aces.sefd.stages

Base tasks used to construct the prefect based SEFD pipeline

Module Contents

Functions

scan_ms_configs(→ list[tuple[int, int]])

Obtain a sorted listed of (beam, minimum frequency) tuples, used for helping

find_ms(→ Collection[pathlib.Path])

Searches for measurement sets within a folder in the current directory. The folder

summary_plots_sefd() → pathlib.Path)

Create summary plots of the merged SEFD hdf5 file

verify_create_hdf5_hdr_sefd(→ tuple[dict[Any, Any], ...)

Inspects the header of many SEFD hdf5 files, each corresponding to a separate ASKAP

merge_hdf5_sefd(→ pathlib.Path)

Merge many SEFD beam HDF5 files into a single HDF5 file

processing_sefd() → pathlib.Path)

Create a SEFD HDF5 file from a measurement set

create_parset(→ None)

Copies and creates the necessary parsets to support the SEFD pipeline

move_sefd_files_into(→ None)

Move the SEFD created files into a specified output directory.

Attributes

logger

ARCHIVE

aces.sefd.stages.logger[source]
aces.sefd.stages.ARCHIVE = '/astro/askaprt/askapops/askap-scheduling-blocks/'[source]
aces.sefd.stages.scan_ms_configs(ms_set: Collection[pathlib.Path]) list[tuple[int, int]][source]

Obtain a sorted listed of (beam, minimum frequency) tuples, used for helping to sort measurement sets before merging their corresponding hdf5 files together while ensuring unique indicies

Args:

ms_set (Collection[Path]): Measurement sets that will be sorted

Returns:

list[tuple[int, int]]: Increasing beam and frequency tuples across all measurement sets

aces.sefd.stages.find_ms(sbid: int) Collection[pathlib.Path][source]

Searches for measurement sets within a folder in the current directory. The folder name is the provided sbid.

Args:

sbid (int): The SBID of the observation, and the name of a folder containing the measurement sets

Raises:

FileNotFoundError: Raised when the SBID folder containing the measurement sets is not found

Returns:

Collection[Path]: Paths to each of the located measurement sets

aces.sefd.stages.summary_plots_sefd(sbid: int, merged_hdf5: pathlib.Path, sefd_scale_range: tuple[float, float] = (1465.0, 2931.0)) pathlib.Path[source]

Create summary plots of the merged SEFD hdf5 file

Args:

sbid (int): The SBID of the observation the SEFD data are derived from merged_hdf5 (Path): Location of the merged HDF5 file sefd_scale_range (tuple[float, float], optional): SEFD limits used for plotting, and correspond to Tsys/eff of 60K and 120K. Defaults to (1465.0, 2931.0).

Returns:

Path: Path to output plot created

aces.sefd.stages.verify_create_hdf5_hdr_sefd(sefd_hdf5: Collection[pathlib.Path]) tuple[dict[Any, Any], list[int], list[int]][source]

Inspects the header of many SEFD hdf5 files, each corresponding to a separate ASKAP beam, to ensure compatible frequency ranges, correct number of beams, and antennas. If these checks pass, a new header is formed with correct properties for the merged HDF5 file

Args:

sefd_hdf5 (Collection[Path]): A collection of Paths, each pointing to a SEFD beam HDF5 file

Raises:

ValueError: Raised when the spectrum is discontigous / split.

Returns:

tuple[dict[Any, Any], list[int], list[int]]: The new header, list of unique antenna and beams

aces.sefd.stages.merge_hdf5_sefd(sbid: int, sefd_hdf5s: Collection[pathlib.Path]) pathlib.Path[source]

Merge many SEFD beam HDF5 files into a single HDF5 file

Args:

sbid (int): The SBID of the observationt hat took the data being processed sefd_hdf5s (Collection[Path]): Collection of paths that point to t he SEFD HDF5 file of indibidual beams

Returns:

Path: Path to the merged SEFD HDF5 file

aces.sefd.stages.processing_sefd(sbid: int, ms: pathlib.Path, beam_min_freq_order: list[tuple[int, int]], default_parset_path: pathlib.Path = Path('SEFD_defaults.parset')) pathlib.Path[source]

Create a SEFD HDF5 file from a measurement set

Args:

sbid (int): SBID of the observation used to obtain data ms (Path): Path to a measurement set containing data from a single ASKAP beam beam_min_freq_order (list[tuple[min, float]]): Lookup used to derive the correct order of output hdf5 files, with increasing numbers corresponding to larger beams and higher frequencies. default_parset_path (Path, optional): Path to a parset with default processing options. Defaults to Path(“SEFD_defaults.parset”).

Raises:

FileNotFoundError: Raised if the default SEFD processing parset can not be located FileNotFoundError: Raised id the SEFD paraset for this SBID does not exist

Returns:

Path: Output path of the SEFD HDF5 file

aces.sefd.stages.create_parset(sbid: int, workdir: pathlib.Path) None[source]

Copies and creates the necessary parsets to support the SEFD pipeline

Args:

sbid (int): The SBID of the SEFD observation to process workdir (Path): Location to copy the parsets into, which is intended to be where processing will be carried out

Raises:

FileNotFoundError: Raised if the SEFD parset distributed with aces-apps can not be found

aces.sefd.stages.move_sefd_files_into(sbid: int, out_dir: pathlib.Path) None[source]

Move the SEFD created files into a specified output directory.

Args:

sbid (int): The SBID of the observation being processed. out_dir (Path): Location to move files to.