orca.utils.calibrationutils

Calibration utilities for source model generation.

Provides functions for creating calibrator source models, selecting calibration time ranges based on source transits, and generating CASA component lists for calibration and peeling.

Attributes

SRC_LIST

Functions

calibration_time_range(start_time, end_time[, ...])

Get dada file names based on Cygnus A transit for calibration.

gen_model_ms_stokes(ms[, zest])

Generate component lists for calibration / polarized peeling in CASA.

gen_model_from_dict(ms, npzfile)

parse_filename(filename)

Parse a filename of the form YYYYMMDD_HHMMSS_anything.ms and extract the UTC time.

get_lst_from_filename(filename)

source_ra_in_hours(position_str)

is_within_transit_window(filename[, window_minutes])

get_relative_path(ms_path)

build_output_paths(ms_path[, base_output_dir])

Module Contents

orca.utils.calibrationutils.SRC_LIST[source]
orca.utils.calibrationutils.calibration_time_range(start_time: datetime.datetime, end_time: datetime.datetime, duration_min: float = 20)[source]

Get dada file names based on Cygnus A transit for calibration. Get list of .dada file names to use for calibration. Selects .dada files that span {duration_min} centered on transit of Cygnus A.

Parameters:
  • utc_times_txt_path – Path to utc_times.txt file.

  • start_time – Start time of data for which to derive calibration tables, datetime format.

  • end_time – End time of data for which to derive calibration tables, datetime format.

  • duration_min – In minutes, amount of time used for calibration. Default is 20 min.

Returns:

cal_start_time and cal_end_time covering {duration_min} calibration range,

in datetime format.

orca.utils.calibrationutils.gen_model_ms_stokes(ms: str, zest: bool = False)[source]

Generate component lists for calibration / polarized peeling in CASA.

Parameters:
  • ms – Measurement set to generate model for.

  • zest – For supplying component lists for polarized peeling. Default is False.

Returns:

Returns path to component list(s). If zest=True, will return a list of paths to single-source component lists.

orca.utils.calibrationutils.gen_model_from_dict(ms: str, npzfile: str)[source]
orca.utils.calibrationutils.parse_filename(filename)[source]

Parse a filename of the form YYYYMMDD_HHMMSS_anything.ms and extract the UTC time.

orca.utils.calibrationutils.get_lst_from_filename(filename)[source]
orca.utils.calibrationutils.source_ra_in_hours(position_str)[source]
orca.utils.calibrationutils.is_within_transit_window(filename, window_minutes=4)[source]
orca.utils.calibrationutils.get_relative_path(ms_path)[source]
orca.utils.calibrationutils.build_output_paths(ms_path, base_output_dir='/lustre/pipeline/slow-averaged/')[source]