low_comm_tools.ms_fixes.fix_weights

Classes

DataChunk

Functions

_iter_chunks(→ collections.abc.Generator[DataChunk, ...)

Iterate over rows of a MeasurementSet main table in chunks.

fd_to_fraction(→ numpy.typing.NDArray[numpy.floating[Any]])

get_parser(→ argparse.ArgumentParser)

main(→ None)

make_new_weights(→ pathlib.Path)

Module Contents

class low_comm_tools.ms_fixes.fix_weights.DataChunk[source]

Bases: NamedTuple

chunk_size: int[source]
interval: astropy.units.Quantity[astropy.units.s][source]
row_start: int[source]
weight: low_comm_tools.ms_utils.FloatArray | None[source]
weight_spectrum: low_comm_tools.ms_utils.FloatArray | None[source]
low_comm_tools.ms_fixes.fix_weights._iter_chunks(ms_table: casacore.tables.table, chunk_size: int) collections.abc.Generator[DataChunk, None, None][source]

Iterate over rows of a MeasurementSet main table in chunks.

Parameters:
  • ms_table (table) – An opened, writable MeasurementSet main table.

  • present_columns (list[str]) – Visibility column names to read.

  • chunk_size (int) – Number of rows to read per chunk.

Yields:

BaselineChunk – One chunk of rows at a time.

low_comm_tools.ms_fixes.fix_weights.fd_to_fraction(fd_arr: numpy.typing.NDArray[numpy.floating[Any]]) numpy.typing.NDArray[numpy.floating[Any]][source]
low_comm_tools.ms_fixes.fix_weights.get_parser() argparse.ArgumentParser[source]
low_comm_tools.ms_fixes.fix_weights.main() None[source]
low_comm_tools.ms_fixes.fix_weights.make_new_weights(ms_path: pathlib.Path, chunk_size: int = 1000, dry_run: bool = False) pathlib.Path[source]