MHO_AdhocPhaseCorrection
Purpose
MHO_AdhocPhaseCorrection applies a time-dependent (and optionally
channel-dependent) phase correction exp(-i*zeta) to visibility data.
The operator supports three modes: sinewave, polynomial, and file-based.
The phase correction zeta is computed per (channel, accumulation period)
and applied uniformly across all polarization products and spectral points.
Control File Trigger
Keyword:
adhoc_phaseCategory: calibration
Priority: 3.5
Parameter |
Type |
Description |
|---|---|---|
algorithm_type |
string |
Must be |
adhoc_amp |
double |
Sinewave amplitude in degrees. |
adhoc_period |
double |
Sinewave period in seconds. |
adhoc_tref |
double |
Reference time in seconds past the most recent hour. |
Parameter |
Type |
Description |
|---|---|---|
algorithm_type |
string |
Must be |
adhoc_poly |
list_real |
1-6 polynomial coefficients in deg/s^n. |
adhoc_tref |
double |
Reference time in seconds past the most recent hour. |
Parameter |
Type |
Description |
|---|---|---|
algorithm_type |
string |
Must be |
adhoc_file |
string |
Per-station: path to the ASCII phase file. |
adhoc_file_chans |
string |
Per-station: channel-label string defining column order. |
Input Data
This operator acts on the visibility_type container.
Algorithm
The operator performs the following steps:
Initialization (``InitializeInPlace``):
If the mode is
NONE, the operator is a no-op.Extract the scan start time from the visibility container’s
startmetadata tag. Convert to fractional days since the beginning of the year, and compute the scan start in seconds past the most recent hour.Derive the accumulation period duration from the time axis.
For file (PHYLE) mode only: load and parse both the reference and remote station adhoc phase files. Each data line contains a fractional day time followed by one phase value (in degrees) per channel. Comment lines (non-numeric first token) are skipped. If a file has only one data row, it is duplicated to ensure a valid interpolation interval.
Execution (``ExecuteInPlace``):
Iterate over every frequency channel in the visibility container.
For each channel, retrieve the
channel_label(fourfit freq-code character). Channels without a label are skipped.For each accumulation period (AP):
Compute the AP center time in seconds from scan start:
t_center = t_AP + 0.5 * t_acc.Compute the phase correction
zeta(in radians) by callingComputeZetawith the channel label and AP center time (details below).Construct the phasor
Phi = exp(-i*zeta).Multiply all visibility values for all polarization products and spectral points at (channel, AP) by
Phi.
Phase Computation (``ComputeZeta``):
The time argument used in the sinewave and polynomial models is:
where \(t_{\rm ref}\) is the adhoc_tref parameter. This (legacy) convention
measures time in seconds since the beginning of the year, minus the seconds-past-the-hour reference.
Sinewave mode:
\[\zeta = A \sin\!\left(\frac{2\pi \tau}{P}\right)\]where \(A\) is the amplitude (converted from degrees to radians by the builder) and \(P\) is the period in seconds.
Polynomial mode:
\[\zeta = c_0 + c_1 \tau + c_2 \tau^2 + c_3 \tau^3 + c_4 \tau^4 + c_5 \tau^5\]where coefficients \(c_0, \dots, c_5\) are in rad/sn (converted from degrees by the builder). Up to 6 coefficients are used; missing entries default to zero.
File mode:
Convert the AP center time to fractional days since BOY:
t_fpday = t_scan_start_fpday + t_center / 86400.For each station, look up the channel’s freq-code character in the station’s channel string to find the column index.
Clamp
t_fpdayto the file’s time range, then find the bounding interval [n-1, n] by linear scan.Linearly interpolate the phase (in degrees) between rows n-1 and n:
\[\phi_{\rm deg} = \frac{t_{\rm bound}(\phi_b - \phi_a) - t_a \phi_b + t_b \phi_a}{t_b - t_a}\]Convert from degrees to radians.
The differential phase correction is \(\zeta = \phi_{\rm ref} - \phi_{\rm rem}\).
Effect on Data
For each (channel, AP) combination, all visibility values across all
polarization products and spectral points are multiplied by a complex
phasor exp(-i*zeta), where zeta is the mode-dependent phase correction
in radians. In sinewave and polynomial modes, zeta is the same for all
channels. In file mode, zeta varies per channel and is computed as the
differential phase (reference minus remote) interpolated from station-specific
phase files.