Jupiter: continuum polarization calibration 5.5.0: Difference between revisions

From CASA Guides
Jump to navigationJump to search
No edit summary
No edit summary
Line 81: Line 81:
myPolSetjy = setjy(vis='jupiter6cm.demo.ms', field='1331+305', standard='manual', spw='0', fluxdensity=[i0,0,0,0], spix=[alpha,0], reffreq=str(f0)+'GHz', polindex=[c0,0], polangle=[d0,0], scalebychan=True, usescratch=False)
myPolSetjy = setjy(vis='jupiter6cm.demo.ms', field='1331+305', standard='manual', spw='0', fluxdensity=[i0,0,0,0], spix=[alpha,0], reffreq=str(f0)+'GHz', polindex=[c0,0], polangle=[d0,0], scalebychan=True, usescratch=False)
</source>
</source>
The results are displayed in the CASA logger as well as myPolSetjy python dictionary


<pre style="background-color: #fffacd;">
<pre style="background-color: #fffacd;">

Revision as of 14:49, 30 July 2018

Data Import

Data Inspection and Editing

Calibration

Set the Flux Scale

Set the absolute flux density scale, but only for Stokes I at the moment. Our primary (flux) calibrator here is 1331+305 (3C286). The default model for CASA 5.3+ is 'Perley-Butler 2017'.

setjy(vis='jupiter6cm.demo.ms', field='1331+305')


Initial gain calibration

At this stage the data have an overall flux density scaling determined, but full gain solutions aren't there yet. The relevant task is gaincal (analogous to the AIPS task CALIB). Rather than generate solution tables (SN tables in AIPS) that are attached to the measurement set (UVFITS in AIPS era), gaincal will produce a separate tables, and we will use appropriate extensions to keep track of what is what.

Firstly generate an antenna zenith-angle dependent VLA gain curve calibration table

gencal(vis='jupiter6cm.demo.ms', caltable='jupiter6cm.demo.gc', caltype='gc')

Now, solve for antenna gains on 1331+305 and 0137+331, using the just generated gain curve table (.gc).

gaincal(vis='jupiter6cm.demo.ms', caltable='jupiter6cm.demo.G', field='1331+305,0137+331', spw='', gaintype='G', calmode='ap', solint='inf', combine='', refant='11', minsnr=3, gaintable=['jupiter6cm.demo.gc'], parang=False)

# And check the solutions
plotcal(caltable='jupiter6cm.demo.G', xaxis='time', yaxis='amp', subplot='333', iteration='antenna')

If all looks good, bootstrap the flux density scale of the flux calibrator onto the phase calibrators. AIPS called it GETJY, but CASA calls it fluxscale.

myFluxscale = fluxscale(vis='jupiter6cm.demo.ms', caltable='jupiter6cm.demo.G', fluxtable='jupiter6cm.demo.Gflx', reference='1331+305', transfer='0137+331', append=False, display=False)

The output is displayed in the logger as well as stored in the myFluxscale python dictionary

 Beginning fluxscale--(MSSelection version)-------
 Found reference field(s): 1331+305
 Found transfer field(s):  0137+331
 Flux density for 0137+331 in SpW=0 (freq=4.8851e+09 Hz) is: 5.29882 +/- 0.00457512 (SNR = 1158.18, N = 54)
 Flux density for 0137+331 in SpW=1 (freq=4.8351e+09 Hz) is: 5.35056 +/- 0.00178254 (SNR = 3001.65, N = 54)
 Fitted spectrum for 0137+331 with fitorder=1: Flux density = 5.32463 +/- 0 (freq=4.86004 GHz) spidx=-0.944519 (degenerate)
 Storing result in jupiter6cm.demo.Gflx
 Writing solutions to table: jupiter6cm.demo.Gflx


When executing fluxscale(), the calibration table with the extension .G is modified and stored as a new table with the extension .Gflx. So far, solutions have been generated only for the calibrators, and have not yet been transferred to the target source(s).

Before proceeding, inspect the flux density calibration and save results to a file

plotcal(caltable='jupiter6cm.demo.Gflx', xaxis='time', yaxis='amp', showgui=True, figfile='jupiter6cm.demo.Gflx.amp.png')

plotcal(caltable='jupiter6cm.demo.Gflx', xaxis='time', yaxis='phase', plotrange=[-1,-1,-200,200], showgui=True, figfile='jupiter6cm.demo.Gflx.phase.png')


Polarisation calibration

Set the polarisation model

Now, set the polarisation model for the polarised position-angle calibrator (here 1331+305=3C286 which is also our primary flux calibrator). For polarisation properties of your primary polarisation calibrator see VLA Polarimetry Guide.

i0=7.3109    # Stokes I value for spw 0 ch 0
f0=4.8851    # Frequency for spw0 ch0 (note that in our data the 'lower' spw is actually higher frequency)
alpha=log(i0/7.35974932)/log(4.8351/f0) # Values from our setjy() run on Stokes I earlier
c0=0.114     # Fractional polarisation 11.4% for 5GHz
d0=33*pi/180 # Polarisation angle 33deg in radians

myPolSetjy = setjy(vis='jupiter6cm.demo.ms', field='1331+305', standard='manual', spw='0', fluxdensity=[i0,0,0,0], spix=[alpha,0], reffreq=str(f0)+'GHz', polindex=[c0,0], polangle=[d0,0], scalebychan=True, usescratch=False)

The results are displayed in the CASA logger as well as myPolSetjy python dictionary

#In CASA
CASA <49>: myPolSetjy
Out[49]: 
{'7': {'0': {'fluxd': array([ 7.26237491,  0.33674164,  0.7563341 ,  0.        ])},
  'fieldName': '1331+305'},
 'format': "{field Id: {spw Id: {fluxd: [I,Q,U,V] in Jy}, 'fieldName':field name }}"}


Template:Checked 5.3.0

Pre-upgrade VLA Tutorials