media_corrections¶
This submodule contains download utilities for ancillary media-correction data,
including IONEX ionospheric maps and VMF tropospheric mapping functions. The
download_ancillary() function is the main convenience interface for
downloading both data sources for a UTC date range. Source-specific interfaces
for IONEX and VMF products are documented in the submodules listed above. The
DownloadAtmosphericData class provides the legacy atmospheric-data
downloader interface in this media-correction namespace.
Functions¶
|
Download all ancillary atmospheric and ionospheric data for a date range. |
- download_ancillary(start: datetime.datetime, end: datetime.datetime, *, ionex: bool = True, vmf: bool = True, vmf_technique: tudatpy.data_input.data_retrieval.media_corrections.vmf.vmf_downloader.VmfTechnique = VmfTechnique.GNSS, vmf_processing: tudatpy.data_input.data_retrieval.media_corrections.vmf.vmf_downloader.VmfProcessing = VmfProcessing.OPERATIONAL, ionex_products: Sequence[tudatpy.data_input.data_retrieval.media_corrections.ionex.ionex_downloader.IonexProduct] | None = None, ionex_resolution: tudatpy.data_input.data_retrieval.media_corrections.ionex.ionex_downloader.IonexResolution | None = IonexResolution.TWO_HOUR, vmf_stations_to_keep: Sequence[str] | None = None, base_directory: pathlib.Path | str = '~/.tudat/ancillary', netrc_path: pathlib.Path | str | None = None) dict[str, tudatpy.data_input.data_retrieval.media_corrections._common.DownloadResult][source]¶
Download all ancillary atmospheric and ionospheric data for a date range.
Convenience wrapper around
download_ionex()anddownload_vmf()that downloads all requested data products into organized sub-directories.- Parameters:
start (datetime) – Start of the UTC date range (inclusive).
end (datetime) – End of the UTC date range (inclusive).
ionex (bool, default = True) – Download IONEX ionospheric map files.
vmf (bool, default = True) – Download VMF troposphere mapping function files.
vmf_technique (VmfTechnique, default = VmfTechnique.GNSS) – Geodetic technique for VMF products.
vmf_processing (VmfProcessing, default = VmfProcessing.OPERATIONAL) – VMF processing type.
ionex_products (sequence of IonexProduct, optional) – Ordered preference list for IONEX. Defaults to all products.
ionex_resolution (IonexResolution or None, default = IonexResolution.TWO_HOUR) – IONEX temporal resolution override.
base_directory (Path or str, default = "~/.tudat/ancillary") – Root directory; sub-folders
ionex/andvmf/are created underneath.netrc_path (Path or str, optional) – Path to
.netrcfor CDDIS authentication.
- Returns:
Keys
"ionex"and/or"vmf"(only present if requested), each mapping to aDownloadResult.- Return type:
Examples
>>> from datetime import datetime >>> from tudatpy.data_input.data_retrieval.media_corrections import ( ... download_ancillary, VmfTechnique) >>> >>> # Download everything (IONEX + VMF GNSS) >>> results = download_ancillary(datetime(2025, 3, 1), datetime(2025, 3, 7)) >>> print(results["ionex"].all_files) >>> print(results["vmf"].all_files) >>> >>> # Download only VMF with optical/SLR technique >>> results = download_ancillary( ... datetime(2025, 3, 1), datetime(2025, 3, 7), ... ionex=False, vmf_technique=VmfTechnique.OPTICAL ... )
Classes¶
Downloader for atmospheric ancillary data products. |
|
|
Result of a download operation. |
- class DownloadAtmosphericData[source]¶
Bases:
objectDownloader for atmospheric ancillary data products.
- download_ionex_vmf3_files(start_utc: str, end_utc: str, dac: str = 'JPL', typ: str = 'FIN', smp: str = '02H', vmf_technique: str = 'GNSS', ionex_repo: str = 'Data/ionex_temp', vmf3_repo: str = 'Data/vmf3_temp', ionex: bool = True, vmf3: bool = True, clear_repository: bool = False) dict[str, tudatpy.data_input.data_retrieval.media_corrections._common.DownloadResult][source]¶
Download IONEX and VMF3 files over a UTC date range.
- Parameters:
start_utc (str) – Start date/time in ISO format.
end_utc (str) – End date/time in ISO format.
dac (str, default="JPL") – IONEX data analysis center.
typ (str, default="FIN") – IONEX product type.
smp (str, default="02H") – IONEX sample interval.
vmf_technique (str, default="GNSS") – VMF technique name.
ionex_repo (str, default="Data/ionex_temp") – Local IONEX output directory.
vmf3_repo (str, default="Data/vmf3_temp") – Local VMF3 output directory.
ionex (bool, default=True) – Whether IONEX files are downloaded.
vmf3 (bool, default=True) – Whether VMF3 files are downloaded.
clear_repository (bool, default=False) – Whether enabled output directories are removed before download.
- Returns:
Download results keyed by product type.
- Return type:
- class DownloadResult(downloaded: list[pathlib.Path] = <factory>, existing: list[pathlib.Path] = <factory>, failed: list[str] = <factory>)[source]¶
Bases:
objectResult of a download operation.
- failed¶
Human-readable failure descriptions for days where no file could be obtained.
Exceptions¶
Base exception for download failures. |
|
Raised when authentication credentials are missing or invalid. |
- class AuthenticationError[source]¶
Bases:
AncillaryDownloadErrorRaised when authentication credentials are missing or invalid.
IONEX downloads from NASA CDDIS require Earthdata credentials stored in a
~/.netrcfile. See thedownload_ionexdocstring for setup instructions.