CASA Contributed Script: vlacal-setjy
This page is currently under development.
Please do not use this guide until this message has been removed.
Introduction
Flux-density calibration for the VLA typically involves an observation of one of four primary calibrators: 3C286, 3C48, 3C138 and 3C147. Models for these sources are distributed as part of the CASA package and model visibilities are predicted using the task setjy. The most current models available in setjy are accessible using the flux-density standard Perley Butler 2017 (hereafter PB17), which is based on observations conducted on or before January 2016.
Given the recent and significant variability in some primary calibrators (i.e., 3C48 and 3C147) NRAO staff are in the process of creating a new flux-density standard based on more recent observations. Instead of packaging these new models with CASA, NRAO will host a database that is continually updated with the latest monitoring data (having an approximately monthly cadence). A new flux-density standard will be added to the task setjy to make use of these new models (estimated release date 2023). Until the new version of setjy is released, this contributed script vlacal-setjy.py can be executed to obtain the newest models from the database. This casaguide provides documentation and examples of how to use this script.
Obtaining the script
The script vlacal-setjy.py is available for download here. Please save a copy in your local working directory, e.g.,
# in CASA
!wget www.aoc.nrao.edu/~jmarvil/vlacal-setjy.py
Loading the functions
Next, you will want to run the script in CASA, e.g.,
# in CASA
execfile('vlacal-setjy.py')
This will import functions that you can now run from your CASA session. You will need to run the script each time you start CASA if you want these functions to be available (or add the above to startup.py). Note that you will not need to open the script in an editor or make any modifications to it.
Calculating a flux-density ratio
One function provided by this script will calculate the ratio of the PB17 flux to the new NRAO flux standard. This ratio may be of interest to users who have already calibrated their data using the PB17 flux standard. In this case, the ratio could be used to scale the visibility amplitude or the image intensity. The function to calculate this ratio is called vlacal_setjy_calculate_ratio. The following functional arguments will need to be provided:
- source: The string name of the VLA primary calibrator, i.e., one of '3C286', '3C48', '3C138' or '3C147'
- band: The single-letter string name of the VLA receiver band, i.e., one of 'P', 'L', 'S', 'C', 'X', 'U', 'K', 'A' or 'Q'
- date: The date to determine the flux-density scale (typically the date your observation took place), formatted as'YYYY/MM/DD'
For example, for source 3C48 at Ka-band on June 1, 2019 you would run:
# in CASA
vlacal_setjy_calculate_ratio( '3C48', 'A', '2019/06/01' )
which will produce the following output:
Obtained flux of 1.074 Jy on mjd 58635.0 for source 3C48 at reference frequency 33.25 GHz This interpolated flux differs from Perley-Butler 2017 by 32.65%
Based on this output, one could scale their results by a factor of 1.3265 to account for the estimated flux of 3C48 at their time of observation.