arrakis.frion

Correct for the ionosphere in parallel

Attributes

TQDM_OUT

Classes

FrionResults

Prediction

FRion prediction

Functions

cli()

Command-line interface

correct_worker(→ pymongo.UpdateOne)

Apply FRion corrections to a single island

frion_parser(→ argparse.ArgumentParser)

index_beams(→ dict)

main(field, outdir, host, epoch[, sbid, username, ...])

FRion flow

predict_worker(→ Prediction)

Make FRion prediction for a single island

serial_loop(→ FrionResults)

Module Contents

class arrakis.frion.FrionResults[source]

Bases: NamedTuple

correction: pymongo.UpdateOne[source]
prediction: Prediction[source]
class arrakis.frion.Prediction[source]

Bases: NamedTuple

FRion prediction

predict_file: str[source]
update: pymongo.UpdateOne[source]
arrakis.frion.cli()[source]

Command-line interface

arrakis.frion.correct_worker(beam: Dict, outdir: str, field: str, prediction: Prediction, island: dict) pymongo.UpdateOne[source]

Apply FRion corrections to a single island

Parameters:
  • beam (Dict) – MongoDB beam document

  • outdir (str) – Output directory

  • field (str) – RACS field name

  • predict_file (str) – FRion prediction file

  • island_id (str) – RACS island ID

Returns:

Pymongo update query

Return type:

pymongo.UpdateOne

arrakis.frion.frion_parser(parent_parser: bool = False) argparse.ArgumentParser[source]
arrakis.frion.index_beams(island: dict, beams: List[dict]) dict[source]
arrakis.frion.main(field: str, outdir: pathlib.Path, host: str, epoch: int, sbid: int | None = None, username: str | None = None, password: str | None = None, database=False, ionex_server: str = 'ftp://ftp.aiub.unibe.ch/CODE/', ionex_prefix: str = 'codg', ionex_proxy_server: str | None = None, ionex_formatter: str | Callable | None = 'ftp.aiub.unibe.ch', ionex_predownload: bool = False, limit: int | None = None)[source]

FRion flow

Parameters:
  • field (str) – RACS field name

  • outdir (Path) – Output directory

  • host (str) – MongoDB host IP address

  • epoch (int) – Epoch of observation

  • sbid (int, optional) – SBID of observation. Defaults to None.

  • username (str, optional) – Mongo username. Defaults to None.

  • password (str, optional) – Mongo passwrod. Defaults to None.

  • database (bool, optional) – Update database. Defaults to False.

  • ionex_server (str, optional) – IONEX server. Defaults to “ftp://ftp.aiub.unibe.ch/CODE/”.

  • ionex_proxy_server (str, optional) – Proxy server. Defaults to None.

  • ionex_formatter (Union[str, Callable], optional) – IONEX formatter. Defaults to “ftp.aiub.unibe.ch”.

  • ionex_predownload (bool, optional) – Pre-download IONEX files. Defaults to False.

  • limit (int, optional) – Limit to number of islands. Defaults to None.

arrakis.frion.predict_worker(island: Dict, field: str, beam: Dict, start_time: astropy.time.Time, end_time: astropy.time.Time, freq: numpy.ndarray, cutdir: pathlib.Path, plotdir: pathlib.Path, server: str = 'ftp://ftp.aiub.unibe.ch/CODE/', prefix: str = '', formatter: str | Callable | None = None, proxy_server: str | None = None, pre_download: bool = False) Prediction[source]

Make FRion prediction for a single island

Parameters:
  • island (Dict) – Pymongo island document

  • field (str) – RACS field name

  • beam (Dict) – Pymongo beam document

  • start_time (Time) – Start time of the observation

  • end_time (Time) – End time of the observation

  • freq (np.ndarray) – Array of frequencies with units

  • cutdir (str) – Cutout directory

  • plotdir (str) – Plot directory

Returns:

FRion prediction file and pymongo update query

Return type:

Tuple[str, pymongo.UpdateOne]

arrakis.frion.serial_loop(island: dict, field: str, beam: dict, start_time: astropy.time.Time, end_time: astropy.time.Time, freq_hz_array: numpy.ndarray, cutdir: pathlib.Path, plotdir: pathlib.Path, ionex_server: str, ionex_prefix: str, ionex_proxy_server: str | None, ionex_formatter: str | Callable | None, ionex_predownload: bool) FrionResults[source]
arrakis.frion.TQDM_OUT[source]