arrakis.frion

Correct for the ionosphere in parallel

Module Contents

Classes

Prediction

FRion prediction

Functions

cli()

Command-line interface

correct_worker(→ pymongo.UpdateOne)

Apply FRion corrections to a single island

index_beams(→ dict)

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

Main script

predict_worker(→ Prediction)

Make FRion prediction for a single island

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.index_beams(island: dict, beams: List[dict]) dict[source]
arrakis.frion.main(field: str, outdir: pathlib.Path, host: str, epoch: int, 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]

Main script

Parameters:
  • field (str) – RACS field name

  • outdir (str) – Output directory

  • host (str) – MongoDB host IP address

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

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

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

  • verbose (bool, optional) – Verbose output. Defaults to True.

  • 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”.

arrakis.frion.predict_worker(island: Dict, field: str, beam: Dict, start_time: astropy.time.Time, end_time: astropy.time.Time, freq: numpy.ndarray, cutdir: str, plotdir: str, 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]