geopulse.io.iaga2002
IAGA-2002 magnetometer format parser.
IAGA-2002 is the standard geomagnetic observatory format used by INTERMAGNET and many observatories. Files have:
a fixed-width 12-line header (each line 69 chars, terminated with
|),optional
#-prefixed comment lines,one column-header line (also
|-terminated),data rows:
YYYY-MM-DD HH:MM:SS.sss DOY <col1> <col2> <col3> <col4>.
The header includes the IAGA station code, geodetic lat/lon, and a
Reporting field naming the four data columns — typically XYZF
(geographic X-north, Y-east, Z-down, total F, all in nT) or HDZF
(horizontal, declination, vertical, total).
This module reads the file and returns raw arrays; the SI conversion and
frame-standardisation (D → X, Y) happen in
geopulse.sources.intermagnet.INTERMAGNETSource.
References
IAGA-2002 format specification, INTERMAGNET Technical Reference.
Functions
|
Read an IAGA-2002 file. |
Classes
|
Parsed contents of a single IAGA-2002 file. |
- class geopulse.io.iaga2002.Iaga2002File(station_code, latitude_deg, longitude_deg, reporting, time_utc, col1_nT, col2_nT, col3_nT, col4_nT, header)[source]
Bases:
objectParsed contents of a single IAGA-2002 file.
- Parameters:
- longitude_deg
Geodetic longitude, degrees east (0-360 in the file, normalised to [-180, 180] here).
- Type:
- time_utc
UNIX epoch seconds (UTC). Shape
(n_samples,).- Type:
- col1_nT, col2_nT, col3_nT, col4_nT
The four data columns in nT (D columns remain in minutes of arc; the source adapter is responsible for angle interpretation). Sentinel values (
99999,88888) are replaced withNaN.- Type:
- geopulse.io.iaga2002.read_iaga2002(path)[source]
Read an IAGA-2002 file.
- Parameters:
- Return type:
- Returns:
Iaga2002File – Parsed file contents. Component columns are in nT (with sentinels NaN’d); the
reportingfield tells you what the four columns actually represent (XYZF vs HDZF vs …).- Raises:
DataError – If the file is missing a required header field, has an unrecognised reporting orientation, or fails to parse.
Examples
>>> from geopulse.io.iaga2002 import read_iaga2002 >>> f = read_iaga2002("some_file.min") >>> f.station_code 'OTT'