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
3-subscan Atmcals: subscan 0=sky, 1=ambient, 2=hot. For 4-subscan Atmcals, subscan 0=sky, 1=reference(zero), 2=ambient, 3=hot.
for an example dataset with the problem.
- asdm: the name of the ASDM to fix
- dryrun: if True, then print the scan numbers that need fixing, but don't change anything
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.