spinifex.ionospheric.ionex_download =================================== .. py:module:: spinifex.ionospheric.ionex_download .. autoapi-nested-parse:: Utilities for downloading IONEX files from various servers. Attributes ---------- .. autoapisummary:: spinifex.ionospheric.ionex_download._download_ionex spinifex.ionospheric.ionex_download.download_ionex Functions --------- .. autoapisummary:: spinifex.ionospheric.ionex_download._download_ionex_coro spinifex.ionospheric.ionex_download.chapman_format spinifex.ionospheric.ionex_download.download_from_cddis spinifex.ionospheric.ionex_download.download_from_chapman spinifex.ionospheric.ionex_download.download_from_igsiono spinifex.ionospheric.ionex_download.download_ionex_coro spinifex.ionospheric.ionex_download.igsiono_format spinifex.ionospheric.ionex_download.new_cddis_format spinifex.ionospheric.ionex_download.old_cddis_format spinifex.ionospheric.ionex_download.should_use_new_cddis_format Module Contents --------------- .. py:function:: _download_ionex_coro(times: astropy.time.Time, options: spinifex.ionospheric.tec_data.IonexOptions | None = None) -> list[pathlib.Path] :async: Download IONEX files from a server. Parameters ---------- times : Time Times to download for. options : IonexOptions Options for the ionex model. Returns ------- list[Path] List of downloaded files Raises ------ IonexError If the server is not supported. NotImplementedError If the server is not implemented yet. .. py:function:: chapman_format(time: astropy.time.Time, prefix: str = 'uqr', url_stem: str | None = None) -> str Format a URL for an IRTG file from Chapman. Parameters ---------- time : Time Time to get the URL for. prefix : str, optional Ionex prefix, by default "irt" url_stem : str | None, optional URL stem, by default None Returns ------- str File URL .. py:function:: download_from_cddis(times: astropy.time.Time, prefix: str = 'cod', time_resolution: astropy.units.Quantity | None = None, url_stem: str | None = None, solution: spinifex.ionospheric.tec_data.SOLUTION = 'final', output_directory: pathlib.Path | None = None) -> list[pathlib.Path] :async: Download IONEX files from CDDIS. Parameters ---------- times : Time Times to download for. prefix : str, optional Analysis centre prefix, by default "cod" time_resolution : u.Quantity | None, optional Time resolution, by default None, will default to the server time resolution. url_stem : str | None, optional URL steam, by default None, will default to CDDIS. solution : SOLUTION, optional Solution type, by default "final", must be "final" or "rapid". output_directory : Path | None, optional Output directory path, by default None, will default to `ionex_files` in the current working directory. Returns ------- list[Path] List of downloaded files .. py:function:: download_from_chapman(times: astropy.time.Time, prefix: str = 'uqr', url_stem: str | None = None, output_directory: pathlib.Path | None = None) -> list[pathlib.Path] :async: Download IONEX files from Chapman. Parameters ---------- times : Time Times to download for. prefix : str, optional Ionex prefix, by default "irt" url_stem : str | None, optional URL stem, by default None output_directory : Path | None, optional Output directory path, by default None Returns ------- list[Path] List of downloaded file paths Raises ------ IonexError If the date is before 2021/024. .. py:function:: download_from_igsiono(times: astropy.time.Time, prefix: str = 'igs', time_resolution: astropy.units.Quantity | None = None, url_stem: str | None = None, solution: spinifex.ionospheric.tec_data.SOLUTION = 'final', output_directory: pathlib.Path | None = None) -> list[pathlib.Path] :async: Download IONEX files from IGSIONO. Parameters ---------- times : Time Times to download for. prefix : str, optional URL prefix, by default "igs" time_resolution : u.Quantity | None, optional Ionex resolution, by default None url_stem : str | None, optional URL stem, by default None solution : SOLUTION, optional Type of solution, by default "final" output_directory : Path | None, optional Output directory path, by default None Returns ------- list[Path] List of downloaded file paths .. py:function:: download_ionex_coro(times: astropy.time.Time, server: str = 'chapman', prefix: str = 'uqr', url_stem: str | None = None, time_resolution: astropy.units.Quantity | None = None, solution: spinifex.ionospheric.tec_data.SOLUTION = 'final', output_directory: pathlib.Path | None = None) -> list[pathlib.Path] :async: Download IONEX files from a server. Parameters ---------- times : Time Times to download for. server : str Server to download from, by default "cddis". Must be a supported server. prefix : str, optional Analysis centre prefix, by default "cod". Must be a supported analysis centre. url_stem : str | None, optional URL stem, by default None, will default to the server URL. time_resolution : u.Quantity | None, optional Time resolution, by default None, will default to the server time resolution. solution : SOLUTION, optional Solution type, by default "final", must be "final" or "rapid". output_directory : Path | None, optional Output directory path, by default None, will default to `ionex_files` in the current working directory. Returns ------- list[Path] List of downloaded files Raises ------ IonexError If the server is not supported. NotImplementedError If the server is not implemented yet. .. py:function:: igsiono_format(time: astropy.time.Time, prefix: str = 'igs', time_resolution: astropy.units.Quantity | None = None, url_stem: str | None = None, solution: spinifex.ionospheric.tec_data.SOLUTION = 'final') -> str Format a URL for an IGS IONO file from IGSIONO. Parameters ---------- time : Time Time to get the URL for. prefix : str, optional Ionex prefix, by default "igs" time_resolution : u.Quantity | None, optional Ionex resolution, by default None url_stem : str | None, optional URL stem, by default None solution : SOLUTION, optional Type of solution, by default "final" Returns ------- str File URL .. py:function:: new_cddis_format(time: astropy.time.Time, prefix: str = 'cod', time_resolution: astropy.units.Quantity | None = None, url_stem: str | None = None, solution: spinifex.ionospheric.tec_data.SOLUTION = 'final') -> str Get the URL for a new IONEX file from CDDIS. Parameters ---------- time : Time Time to get the URL for. prefix : str, optional Analysis centre prefix, by default "cod". Must be a supported analysis centre. time_resolution : u.Quantity | None, optional Time resolution, by default None, will default to the server time resolution. url_stem : str | None, optional URL steam, by default None, will default to CDDIS. solution : SOLUTION, optional Solution type, by default "final", must be "final" or "rapid". Returns ------- str File URL .. py:function:: old_cddis_format(time: astropy.time.Time, prefix: str = 'cod', time_resolution: astropy.units.Quantity | None = None, url_stem: str | None = None, solution: spinifex.ionospheric.tec_data.SOLUTION = 'final') -> str Get the URL for an old IONEX file from CDDIS. Parameters ---------- time : Time Time to get the URL for. prefix : str, optional Analysis centre prefix, by default "cod" time_resolution : u.Quantity | None, optional Time resolution, by default None, will default to the server time resolution. url_stem : str | None, optional URL steam, by default None, will default to CDDIS. solution : SOLUTION, optional Solution type, by default "final", must be "final" or "rapid". Returns ------- str File URL Raises ------ IonexError If the prefix is not a supported analysis centre. .. py:function:: should_use_new_cddis_format(day: astropy.time.Time, prefix: str) -> bool Determine if the new CDDIS format should be used. Parameters ---------- day : Time Day to pull from CDDIS. prefix : str Analysis centre prefix. Returns ------- bool Whether the new format should be used .. py:data:: _download_ionex .. py:data:: download_ionex