Use of the Pulsar Timing Programs


Copying data 
Details of the files that have been copied over from ARTHUR are kept in a file called /psr/data/obsinfo/filessorted. It is imperative that this file is kept up to date, else one will easily get in a mess if files are copied more than once. 

If a new file is to be copied, then ftp to ARTHUR from the /psrdata/timing directory, setting the required directory on arthur, i.e. disk$data:[pulsar.obs.psrdata_1] or disk$data:[pulsar.obs.psrdata_2] for the 42ft data. Remember to type binary. The file extension on the Suns must be .VBIN. therefore the command is for example get 980721_1.bin;1 980721_1.VBIN

When the file has been copied, the utility vms2unix must be run with the parameter being the name of the file (without the .VBIN extension), this will produce a file with a '.BIN' extension. At this point it is worth checking a file called /psr/data/obsinfo/OBSFREQUENCIES.DAT that contains the details of the observing sessions. When that file has been updated then makeobsfreqs must be run in the /psr/soft/prof directory to produce a binary version of that data. 

Sorting timing
data into directories
The preliminary scripts for COBRA data analysis are given at the end of this section.
Run psrprof, set the input file to the file copied over and type sort. This will sort all the pulsar data into its respective directories.  (Data from DDU1, has a suffix _1 and is sorted into directory /psrdata/timing/pulsarname.  Data from DDU2 is suffixed _2, and goes into a subdirectory _2. Data from the Pulsar Synchronous Integrator goes into _3).
When sort is run, a file pulsarlist is created, listing all the sorted pulsars. This list can be used if you wish to process all the new data (see next section).
To update the data in a particular pulsar directory ,  type psrav <pulsar name> This will check whether there are any new .bin files and average them into av.bin files, it will then obtain arrival times and profiles in .tpo and .prf files, then it will convert these into .bat files ready for analysis with psrtime.

