arrakis.merge_fields

Merge multiple RACS fields

Functions

cli()

Command-line interface

copy_singleton(→ List[pymongo.UpdateOne])

Copy an island within a single field to the merged field

copy_singletons(→ List[pymongo.UpdateOne])

Copy islands that don't overlap other fields

genparset(→ str)

main(→ str)

make_short_name(→ str)

merge_multiple_field(→ List[pymongo.UpdateOne])

Merge an island that overlaps multiple fields

merge_multiple_fields(→ List[pymongo.UpdateOne])

Merge multiple islands that overlap multiple fields

merge_parser(→ argparse.ArgumentParser)

Module Contents

arrakis.merge_fields.cli()[source]

Command-line interface

arrakis.merge_fields.copy_singleton(beam: dict, field_dict: Dict[str, str], merge_name: str, data_dir: str) List[pymongo.UpdateOne][source]

Copy an island within a single field to the merged field

Parameters:
  • beam (dict) – Beam document

  • field_dict (Dict[str, str]) – Field dictionary

  • merge_name (str) – Merged field name

  • data_dir (str) – Output directory

Raises:

KeyError – If ion files not found

Returns:

Database updates

Return type:

List[pymongo.UpdateOne]

arrakis.merge_fields.copy_singletons(field_dict: Dict[str, str], data_dir: str, beams_col: pymongo.collection.Collection, merge_name: str) List[pymongo.UpdateOne][source]

Copy islands that don’t overlap other fields

Parameters:
  • field_dict (Dict[str, str]) – Field dictionary

  • data_dir (str) – Data directory

  • beams_col (pymongo.collection.Collection) – Beams collection

  • merge_name (str) – Merged field name

Returns:

Database updates

Return type:

List[pymongo.UpdateOne]

arrakis.merge_fields.genparset(old_ims: list, stokes: str, new_dir: str) str[source]
arrakis.merge_fields.main(fields: List[str], field_dirs: List[str], merge_name: str, output_dir: str, host: str, epoch: int, username: str | None = None, password: str | None = None, yanda='1.3.0') str[source]
arrakis.merge_fields.make_short_name(name: str) str[source]
arrakis.merge_fields.merge_multiple_field(beam: dict, field_dict: dict, merge_name: str, data_dir: str, image: str) List[pymongo.UpdateOne][source]

Merge an island that overlaps multiple fields

Parameters:
  • beam (dict) – Beam document

  • field_dict (dict) – Field dictionary

  • merge_name (str) – Merged field name

  • data_dir (str) – Data directory

  • image (str) – Yandasoft image

Raises:

KeyError – If ion files not found

Returns:

Database updates

Return type:

List[pymongo.UpdateOne]

arrakis.merge_fields.merge_multiple_fields(field_dict: Dict[str, str], data_dir: str, beams_col: pymongo.collection.Collection, merge_name: str, image: str) List[pymongo.UpdateOne][source]

Merge multiple islands that overlap multiple fields

Parameters:
  • field_dict (Dict[str, str]) – Field dictionary

  • data_dir (str) – Data directory

  • beams_col (pymongo.collection.Collection) – Beams collection

  • merge_name (str) – Merged field name

  • image (str) – Yandasoft image

Returns:

Database updates

Return type:

List[pymongo.UpdateOne]

arrakis.merge_fields.merge_parser(parent_parser: bool = False) argparse.ArgumentParser[source]