Return to directory of Todd's CASA extensions
This class contains methods to read the gains (slope and intercept) of the baseband square law detectors (
SQLDs) from the container log text file on the
computing-logs web interface, and to apply them to the
SQLD data of a CASA measurement set in order to convert from ADC counts to dBm.
Usage:
| __init__(self, vis, copy_ms=False)
| copy_ms: if set to True, will first copy vis.ms into vis.sqld and operate on that
|
| plotms(self, antenna='*&&&', scan='', spw='', coloraxis='spw', correlation='XX', iteraxis='antenna', avgtime='1s', plotrange=[0, 0, 0, 0], intent='OBSERVE_TARGET')
| Runs plotms with useful parameters
| scan: if '', then plot all scans with specified intent(s)
| spw: if '', then find all SQLD spws
| intent: a list of intents, as a comma-delimited string
|
| convertSQLDtodBm(self, antenna='', calibration='auto', spw='', zeroLevel=-20, verbose=False)
| Converts the amplitude data in the SQLD spws of an ALMA measurement set
| from counts to dBm.
| Inputs:
| * vis: the measurement set
| Optional inputs:
| * calibration: a text file that contains the slope and intercept values
| for each of the IF channels (A,B,C,D for each sideband)
| * antenna: the list of antenna names or IDs to convert
| * spw: the list of spws to convert (default is all SQLD spws)
| * zeroLevel: what value (in dBm) to assign to data points with 0 counts
| Theory:
| a) convert from counts to mV using (counts/65536)*2.5
| b) apply the slope and intercept to convert to mW
| d) convert from mW to dBm by 10*log10(mW)
| -Todd Hunter
|
| readSQLDCalibration(self, antenna, calibration='auto', overwrite=False)
| Reads the gains (slope and intercept) of the SQLDs from a
| container log text file.
| calibration: if 'auto', then retrieve the files from the computing web server
| if '', then use the default values for DA64 on April 1, 2014
| if a filename, then search for values in it
| overwrite: if False (default), then check if the files have already
| been retrieved in the current working directory
| if True, then re-retrieve them
Example
See
CSV-2810:
CASA <13>: sqld = au.SQLD('uid.ms', copy_ms=True)
CASA <14>: sqld.convertSQLDtodBm()
CASA <15>: plotms('uid.sqld',spw='13',yaxis='real',antenna='0&&&',ylabel='Power (dBm)',correlation='XX',plotrange=[0,0,-4,6], coloraxis='scan')
or equivalently:
CASA <16>: sqld.plotms(spw='13',plotrange=[0,0,-4,6], coloraxis='scan')
--
ToddHunter - 2014-04-30
- X1646_scan5_6_BB1_DA64.png: