aces.sefd.stages¶
Base tasks used to construct the prefect based SEFD pipeline
Module Contents¶
Functions¶
|
Obtain a sorted listed of (beam, minimum frequency) tuples, used for helping |
|
Searches for measurement sets within a folder in the current directory. The folder |
|
Create summary plots of the merged SEFD hdf5 file |
|
Inspects the header of many SEFD hdf5 files, each corresponding to a separate ASKAP |
|
Merge many SEFD beam HDF5 files into a single HDF5 file |
|
Create a SEFD HDF5 file from a measurement set |
|
Copies and creates the necessary parsets to support the SEFD pipeline |
|
Move the SEFD created files into a specified output directory. |
Attributes¶
- 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