MHO_Passband
Purpose
MHO_Passband selects a contiguous frequency range for either inclusion or
exclusion across all channels. Depending on the ordering of the two frequency
limits, the operator either cuts out a specific band of spectrum
(exclusion mode) or retains only a specific band and cuts everything
outside (inclusion mode). This provides a simple mechanism for restricting
analysis to a known clean frequency range or for removing a specific
interferer band.
Control File Trigger
Keyword:
passbandCategory: flagging
Priority: 4.5
Parameter |
Type |
Description |
|---|---|---|
value |
list_real |
List of exactly two frequency values (in MHz) specifying the band limits. The interpretation depends on their order: if |
The builder (MHO_PassbandBuilder) validates that exactly two frequency
values are provided and passes them to the operator’s SetPassband method.
The default behavior (when neither ordering is explicitly set) is exclusion mode,
which matches the legacy fourfit convention.
Input Data
This operator acts on the visibility_type container and simultaneously
modifies the weight_type container (supplied via SetWeights).
Algorithm
MHO_Passband has no Initialize method; all work occurs in ExecuteInPlace.
The operator supports two modes of operation, distinguished by the fIsExclusion flag set during SetPassband:
Exclusion mode (\(f_{\rm second} < f_{\rm first}\)):
The frequency band \([f_{\rm low}, f_{\rm high}]\) is excised; everything outside is retained.
Iterate over every frequency channel.
Retrieve the channel’s sky frequency,
bandwidthlabel, andnet_sidebandlabel.Compute the channel’s lower and upper frequency limits using
DetermineChannelFrequencyLimits:\[\begin{split}[f_{\rm chan\_low}, f_{\rm chan\_high}] = \begin{cases} [f_{\rm sky},\ f_{\rm sky} + B] & \text{USB} \\ [f_{\rm sky} - B,\ f_{\rm sky}] & \text{LSB} \end{cases}\end{split}\]Use
FindIntersectionto check whether the exclusion band overlaps the channel interval.If there is overlap, iterate over all spectral points:
Compute the absolute frequency \(f_{\rm sp} = f_{\rm sky} + s_b \cdot \Delta f_{\rm sp}\) where \(s_b = +1\) for USB and \(s_b = -1\) for LSB.
If \(f_{\rm low} < f_{\rm sp} < f_{\rm high}\), zero out the visibility slice and increment the zeroed counter.
Compute the used bandwidth fraction and rescaling factor, apply to weights, and store metadata.
Inclusion mode (\(f_{\rm first} < f_{\rm second}\)):
Only the frequency band \([f_{\rm low}, f_{\rm high}]\) is retained; everything outside is cut.
Iterate over every frequency channel.
Retrieve channel frequency information and compute the channel interval \([f_{\rm chan\_low}, f_{\rm chan\_high}]\).
Use
FindIntersectionto check whether the inclusion band overlaps the channel interval.If there is overlap:
Iterate over all spectral points.
For each spectral point, if \(f_{\rm sp} < f_{\rm low}\) or \(f_{\rm sp} > f_{\rm high}\) (outside the inclusion band), zero out the visibility slice and increment the counter.
Compute the used bandwidth fraction and rescaling factor, apply to weights, and store
used_bandwidth_fractionon the visibility channel axis andrescaling_factoron the weight container’s channel axis.
If there is no overlap (channel is entirely outside the inclusion band):
Zero out the entire channel (all spectral points, all polarization products, all accumulation periods).
Multiply all weight entries for the channel by zero.
Store
used_bandwidth_fraction= 0.0 andrescaling_factor= 0.0.
Effect on Data
In exclusion mode, spectral points whose absolute frequency falls within the
specified band [f_low, f_high] are zeroed. In inclusion mode, all spectral
points outside [f_low, f_high] are zeroed, and channels with no overlap with
the inclusion band are entirely zeroed (both visibility and weight data).
In both modes, the weight container is rescaled per channel
using 1/frac where frac is the fraction of retained spectral points.
used_bandwidth_fraction is stored on the visibility channel axis, and
rescaling_factor is stored on the weight container’s channel axis.