*Master Side of the recipe *
Recipe to correct outliers in the gain solutions of an parmdb, using the program parmexportcal The main purpose of this program is to strip off the time axis information from a instrument model (a.k.a ParmDB) -or- a minimal implementation of the edit_parmdb program. Search all gains for outliers and swap these for the median
Command line arguments
Recipe inputs
Parameters: |
|
---|
Recipe outputs (job.results[parameter])
Parameters: | mapfile – (FileField) mapfile with corrected parmdbs (FileField) |
---|
*Node Side of the recipe *
Perform a gain outlier correction on the provided parmdb. The functionality is based on the edit_parmdb script of John Swinbank.
Outliers in the gain are swapped with the median. resulting gains are written back to the supplied ms:
Performs a gain outlier correction of the infile parmdb with the corrected parmdb written to outfile. Outliers in the gain with a distance of median of sigma times std are replaced with the mean. The last value of the complex array is skipped (John Swinbank: “I found it [the last value] was bad when I hacked together some code to do this”)
Read the polarisation data and type from the db.
Performs a conversion of a 2d array to a 1d complex valued array. with real/imag values or with amplitude phase values
Perform the actual find and replace of the outliers Calculation are perform with complex arithmatic therefore the 2d arrays are converted to complex value array of 1 d
Use pyparmdb to write (now corrected) data to the parmdb