geopulse.sources.intermagnet
INTERMAGNET IAGA-2002 loader.
Wraps geopulse.io.iaga2002.read_iaga2002() and standardises the
result into a BFieldTimeSeries — nT → T conversion, HDZF frame
converted to geographic X (north) / Y (east), and cropped to the
requested time window.
Frame conventions
XYZF reporting is the easy case:
X= geographic north,Y= geographic east,Z= downward, all in nT. Direct mapping tobx_T,by_T,bz_T.HDZF reporting:
H= horizontal magnitude (nT),D= declination (minutes of arc in the IAGA convention — most observatories still emit this way; some emit degrees). The declination is the angle from geographic north to the horizontal-field direction, measured positive east. So:X = H · cos(D_rad), Y = H · sin(D_rad).
Pass
declination_unit="degrees"if the observatory reports D in degrees (D max magnitude around 20 is a giveaway).
Missing samples (IAGA 99999 / 88888 sentinels) surface as NaN on the
returned series; downstream code must filter or interpolate.
Classes
|
Loader for INTERMAGNET IAGA-2002 magnetometer data. |
- class geopulse.sources.intermagnet.INTERMAGNETSource(file_path, declination_unit='minutes')[source]
Bases:
BFieldSourceLoader for INTERMAGNET IAGA-2002 magnetometer data.
- Parameters:
Examples
>>> src = INTERMAGNETSource("OTT_20240510.min") >>> b = src.load(start_s=0, end_s=86400) >>> b.bx_T.shape (1440,)
- load(start_s=-inf, end_s=inf, dt_s=1.0, station_id='')[source]
Load and standardise the file.
- Parameters:
start_s (
float) – Time window in UNIX epoch seconds (UTC). Defaults return the full file. Samples outside the window are dropped.end_s (
float) – Time window in UNIX epoch seconds (UTC). Defaults return the full file. Samples outside the window are dropped.dt_s (
float) – Ignored — the file’s native sampling rate is used. Present for ABC symmetry.station_id (
str) – Override for the station identifier. If empty, the file’sIAGA CODEis used.
- Return type:
- Returns:
BFieldTimeSeries – Bx/By/Bz in Tesla, time in UTC epoch seconds.
- Raises:
DataError – On unrecognised reporting orientation or empty windowed slice.