:py:mod:`aces.operations.actions` ================================= .. py:module:: aces.operations.actions .. autoapi-nested-parse:: This contains some bespoke operations related to the general orchastration of a workflow, including: - copying measurement sets Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: aces.operations.actions.find_sbid_ms_in_dir aces.operations.actions.find_ms_in_dir aces.operations.actions.copy_measurement_set Attributes ~~~~~~~~~~ .. autoapisummary:: aces.operations.actions.logger .. py:data:: logger .. py:function:: find_sbid_ms_in_dir(sbid: int, target_dir: pathlib.Path, expected_no: Optional[int] = None) -> list[pathlib.Path] Searches for measurement sets of a particular SBID in a target directory Args: sbid (int): The SBID of interest target_dir (Path): The directory expected to contain the MS expected_no (Optional[int], optional): Number of expected MSs to find. Defaults to None. Raises: MissingMSError: Raised when expected_no is not None and that many MSs are not found Returns: list[Path]: Location to the MSs that were found in the target_dir .. py:function:: find_ms_in_dir(target_dir: pathlib.Path, expected_no: Optional[int] = None) -> list[pathlib.Path] Searches for measurement sets of a particular SBID in a target directory Args: target_dir (Path): The directory expected to contain the MS expected_no (Optional[int], optional): Number of expected MSs to find. Defaults to None. Raises: MissingMSError: Raised when expected_no is not None and that many MSs are not found Returns: list[Path]: Location to the MSs that were found in the target_dir .. py:function:: copy_measurement_set(target_ms: pathlib.Path, output_dir: pathlib.Path, overwrite: bool = False) -> pathlib.Path Copy a measurement set from a source location to the working directory where the holography pipeline is being executed. Although measurement sets are strictly directories, this function could be expanded for measurement specific tasks. Args: target_ms (Path): Full path to the measurement set to be copied output_dir (Path): Location to save the measurement set overwrite (bool, optional): Overwrite the measurement set if it exists. Defaults to False. Returns: Path: The name of the copied measurement set in the target directory