Use of the Pulsar Timing Programs

PSRPROF COMMANDS

This is a list of most of the commands and the syntax required. For a fuller description type help at the prompt in psrprof or look at /psr/help/psrprof.

 

 
 
 

 

ABCD E FG H I J K LMNOP Q RS T U V W X Y Z

 

Command

Syntax

Description

- - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - -

ALIGN object_array_name, 
reference_array_name
The ALIGN command calculates from the data in channel 1 of the two arrays the amount of shift required to align the two sets of data. All channels of the object_array are then shifted by this amount. If the object_array_name is PA, the data in the IN and AV arrays are assumed to be Stokes' parameters and the PA of the IN array is aligned with that of the AV array.
ALIGNCH data_block, 
channel_to_be_aligned,
reference_channel
The alignch command will align two channels of a given data block **This does not alter the header time**
ANALYSE no_of_pulsars, 
required_number_of_integrations,
<KASPI>
Will search through the input file and produce an output file that contains all commands to analyse that input file to produce arrival times. Sets such quantities as windows, and template file names, using seektime and getgoodtime.
If KASPI, then an arrival time is produced together with an error using the Downs and Reichley algorithm as implemented by Vicky.
APPEND input_array_name,
output_array_name
APPEND takes the input array and appends it to the output data array, where the data blocks are IN,AV,A3 or A4 It is assumed that the bin sizes and number of channels in both blocks are the same.
AVCH array_name 
<channel_A,channel_B>
AVCH averages two channels of the data in the array_name data block, and places the result in channel_B. If the 2 channels have different polarisations, the averaged channel is set to 'i'.If the scale qualifier is added, the channels will be scaled to a dclevel of sqrt(dclevel-chA * dclevel-chB). This option is currently only available for two channel averaging in tstprof. The channels must have non-zero dclevels before this call is made (eg via fitslopes or fitbases). 

 If only channel_A is specified, this is averaged into channel 1.

 If no channels are given, AVCH averages all the channels of each polarisation into sequential channels starting at 1. The polarisation of the resulting channels is preserved and the number of channels reset to the number of pols. (Function assumes all channels of each polarisation are grouped together eg llllrrrr)

 If channel_A is set to -1 then all channels are averaged and the average is placed in the next available channel (pol set to 'i'). The number of channels is incremented by 1.

 If channel_A is set to -2 then all channels of the same frequency are averaged and the average is placed in first (lowest) channel of each set.

 The number of channels is reset according to to number of frequency sets and the pol changed to i.

 A check is made that the channels specified are contained in the data.

 Examples:

  • AVCH IN 2 1 averages channel 2 and 1 in IN array, result in 1 
  • AVCH IN 3 averages channel 3 and 1 in IN array, result in 1 
  • AVCH IN avs all chans by pol in IN array eg llrr --> lr 
  • AVCH IN -1 avs all chans result in nch+1 
  • AVCH IN -2 avs all chans by freq in IN array eg llllrrrr --> iiii
  • AVCH IN 2 1 SCALE scale channels before averaging 2 and 1, result in 1
AVERAGE shift AVERAGE averages the data in the IN array with the data in the AV array, for each channel of data, first applying a shift of "shift" bins to the data in the IN array. The averaging is weighted by the relative number of pulses in each channel of IN and AV.
BACKSPACE input_channel Backspace either IN1FILE or IN2FILE Note: this command will crash psrprof on Unix systems (VMS worked OK!)
CGATES input_channel Displays the data in the given data_block, and then the cursor is enabled in order to set any required gates.
CHANGETBIN data_block,
new_value_of_TBIN
CHANGETBIN reforms the data in the specified data block, so that it has the new_value_of_TBIN. If the specified data block is A3, a template is assumed, and so the UTS is altered in the opposite sense to data. if the new tbin has a negative value, then its absolute value is the number of bins to be placed across the period
CLEAN no of iterations -
CLEAR data_block Clears the specified data_block, and resets to zero all values in the header.
CLOSE data_stream Closes any file connected to the specified data stream, where this may be IN1FILE, IN2FILE, OUT1FILE, OUT2FILE or MONFILE.
CONDENSE data_block, group Condenses the given data_block by the factor group.
COPY inout COPY inout with no additional parameters, copies the data between the four arrays IN,AV,A3 and A4. inout specifies the two arrays. All combinations are allowed including copying to the same block.

 If ch1 and optionally ch2 are given, COPY copies ch1 in IN array to ch2 in the OUT array. (Omitting ch2 will give a copy of ch1 from IN to OUT). See also COPYCH for copying channels within an array

 Examples:

  • COPY INAV copies IN array to AV array 
  • COPY INAV 1 copies IN array channel 1 to AV array channel 1 
  • COPY INAV 1 2 copies IN array channel 1 to AV array channel 2
COPYCH data_block,
channel_A,channel_B
A Command that allows the copying of data from channel_A to channel_B in the specified data_block. See also COPY for copying between blocks.

 Example:

  • COPYCH IN 1 2 copies IN array channel 1 to channel 2
