orca.transform.qa
Quality assurance transforms for data validation.
Provides functions for data sanity checking, gain calibration quality assessment, and identification of problematic antennas and channels. Integrates with ClickHouse for logging QA metrics.
Attributes
Functions
|
Check measurement sets for data integrity issues. |
|
Analyze a CASA gain calibration table to identify problematic antennas and channels |
Module Contents
- orca.transform.qa.sanity_check(msl: List[str]) List[str][source]
Check measurement sets for data integrity issues.
Reads data from each measurement set and checks for excessive zero values. Reports statistics to ClickHouse database and returns list of problematic files.
- Parameters:
msl – List of measurement set paths to check.
- Returns:
List of measurement sets that had I/O errors or unexpected row counts.
- orca.transform.qa.gainQA(calfile: str, do_plot: bool = True, save_stats: bool = True, outdir: str = './', qa_file: str = None)[source]
Analyze a CASA gain calibration table to identify problematic antennas and channels based on gain amplitude and SNR statistics. Optionally generates a QA report and diagnostic plots.
- Parameters:
calfile (str) – Path to the CASA calibration table (gaincal output).
do_plot (bool) – If True, generates diagnostic plots and saves to outdir.
save_stats (bool) – If True, writes a .qa report with flagged antennas/channels.
outdir (str) – Output directory to save plots. Defaults to ‘./’.
qa_file (str) – Optional path to the QA report file. If None, defaults to calfile + ‘.qa’.
- Returns:
Array of indices of CORRELATOR NUMBERS with anomalous amplitude statistics. bad_ch (np.ndarray): Array of indices of channels with anomalous SNR statistics.
- Return type:
bad_corrs (np.ndarray)