Automated analysis for arrival times If data has just been sorted with psrprof, in the directory /psrdata/timing you will have created a file called pulsarlist. Alternatively you can create a file called pulsarlist manually or rename completedlist to pulsarlist.
The command doall will sort the pulsars in the pulsarlist file, removing duplicate entries and run the psrav script on each of them. (An option is also available to specify a date eg doall A3b, which reprocesses a particular file for each pulsar, or doall all which reprocesses ALL the data for all the pulsars in pulsarlist.
In each directory there is a file called auto. If for any reason, analysis should not be carried out on a pulsar then this file should be removed, or exist and contain the word veto. The usual reasons are for new pulsars where a good solution has not yet been obtained. Glitching pulsars may be automatically analysed if an appropriate ephemeris index file is created. On completion the job renames pulsarlist to completedlist. (the script doall2 will remake pulsars in the _2 directories, using the file pulsarlist2 which can be copied from pulsarlist_42ft)

Useful Scripts psrav <1 or 2> pulsarname <filename or all>
produces timing points for the named pulsar in tempo format, and BATS in psrtime format. The only argument required is the pulsarname, in which case the directory with that name will be checked and additions to the data will be analysed. Optionally you can specify whether to analyses DDU1 or DDU2 data (the default is DDU1), you can force the analysis of a particular data file (use the name without the .bin extension, eg A4c) or force the reanalysis of all the data for that pulsar.

doall or doall2
Runs psrav pulsarname on all the names held in file pulsarlist or pulsarlist2

Crab Data
With the faster machines now available, and streamlining of the analysis, it is now practical to process the Crab data in the same way as other pulsars, using psrav.

For reference, here is the original manual method. (Note, we no longer hold the most recent data separately).
First, in the main crab directory, /psrdata/timing/0531+21

  • There is a file called, check this to  ascertain which .bin files will be checked, obviously this will need to be kept up to date.
  • Remove those av.bin files which it will try to remake.
  • In psrprof obey, then exit.
  • Remove psrav.bin.
  • Type crunch. This will concatenate all the av.bin which are listed in datefile into a new file psrav.bin.
  • In psrprof type prune psrav, This will sort the data, and will also remove any duplicate integrations. Exit from psrprof.
  • Check and if necessary edit the file to remake any files for which av.bin files have been remade, or created.
  • Remove any .tpo and .prf files which are to be remade.  Remove psrav.prf and psrav.tpo.
  • Enter psrprof and type obey This will create tpo and  prf files.
  • Type crunchtpo. This will concatenate all the .prf and .tpo  files which are listed in datefile into  new files psrav.prf and  psrav.tpo.
  • In psrtime obey, which will read the tempo file and reduce the data to the barycentre and write the data to the file psrav.bat.
Now change to the 42ft subdirectory by tyuping cd _2. Repeat all the above proceesing for the 42ft data in this directory, in exactly the same way. 

At the moment to save unneccessary computing the data is only analysed from 98/01/01. 

When running psrtime from the main  crab data directory , the command obey psrav.dat  is used (or clicking on the 'load' button in cursor with psrav in the Data box).  This command will load in all the available non-42ft data.  Alternatively the command obey psrall.dat will load all available data from all systems.

Producing published Crab ephemeris Once a month a fit needs to be obtained to the data and the details put into the latex file crab2.tex and also tempo run to get the fit in tempo format. The tempo fit and the latexed version of the ephemeris are then placed in the crab public ftp area.

Note on 
With regard to templates, it was the custom to have various templates, one for each frequency band, called 408temps.bin, 610temps.bin etc. However, this gave rise to the possibility that different templates for one pulsar could have different reference points. The required template was decoded by a file called templates.code, which gave the required template for each frequency band. This system has now been superceded, and all the templates are in a multi-channel file called templates.bin, each channel carrying the templates for the appropriate frequency of observation. It is then possible to obey the command slidech to align the templates dependant on dispersion measure calculations carried out in psrtime.(For most pulsars this operation has been carried out and should not be redone).

  With regard to psrtime and psrprof, descriptions of all commands can be found in the programs either by typing comm for a short description or looking in the help file by typing help.

Sorting COBRA data Cobra data is currently produced as EPN files, with one file per subintegration. The files are labelled as prof_PSRNAME_MJD.SECS_ID.epn where the pulsar is preceded by a B or a J, MJD.SECS is the observation date and time and ID is an MPI number and relates to the the sampler node.

Cobra data is being stored in directories /psrdata/timing/xxxxxxxx/_4 where xxxxxx is the common pulsar name. (This is the same system we use for 42ft data which is in _2 directories). If the directory doesn't exist, create it.

Copy across any new Cobra epn files to this directory.

If this is a strong pulsar and you want a timing point for each subintegration and each sampler node, run the script redo_epn pulsar_name otherwise run redo_epnav pulsar_name to create a single timing point from each set of subintegrations.

These scripts will create any necessary files for processing and links to existing templates etc. They will first load all the epn files into a single bin file (currently cbr_4.bin)
If averaging is required a file cbr_4av.bin is then created.
Next, templates are fitted and a file of sats in tempo format is produced from either cbr_4.bin or cbr_4av.bin. Then the sats are run through psrtime to produce bats in cobra.bat.
Additional options are available with redo_epn and redo_epnav (these scripts are under developemnet so it's worth typing redo_epn or redo_epnav occasionally to see what the current usage is!) Other available options are clean which rebuilds all the configuration files eg psravedit.dat etc. and analyse which skips reading the epn files into a bin file and just performa the reanalysis. In addition redo_epnav can take a parameter which defines the Centre frequncy to which all the data from different nodes will be dedispersed before combining them.
To look at the data run psrtime, cursor, click on LOAD, click on PLOT The redo_epn script has written a file psrav.dat which loads up all the cobra points, MK2/lovell timing points and 42ft points if there are any, and sets the default display limits to the last few months (If you click on PLOT rather than FULL PLOT).

Problems.....limitations etc
there are a few problems still, with creating the new set of files and links in the _4 directory.

Features :-) The script creates a standard psravedit.dat file which is run by psrprof to preprocess the profiles before template matching. (this does things like averaging L & R , creating 2.0 periods of data, and baselining. This only gets created once, so if you want/need to do something different to a pulsar. eg reduce the number of bins, put the mods in here. Remember files are created only once in each directory so any mods made will be permanent (unless you run redo_epn(av) clean!). To return to default settings run redo_epn(av) clean.

If you're working in psrtime in the main pulsar directory and want to load up the Cobra data for comparison, type read bats from _4/cobra.bat at the prompt.

July 26 2004