setjy
- setjy(vis='', field='', spw='', selectdata=False, timerange='', scan='', intent='', observation='', scalebychan=True, standard='Perley-Butler 2017', model='', listmodels=False, fluxdensity=-1, spix=0.0, reffreq='1GHz', polindex='', polangle='', rotmeas=0.0, fluxdict='', useephemdir=False, interpolation='nearest', usescratch=True, ismms=False)[source]
Fills the model column with the visibilities of a calibrator
[Description] [Examples] [Development] [Details]
- Parameters
vis (string=’’) - Name of input visibility file
field (string=’’) - Select field using field id(s) or field name(s)
spw (string=’’) - Select spectral window/channels
selectdata (bool=False) - Other data selection parameters
selectdata = True
timerange ({string, stringVec}=’’) - Select data based on time range
scan ({string, stringVec}=’’) - Scan number range
intent (string=’’) - Select observing intent
observation ({string, int}=’’) - Select by observation ID(s)
scalebychan (bool=True) - Scale the flux density on a per channel basis or else on a per spw basis
standard (string=’Perley-Butler 2017’) - Flux density standard
standard = Perley-Butler 2017
model (string=’’) - File location for field model
listmodels (bool=False) - List the available models for VLA calibrators or Tb models for Solar System objects
interpolation (string=’nearest’) - Method to be used to interpolate in time
standard = Perley-Butler 2013
model (string=’’) - File location for field model
listmodels (bool=False) - List the available models for VLA calibrators or Tb models for Solar System objects
interpolation (string=’nearest’) - Method to be used to interpolate in time
standard = Perley-Butler 2010
model (string=’’) - File location for field model
listmodels (bool=False) - List the available models for VLA calibrators or Tb models for Solar System objects
standard = Butler-JPL-Horizons 2012
listmodels (bool=False) - List the available models for VLA calibrators or Tb models for Solar System objects
useephemdir (bool=False) - Use directions in the ephemeris table
standard = manual
fluxdensity ({int, intVec, doubleVec}=-1) - Specified flux density in Jy [I,Q,U,V]; (-1 will lookup values)
spix ({double, doubleVec}=0.0) - Spectral index (including higher terms) of I fluxdensity
reffreq (string=’1GHz’) - Reference frequency for spix
polindex (doubleVec=’’) - Coefficients of an expansion of frequency-dependent linear polarization fraction expression
polangle (doubleVec=’’) - Coefficients of an expansion of frequency-dependent polarization angle expression (in radians)
rotmeas (double=0.0) - Rotation measure (in rad/m^2)
standard = fluxscale
fluxdict (record=’’) - Output dictionary from fluxscale
usescratch (bool=True) - Will create if necessary and use the MODEL_DATA
- Returns
fluxd (dict) - flux densities indexed by field and SPW
Description
Warning
There are Known Issues for setjy.
The setjy task sets the model visibility amplitude and phase associated with a flux density scale and a specified clean components image into the model column of the MS data set. The flux density (I,Q,U,V) for a point source calibrator can be entered explicitly. If no model is specified, then a point source at the phase center is assumed. For sources that are recognized flux calibrators (listed in Flux Calibrator Models ), setjy can calculate the flux densities as a function of frequency (and time, for some extragalactic sources classified as the variable sources and Solar System objects). Otherwise, the flux densities should be manually specified ( standard=’manual’).
Overview
The basic modes of operations are specified by the parameter, standard. As the name indicates, the bulk of its options are different flux density standards available in CASA as listed in Flux Calibrator Models. In addition, standard=’manual’ allows flux density scaling to be specified directly instead of using one for the flux density standards. And finally, standard=‘fluxscale’ allows the user to insert a flux density based on the python dictionary result from the fluxscale task, after the initial setjy on the primary flux calibrator, to insert proper flux density models for secondary calibrators in the MS.
By default the setjy task will cycle through all selected fields, spectral windows and channels, (one solution per spw with scalebychan = False) , setting the flux density either to 1 Jy (unpolarized), or if the source is recognized as one of the calibrators, to the flux density (assumed unpolarized) appropriate to the observing frequency.
Optionally, the MODEL_DATA column can be filled with the Fourier transform of the model image. But for any given MeasurementSet, the performance and data storage requirements are less demanding without the MODEL_DATA column. If usescratch=False, the model is stored as a ‘virtual’ model. The model parameters are saved either in the SOURCE_MODEL column in the SOURCE table (if one exists) or in the keyword of the main table in the MS and model visibilities are evaluated on the fly when processing calibration or plotting in plotms. The result containing flux densities for each spw is returned as a Python dictionary when it is executed as the function with arguments,
# For Example setjy(vis=‘my.ms’…)
Manually setting Flux Densities: standard=‘manual’
With this mode, the flux densities and other relevant parameters necessary to describe the model can be entered manually. The following are the subparameters.
standard = 'manual' # Flux density standard fluxdensity = [1, 0, 0, 0] # Specified flux density in Jy [I,Q,U,V]; (-1 will lookup values) spix = [] # Spectral index (including higher terms) of I fluxdensity reffreq = '' # Reference frequency for spix polindex = [] # Coefficients of an expansion of frequency-dependent linear # polarization fraction expression polangle = [] # Coefficients of an expansion of frequency-dependent polarization # angle expression (in radians) rotmeas = 0.0 # Rotation measure (in rad/m^2)
In the simplest version, the flux for Stokes I can be set via the fluxdensity subparameter as the first entry in a list. In the above example [1,0,0,0] setjy sets the flux to 1 Jy. Additional Stokes specifications can be set in remaining list members. All fluxdensity vales must be given in units of Jy. A spectral index can be provided via the spix and reffreq subparameters. Finally it is also possible to provide coefficients for the polarization fraction and angle as well as a rotation measure to define the model (polindex, polangle, rotmeas subparameters).
The spix subparamter can accept a list of values to include the spectral index of Stokes I in higher order terms, using the definition of the flux density at a frequency, \(\nu\), \(S(\nu)=fluxdensity[0]*\frac{\nu}{reffreq}^{spix[0]+spix[1]*log(\nu/reffreq)+..}\) . The reffreq is given by a string including the unit (e.g. ‘10GHz’, note that there is no space between the value and the unit). The polindex takes a list of coefficents ([p0, p1, p2…]) using the definition of frequency-dependent polarization index (PI) , where
\(PI = \frac{\sqrt{Q^2+U^2}}{I} = p0 + p1*\frac{\nu-reffreq}{reffreq} + p2*(\frac{\nu-reffreq}{reffreq})^2 + ...\).
Similarly, the polangle subparameter takes a list of coefficients ([a0,a1,a2, ..]) using the definition of polarization angle (\(\chi\)), where
\(\chi = 0.5arctan\frac{U}{Q} = a0 + a1*\frac{\nu-reffreq}{reffreq} + a2*(\frac{freq-reffreq}{reffreq})^2 + ..\).
Note
Some logics how these subparameters are used to determine flux densities:
When Stokes Q and U flux densities are given in fluxdensity, the coefficient, p0 is determined from these flux densities and the entry for p0 in polindex is ignored. Also, a0 is determined from these flux density values and the entry for a0 in polangle is ignored.
If Q and U flux densities in fluxdensity are set to 0.0, then polindex [0] and polangle [0] are used to determine Q and U at reffreq.
When the frequency-dependent polindex and polangle are used, be sure to include all the coefficients for both polindex and polangle. Otherwise Q and U flux densities are not calculated correctly.
If rotmeas is given, the Q and U that are determined from above parameters are further corrected for the Faraday rotation.
Using the Predefined Standards
For the VLA, the default source models are customarily point sources defined by the ’Baars’, ’Perley 90’, ’Perley-Taylor 99’, ’Perley-Butler 2010’, time-variable ’Perley-Butler 2013’, ‘Perley-Butler 2017’, ’Scaife-Heald 2012’, or ’Stevens-Reynolds 2016’ flux density scales (See Flux Calibrator Models for details; ’Perley-Butler 2017’ is the current standard by default), or point sources of unit flux density if the flux density is unknown. When ‘Perley-Bulter 2017’ is used and if any part of the frequencies of the relevant visibility data are outside the valid frequency range for each individual source as listed in Flux Calibrator Models, setjy issues warning log messages while it still proceeds to calcuate the flux densities and set the model visibility.
Most calibrator sources are based on radio emission from quasars and jets. The spectral indices of these sources are such that at (sub)mm wavelengths the majority of these sources become too weak and variable to reliably set the flux density scale. Alternatives are thermal objects such as planets, moons, and asteroids. Being Solar System objects, these objects do not move at the sidereal rate and may be (strongly) resolved. The standard=’Butler-JPL-Horizons 2010’ and the recommended standard=’Butler-JPL-Horizons 2012’ (for more information on the implemented models, see Flux Calibrator Models page and also ALMA Memo 594 [1].) option of setjy includes flux density calibration using Solar System objects.
For ’Butler-JPL-Horizons 2012’ CASA currently supports the objects listed in Flux Calibrator Models to be applied to ALMA data. These names are recognized when they are used in the ’field’ parameter in setjy. In that case, setjy will obtain the geocentric distance and angular diameter at the time of the observation from a JPL–Horizons ephemeris and calculate model visibilities. Currently the objects are modeled as uniform temperature disks. Note that this model may oversimplify the real structure, in particular asteroids. The supported brightness temperature models for Solar System objects can be listed by selecting a standard and listmodels=True without setting any other parameters as shown below:
setjy(standard=‘Butler-JPL-Horizons 2012’, listmodels=True)
Each model contains temperatures at tabulated frequencies except for Mars. For Mars, the model temperatures are tabulated in time and frequency (see Flux Calibrator Models - Conventions, Data Formats for more details).
For selected asteroids, time variable models are available based on thermophysical modeling by T. Mueller (private communication) for January 1st, 2014 and beyond. Currently, the new models are available for Ceres, Pallas, and Vesta. A model is also available for Lutetia but using this source for ALMA absolute flux calibration is not advised. These new models are automatically chosen for the data taken after 2014 January 1, 0 hr UT. These models are also listed when the setjy task is executed with standard=‘Butler-JPL-Horizons 2012’ and listmodels=True. These model data files contain flux densities tabulated in time and frequency (see Flux Calibrator Models - Conventions, Data Formats for more details).
Flux density calculation with Solar System objects depends on ephemerides. The setjy task looks for the data in os.getenv(‘CASAPATH’).split()[0] + ‘/data/ephemerides/JPL-Horizons’. If no ephemeris for the right object at the right time is present, the calculation will fail. Ask the ALMA helpdesk to make an ephemeris. The very adventurous and well versed in python can try it using CASA’s recipes.ephemerides package:
import recipes.ephemerides as eph help eph
CASA comes with ephemerides for several more objects, but they are intended for use with me.framecomet(), and are not (yet) suitable flux density calibrators. It is up to the observer to pick a good flux density calibrator (bright, spherical and featureless, on a circular orbit, in the right part of the sky, and not too resolved). Even some of the objects listed above may prove to require more sophisticated flux density models than are currently implemented in CASA. For many objects running casalog.filter(‘INFO1’) before running setjy will send more information to the logger.
Warning
The apparent brightness of objects in the Solar System will vary with time because of the Earth’s varying distance to these objects, if nothing else. If the field index of a flux calibrator spans several days, setjy should be run more than once, limiting each run to a suitable timerange by using the timerange, scan, and/or observation selection parameters. Note that it is the field index that matters, not the name. Typically concat assigns moving objects a new field index for each observation, so usually it is not necessary to select a time range in setjy. However, it is worth checking with
listobs
, especially for planets.Using Calibration Models for Resolved Sources
For observations of Solar System objects using the ’Butler-JPL-Horizons 2010’ and ’Butler-JPL-Horizons 2012’ models, setjy will know and apply the flux distribution across the extended structure of the calibrators.
For other sources, namely VLA calibrator sources, a flux density calibrator can be resolved at the observing frequency and the point source model generated by setjy will not be appropriate. If available, a model image of the resolved source at the observing frequency may be used to generate the appropriate visibilities using the model subparameter (currently only available for standard=’Perley-Butler 2010’, standard=’Perley-Butler 2013’, and standard=’Perley-Butler 2017’). To do this, the model subparameter must include the full path to the model image. If the model subparameter is given only the file name, setjy will first search for the model image in the current working directory.
Also note that using setjy with a model image will only operate on that single source. Therefore, for different sources, setjy would need to be run multiple times (with different field settings). The default model images available are listed by listmodel=True and are found in the …/data/nrao/VLA/CalModels sub-directory of the CASA installation. Note the full path to the flux density calibrators may change depending on the installation directory or copies of these models can be placed in the current working directory.
Note
Currently available model images are:
3C138_P.im 3C138_L.im 3C138_S.im 3C138_C.im 3C138_X.im 3C138_U.im 3C138_K.im 3C138_A.im 3C138_Q.im
3C286_P.im 3C286_L.im 3C286_S.im 3C286_C.im 3C286_X.im 3C286_U.im 3C286_K.im 3C286_A.im 3C286_Q.im
3C48_P.im 3C48_L.im 3C48_S.im 3C48_C.im 3C48_X.im 3C48_U.im 3C48_K.im 3C48_A.im 3C48_Q.im
3C147_P.im 3C147_L.im 3C147_S.im 3C147_C.im 3C147_X.im 3C147_U.im 3C147_K.im 3C147_A.im 3C147_Q.im
3C123_P.im
3C196_P.im
3C295_P.im
3C380_P.im
These are all un-convolved images of AIPS CC lists. It is important that the model image not be one convolved with a finite beam; it must have units of Jy/pixel (not Jy/beam).
Note that setjy will rescale the flux in the models for known sources to match those it would have calculated. It will thus extrapolate the flux out of the frequency band of the model image to whatever spectral windows in the MS is specified (but will use the structure of the source in the model image).
If no source model is available, the uvrange selection may be needed during calibration to exclude the baselines where the resolution effect is significant. There is no hard and fast rule for this, though should be considered if the calibrator shows a drop of more than 10% on the longest baselines (use plotms to look at this). The antenna selection may also be needed if the calibrator is heavily resolved and there are few good baselines to the outer antennas. Note that uvrange may also be needed to exclude the short baselines on some calibrators that have extended flux not accounted for in the model.
Note: For the following models, hard-coded radius limits on the model images are applied automatically.
3C286
3.0”
3C48
0.95”
3C147
0.85”
3C138
0.75”
Note: the calibrator guides for the specific telescopes usually indicate appropriate min and max for uvrange. For example, see the VLA Calibration Manual at: https://science.nrao.edu/facilities/vla/observing/callist for details on the use of standard calibrators for the VLA.
Bibliography
- Examples
Set flux density explictly
With standard=’manual’ (and selectdata=True), the parameters look like this. fluxdensity takes a list of flux densities, [I, Q, U, V] at reffreq. The same reffreq will be used as a reference frequecy for spix, polindex, and polange.
# setjy :: Fills the model column with the visibilities of a calibrator vis = '' # Name of input visibility file field = '' # Field name(s) spw = '' # Spectral window identifier (list) selectdata = True # Other data selection parameters timerange = '' # Time range to operate on (for usescratch=T) scan = '' # Scan number range (for usescratch=T) intent = '' # Observation intent observation = '' # Observation ID range (for usescratch=T) scalebychan = True # scale the flux density on a per channel basis or else on # a per spw basis standard = 'manual' # Flux density standard fluxdensity = -1 # Specified flux density [I,Q,U,V]; (-1 will lookup values) spix = 0.0 # Spectral index (including higher terms) of I fluxdensity reffreq = '1GHz' # Reference frequency for spix polindex = [] # Coefficients of an expansion of frequency-dependent # linear polarization fraction expression polangle = [] # Coefficients of an expansion of frequency-dependent # polarization angle expression rotmeas = 0.0 # Rotation measure (in rad/m^2) usescratch = False # Will create if necessary and use the MODEL_DATA
In the simplest form, setting a constant Stokes I flux density for a calibrator ( field=’0’) for all spw can be done as
setjy(vis='data.ms', field='0', fluxdensity=[3.5,0.0,0.0,0.0])
To set Stokes I flux density with spectral index and Stokes Q and U using frequency-dependent polarization index and polarization angle (in rad) also including rotation measure:
setjy(vis=‘data.ms’, standard='manual', field = ‘3C48’, fluxdensity=[6.4861, 0, 0, 0], spix=[-0.630458,-0.132252], reffreq="3000.0MHz”, polindex=[0.02143,0.0392,0.002349,-0.0230] polangle=[-1.7233,1.569,-2.282,1.49], rotmeas=-68.0)
Use one of the predefined standards
Current default for standard is ‘Perley-Butler 2017’ and the parameters look like this (with selectdata=True):
# setjy :: Fills the model column with the visibilities of a calibrator vis = '' # Name of input visibility file field = '' # Field name(s) spw = '' # Spectral window identifier (list) selectdata = True # Other data selection parameters timerange = '' # Time range to operate on (for usescratch=T) scan = '' # Scan number range (for usescratch=T) intent = '' # Observation intent observation = '' # Observation ID range (for usescratch=T) scalebychan = True # scale the flux density on a per channel basis or else on a per spw basis standard = 'Perley-Butler 2017' # Flux density standard model = '' # File location for field model listmodels = False # List the available models for VLA calibrators or Tb models for Solar System objects interpolation = 'nearest' # method to be used to interpolate in time usescratch = False # Will create if necessary and use the MODEL_DATA
In the most simplest case, using the default stanadard, if field=’0’ is one of the known sources as listed in Flux Calibrator Models (e.g. 3C286), the following will set appropriate channel dependent flux densities for all spws.
setjy(vis='data.ms', field='0')
For selected spws with field specified by the source name:
setjy(vis='data.ms', field='3C286', spw='0,2')
With a model image:
setjy(vis='ngc7538_XBAND.ms', field='0', model='3C48_X.im')
Note that if there is no 3C48_X.im in the current directory, setjy looks for it in the default model data image directory.
An example for a Solar System object as a flux calibrator:
setjy(vis=’c0104I’, field=’MARS’, spw=’0~2’, standard=’Butler-JPL-Horizons 2012’)
To list supported models for the relevant standard, set istmodels=True and select standard (no need to set vis):
setjy(listmodels=True)
This will show a list of the VLA model images along with their full paths to the terminal:
No candidate models matching '*.im\* \*.mod*' found in . Candidate models (*) in /users/ttsutsum/casabuilds/data/nrao/VLA/CalModels: 3C138_A.im 3C138_L.im 3C138_U.im 3C147_C.im 3C147_Q.im 3C147_X.im 3C286_K.im 3C286_S.im 3C48_A.im 3C48_L.im 3C48_U.im 3C138_C.im 3C138_Q.im 3C138_X.im 3C147_K.im 3C147_S.im 3C286_A.im 3C286_L.im 3C286_U.im 3C48_C.im 3C48_Q.im 3C48_X.im 3C138_K.im 3C138_S.im 3C147_A.im 3C147_L.im 3C147_U.im 3C286_C.im 3C286_Q.im 3C286_X.im 3C48_K.im 3C48_S.im README
Similarly, for Solar System objects (e.g. standard=’Butler-JPL-Horizons 2012’), Tb models and new time asteroid models are listed by:
setjy(standard='Butler-JPL-Horizons 2012', listmodels=True)
This will show a list looks like below in the terminal:
Tb models of solar system objects available for Butler-JPL-Horizons 2012 (*Tb*.dat) in /users/ttsutsum/casabuilds/data/alma/SolarSystemModels: Callisto_Tb.dat Europa_Tb.dat Io_Tb.dat Jupiter_Tb.dat Mars_Tb_time.dat Pallas_Tb.dat Uranus_Tb.dat Vesta_Tb.dat Ceres_Tb.dat Ganymede_Tb.dat Juno_Tb.dat Mars_Tb.dat Neptune_Tb.dat Titan_Tb.dat Venus_Tb.dat Time variable models of asteroids available for Butler-JPL-Horizons 2012 [only applicable for the observation date 2014.01.01 0UT and beyond] (*fd_time.dat) in /users/ttsutsum/casabuilds/data/alma/SolarSystemModels: Ceres_fd_time.dat Lutetia_fd_time.dat Pallas_fd_time.dat Vesta_fd_time.dat
- Development
No additional development details
- Parameter Details
Detailed descriptions of each function parameter
vis (string='')
- Name of input visibility fileDefault: noneExample: vis=’ngc5921.ms’field (string='')
- Select field using field id(s) or field name(s)Default: ‘’ (all fields, but run setjy one fieldat a time)Use ‘go listobs’ to obtain the list id’s ornames. If field string is a non-negative integer,it is assumed a field index, otherwise, it isassumed a field name.Examples:field=’0~2’; field ids 0,1,2field=’0,4,5~7’; field ids 0,4,5,6,7field=’3C286,3C295’; field named 3C286 and3C295field = ‘3,4C*’; field id 3, all namesstarting with 4Cspw (string='')
- Select spectral window/channelsDefault: ‘’ (all spectral windows)NOTE: setjy only selects by spectral window, andignores channel selections. Fine-grained controlcould be achieved using (and possiblyconstructing) a cube for model.selectdata (bool=False)
- Other parameters for selecting part(s) of the MS tooperate on.Default: FalseOptions: False|TrueCurrently all time-oriented and most likely onlyof interest when using a Solar System object as acalibrator.timerange ({string, stringVec}='')
- Select data based on time rangeSubparameter of selectdata=TrueDefault = ‘’ (all)Examples:timerange =‘YYYY/MM/DD/hh:mm:ss~YYYY/MM/DD/hh:mm:ss’(Note: if YYYY/MM/DD is missing date defaultsto first day in data set.)timerange=’09:14:0~09:54:0’ picks 40 min onfirst daytimerange= ‘25:00:00~27:30:00’ picks 1 hr to 3hr 30min on NEXT daytimerange=’09:44:00’ pick data within oneintegration of timetimerange=’>10:24:00’ data after this timescan ({string, stringVec}='')
- Scan number rangeSubparameter of selectdata=TrueDefault: ‘’ = allExample:scan=’1~5’For multiple MS input, a list of scan strings canbe used:scan=[‘0~100’,’10~200’]scan=’0~100; scan ids 0-100 for all input MSesCheck ‘go listobs’ to insure the scan numbers arein order.intent (string='')
- Select observing intentDefault: ‘’ (allExample: using wildcard characters,intent=”CALIBRATE_AMPLI” will match field(s)contains CALIBRATE_AMPLI in a list of intentsWARNING: If a source with a specific field id hasscans that can be distinguishable with intentselection, one should setusescatch=True. Otherwise, any existing model ofthe source may be cleared and overwritten even ifthe part of the scans not selected by intent.observation ({string, int}='')
- Select by observation ID(s)Subparameter of selectdata=TrueDefault: ‘’ = allExample: observation=’0~2,4’scalebychan (bool=True)
- Scale the flux density on a per channel basis?Default: TrueOptions: True|FalseThis determines whether the fluxdensity set inthe model is calculated on a per channelbasis. If False then it only one fluxdensityvalue is calculated per spw. (Either way, allchannels in spw are modified.) It is effectivelyTrue if fluxdensity[0] > 0.0.standard (string='Perley-Butler 2017')
- Flux density standard, used if fluxdensity[0] less than 0.0Default: ‘Perley-Butler 2017’Options: ‘Baars’, ‘Perley 90’, ‘Perley-Taylor95’, ‘Perley-Taylor 99’, ‘Perley-Butler 2010’,‘Perley-Butler 2013’, ‘Perley-Butler 2017’,‘Scaife-Heald 2012’, ‘Stevens-Reynolds 2016’,‘Butler-JPL-Horizons 2010’, ‘Butler-JPL-Horizons2012’, ‘manual’ ‘fluxscale’All but the last four options are forextragalactic calibrators. The two ‘Butler-JPL’standards are for Solar System objects. Note thatScaife-Heald 2012 is for the low frequencies(mostly valid for the frequency range,30-300MHz).Flux density calculation with Solar Systemobjects depends on ephemerides. The setjy tasklooks for the data inos.getenv(‘CASAPATH’).split()[0] +‘/data/ephemerides/JPL-Horizons’. If no ephemerisfor the right object at the right time ispresent, the calculation will fail. Ask thehelpdesk to make an ephemeris.For more information on individual calibrators,see CASA Docs (https://casa.nrao.edu/casadocs/)model (string='')
- Model image (I only) for setting the model visibilities.Subparameter of standard=”Perley-Butler 2010”,“Perley-Butler 2013”, and “Perley-Butler 2017”Default: ‘’ (do not use a model image)The model can be a cube, and its channels do nothave to exactly match those of vis. It isrecommended to use model for sources that areresolved by the observation, but theButler-JPL-Horizons standard supplies a basicmodel of what several Solar System objects looklike. Each field must be done separately whenusing a model image.Both the amplitude and phase are calculated. Atthe AOC or CV, the models are located incasa[‘dirs’][‘data’] + ‘/nrao/VLA/CalModels/’,e.g. /usr/lib/casapy/data/nrao/VLA/CalModels/3C286_L.imlib64If model does not start with ‘/’, setjy will lookfor a match in ‘.’, ‘./CalModels’, and anyCalModels directories within thecasa[‘dirs’][‘data’] tree (excluding certainbranches).Note that model should be deconvolved, i.e. a setof clean components instead of an image that hasbeen convolved with a clean beam.listmodels (bool=False)
- List the available models for VLA calibrators or Tbmodels for Solar System objectsSubparameter of standard=”Perley-Butler 2010”,“Perley-Butler 2013”, and “Perley-Butler 2017”Default: FalseOptions: False|TrueIf True, do nothing but list candidates for model(for extragalactic calibrators) that are presenton the system. It looks for .im .mod in. including its sub-directories but skipping anydirectory name start with “.”, CalModels, andCalModels directories in the casa[‘dirs’][‘data’]tree. It does not check whether they areappropriate for the MS! Ifstandard=’Butler-JPL-Horizons 2012’, Tb models(frequency-dependend brightness temperaturemodels) for Solar System objects used in thestandard. For standard=’Butler-JPL-Horizons2010’, the recognized Solar System objects arelisted.fluxdensity ({int, intVec, doubleVec}=-1)
- Specified flux density in Jy [I,Q,U,V]Subparameter of standard=”manual”Default: -1 (uses [1,0,0,0] flux density forunrecognized sources, and standard flux densitiesfor ones recognized by the default standardPerley-Butler 2010).Only one flux density can be specified at atime. The phases are set to zero.setjy will try to use the standard if fluxdensityis not positive.Examples:fluxdensity=-1 will use the default standardfor recognized calibrators (like 3C286, 3C147and 3C48) and insert 1.0 for selected fieldswith unrecognized sources.field = ‘1’; fluxdensity=[3.2,0,0,0] will putin a flux density of I=3.2 for field=’1’At present (June 2000), this is the only methodto insert apolarized flux density model.Example: fluxdensity=[2.63,0.21,-0.33,0.02]will put in I,Q,U,V flux densities of2.63,0.21,-0.33, and 0.02, respectively, inthe model column.spix ({double, doubleVec}=0.0)
- Spectral index for I flux densitySubparameter of standard=”manual”Default: [] =>0.0 (no effect)Options: a float or a list of float valuesS = fluxdensity *(freq/reffreq)**(spix[0]+spix[1]*log(freq/reffreq)+..)Only used if fluxdensity is being used.IMPORTANT: If fluxdensity is positive, and spixis nonzero, then reffreq must be set too!It is applied in the same way to allpolarizations, and does not account for Faradayrotation or depolarization.Example: [-0.7, -0.15] for alpha and a curvature termreffreq (string='1GHz')
- Reference frequency for spixSubparameter of standard=”manual”Default: ‘1GHz’ (this is only here to preventdivision by 0!)Given with a unit with an optional frequencyframe (if the frame is not given, LSRK isassumed). There should be no space between thevalue and the unit (e.g. ‘100.0GHz’ or ‘TOPO100.0GHz’ are correct but with ‘100.0 GHz’ youwill see a warning message that it will bedefaulted to LSRK).Example: ‘86.0GHz’, ‘TOPO 86.0GHz’, ‘4.65e9Hz’NOTE: If the flux density is being scaled byspectral index, then reffreq must be set towhatever reference frequency is correct for thegiven fluxdensity and spix. It cannot bedetermined from vis. On the other hand, if spixis 0, then any positive frequency can be used(and ignored).polindex (doubleVec='')
- Coefficients of the frequency-dependent linearpolarization index (polarization fraction)Subparameter of standard=”manual”Default: []Expressed as pol. index = sqrt(Q^2+U^2)/I = c0 +c1*((freq-reffreq)/reffreq) +c2*((freq-reffreq)/reffreq)^2 + .. When Q and Uflux densities are given fluxdensity, c0 isdetermined from these flux densities and theentry for c0 in polindex is ignored. Or Q and Uflux densities in fluxdensity can be set to 0.0and then polindex[0] and polangle[0] are used todetermine Q and U at reffreq.Example: [0.2, -0.01] (= [c0,c1])polangle (doubleVec='')
- Coefficients of the frequency-dependent linearpolarization angle (in radians)Subparameter of standard=”manual”Default: []Expressed as pol. angle = 0.5*arctan(U/Q) = d0 +d1*((freq-reffreq)/reffreq) +d2*((freq-reffreq)/reffreq)^2 + .. When Q and Uflux densities are given in fluxdensity, d0 isdetermined from these flux densities and theentry for d0 in polangle is ignored. Or Q and Uflux densities in fluxdensity can be set to 0.0and then polindex[0] and polangle[0] are used todetermine Q and U at reffreq. Here polangleparameters are assumed to represent the intrinsicpolarization angle.Example: [0.57, 0.2] (=[d0,d1])rotmeas (double=0.0)
- Rotation measure (in rad/m^2)Subparameter of standard=”manual”Default: 0.0Note on the use of polindex, polangle and rotmeasWhen the frequnecy-dependent polindex andpolangle are used, be sure to include all thecoefficients of both polindex and polangle todescribe frequency depencency. Otherwisefrequency-dependent Q and U flux densities arenot calculated correctly. If rotmeas is given,the calculated Q and U flux densities are thencorrected for the Faraday rotation.fluxdict (record='')
- Output dictionary from fluxscaleSubparameter of standard=”fluxscale”Using the flexibly results, the flux density,spectral index, and reference frequency areextracted and set to fluxdensity, spix, andreffreq parameters, respectively. The field andspw selections can be used to specify subset ofthe fluxdict to be used to set the model. If theyare left as default (field=””, spw=””) all fieldsand/or spws in the fluxdict (but those spws withfluxd=-1 will be skipped) are used.useephemdir (bool=False)
- Use directions in the ephemeris table for the solarsystem object?Subparameter of standard=”Butler-JPL-Horizons2012”,Default: FalseOptions: False|Trueinterpolation (string='nearest')
- Method to be used to interpolate in time for the timevariable sources (3C48,3C138,3C147).Subparameter of standard=”Perley-Butler 2013”,and “Perley-Butler 2017”Default: ‘nearest’Options: ‘nearest|linear|cubic|spline’This parameter is ignored for other non-variablesources in the standard.usescratch (bool=True)
- Will create if necessary and use the MODEL_DATADefault: TrueOptions: True|False* If True: the model visibility will be evaluatedand saved on disk in the MODEL_DATA column.This will increase your ms in size by a factorof 1.5 (w.r.t. the case where you only havethe DATA and the CORRECTED_DATA column). UseTrue if you need to interact with theMODEL_DATA in python, say. Also, use True ifyou need finer than field and spw selectionsusing scans/time (and when use with intentselection, please see WARNING section in theintent parameter description).* If False: ‘virtual’ model is created. The modelinformation is saved either in the SOURCE_MODELcolumn in the SOURCE table (if one exists) orin the keyword of the main table in the MS, andmodel visibilities are evaluated on the flywhen calculating calibration or plotting inplotms.By running usescratch=T, it will remove theexisting virtual model from previousruns. usescratch=F will not remove the existingMODEL_DATA but in subsequent process the virtualmodel with matching field and spw combinationwill be used if it exists regardless of thepresence of the MODEL_DATA column.NOTE: for usescratch=False, timerange, scan, andobservation are ignored (i.e. time-specificvirtual model is not possible.).VERY IMPORTANT: The current implementation oftime-dependent models (e.g. ephemerides sources)within setjy is incompatible with the use of thevirtual model column. Please use ephemerides sourcemodels only with usescratch=Trueismms (bool=False)
- to be used internally for MMS