:py:mod:`aces.operations.ms` ============================ .. py:module:: aces.operations.ms .. autoapi-nested-parse:: Simple tools and functions associated with measurement sets Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: aces.operations.ms.generate_mock_ms aces.operations.ms.beam_from_ms aces.operations.ms.min_freq_from_ms aces.operations.ms.extract_beam_min_freq Attributes ~~~~~~~~~~ .. autoapisummary:: aces.operations.ms.logger aces.operations.ms.MSTABLES aces.operations.ms.MSTABLEFILES .. py:data:: logger .. py:data:: MSTABLES :type: tuple[str, Ellipsis] :value: ('ANTENNA', 'DATA_DESCRIPTION', 'FEED', 'FIELD', 'FLAG_CMD', 'HISTORY', 'OBSERVATION',... .. py:data:: MSTABLEFILES :type: tuple[str, Ellipsis] :value: ('table.dat', 'table.f0', 'table.f0i', 'table.f1', 'table.info', 'table.lock') .. py:function:: generate_mock_ms(ms_name: str, out_dir: Optional[pathlib.Path] = None, ms_tables: tuple[str, Ellipsis] = MSTABLES, ms_table_files: tuple[str, Ellipsis] = MSTABLEFILES) -> pathlib.Path 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 .. py:function:: beam_from_ms(ms: pathlib.Path) -> int 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 .. py:function:: min_freq_from_ms(ms: pathlib.Path) -> float 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 .. py:function:: extract_beam_min_freq(ms: pathlib.Path) -> tuple[int, int] 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