getALMAFluxcsv

Return to directory of Todd's CASA extensions

Reads a flux.csv file generated by the pipeline's hifa_import task. runs getALMAFlux for each field, and fills in updated flux density values as computed from the closest Band 3 and Band 7 measurements in the ALMA calibrator database. The original file is renamed to *.original. The following conditions will generate warning messages to the console:
  1. Band 3/7 measurements differ in date by > 14 days
  2. mean time separation between science observation and Band 3/7 measurement is > 14 days
  3. spectral index comes out too high

For simplicity, the first two warnings are controlled by the same parameter: "separationThreshold" (default=14). The first two warnings will only be printed for sources with intent of FLUX or AMPLITUDE. The third warning will be printed for any source since it may uncover problems in the database. It is controlled by the parameter "maximumSensibleSpectralIndex" (default=0.0).

Usage:

au.getALMAFluxcsv(fluxcsv, lowband=3, highband=7, searchAdjacentNames=True, separationThreshold=30,
                                  maximumSensibleSpectralIndex=0.0, silent=True, outfile='')
Inputs:
  • fluxcsv: name of the flux.csv file to process (it can include the path)
  • lowband: the ALMA Band number to use as the low frequency flux measurement
  • highband: the ALMA Band number to use as the high frequency flux measurement
  • searchAdjacentNames: pass this flag to au.searchFlux to promote finding quasars that were erroneously "renamed" by the online system
  • separationThreshold: in days, if Band3/7 measurements are further apart then this, then write a warning
  • maximumSensibleSpectralIndex: if larger than this, then write a warning
  • silent: if True, then only print Warning and progress messages, not the flux information messages
  • outfile: name of file to produce (it can include the path), default='flux.csv'

Example:

CASA <7>: !more flux.csv
ms,field,spw,I,Q,U,V
uid___A002_X652932_X16a.ms,0,9,3030.53370177,0.0,0.0,0.0,"intent=BANDPASS"
uid___A002_X652932_X16a.ms,0,11,3030.53370177,0.0,0.0,0.0,"intent=BANDPASS"
uid___A002_X652932_X16a.ms,0,13,3030.53370177,0.0,0.0,0.0,"intent=BANDPASS"
uid___A002_X652932_X16a.ms,0,15,3030.53370177,0.0,0.0,0.0,"intent=BANDPASS"
uid___A002_X652932_X16a.ms,3,9,7.05,0.0,0.0,0.0,"intent=PHASE"
uid___A002_X652932_X16a.ms,3,11,7.05,0.0,0.0,0.0,"intent=PHASE"
uid___A002_X652932_X16a.ms,3,13,7.05,0.0,0.0,0.0,"intent=PHASE"
uid___A002_X652932_X16a.ms,3,15,7.05,0.0,0.0,0.0,"intent=PHASE"

CASA <8>: au.getALMAFluxcsv('flux.csv')
WARNING: Measurements for field 0 (J1229+0203) at Band 3 & 7 differ by 32 days, causing further uncertainty in the spectral index.
Consult the time plots on the ALMA calibrator web tool to check the validity of the flux densities.
WARNING: Measurements for field 3 (3C273) at Band 3 & 7 differ by 32 days, causing further uncertainty in the spectral index.
Consult the time plots on the ALMA calibrator web tool to check the validity of the flux densities.

CASA <9>: !more flux.csv
ms,field,spw,I,Q,U,V
uid___A002_X652932_X16a.ms,0,9,2.287,0.0,0.0,0.0,"intent=BANDPASS # +-0.255Jy, freq=341.995GHz, spec_index=-0.970+-0.039, Band3/7_separation=32 days, s
etjy parameters for field 0 (J1229+0203): spix=-0.9704, reffreq='341.9946GHz', fluxdensity=[2.286526,0,0,0], au.getALMAFluxcsv v1.1845 executed on 2014
-08-08"
uid___A002_X652932_X16a.ms,0,11,2.274,0.0,0.0,0.0,"intent=BANDPASS # +-0.259Jy, freq=343.932GHz"
uid___A002_X652932_X16a.ms,0,13,2.211,0.0,0.0,0.0,"intent=BANDPASS # +-0.255Jy, freq=353.995GHz"
uid___A002_X652932_X16a.ms,0,15,2.199,0.0,0.0,0.0,"intent=BANDPASS # +-0.254Jy, freq=355.995GHz"
uid___A002_X652932_X16a.ms,3,9,2.287,0.0,0.0,0.0,"intent=PHASE # +-0.257Jy, freq=341.995GHz, spec_index=-0.970+-0.039, Band3/7_separation=32 days, setj
y parameters for field 3 (3C273): spix=-0.9704, reffreq='341.9946GHz', fluxdensity=[2.286526,0,0,0]"
uid___A002_X652932_X16a.ms,3,11,2.274,0.0,0.0,0.0,"intent=PHASE # +-0.257Jy, freq=343.932GHz"
uid___A002_X652932_X16a.ms,3,13,2.211,0.0,0.0,0.0,"intent=PHASE # +-0.254Jy, freq=353.995GHz"
uid___A002_X652932_X16a.ms,3,15,2.199,0.0,0.0,0.0,"intent=PHASE # +-0.256Jy, freq=355.995GHz"
-- ToddHunter - 2014-08-07
Topic revision: r6 - 2016-05-13, ToddHunter
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding NRAO Public Wiki? Send feedback