Utility functions
Add new antenna to CASA antenna table
adds a new antenna to a CASA antenna table Usage: python add_ant.py
Currently, the inputs are hardcoded, with the AMT as an example.
Inputs: - input antenna table name - output antenna table name - new antenna dictionary, includes: – Position: Lat [deg], Long [deg, east +ve], height [metres] converts to XYZ assuming WGS84 ellipsoid, formulas from Seeber, Satellite Geodesy (2003 ed, sect.2.1.4)
– antenna mount type (will become important as MeqSilhouette accounts for this)
– DISH_DIAMETER [metres]
– etc.
e.g. newAntDict = {‘OFFSET’ : [0,0,0], ‘POSITION’: [5627893.7450699108, 1637770.1989314035, -2512490.219404601], ‘TYPE’ : ‘GROUND-BASED’, ‘DISH_DIAMETER’: 12, ‘FLAG_ROW’: 0, ‘MOUNT’ : ‘alt-az’, ‘NAME’ : ‘AMT’, ‘STATION’ : ‘AMT’}
Ouputs: new antenna table
- meqsilhouette.utils.add_ant.AddAnt(inputAntTableName, outputAntTableName, newAntDict)[source]
Add a single row to existing CASA antenna table and write to a new table.
Parameters
- inputAntTableNamestr
Name of input antenna table
- outputAntTableNamestr
Name of output antenna table
- newAntDictdict
Dictionary containing new antenna parameters
Print functions
Regularize MS with missing rows
- meqsilhouette.utils.regularize_ms.regularize_ms(msname)[source]
Regularize an MS
Parameters
- msnamestr
Name of the MS to be regularized
Returns
- outmsnamestr
Name of the regularized MS
Notes
The output MS will have the same number of baselines (rows) for each time stamp. All new rows are fully flagged. First, missing rows are written into a separate MS <msname>_missing.MS, which is concatenated with the original MS and sorted in order of TIME, DATADESC_ID, ANTENNA1, ANTENNA2 to form a new regular MS. This MS is a ‘deep’ copy copy of the original MS.
If no rows are missing, no new MS is created and outmsname = msname.