CORRECT data_block <NOAUTO> CORRECT can be used to correct the arrival time of data in the given data_block.

 The default behaviour of psrprof is to use the pulsar parameters given in an ephemeris file to correct the pulse arrival time. The ephemeris file to be used at any given MJD is found in a lookup file called ephindex.dat which has the following form:
 
 

! ephindex.dat file: Contains the name of an .eph 
! file, and the end date (mjd) for that file to be 
! applied. (Any text after the MJD will be ignored).
! END statement is optional, comment lines start 
! with a !
! An MJD of -1. means 'until the last syllabub
! of recorded time'
psrav 50934. 98/05/01
psr99 51452. 99/10/01
psrA0 51740. 00/07/15
psrA0b 51805. 00/09/18
psrA0c -1.
END
If ephindex.dat is not found, psrav.eph will be used. If psrav.eph is not found or if the NOAUTO option is specified, the parameters that have been preloaded with correct.dat or setvar commands will be used.

 

CORRECT WAVES <NOAUTO> Corrects data from wave parameters. If a file 'fitwaves.par' exists and the parameters are zero, then attempts to open the parameter file and read values from it. Calculates the sum of all the waves at the given date(in days) and returns the value wcorr(in msec). 
CWINDOW data_block CWINDOW can be used to window the given data_block. The specified data_block is displayed and on setting gate #1, the data is windowed using gate #1 and then displayed. The action of windowing will delete all the data before the start of, and after the end of, the window.
CHANGEDATA data_block, action CHANGEDATA can be used to edit the data in the specified data_block interactively. First of all the data is displayed.
 
 
  • C To change a single data point. Position the cursor over the point to be changed and vertically at the required new value. The option 'C' is now entered, followed by the channel number. A dashed line is then drawn between the old and new values. 
  • I To interpolate between two data points. Position the cursor over the first point and vertically at the required level and enter the option 'I'.Place the cursor over the second point and enter the channel number. A dotted line will then be drawn showing the new data. 
  • R To restore the last data point that has been changed. Will fault if no point has been restored, but after having restored a point, will not restore until a further point has been changed. 
  • Z Similar operation as I but the data in the selected region is set to zero 
  • D To display the latest data i.e after some operation without quitting. 
  • Q This is the clean way to exit.
