aces.operations.ms¶
Simple tools and functions associated with measurement sets
Module Contents¶
Functions¶
|
Generates a mock measurement folder and file structure, intended for |
|
Returns the ASKAP PAF beam number from an ASKAP measurement set |
|
Returns the lowest frequency observed in an ASKAP measurement set |
|
Extracts the beam number and lowest frequency channel from an ASKAP measurement set. |
Attributes¶
- aces.operations.ms.MSTABLES: tuple[str, Ellipsis] = ('ANTENNA', 'DATA_DESCRIPTION', 'FEED', 'FIELD', 'FLAG_CMD', 'HISTORY', 'OBSERVATION',...[source]¶
- aces.operations.ms.MSTABLEFILES: tuple[str, Ellipsis] = ('table.dat', 'table.f0', 'table.f0i', 'table.f1', 'table.info', 'table.lock')[source]¶
- aces.operations.ms.generate_mock_ms(ms_name: str, out_dir: pathlib.Path | None = None, ms_tables: tuple[str, Ellipsis] = MSTABLES, ms_table_files: tuple[str, Ellipsis] = MSTABLEFILES) pathlib.Path[source]¶
Generates a mock measurement folder and file structure, intended for testing and other trickery. Not yet intended for regular usage. A ‘.ms’ suffix will be added if it does not already exist.
- Args:
ms_name (str): Name of the measurement fodler to create out_dir (Optional[Path], optional): Location to create the measurement set folder structure. If None it is created in current working directory. Defaults to None. ms_tables (tuple[str, …], optional): Set of table names that will be created. Defaults to MSTABLES. ms_table_files (tuple[str, …], optional): Names of files in each table to create. Defaults to MSTABLEFILES.
- Returns:
Path: Path to the measurement set
- aces.operations.ms.beam_from_ms(ms: pathlib.Path) int[source]¶
Returns the ASKAP PAF beam number from an ASKAP measurement set
- Args:
ms (Path): Path of the measurement set where the beam number will be obtained
- Returns:
int: The beam number of the ASKAP measurement set
- aces.operations.ms.min_freq_from_ms(ms: pathlib.Path) float[source]¶
Returns the lowest frequency observed in an ASKAP measurement set
This is useful when building up a unique combintaion
- Args:
ms (Path): Path of the measurement set where the beam number will be obtained
- Returns:
float: The lowest frequency in Hz across all channels
- aces.operations.ms.extract_beam_min_freq(ms: pathlib.Path) tuple[int, int][source]¶
Extracts the beam number and lowest frequency channel from an ASKAP measurement set.
This is intended to help identify and sort measurement sets in a increasing beam and frequency order, and will be helpful when merging hdf5 based datasets together
- Args:
ms (Path): Path to a valid measurement set.
- Returns:
tuple[int, int]: The beam number and lowest frequency in MHz