Utils 🛠️¶
The utils module provides helper functions to inspect the parsed datasets, and to download RINEX files. About the latter, to perform TEC analysis you need both Observation (from the station) and Navigation (global ephemerides) files: PyTECGg simplifies this with dedicated downloaders:
- INGV RING Network: targeted at the Italian GNSS network, downloading high-quality 30s observation files.
- BKG IGS Global: Downloads aggregated multi-constellation navigation files (BRDC), essential for orbit propagation.
API Reference¶
summarise_rinex_data(obs, nav)
¶
Print a diagnostic summary of GNSS RINEX data.
This utility provides a high-level overview of the dataset's temporal coverage, constellation and signal availability. It is designed to help users verify if the loaded observations contain the desidered frequency pairs and tracking channels (e.g., C, L, S, I, Q) required for accurate TEC calibration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
obs
|
DataFrame
|
Observation data in long format, as returned by |
required |
nav
|
dict[str, DataFrame]
|
Navigation data dictionary keyed by constellation symbol, as returned
by |
required |
Returns:
| Type | Description |
|---|---|
None
|
The summary is printed directly to the standard output. |
download_obs_ring(station_code, year, doys, output_path)
¶
Download RINEX observation files (Hatanaka crx.gz) from the INGV RING server.
Automatically handles station code conversion (e.g., converts 4-character codes like 'GRO2' to 'GRO200ITA') and organizes files into station-specific subdirectories.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
station_code
|
str
|
The station identifier (4 or 9 characters). Example: 'GRO2' or 'GRO200ITA'. |
required |
year
|
int
|
The observation year (e.g., 2023). |
required |
doys
|
list[int]
|
A list of Days Of Year (DOY), e.g., [1, 2, 3]. |
required |
output_path
|
Path
|
The root directory where the files will be saved. |
required |
Notes
Data Source: https://webring.gm.ingv.it:44324/rinex/RING
download_nav_bkg(year, doys, output_path)
¶
Download global navigation RINEX files (BRDC) from the BKG server.
BRDC files contain multi-constellation navigation messages aggregated from the global IGS station network. The function dynamically scrapes the BKG HTTP directories to find the best available navigation file format (modern IGS, other RINEX 3 centers like WRD/DLR, or legacy .gz formats) for each given DOY.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
year
|
int
|
The observation year (e.g., 2023). |
required |
doys
|
list[int]
|
A list of Days Of Year (DOY). |
required |
output_path
|
Path
|
The directory where the navigation files will be saved. |
required |
Notes
Data Source: https://igs.bkg.bund.de/root_ftp/IGS/BRDC