Parkes Polarimetry

The following example is processing of some Parkes polarimetric observations of OH masers at 1.6 GHz. Because digital filters where used in the backend, the baselines are stable enough not to require a quotient spectra. The 4 MHz bandwidth is wide enough to observe both the 1665 and 1667 MHz OH maser transitions. Each source was observed once for about 10 minutes. Tsys information was not written to the RPFITS file (a nominal 25K values was used), so the amplitudes need to be adjusted based on a separate log file. A simple user function is used to simplify this, contained in a file called mypol.py:

def xyscale(data,xtsys=1.0,ytsys=1.0,nomtsys=25.0) :

 selection = selector()
 selection.set_polarisations(0)
 data.set_selection(selection)
 data.scale(xtsys/nomtsys)

 selection.set_polarisations(1)
 data.set_selection(selection)
 data.scale(ytsys/nomtsys)

 selection.set_polarisations(0)
 data.set_selection(selection)
 data.scale((xtsys+ytsys)/(2*nomtsys))

 selection.set_polarisations(0)
 data.set_selection(selection)
 data.scale((xtsys+ytsys)/(2*nomtsys))

The typical ASAP session would be

# Remind ourself the name of the rpfits files
ls

# Load data from an rpfits file
d1665 = scantable('2005-10-27_0154-P484.rpf')

# Check what we have just loaded
d1665.summary()

# View the data in velocity
d1665.set_unit('km/s')
d1665.set_freqframe('LSRK')

# Correct for the known phase offset in the crosspol data
d1665.rotate_xyphase(-4)

# Create a copy of the data and set the rest frequency to the 1667 MHz
# transition
d1667 = d1665.copy()
d1667.set_restfreqs([1667.3590], 'MHz')
d1667.summary()

# Copy out the scan we wish to process
g351_5 = d1665.get_scan('351p160')
g351_7 = d1667.get_scan('351p160')

# Baseline both
msk = g351_5.create_mask([-30,-25],[-5,0])
g351_5.poly_baseline(msk,order=1)
msk = g351_7.create_mask([-30,-25],[-5,0])
g351_7.poly_baseline(msk,order=1)


# Plot the data. The plotter can only plot a single scantable
# So we must merge the two tables first

plotscans = merge(g351_5, g351_7)

plotter.plot(plotscans) # Only shows one panel

# Tell the plotter to stack polarisation and panel scans
plotter.set_mode('p','s')

# Correct for the Tsys using our predefined function
execfile('mypol.py') # Read in the function xyscale
xyscale(g351_5,23.2,22.7) # Execute it on the data
xyscale(g351_7,23.2,22.7)

# Only plot the velocity range of interest
plotter.set_range(-30,10)

# Update the plot with the baselined data
plotter.plot()

# Look at the various polarisation products
selection = selector()
selection.set_polarisations(``RR LL'')
plotter.set_selection(selection)
selection.set_polarisations(``I Plinear'')
plotter.set_selection(selection)
selection.set_polarisations(``I Q U V'')
plotter.set_selection(selection)

# Save the plot as postscript
plotter.save('g351_stokes.ps')

# Save the process spectra
plotscans.save('g351.asap')



Malte Marquarding 2007-08-16