The operation is ended by entering RETURN or a character not used as an option or Q. The screen will then be cleared and the changed data re-displayed.
DEDISPERSE data_block,ref_channel Shifts all the data channels in the specified data_block relative to ref_channel according to the dispersion measure and FOBS for each channel. If ref_channel = 0 then the data are shifted relative to infinite frequency. If ref_channel = -1 then the data are shifted relative to the centre freq. If ref channel is < -1, the ref channel will be read as an integer frequency and the data dispersed to this value (abs). You may also need to use setvar in dduf xxxx to change the header value. If no ref_channel is specified, ref_channel = 1 is assumed.
DELETECH data_block 
from start_channel 
to finish_channel
Deletes the specified channels from the given data block
DISPLAY option Option may take the form IN, AV, A3, A4, POL, GREY, BLOB or QUICK Displays the data in the block specified by option or the IN array in polarisation form. If the option is GREY,BLOB or QUICK then will produce a greyplot of the required data. Note is taken of the captions switch IGRCLUTTER in producing scales and captions.
DISPLAY POL
<long_range,
<paoffset, <channel>>>
Displays the data in polarisation form. <long_range> specifies the range of longitude in degrees to be displayed, <paoffset> is a DC offset in degrees added to the position angle data before plotting, and <channel> specifies the channel holding the I data. This will usually be 1 or occasionally 5 if two frequencies have been recorded.
DISPLAY BLOB 
<PH>, <DUP, <number>>
Displays the current data in the IN block in a blob format, where the size of the blob is determined by the amplitude of the data. If PH is specified then the plot is against phase. If DUP is added then will duplicate the data by the given number where the default is 2.
DISPLAY GREY
<PH>, <DUP, <number>>
Displays the current data in the IN block in a grey format. If PH is specified then the plot is against phase. If DUP is added then will duplicate the data by the given number where the default is 2.
DISPLAY QUICK 
<PH>, <DUP, <number>>
Displays the current data in the IN block in a blob format, where the character plotted is determined by the amplitude of the data. If PH is specified then the plot is against phase. If DUP is added then will duplicate the data by the given number where the default is 2.
DO <UNTIL end_time>,
<no_of_times>,
set of commands
Performs multiple operation of the given set of commands. If no <no_of_times> or <end_time> is given, then the loop will be infinite and the operation will only cease at the end of an input data file.
DUP data_block,<number> Duplicates the given data block the given number of times. If no number is given then 2 is assumed, else if too great for available storage then the number is reduced. **NOTE** This duplicates in multiples of NBIN not Period
EDIT command A number of commands are provided in order to edit each data block as it is read. The editing of data is only carried out on the input file connected to input channel #1.
EDIT SET This option enters the SETEDIT mode, where commands can be entered to be obeyed whenever a new block of data is read in. This mode is left by typing EDIT END
EDIT ADD This option enters the SETEDIT mode, but any commands entered here will be added to the end of the existing list of edit commands.
EDIT CLEAR Will clear all edits from the edit command list
EDIT SHOW Will show the list of the current edit comands
EDIT END Is used to exit from the SETEDIT mode.
EDIT OBEY This command will carry out the list of commands held in the edit list on the current block of data.
EDIT INSERT This command will insert a new command(s) prior to the stated command number(as shown in EDIT SHOW). The list of edits is then expanded.
EDIT DELETE This command will delete the specified command. The list of edits is then compacted.
EXTRACT pulsar_name This command will search through the current input data file for the given pulsar and will write each record to the current output file. 
EXTRACT trigger xxx This command will search through the current input data file and write to the output file, any integration where the max level is xxx greater than the dclevel (you need to use setbases, fitbases in first). Developed for picking out possible giant pulses from single pulse data. Default trigger level is 100
EXTRACT cludge Maintenance option (don't use!). Currently this option will rewrite header times. Who knows what it will do in future!
FFT data_block <option> Carries out a FFT on the selected data block. WARNING -- the number of bins must first be set to power of 2, i.e. 256 or 512 (use changetbin (data_block) -512)
Options available are SUM, DIV and INV
  • fft data_block_a sum data_block_b

  • This will carry out an fft on data_block_a and add it to an fft that has previously been formed in data_block_b. The result is left in data_block_b
  • fft data_block_a div data_block_b

  • This will carry out an fft on data_block_a and then divide it by the fft that has previously been formed in data_block_b. The result is left in data_block_a.
  • fft data_block inv <opt>

  • This will carry out the inverse fft operation, multiplying the fft in data_block by a gausssian of width opt, where opt is the fraction of the datablock width. The result is left in data_block_a when finished.
    The fourier transform is held with the amplitudes in channel 1 and the phases in channel 2.
     
FINDTEMP <option> Searches through the templates.code file to find which template file to connect to IN2FILE, or which channel of TEMPLATES.BIN to get. This depends upon the frequency of the observations and either the data in the given block, or the given pulsar if the option is PSR and then looks for a data block for the same Pulsar as is given in the data in the specified data block.

Frequency ranges are:-
< 500MHz uses 408temps.bin or channel 1 of templates.bin
>= 500MHz AND < 750MHz 610temps.bin or channel 2 of templates.bin
>= 750MHz AND < 1100MHz 910temps.bin or channel 3 of templates.bin
>= 1100MHz AND < 1500MHz 1420temps.bin or channel 4 of templates.bin
>= 1500MHz 1600temps.bin or channel 5 of templates.bin

Checks whether the data looks like template data, and faults if the Header time is not less than one day. The template in A3 is then automatically operated on by CHANGETBIN using the value of TBIN found in the specified data block. (This command does not alter the value of INCHAN)
Specials..... pulsars 0531+21, 0329+54, 1828-10 and 0538+2817 are hard coded to use either a calculated template (0531+21) or a combination of 2 templates in tempa.bin and tempb.bin. To use a template combination for these pulsars the file templates.bin should not be found, and the templates.code file should read eg: (formatting must be exact).

  0538+2817 00000 M
FILLGAP Takes the input file assumed at the moment to contain integrations once per day, and adds a line of zero data for any missing days and writes it out to the outfile.
FITBASES data_block Fits baselines to the data in the specified data_block, using the regions of the data as defined by the gates numbered 2,3 and 4. (Gate number 1 is used to define the pulse gate and is excluded).
FITSLOPES data_block <base> Fits sloping baselines to the data in the specified data_block, by carrying out a straight-line fit to the top smallest <base> (default=0.8) fraction of the data in channel 1. The fit to the same data points in any other channels is also performed. If less than 10 bins are available for the baseline, then only a baseline is subtracted, not a slope. This is particularly valuable in cases where the receiver power level is changing with time, for instance at low elevation where the amount of ground noise power is varying.
FITGAUSS data_block <FITPARS> Fits a gaussian profile to the data in the specified data block, for the height, width between half-amplitude points (in ms), the position with respect to the start of the first bin (in ms) and the baseline level. These are stored internally in the COMMON PROFWRK as FHEIGHT, FWIDTH, FPOSN and FBASE, repectively, together with their associated errors. <FITPARS> may be used to determine which parameters are fitted. If FITPARS takes the value abcde A B C D E, where a,b,c,d,e = 1 for fitting and 0 for no fitting for the 5 parameters with starting values (if constant) as follows:
    A,a - amplitude
    B,b - width
    C,c - position
    D,d - baseline
    E,e - slope
The default value is 11110. i.e. fit for all but slope.
Use WRITE LINE WIDTH to output the height and width. *****N.B. At present, the fitted function is a Lorentzian.***** 
FITSCAT data_block Fits a decaying exponential waveform to the data in the specified data_block.
FIXDCLEVEL data_bloc Will fix up bad DCLON,OFF due to faulty AVERAGE weights. If data_block is BIN1, then the first bin is replaced by the mean of the first and the last in every channel in the IN array.
FOLD data_block,<period> Folds the data in the data_block with the given period, and then windows the data_block with the new Period. If no period is given, the period is calculated from the header.
GETARRTIME <FREQ> Using a template expected to be already in A3, calculates an arrival time and error from the data in Channel 1 of the IN data block. This command uses data block A4 !!!

 If GETARRTIME alone is used, the template is convolved with the data block and an arrival time found by interpolation around the peak of the convolution.

 If GETARRTIME FREQ is used, the data is convolved with the template in the frequency domain

GETDM data_block,
channel_A,
channel_B
Calculates the DM for a pulsar from data in 2 channels of the given data_block using the values of FOBS given for those 2 channels. The first two period ambiguities are also given.
GETFLUX <data_block> For the given data_block (default is IN), calculates the Mean Flux, Peak Flux, Equivalent Pulse width, 50% level Pulse width and 10% level Pulse width. This is calculated for all available channels.
GET_TFLUX conv Loads a template into A3 and normalises it so that convolution with the observed data gives the Flux FITAMP. The data should be single channel, and calibrated in Jy with a call to GETPOL Use write line fitamp to show/save result. (27/2/2002)
GET_TFLUX centre Loads a template into A3 and normalises it. Assumes that the data is single channel, and calibrated (see above) and that the pulse is centred with correct. (11/10/2004) Use write line fitamp to show/save result.
GETGOODTIME <noslope>,
number,span,limit
Produces one good arrival time from the best fit to a number of arrival times produced by GETARRTIME.
This command requires three parameters to be supplied.
  1. The number of arrival times to be used,(MAX=100) 
  2. The span of the printout, and 
  3. The limit for rejecting 'bad' points.
If the span and limit are given as integers then it assumed that the units are bins, else if real quantities are given, then the units are a fraction of a period.
If the span is zero or negative, the available data is spread across the page.
If the limit is set to 0, then a fit is not performed, but individual points can be deleted as required.
If the optional parameter <noslope> is given then a fit is performed with the slope set to zero.
This command uses data block A4 !! 
GETPA  <weights> <ngrouped> Determines the mean position angle of the Stokes parameters of the data in the IN array. All points with I greater than 3 sigma are included, either with equal weight (weights=NOWEIGHTS) or with weights proportional to the magnitude of the linear polarisation, P (weights=WEIGHTS, default). Points may be optionally grouped NGROUPED points at a time before processing. 
GETPOL Converts the IN array into Stokes parameters, using the data in the file OBSINFODIR:syscal.dat for the calibration quantities.
4 Channel data may be in the form 'ilqu' (in which case JYCNT in syscal.dat should be positive) or 'lrqu' or 'rlqu'(JYCNT given as negative value - ABS used in calculations :-)
For 2 channel data, the CAL is used for flux and "position angle" calibration (DCLON and DCLOFF should be available)
Channels are returned as 'IVQU'
This command sets a staus value in hdr.flags(2).
  • 0= OK
  • 1=no poln data in syscal.dat
  • 2 = freq. inconsistency 
  • -1 = Jycnt used instead of JYSCAL
  •  -2 = unexpected poln. id.
See also WRITE ASCPOL
GETROT Determines the PA rotation between the Stokes parameters of the data in the IN array relative to that in the AV array. The data should first be ALIGNed before performing this operation.
GETTEMP <data_block> Searches through the file connected to IN2FILE, looking for a data block for the same Pulsar as is given in the data in the specified data block. Checks whether the data looks like template data, and faults if the Header time is not less than one day. The template in A3 is then automatically operated on by CHANGETBIN using the value of TBIN found in the specified data block. (This command does not alter the value of INCHAN) 
GRAPHICS Allows the setting of various parameters concerned with plotting, in general the parameters are as defined by PGPLOT
GRAPHICS SET GRDEVICE  The graphics device is set by default to the value of the environment variable PGPLOT_DEV (default /xwin). The graphics device can be set to any of the standard output devices, but if a customised output is required then SET GRDEV ? will wait for a prompt both for whether you require a customised output, and to input the required output device. /ps and /vps are probably the most useful devices
GRAPHICS SET IGRCLUTTER Switch for titles and scales on display.
If  IGRCLUTTER =0  then only draw box
else if  IGRCLUTTER =1 draw box and labels
IGRCLUTTER =2 titles
GRAPHICS SET HARDDEV  Sets the hard copy device
GRAPHICS SET LIN_WID Sets the line width 
GRAPHICS SET LIN_STY Sets the line style 
GRAPHICS SET FONT  Sets the font
GRAPHICS SET CHR_HT  Sets the character height
GRAPHICS SET PG_ASK  switches automatic new page.
GRAPHICS SET XPIC Sets the number of plots in the X direction
GRAPHICS SET YPIC  Sets the number of plots in the Y direction
INTEGRATE nblocks, <time_gap>, 
<option>
Performs an integration of a specified number of input blocks, the result being left in the AV array. The AV array is not cleared at the start of INTEGRATE. The user must do this if required. The integrating will cease if the time difference between two successive data blocks is greater than time_gap(hours).(default is half an hour) The options available are DRIFT, ALIGN, FOLD or BINARY.
INTEGRATE nblocks,<time_gap>, DRIFT,
delayrate, <date_time>
Integrates nblocks of data using the given delayrate in microsecs per minute. The epoch for calculating the accumulated delay is given by <date_time> in seconds, if no epoch is given then uses the current time.
INTEGRATE nblocks, <time_gap>, ALIGN Integrates nblocks of IN data into the AV array. For each block read in the data is aligned with the data already in AV. If AV is empty then the first block is copied directly into AV.
INTEGRATE nblocks, <time_gap>,
FOLD period, date_time
Integrates nblocks of data after the data has been folded with the given period.
INTEGRATE nblocks, <time_gap>,
BINARY nphases
Integrates nblocks of data into the AV array, putting the data from channel 1 of the IN array into one of nphases channels in the AV array as determined by the mean anomaly: (ich=nint(nphases*ma/360.0)).
LIMIT data_block, value Limits the data in the given block to the value given. 
MAKETEMP option Produces a template in A3. If the option is a data_block, then the current data in the specified data_block is displayed together with the cursor allowing gate #1 to be set. The data is then windowed by this gate and copied to the A3 array to be used as a template for pulse arrival time determinations.
*** 5-MAY-1992 ***. The gate operations are no longer carried out, all the data is used.

 Other options in place of the name of a data block are:-

  • 1828-10
  • 0329+54
  • 0538+2817
  • 0531+21 or CRAB
In these cases a template is calculated from data in the IN block.

 CRABTEMP type
CRABTEMP uses the parameters from the IN array and forms a template for the Crab pulsar in the A3 array. The command is followed by 1 or 2 to determine whether the main pulse or interpulse is first.

MON  quantity The MON command is used to monitor current data. The following commands are available.
  • MON <datablock> <ASCII>

  • If the quantity is a data block then the following options are available:- 
    • MON <datablock> shows a full mon 
    • MON <datablock> hdr only shows the header information 
    • MON <datablock> ch only shows the channel information 
    • MON <datablock> ch <channel no> shows the data in the required channel. 
MON GREY <no_blocks>,
<option>,
<'RANGE', min_value,max_value>>
Produces a printgrey of the input data. At the start of each new pulsar a header will be printed. The option can be set to 'FULL' or 'SHORT' to indicate the type of header produced or 'NOBREAK' which suppresses the printing of headers. If the number of blocks is not given, the printgrey will continue to the end of the current pulsar. Otherwise it will continue for <no_blocks> integrations. If the option RANGE is given then expects the minimum and maximum values for the scale to be given. The no_blocks can alternatively be given after the RANGE parameters. 
MON GREYCHANS 
<'RANGE', 
min_value,max_value>>
Prints a grey plot of the current data in IN, with each channel on a new line. Scaling is determined by the optional RANGE parameters. If min_value and max_value are both zero or not given, scaling will be automatic, channel-by-channel. If non-zero and equal, global scaling is carried out over all the channels. Otherwise the values given define the range spanned by the grey-scale. 
MON POLPARS Show the current polarisation parameters.
MON POLCAL Show the polarisation CAL quantities for the IN array
MON POLDATA Show the mean polarisation data for the IN array
NORMTEMP Normalises the data in A3. 
OPTSCAN  <data_block> <max_slope> Searches the data in the given block of data for periodicity, the data being arranged as NCH of sub-integrations.
Use READ IN N to fill the A4 array, and then OPTSCAN A4. It is advisable perform a SETBASES 0.5 FITBASES IN as an edit. The range of period searched can be controlled by max_slope which specifies +/- the maximum slope searched in bins/sub-integration. The resultant waveform is stored in AV to be viewed.
PLOT  GREY See DISPLAY GREY 
PRINT <option> The PRINT command is used to send data to the current output file, or to enquire on the status of the ouput file. The following commands are related to data sent to the output file.
PRINT GREY <no_blocks>,
<option>, <RANGE, 
min_value, max_value>
Produces a printgrey of the input data stream. At the start of each new pulsar a header will be printed. The option can be set to 'FULL' or 'SHORT' to indicate the type of header produced or 'NOBREAK' which suppresses the printing of headers. If the number of blocks is not given, the printgrey will continue to the end of the current pulsar. Otherwise it will continue for <no_blocks> integrations. If the option RANGE is given then expects the minimum and maximum values for the scale to be given. The no_blocks can alternatively be given after the RANGE parameters.
PRINT GREYCHANS 
<RANGE,
min_value, max_value>
Prints a grey plot of the current data in IN, with each channel on a new line. Scaling is determined by the optional RANGE parameters. If min_value and max_value are both zero or not given, scaling will be automatic, channel-by-channel. If non-zero and equal, global scaling is carried out over all the channels. Otherwise the values given define the range spanned by the grey-scale.
PRINT LINE option The default data_block is IN and the default chan is 1. The default data_block can be changed (data_block1) or over-ridden in individual options. The current options are shown below.
PRINT LINE IDENT The pulsar ident string is written i.e. 88/07/25 03:21:47 0531+21 42FT 610.000
PRINT LINE CLOCKS The five clocks are written from the header Computer,Rubidium,MSF,Loran and the clock difference (Update this!)
PRINT LINE FITTIME Prints out the time derived from the last call to GETGOODTIME.
PRINT LINE FITERR Prints out the fit error from the last call to GETGOODTIME.
PRINT LINE CORTIME Prints out the corrected time from the last call to GETGOODTIME.
PRINT LINE SAT Writes the word 'SAT'
PRINT LINE PSRNAME Writes the Pulsar name
PRINT LINE TEL Writes the telescope name
PRINT LINE FOBS If FOBS has been set then writes FOBS else will write DDUFREQ
PRINT LINE IDDU Writes the DDU number
PRINT LINE CHAN Writes '1'
PRINT LINE PULSEAMP Returns the amplitude of the pulse in the optionally specified channel as defined by pulse gate #1 scaled over the whole pulse period, and multiplied by 1000. If no channel is specified, 1 is assumed. If -1 is given for the channel then all channels are written.
PRINT LINE DCLEVEL
PRINT LINE GATEAMP 
data_block, gate_no,
<channel>
Returns the amplitude of the pulse in the optionally specified channel as defined by pulse gate_no scaled over the whole pulse period, and multiplied by 1000. If no channel is specified, 1 is assumed. If -1 is given for the channel then all channels are written.
PRINT LINE NEWLINE Forces a newline in the output.
PRINT LINE DATA
PRINT LINE FLUX 
<data_block>,<channel>
Writes out the Flux parameters for the given data_block and channel. A previous call to GETFLUX must have been made. The items are as follows:
Mean flux(mJy) Peak flux(mJy) Weq(ms) W50(ms) W10(ms) Flag
The values taken by Flag are described in GETPOL
Defaults are data_block IN and channel 1, if -1 is specified, then all the channels are given and only the cal status, and mean flux for each channel is printed. 
PRINT LINE MA Write the mean anomaly.
PRINT LINE NBIN Writes the number of bins.
PRINT LINE FITAMP
<Beam width in arc-mins>
Writes the amplitude of the the fit from a getarrtime.
If a Beam width is given, then the difference in RA/DEC between observation and current ephemeris (if a correct has been done) is used to estimate flux at the corrected position. (20/02/2002)
PRINT LINE DCLOFF
PRINT LINE AZEL Writes the value of the Actual Azimuth and Elevation.
PRINT LINE DDUF
PRINT LINE DDUDF
PRINT LINE SCINTAMP
<data_block>
Writes the integrated flux within gate 1 and the integrated flux for a nominal gate 120 degrees away in longitude for each of the data channels in the specified block.
PRINT LINE STRING
PRINT LINE SUMMARY
PRINT LINE POL
PRINT LINE WIDTH Writes the width and error (in ms) and amplitude and error of the last fitted gaussian (using FITGAUSS).
PRINT LINE TBIN
PRINT LINE TEMPO prints the site arrival time obtained from either GETGOODTIME or GETARRTIME in a format suitable for TEMPO or PSRTIME (read tempo from). If this is the first record written, then it is prefixed with the standard tempo header.
PRINT LINE MJD
PRINT LINE TRES
PRINT LINE RADEC Writes the demanded RA/DEC (1950). This will be either the RA/DEC used for the observation OR if a correct command has been used, the ephemeris RA/DEC 
PRINT LINE OBSRADEC Writes the actual RA/DEC (1950) used for the observation.
PRINT LINE RADEC2000 Writes the demanded RA/DEC (2000). This will be either the RA/DEC used for the observation OR if a correct command has been used, the ephemeris RA/DEC 
PRINT LINE OBSRADEC2000 Writes the actual RA/DEC (2000) used for the observation.
PRINT LINE POSDIFF Writes the difference between Observes RA/DEC and Corrected RA/DEC in arc mins.
PRINT LINE CALLEVEL
PRINT LINE SIGMA
PRINT LINE DCLON
PRINT LINE TSKY
PRINT LINE FITWIDTH
PRINT LINE NP
PRINT LINE TOBS Writes integration time in secs (calculated from NP * PB)
PRINT LINE SHORTMON
PRINT LINE UTS
PRINT LINE PARANGLE
PRINT LINE CPOL The character representation of the Pols. of all the chans. eg llrr
PRUNE  file_name 
(without the .bin extension)
Prune reads in a file, then sorts into time sequence, leaving it in a file called new.bin, and then write the file out to the original name, but deleting any records that have identical times (uts).

READ data_block,
<epn,mel,bak,xray,sigproc>
<no_of_blocks>,
<mins>,
<timegap>
Reads data into the specified data_block (IN,AV A3 or A4) from the selected INPUT file, automatically selecting the correct data format.
  • Default file type is binary (or use bin qualifier) the exact flavour is found from header information.
  • epn, sigproc and mel files are recognised by the file extension or qualifier. These file types may contain multiple profiles with multiple channels. (except sigproc which is currently single channel)
  • xray/asc/bak files are recognised ONLY by the qualifier. The code for these qualifiers probably hasn't been used in anger for many years, expects specific datafile formats and doesn't look too fault tolerant!)
