Timing Observations of a Known Pulsar#

When to Use This Quick Guide

This quick guide can be used to observe known pulsars with well-measured dispersion measures (DMs) and pulsar timing solutions (e.g. as made using TEMPO). The most common use-case is pulsar timing observations. It should not be used to observe fast radio bursts (FRBs), to search for pulsars, to observe pulsars without well-determined DMs and timing solutions, or when one needs to observe single pulses.

This observing setup makes use of coherent dedispersion. Coherent dedispersion is a technique for completely removing the intrachannel dispersive delay in real time, before data are written to disk. Coherent dedispersion will improve scientific data quality and should be used whenever the DM of a pulsar is known.

Overview#

First, we will define some example configurations. We take advantage of the fact that configuration parameters are specified as strings that can be broken up into different groups and combined when a Configure() command is issued. This allows us to reduce redundant parameter specifications and the opportunities for errors.

Next, we provide a complete example of a simple observing script as well as some tips, tricks, and use of advanced scripting features.

Example Configurations#

Configuration Keywords Common to All Pulsar Modes#

The following configuration string is common to all pulsar modes.

 1config_common = """
 2obstype     = 'Pulsar'
 3backend     = 'VEGAS'
 4deltafreq   = 0.0
 5swtype      = 'none'
 6swper       = 0.04
 7swfreq      = 0
 8vdef        = 'Radio'
 9vframe      = 'topo'
10vlow        = 0.0
11vhigh       = 0.0
12"""

Receiver-Specific Configuration Keywords#

The following configuration keywords are receiver-specific. In this example, we will use the L-Band receiver.

1config_LBand = """
2receiver            = 'Rcvr1_2'
3pol                 = 'Linear'
4notchfilter         = 'In'
5nwin                = 1
6restfreq            = 1500.0
7dopplertrackfreq    = 1500.0
8bandwidth           = 800.0
9"""

Note

  • Not every receiver has a notch filter.

  • The value of nwin must match the number of rest frequencies.

  • You should choose a bandwidth that is well-matched to the

frequency range of the receiver you are using.

Common VEGAS Configuration Keywords#

The following configuration string specifies keywords are common to both the pulsar fold-mode and calibration scans that we will perform. In this example, we will use the most frequently used parameters for high-precision pulsar timing.

1config_vegas_common = """
2tint                = 10.24e-6
3vegas.numchan       = 512
4vegas.scale         = 1000
5vegas.outbits       = 8
6vegas.fold_bins     = 2048
7vegas.fold_dumptime = 10.0
8vegas.polnmode      = 'full_stokes'
9"""

Note

  • This configuration will result in frequency channels that are

approximately 1.5 MHz wide. - The recommended value of tint depends on the frequency

resolution (i.e. the bandwidth, \(BW\), and number of channels, \(n_{chan}\)). The formula for calculating the recommended integration time \(t_{int}\) is \(t_{int} = \frac{16 \times n_{chan}}{BW}\).

  • The recommended value of vegas.scale depends on the dedispersion mode, bandwidth, and number of channels. See the VPM Observing Reference for recommendations for valid combinations of dedispersion mode / bandwidth / number of channels.

VEGAS Keywords Specific to Fold Mode#

These keywords define the setup for observing the known pulsar with a specific period and DM value.

1vegas_config_fold = """
2swmode              = 'tp_nocal'
3noisecal            = 'off'
4vegas.obsmode       = 'coherent_fold'
5vegas.fold_parfile  = '/home/gpu/tzpar/B1937+21.par'
6"""

Note

  • vegas.fold_parfile must specify a valid TEMPO1 formatted file specific to your pulsar of interest.

  • See these links for more information about the following parameters: swmode and noisecal.

VEGAS Keywords Specific to Calibration Scans#

These keywords specify the setup for taking data that can be used for polarization calibration. Not all science cases will require this, but it is recommended.

1vegas_config_cal = """
2swmode          = 'tp'
3noisecal        = 'lo'
4vegas.obsmode   = 'coherent_cal'
5"""

Note

  • See these links for more information about the following

parameters: swmode and noisecal.

Observing Scripts#

Listing 1 is a complete observing script that will perform a polarization calibration scan and a timing observation of a single pulsar.

Listing 1 This script will perform a polarization calibration scan and a timing observation of a single pulsar.#
 1# Load a source catalog
 2# pulsars_all_GBT is a built-in catalog
 3catalog = Catalog(pulsars_all_GBT)
 4
 5source = 'J1713+0747'
 6
 7# Observe the pulsar for 30 minutes or until a UTC stop time
 8use_stop_time = True
 9pulsar_scan_length = 60 * 30
