low_comm_tools.ms_fixes.reverse_baselines
Attributes
Classes
A chunk of rows read from the main table of a MeasurementSet, |
Functions
Iterate over rows of a MeasurementSet main table in chunks. |
|
|
Checks the baseline ordering in an MS. |
|
Check if user is happy to continue. |
|
|
|
|
|
Reverse baseline order in an MS. |
Module Contents
- class low_comm_tools.ms_fixes.reverse_baselines.BaselineChunk[source]
Bases:
NamedTupleA chunk of rows read from the main table of a MeasurementSet, containing all columns needed to reverse baselines.
- chunk_size: int[source]
Number of rows in this chunk (may be less than requested on the final chunk).
- low_comm_tools.ms_fixes.reverse_baselines._iter_baseline_chunks(ms_table: casacore.tables.table, present_columns: list[str], chunk_size: int) collections.abc.Generator[BaselineChunk, None, None][source]
Iterate over rows of a MeasurementSet main table in chunks.
- low_comm_tools.ms_fixes.reverse_baselines.check_ant_1_lt_ant_2(ms_path: pathlib.Path) bool[source]
Checks the baseline ordering in an MS.
Returns True if ANTENNA1<ANTENNA2
- low_comm_tools.ms_fixes.reverse_baselines.check_baseline_ordering(ms_path: pathlib.Path) None[source]
Check if user is happy to continue.
Will prompt for interaction if check_ordering_is_good returns True.
- Parameters:
ms_path (Path) – Path to MS
- low_comm_tools.ms_fixes.reverse_baselines.get_parser() argparse.ArgumentParser[source]
- low_comm_tools.ms_fixes.reverse_baselines.reverse_baselines(ms_path: pathlib.Path, chunk_size: int = 1000) pathlib.Path[source]
Reverse baseline order in an MS.
- Performs three steps on each row:
Hermite transpose (transpose + conjugate) the data
Swap ANTENNA1/ANTENNA2 label
Negate UVWs
- Parameters:
ms_path (Path) – Path to MS
chunk_size (int, optional) – Number of rows to process in a chunk. Defaults to 1000.
- Raises:
RuntimeError – If no DATA-like are found
- Returns:
Path to modified MS
- Return type:
Path