Note: If the data_block selected is not IN, the data is first read into IN and then copied to the required data block. If an optional no_of_blocks is given, then reads that number of blocks, putting each block in a successive channel of the A4 block, and setting the number of channels appropriately. This reading will automatically cease when either TBIN or NBIN changes or when the end of one data block differs from the start of the next by more than <timegap> minutes(default=30). If the option 'mins' is added then the number of blocks is taken as a time interval in minutes over which to read the data.
! NOTE: The result of the multiple read is left in data block A4, ! ! and the next data block will have been read in. 
! If the parameter SELPSR is set, then only those blocks in which the given characters of SELPSR are coincident with the same number of characters in the pulsar name are returned.

REJECT data_block command1 command2 ... compares subintegrations stored in a PSRPROF block to see if one (or more) is dominated by interference. Any bad subintegrations are deleted. This routine should be after a `read in 500' and before 'avch a4'.
Version: 1.0, 01/10/01
Author: G. Hobbs (01/10/2001)
Example: reject a4 rms 2 ignore 0.1 periods verbose save
Usage:  data_block =IN, AV, A3, A4 (the block containing the subintegrations), and command can be:
  • verbose - print debug information
  • rms <threshold> [ignore <val> [periods]]

  • Calculates the rms of each subintegration. If ignore is specified then val seconds (or periods if stated) around the central bin are not included in the calculation of the rms (should be used for scintillating pulsars). Any subintegration with an rms greater than the smallest rms multiplied by the threshold is deleted
    e.g. testreject a4 rms 3 ignore 0.1 periods verbose
  • slope.

  • Applies fitslopes to the data before any other analysis
    e.g. testreject a4 slope rms 10 verbose
  • zap <val> 

  • Runs zap to remove a sinusoid of period val seconds (default = 0.02) from the data before any other analysis is carried out.
  • save. Writes any deleted subintegrations to intreject.dat
REWIND input_channel Rewinds either IN1FILE or IN2FILE to its beginning.
ROTATE  data_block Rotates the PA of an array by a specified amount 
SCALE data_block,<option>,factor Scales the specified data_block by the given factor. The options are 
  • CAL:

  • If the option CAL is present, the data are scaled by the factor factor/(DCLON-DCLOFF), so that the factor is treated as being the flux density of the calibration signal. 
  • NORM:

  • If the option NORM is present, the data are scaled by the factor factor/DCLEV.
SCATTER data_block,interval SCATTER performs an exponential scatter on the data in the given data block with a time constant of interval bins.
SEARCH <data_block> Searches the data in the given block of data, arranged as NCH of sub-integrations for any periodicity.
Use READ BLOCKS N to fill the array. 
SEEK option The options available are:-
  • BLOCK <block_number>
  • TIME <date_time>
  • PSR <pulsar_name>
  • NEWPSR <> 
SELECTFREQ from 
<lower freq> to <
upper freq>
Sets the two parameters, sellofreq and selhifreq, such that only data with observing frequencies between these limits will be read in. 
SETBASES <baselength> Sets gates #2 and #3 to cover the first and last NBIN*<baselength> bins of the IN array and the pulse gate (#1) to cover the whole of the data. If <baselength> is not given, a value of 0.1 is assumed. 
SETFOBS  data_block,channel,
new_value
Permits the changing or setting of FOBS for individual channels of the data. Requires
  1. The required data_block (i.e.IN,AV,A3,A4) 
  2. The required channel 
  3. The new_value for FOBS for that channel
If FOBS for channel 1 is given instead of a channel number, then 
  1. The required data_block 
  2. The frequency of channel 1 
  3. The frequency difference between channels.
If the freq diff is omitted then applies fobs to all channels.
SETGATE  gate_no,
gate_start,gate_length,
<BINS>
Permits the setting of the gate_start and gate_length a specified gate_no. gate_start and gate_length are both specified in seconds. If gate_length is set negative, the actual length of the gate is set to the period for the IN data block. If the option BINS is added then the start gate and length are required in bins not seconds. 
SETVAR  data_block,name,new_value Permits the changing of a quantity in a data header. Requires
  1. The required data_block (i.e. IN,AV,A3) 
  2. The name of the quantity to be changed 

  3. The quantities that can be changed are:- 
    Pulsar parameters:- RA, DEC, EPOCH, PERIOD, PDOT, PDDOT, UTS, DUTS 
    Binary parameters:- EPBIN, PBIN, ASINI, OMEGA, OMEGDOT, ECCBIN 
    Observing values :- NCH, NBIN, ITELNO, DDUCHANS, DDUF, TBIN, DELAY NP, DM, CLOCK1, DDUDF 
    Sundry items :- COMMENT, PSRNAME, JPSRNAM, POL,
    JFLAG
  4. and 3) The new_value(s). 
In the case of POL, the first channel no and the no of channels are followed by the polarisation identifiers. e.g. 
  • SETVAR IN NCH 1 
  • SETVAR IN POL 1 4 i l q u 
SLIDECH data_block, channel_no,
shift in millisecs.
Slide the data in a given channel of a data block by the given amount.If the shift is positive then it moves the data to the right. **The header time is not changed by this operation**
SMOOTH data_block,nbins Smooths the data in the specified data_block over nbin bins. 
SORT filename Sort will read in a given data file and each block of data will be appended to the appropriate datefile in the corresponding pulsar directory. If the data file is of the form 951101_2.bin, then the data will be added to files of the form 95c_2.bin, otherwise theyare appended to files of the form 95c.bin 
SPILT data file 
(without the .bin extension)
Split will read a data file and all data from the 42ft telescope will be written to an appropriate file date file_2.bin' and other data will be written to date file.bin
SUMMARISE option Produces a summary of an input file, giving:- Time, Pulsar name, Telescope name, Observing freq., number of channels and number of bins. There are 2 options:-
  • PULSARS - the first block of a new pulsar is summarised 
  • BLOCKS - every block is summarised. 
SWAP inout Swaps the data from one array with that in another, where the allowable arrays are IN,AV,A3 and A4. <inout> can use any of these arrays, including swapping with itself.
SWAPCH data_block,
channel_A,channel_B
A Command that allows the swapping of two channels of data in the specified data_block.
WINDOW <data_block,
<<centre>,window_offset,
< unit>>,window_length>
Windows the data in the <data_block> centred on a distance < Examples of some possible sensible calls are therefore:
  • WINDOW data_block PULSE window_offset window_length
  • WINDOW data_block START window_offset
  • WINDOW data_block PULSE
  • WINDOW data_block window_offset window_length
  • WINDOW data_block window_offset
  • WINDOW data_block ZERO this sets to zero all data outside gate number 1
WRITE option There are different types of WRITE. The first, when the option is IN, AV A3 or A4 will write the current data in the specified block to a file in binary, ascii, epn or sigproc formats, depending on the extension being .bin or .prf or .asc (or .epn) or .sigproc
WRITE ASCPOL Writes the current Stokes Parameters to the given ouput file, in a format that can be read by Psrprofile.
WRITE TOAPRF Writes the input data block in a format suitable to be read in by PSRTIME as a profile for display.
WRITE PONGO Writes a profile in a form easily read by pongo.
WRITE COMMAND writes a line to the current output file, that will be suitable as an obey line for reading into psrprof
  • WRITE COMMAND SEEK Write a seek command for the current pulsar
  • WRITE COMMAND GATES <B|S> gatenumber Write out a SETGATES command for the currently set gates. If an optional gatenumber is supplied then only that gate is written out. The B option writes the line out in terms of bins, and the S option in terms of time. If the argument is negative then gates 1 to ABS(argument) are written out.
  • WRITE COMMAND EDITS Write out the current edits to the file, in a form suitable to OBEY
  • WRITE COMMAND FILE writes a SET INIFILE
WRITE LINE [data_block1] 
option [data_block] [chan]
another_option ...
The default data_block is IN and the default chan is 1. The default data_block can be changed (data_block1) or over-ridden in individual options. The current options are shown below.
(See PRINT LINE for details).

IDENT, CLOCKS, FITTIME, FITERR, CORRTIME, SAT, PSRNAME, TEL, FOBS ,IDDU, CHAN, PULSEAMP, DCLEVEL, GATEAMP, NEWLINE, DATA, FLUX ,MA ,NBIN ,FITAMP, DCLOFF, AZEL, DDUF, DDUDF, SCINTAMP, STRING, SUMMARY, POL, WIDTH, TBIN, TEMPO, MJD, TRES, RADEC, OBSRADEC, RADEC2000, OBSRADEC2000, CALLEVEL, SIGMA, DCLON, TSKY, FITWIDTH, NP, SHORTMON, UTS, PARANGLE, POSDIFF, TOBS, MJDM, PARS

ZAPPERIOD data_block,period Analyses the required data_block (IN,AV,A3) to find the amplitude and phase of a sinewave of the given period in secs. A sine-wave with this amplitude and phase and period is then removed from the data. (More than one attempt may be neccessary). It is important that a FITBASES has been performed before this operation, else end-effects will affect the amplitude and phase of the sine-wave removed.
May 2, 2001
JBO
TOP
Psrprof
Psrprof Parameters
Psrtime
Pulsar 
Home
caj