arrakis.frion ============= .. py:module:: arrakis.frion .. autoapi-nested-parse:: Correct for the ionosphere in parallel .. !! processed by numpydoc !! Attributes ---------- .. autoapisummary:: arrakis.frion.TQDM_OUT Classes ------- .. autoapisummary:: arrakis.frion.FrionResults arrakis.frion.Prediction Functions --------- .. autoapisummary:: arrakis.frion.cli arrakis.frion.correct_worker arrakis.frion.frion_parser arrakis.frion.index_beams arrakis.frion.main arrakis.frion.predict_worker arrakis.frion.serial_loop Module Contents --------------- .. py:class:: FrionResults Bases: :py:obj:`NamedTuple` .. py:attribute:: correction :type: pymongo.UpdateOne .. py:attribute:: prediction :type: Prediction .. py:class:: Prediction Bases: :py:obj:`NamedTuple` FRion prediction .. !! processed by numpydoc !! .. py:attribute:: predict_file :type: str .. py:attribute:: update :type: pymongo.UpdateOne .. py:function:: cli() Command-line interface .. !! processed by numpydoc !! .. py:function:: correct_worker(beam: dict, outdir: pathlib.Path, field: str, prediction: Prediction, island: dict) -> pymongo.UpdateOne 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 :rtype: pymongo.UpdateOne .. !! processed by numpydoc !! .. py:function:: frion_parser(parent_parser: bool = False) -> argparse.ArgumentParser .. py:function:: index_beams(island: dict, beams: list[dict]) -> dict .. py:function:: main(field: str, outdir: pathlib.Path, host: str, epoch: int, sbid: int | None = None, username: str | None = None, password: str | None = None, database: bool = 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) -> None 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 password. 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. .. !! processed by numpydoc !! .. py:function:: predict_worker(island: dict, field: str, beam: dict, start_time: astropy.time.Time, end_time: astropy.time.Time, freq: numpy.ndarray, cutdir: 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 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 :returns: FRion prediction file and pymongo update query :rtype: Tuple[str, pymongo.UpdateOne] .. !! processed by numpydoc !! .. py:function:: 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, ionex_server: str, ionex_prefix: str, ionex_proxy_server: str | None, ionex_formatter: str | Callable | None, ionex_predownload: bool) -> FrionResults .. py:data:: TQDM_OUT