orca.calibration.delay_pipeline =============================== .. py:module:: orca.calibration.delay_pipeline .. autoapi-nested-parse:: Delay calibration pipeline. This module provides the delay calibration pipeline for OVRO-LWA data. Combines measurement sets across all frequencies to solve for per-antenna delays using Cygnus A as the calibrator. The pipeline: 1. Selects optimal MS per frequency based on LST proximity to Cyg A transit. 2. Concatenates and combines spectral windows with mstransform. 3. Flags RFI and bad antennas. 4. Generates Cyg A model and solves for delays. 5. Produces QA plots showing delay solutions per antenna. .. admonition:: Example >>> from orca.calibration.delay_pipeline import run_delay_pipeline >>> run_delay_pipeline('2024-01-15') Functions --------- .. autoapisummary:: orca.calibration.delay_pipeline.closest_ms_by_lst orca.calibration.delay_pipeline.copytree orca.calibration.delay_pipeline.run_delay_pipeline Module Contents --------------- .. py:function:: closest_ms_by_lst(ms_list, target_lst_rad) Find the measurement set closest to target LST. :param ms_list: List of measurement set paths. :param target_lst_rad: Target LST in radians. :returns: Path to the MS with LST closest to target. .. py:function:: copytree(src, dst) Copy directory tree, removing destination if it exists. :param src: Source directory path. :param dst: Destination directory path. .. py:function:: run_delay_pipeline(obs_date, ref_lst=20.00554072 / 24 * 2 * 3.14159265359, tol_min=1) Run delay calibration for all frequencies >= 41 MHz for a given date. This function: 1. Selects the best MS for each frequency based on proximity to a reference LST. 2. Copies selected MS files to NVMe. 3. Concatenates and combines SPWs using mstransform. 4. Flags RFI using AOFlagger and known bad antennas. 5. Generates a model (Cyg A only) and applies it. 6. Runs gaincal to solve for delays. 7. Outputs: - CASA delay calibration table at /lustre/pipeline/calibration/delay// - A QA PDF showing per-antenna delays. 8. Cleans up NVMe temporary files. :param obs_date: Date in 'YYYY-MM-DD' format. :type obs_date: str :param ref_lst: Reference LST (in radians). Default is Cyg A transit. :type ref_lst: float :param tol_min: Reserved for future LST filtering tolerance (minutes). :type tol_min: int