repairAtmcalStateIDs

Return to directory of Todd's CASA extensions

Replaces the stateId entries in the Main.xml file of an ASDM for all the atmospheric calibration (Tsys) scans, so that offline casapy-telcal can then be run in order to regenerate the SysCal.xml file (e.g. using au.repairSysCal). It forces all appearances of "State_X" to match the values of the state IDs in the State.xml table appropriate for the subscan number, which are obtained automatically by running getAtmcalStateIDsFromASDM. For 3-subscan Atmcals: subscan 0=sky, 1=ambient, 2=hot. For 4-subscan Atmcals, subscan 0=sky, 1=reference(zero), 2=ambient, 3=hot. See PRTSIR-2367 for an example dataset with the problem.

Usage:

au.repairAtmcalStateIDs(asdm, dryrun=False)
  • asdm: the name of the ASDM to fix
  • dryrun: if True, then print the scan numbers that need fixing, but don't change anything

Example:

CASA <6>: au.repairAtmcalStateIDs('uid___A002_X80f1d7_X476', dryrun=True)
  Found  140  scans in Scan.xml
Read 22751 lines from Main.xml
No scans need fixing.

-- ToddHunter - 2014-05-08
Topic revision: r3 - 2014-05-15, 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