10stop_time = '21:00:00'
11
12cal_scan_length = 65
13
14
15# Define config strings
16config_common = """
17obstype     = 'Pulsar'
18backend     = 'VEGAS'
19deltafreq   = 0.0
20swtype      = 'none'
21swper       = 0.04
22swfreq      = 0
23vdef        = 'Radio'
24vframe      = 'topo'
25vlow        = 0.0
26vhigh       = 0.0
27"""
28
29config_LBand = """
30receiver            = 'Rcvr1_2'
31pol                 = 'Linear'
32notchfilter         = 'In'
33nwin                = 1
34restfreq            = 1500.0
35dopplertrackfreq    = 1500.0
36bandwidth           = 800.0
37"""
38
39config_vegas_common = """
40tint                = 10.24e-6
41vegas.numchan       = 512
42vegas.scale         = 1000
43vegas.outbits       = 8
44vegas.fold_bins     = 2048
45vegas.fold_dumptime = 10.0
46vegas.polnmode      = 'full_stokes'
47"""
48
49vegas_config_fold = """
50swmode              = 'tp_nocal'
51noisecal            = 'off'
52vegas.obsmode       = 'coherent_fold'
53vegas.fold_parfile  = '/home/gpu/tzpar/B1937+21.par'
54"""
55
56vegas_config_cal = """
57swmode          = 'tp'
58noisecal        = 'lo'
59vegas.obsmode   = 'coherent_cal'
60"""
61
62
63ResetConfig()
64
65# Pointing/focus corrections using a source close to the pulsar
66AutoPeakFocus(location = source)
67
68Slew(source)
69
70# Configure for calibration observation
71Configure(config_common + config_LBand + config_vegas_common + vegas_config_cal)
72
73# Balance the IF system
74Balance()
75Balance()
76
77# Take calibration data
78Track(source, None, cal_scan_length)
79
80# Configure for pulsar observation
81Configure(config_common + config_LBand + config_vegas_common + vegas_config_fold)
82
83# Take pulsar data
84if use_stop_time:
85    Track(source, None, stopTime = stop_time)
86else:
87    Track(source, None, pulsar_scan_length)

Note

  • We do not balance the IF system between the polarization calibration scan and the pulsar scan. This ensures that the instrument response does not change between the two scans.

  • It is highly recommended to perform an AutoPeakFocus() at the beginning of your session - this will ensure the telescope is set up correctly in addition to checking the pointing solution.

    Note

    The PF800 and PF342 receivers only require an AutoPeak().

Tips and Tricks#

We strongly recommend that all observers use a par file that they have generated themselves using tempo1. Files generated with tempo1 should work without issue. If you are uncertain about the provenance of your par file, you can validate it with the following steps:

  • tempo -f [your par file] -z -ZPSR=[pulsar name] -ZOBS=1

  • If there are no issues, tempo will exit without messages and a new file called polyco.dat should appear in the working directory

  • Depending on which parameters are in the par file, tempo may print “WARNING: TZ mode” - These impact the definition of zero-phase point but will not

    prevent observations

  • If polyco.dat is not generated, this is not a valid par file. Contact your GBT project friend for assistance.

Contact your GBT project friend for assistance converting par files from tempo2 to tempo1.

Observing Multiple Sources#

Listing 2 will automatically observe multiple sources one after another. We highlight lines of the script that differ from Listing 1.

Listing 2 This script will automatically observe multiple sources one after another.#
 1# Load a source catalog
 2# pulsars_all_GBT is a built-in catalog
 3catalog = Catalog(pulsars_all_GBT)
 4
 5# Specify several sources in a list
 6sources = ['J1713+0747', 'B1937+21', 'B1929+10']
 7
 8# Observe each pulsar for 30 minutes
 9pulsar_scan_length = 60 * 30
10
11
12# Define config strings
13config_common = """
14obstype     = 'Pulsar'
15backend     = 'VEGAS'
16deltafreq   = 0.0
17swtype      = 'none'
18swper       = 0.04
19swfreq      = 0
20vdef        = 'Radio'
21vframe      = 'topo'
22vlow        = 0.0
23vhigh       = 0.0
24"""
25
26config_LBand = """
27receiver            = 'Rcvr1_2'
28pol                 = 'Linear'
29notchfilter         = 'In'
30nwin                = 1
31restfreq            = 1500.0
32dopplertrackfreq    = 1500.0
33bandwidth           = 800.0
34"""
35
36config_vegas_common = """
37tint                = 10.24e-6
38vegas.numchan       = 512
39vegas.scale         = 1000
40vegas.outbits       = 8
41vegas.fold_bins     = 2048
42vegas.fold_dumptime = 10.0
43vegas.polnmode      = 'full_stokes'
44"""
45
46# Note the use of string substitution to dynamically specify the parfile name
47vegas_config_fold = """
48swmode              = 'tp_nocal'
49noisecal            = 'off'
50vegas.obsmode       = 'coherent_fold'
51vegas.fold_parfile  = '/home/gpu/tzpar/%s.par'
52"""
53
54vegas_config_cal = """
55swmode          = 'tp'
56noisecal        = 'lo'
57vegas.obsmode   = 'coherent_cal'
58"""
59
60
61ResetConfig()
62
63# Pointing/focus corrections using a source close to the first pulsar
64AutoPeakFocus(location = sources[0])
65
66# Loop over all sources defined above
67for source in sources:
68    Slew(source)
69
70    # Configure for calibration observation
71    Configure(config_common + config_LBand + config_vegas_common + vegas_config_cal)
72
73    # Balance the IF system
74    Balance()
75    Balance()
76
77    # Take calibration data
78    Track(source, None, cal_scan_length)
79
80    # Configure for pulsar observation
81    Configure(config_common + config_LBand + config_vegas_common + vegas_config_fold%source)
82
83    # Take pulsar data
84    Track(source, None, pulsar_scan_length)

Advanced Use of Catalogs#

Here we demonstrate an advanced use of catalogs in which we specify the full path to a parfile for each source and access this in the script.

First, we define an example catalog:

1format = spherical
2coordmode = J2000
3head = name         ra                      dec                     parfile
4J1713+0747          17:13:49.5335615        +07:47:37.482501        /home/gpu/tzpar/J1713+0747.par
5B1937+21            19:39:38.561224         +21:34:59.12570         /home/gpu/tzpar/B1937+21.par
6B1929+10            19:32:13.9497           +10:59:32.420           /home/gpu/tzpar/B1929+10.par

Now we define the observing script. The “parfile” column from our catalog is read in for each source and substituted into the configuration string. The sources will be observed in the order they appear in the catalog. In Listing 3 we highlight lines of the script that differ from Listing 2.

Listing 3 Observing script employing advanced use of catalogs.#
 1# Load a source catalog
 2catalog = Catalog("/valid/path/to/catalog.cat")
 3
 4# Observe each pulsar for 30 minutes
 5pulsar_scan_length = 60 * 30
 6
 7
 8# Define config strings
 9config_common = """
10obstype     = 'Pulsar'
11backend     = 'VEGAS'
12deltafreq   = 0.0
13swtype      = 'none'
14swper       = 0.04
15swfreq      = 0
16vdef        = 'Radio'
17vframe      = 'topo'
18vlow        = 0.0
19vhigh       = 0.0
20"""
21
22config_LBand = """
23receiver            = 'Rcvr1_2'
24pol                 = 'Linear'
25notchfilter         = 'In'
26nwin                = 1
27restfreq            = 1500.0
28dopplertrackfreq    = 1500.0
29bandwidth           = 800.0
30"""
31
32config_vegas_common = """
33tint                = 10.24e-6
34vegas.numchan       = 512
35vegas.scale         = 1000
36vegas.outbits       = 8
37vegas.fold_bins     = 2048
38vegas.fold_dumptime = 10.0
39vegas.polnmode      = 'full_stokes'
40"""
41
42# Note the use of string substitution to dynamically specify the parfile name
43vegas_config_fold = """
44swmode              = 'tp_nocal'
45noisecal            = 'off'
46vegas.obsmode       = 'coherent_fold'
47vegas.fold_parfile  = '%s'
48"""
49
50vegas_config_cal = """
51swmode          = 'tp'
52noisecal        = 'lo'
53vegas.obsmode   = 'coherent_cal'
54"""
55
56
57ResetConfig()
58
59for i, source in enumerate(catalog.keys()):
60    # Only perform AutoPeakFocus() for first source
61    if i == 0:
62        AutoPeakFocus(location=source)
63
64    Slew(source)
65
66    # Configure for calibration observation
67    Configure(config_common + config_LBand + config_vegas_common + vegas_config_cal)
68
69    # Balance the IF system
70    Balance()
71    Balance()
72
73    # Take calibration data
74    Track(source, None, cal_scan_length)
75
76    # Configure for pulsar observation
77    Configure(config_common + config_LBand + config_vegas_common + vegas_config_fold%catalog[source]['parfile'])
78
79    # Take pulsar data
80    Track(source, None, pulsar_scan_length)