spinifex.ionospheric.ionex_parser
Module to parse the IONosphere map EXchange (IONEX) data format, as described in Schaer and Gurtner (1998)
Classes
Object containing all necessary information from Ionex data |
|
Object containing header information from ionex file |
Functions
|
Helper function to parse a data block of a single map in ionex. |
|
This function parses the IONEX file. |
|
Read header from ionex file. Put filepointer to the end of the header. |
|
mtigate jumps in tec value at midnight by inserting the tec value of the next day |
|
Read and parse a ionex file. Returns a ionex object. |
|
Get unique days from a ionex object or list of ionex objects. |
|
Get unique days from a list of ionex files. |
Module Contents
- class spinifex.ionospheric.ionex_parser.IonexData[source]
Bases:
NamedTupleObject containing all necessary information from Ionex data
- class spinifex.ionospheric.ionex_parser.IonexHeader[source]
Bases:
NamedTupleObject containing header information from ionex file
- spinifex.ionospheric.ionex_parser._fill_data_record(data: numpy.typing.NDArray[numpy.float64], filep: TextIO, stop_label: str, timeidx: int, ionex_header: IonexHeader) None[source]
Helper function to parse a data block of a single map in ionex. Puts filepointer to the end of the map
Parameters
- dataNDArray
pre allocated array to store the datablock
- filepTextIO
_description_
- stop_labelstr
end of the data block indicator
- timeidxint
index of time of the data block
- ionex_headernamedtuple
header information
- spinifex.ionospheric.ionex_parser._read_ionex_data(filep: TextIO, options: spinifex.ionospheric.tec_data.IonexOptions | None = None) IonexData[source]
This function parses the IONEX file. Some fixed structure (like data records being strings of exactly 80 characters) of the file is assumed. This structure is described in Schaer and Gurtner (1998).
Parameters
- filepTextIO
pointer to an ionex file
- optionsIonexOptions | None, optional
options for ionex model, by default None
Returns
- IonexData
ionex object
- spinifex.ionospheric.ionex_parser._read_ionex_header(filep: TextIO) IonexHeader[source]
Read header from ionex file. Put filepointer to the end of the header.
- spinifex.ionospheric.ionex_parser._replace_midnight_data(ionex: IonexData, next_day_ionex: IonexData) IonexData[source]
mtigate jumps in tec value at midnight by inserting the tec value of the next day
Parameters
- ionexIonexData
ionex data object
- next_day_ionexIonexData
ionex data of the next day
Returns
- IonexData
ionex data object with the data of last timeslot replaced by the data of the next day
- spinifex.ionospheric.ionex_parser.read_ionex(ionex_filename: pathlib.Path, next_day_ionex_filename: pathlib.Path | None = None, options: spinifex.ionospheric.tec_data.IonexOptions | None = None) IonexData[source]
Read and parse a ionex file. Returns a ionex object.
Parameters
- ionex_filenamestr
name of the ionex data file
- next_day_ionex_filenamestr| None
name of the ionex data file for the next day (to remove midnight jumps)
- optionsIonexOptions
Options for the ionex model.
Returns
- IonexData
ionex object with data and grid