Skip to content

GFZ Standard

el_paso.data_standards.gfz_standard.GFZStandard

Bases: DataStandard[GFZVarNames]

A data standard used historically at the GFZ German Research Centre for Geosciences.

This standard defines rules for a set of canonical variable names by converting them to correct units and checking their array dimensions for consistency. It is tailored for compatibility with historical GFZ datasets and internal workflows.

Source code in el_paso/data_standards/gfz_standard.py
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
class GFZStandard(DataStandard[GFZVarNames]):
    """A data standard used historically at the GFZ German Research Centre for Geosciences.

    This standard defines rules for a set of canonical variable names by converting them
    to correct units and checking their array dimensions for consistency. It is tailored
    for compatibility with historical GFZ datasets and internal workflows.
    """

    def __init__(self) -> None:
        """Initializes the GFZStandard with a ConsistencyCheck object."""
        self.consistency_check = ConsistencyCheck()

        self.variable_infos: dict[InternalName, VariableInfo] = {
            "Epoch": VariableInfo[GFZVarNames]("time", "Time in MATLAB datenum format.", ep.units.datenum, ["Epoch"]),
            "Position": VariableInfo[GFZVarNames](
                "xGEO", "Position in geographic cartesian coordinates.", ep.units.RE, ["Epoch", "Position_components"]
            ),
            "Position_geo_alt": VariableInfo[GFZVarNames](
                "geo_alt", "Altitude in geographic cartesian coordinates.", u.km, ["Epoch"]
            ),
            "Position_geo_lat": VariableInfo[GFZVarNames](
                "geo_lat", "Latitude in geographic cartesian coordinates.", u.deg, ["Epoch"]
            ),
            "Position_geo_lon": VariableInfo[GFZVarNames](
                "geo_lon", "Longitude in geographic cartesian coordinates.", u.deg, ["Epoch"]
            ),
            "Energy_FEDU": VariableInfo[GFZVarNames](
                "energy_channels", "Central energy of measured differential flux.", u.MeV, ["Epoch", "Energy_FEDU"]
            ),
            "Energy_FEIU": VariableInfo[GFZVarNames](
                "energy_channels", "Central energy of measured integral flux.", u.MeV, ["Epoch", "Energy_FEDU"]
            ),
            "FEDU": VariableInfo[GFZVarNames](
                "Flux",
                "Electron differential unidirectional flux.",
                (u.cm**2 * u.s * u.sr * u.keV) ** (-1),
                ["Epoch", "Energy_FEDU", "Alpha"],
            ),
            "FEIU": VariableInfo[GFZVarNames](
                "Flux",
                "Electron integral unidirectional flux.",
                (u.cm**2 * u.s * u.sr) ** (-1),
                ["Epoch", "Energy_FEDU", "Alpha"],
            ),
            "Alpha": VariableInfo[GFZVarNames](
                "alpha_local", "Local pitch angles of the particles.", u.radian, ["Epoch", "Alpha"]
            ),
            "Alpha_range": VariableInfo[GFZVarNames](
                "alpha_local_range", "Local pitch angle ranges of the particles.", u.radian, ["Epoch", "min_max"]
            ),
            "Alpha_Eq": VariableInfo[GFZVarNames](
                "alpha_eq_model", "Calculated equatorial pitch angles of the particles.", u.radian, ["Epoch", "Alpha"]
            ),
            "Alpha_Eq_range": VariableInfo[GFZVarNames](
                "alpha_eq_range", "Equatorial pitch angle ranges of the particles.", u.radian, ["Epoch", "min_max"]
            ),
            "Alpha_LC": VariableInfo[GFZVarNames](
                "alpha_lc", "Local loss cone size at the satellite location.", u.radian, ["Epoch"]
            ),
            "Alpha_LC_Eq": VariableInfo[GFZVarNames](
                "alpha_lc_eq",
                "Local loss cone size at the satellite location mapped to the equator.",
                u.radian,
                ["Epoch"],
            ),
            "PSD": VariableInfo[GFZVarNames](
                "PSD",
                "Calculated phase space density of particles.",
                (u.m * u.kg * u.m / u.s) ** (-3),
                ["Epoch", "Energy_FEDU", "Alpha"],
            ),
            "MLT": VariableInfo[GFZVarNames](
                "MLT", "Magnetic local time at the satellite location.", u.hour, ["Epoch"]
            ),
            "L_star": VariableInfo[GFZVarNames](
                "Lstar", "Calculated Lstar of the particles.", u.dimensionless_unscaled, ["Epoch", "Alpha"]
            ),
            "L_m": VariableInfo[GFZVarNames](
                "Lm", "Calculated Lm of the particles.", u.dimensionless_unscaled, ["Epoch", "Alpha"]
            ),
            "B_Eq": VariableInfo[GFZVarNames]("B_eq", "Calculated magnetic field at the equator.", u.nT, ["Epoch"]),
            "B_Calc": VariableInfo[GFZVarNames](
                "B_total", "Calculated magnetic field at the satellite location.", u.nT, ["Epoch"]
            ),
            "B_total_obs": VariableInfo[GFZVarNames](
                "B_sat", "Observered magnetic field at the satellite location.", u.nT, ["Epoch"]
            ),
            "R_Eq": VariableInfo[GFZVarNames](
                "R0", "Radial distance of the satellite location mapped to the equator.", ep.units.RE, ["Epoch"]
            ),
            "InvMu": VariableInfo[GFZVarNames](
                "InvMu", "Calculated first adiabatic invariant.", u.MeV / u.G, ["Epoch", "Energy_FEDU", "Alpha"]
            ),
            "InvK": VariableInfo[GFZVarNames](
                "InvK", "Calculated modified second adiabatic invariant.", ep.units.RE * u.G**0.5, ["Epoch", "Alpha"]
            ),
            "Wave_frequency": VariableInfo[GFZVarNames](
                "freq", "Frequency of the power spectral density.", u.Hz, ["Wave_frequency"]
            ),
            "Wave_ellipticity": VariableInfo[GFZVarNames](
                "ellipticity",
                "Frequency of the power spectral density.",
                u.dimensionless_unscaled,
                ["Epoch", "Wave_frequency"],
            ),
            "Wave_planarity": VariableInfo[GFZVarNames](
                "planarity",
                "Frequency of the power spectral density.",
                u.dimensionless_unscaled,
                ["Epoch", "Wave_frequency"],
            ),
            "Wave_frequency_bandwidth": VariableInfo[GFZVarNames](
                "freq_bw", "Frequency of the power spectral density.", u.Hz, ["Wave_frequency"]
            ),
            "Wave_normal_angle": VariableInfo[GFZVarNames](
                "wave_wna", "Frequency of the power spectral density.", u.degree, ["Epoch", "Wave_frequency"]
            ),
            "MLat": VariableInfo[GFZVarNames]("MLat", "Frequency of the power spectral density.", u.degree, ["Epoch"]),
            "Magnetic_Power_Spectral_Density": VariableInfo[GFZVarNames](
                "BB", "Frequency of the power spectral density.", u.dimensionless_unscaled, ["Epoch", "Wave_frequency"]
            ),
        }

Methods:

el_paso.data_standards.gfz_standard.GFZStandard.__init__

__init__

Initializes the GFZStandard with a ConsistencyCheck object.

Source code in el_paso/data_standards/gfz_standard.py
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
def __init__(self) -> None:
    """Initializes the GFZStandard with a ConsistencyCheck object."""
    self.consistency_check = ConsistencyCheck()

    self.variable_infos: dict[InternalName, VariableInfo] = {
        "Epoch": VariableInfo[GFZVarNames]("time", "Time in MATLAB datenum format.", ep.units.datenum, ["Epoch"]),
        "Position": VariableInfo[GFZVarNames](
            "xGEO", "Position in geographic cartesian coordinates.", ep.units.RE, ["Epoch", "Position_components"]
        ),
        "Position_geo_alt": VariableInfo[GFZVarNames](
            "geo_alt", "Altitude in geographic cartesian coordinates.", u.km, ["Epoch"]
        ),
        "Position_geo_lat": VariableInfo[GFZVarNames](
            "geo_lat", "Latitude in geographic cartesian coordinates.", u.deg, ["Epoch"]
        ),
        "Position_geo_lon": VariableInfo[GFZVarNames](
            "geo_lon", "Longitude in geographic cartesian coordinates.", u.deg, ["Epoch"]
        ),
        "Energy_FEDU": VariableInfo[GFZVarNames](
            "energy_channels", "Central energy of measured differential flux.", u.MeV, ["Epoch", "Energy_FEDU"]
        ),
        "Energy_FEIU": VariableInfo[GFZVarNames](
            "energy_channels", "Central energy of measured integral flux.", u.MeV, ["Epoch", "Energy_FEDU"]
        ),
        "FEDU": VariableInfo[GFZVarNames](
            "Flux",
            "Electron differential unidirectional flux.",
            (u.cm**2 * u.s * u.sr * u.keV) ** (-1),
            ["Epoch", "Energy_FEDU", "Alpha"],
        ),
        "FEIU": VariableInfo[GFZVarNames](
            "Flux",
            "Electron integral unidirectional flux.",
            (u.cm**2 * u.s * u.sr) ** (-1),
            ["Epoch", "Energy_FEDU", "Alpha"],
        ),
        "Alpha": VariableInfo[GFZVarNames](
            "alpha_local", "Local pitch angles of the particles.", u.radian, ["Epoch", "Alpha"]
        ),
        "Alpha_range": VariableInfo[GFZVarNames](
            "alpha_local_range", "Local pitch angle ranges of the particles.", u.radian, ["Epoch", "min_max"]
        ),
        "Alpha_Eq": VariableInfo[GFZVarNames](
            "alpha_eq_model", "Calculated equatorial pitch angles of the particles.", u.radian, ["Epoch", "Alpha"]
        ),
        "Alpha_Eq_range": VariableInfo[GFZVarNames](
            "alpha_eq_range", "Equatorial pitch angle ranges of the particles.", u.radian, ["Epoch", "min_max"]
        ),
        "Alpha_LC": VariableInfo[GFZVarNames](
            "alpha_lc", "Local loss cone size at the satellite location.", u.radian, ["Epoch"]
        ),
        "Alpha_LC_Eq": VariableInfo[GFZVarNames](
            "alpha_lc_eq",
            "Local loss cone size at the satellite location mapped to the equator.",
            u.radian,
            ["Epoch"],
        ),
        "PSD": VariableInfo[GFZVarNames](
            "PSD",
            "Calculated phase space density of particles.",
            (u.m * u.kg * u.m / u.s) ** (-3),
            ["Epoch", "Energy_FEDU", "Alpha"],
        ),
        "MLT": VariableInfo[GFZVarNames](
            "MLT", "Magnetic local time at the satellite location.", u.hour, ["Epoch"]
        ),
        "L_star": VariableInfo[GFZVarNames](
            "Lstar", "Calculated Lstar of the particles.", u.dimensionless_unscaled, ["Epoch", "Alpha"]
        ),
        "L_m": VariableInfo[GFZVarNames](
            "Lm", "Calculated Lm of the particles.", u.dimensionless_unscaled, ["Epoch", "Alpha"]
        ),
        "B_Eq": VariableInfo[GFZVarNames]("B_eq", "Calculated magnetic field at the equator.", u.nT, ["Epoch"]),
        "B_Calc": VariableInfo[GFZVarNames](
            "B_total", "Calculated magnetic field at the satellite location.", u.nT, ["Epoch"]
        ),
        "B_total_obs": VariableInfo[GFZVarNames](
            "B_sat", "Observered magnetic field at the satellite location.", u.nT, ["Epoch"]
        ),
        "R_Eq": VariableInfo[GFZVarNames](
            "R0", "Radial distance of the satellite location mapped to the equator.", ep.units.RE, ["Epoch"]
        ),
        "InvMu": VariableInfo[GFZVarNames](
            "InvMu", "Calculated first adiabatic invariant.", u.MeV / u.G, ["Epoch", "Energy_FEDU", "Alpha"]
        ),
        "InvK": VariableInfo[GFZVarNames](
            "InvK", "Calculated modified second adiabatic invariant.", ep.units.RE * u.G**0.5, ["Epoch", "Alpha"]
        ),
        "Wave_frequency": VariableInfo[GFZVarNames](
            "freq", "Frequency of the power spectral density.", u.Hz, ["Wave_frequency"]
        ),
        "Wave_ellipticity": VariableInfo[GFZVarNames](
            "ellipticity",
            "Frequency of the power spectral density.",
            u.dimensionless_unscaled,
            ["Epoch", "Wave_frequency"],
        ),
        "Wave_planarity": VariableInfo[GFZVarNames](
            "planarity",
            "Frequency of the power spectral density.",
            u.dimensionless_unscaled,
            ["Epoch", "Wave_frequency"],
        ),
        "Wave_frequency_bandwidth": VariableInfo[GFZVarNames](
            "freq_bw", "Frequency of the power spectral density.", u.Hz, ["Wave_frequency"]
        ),
        "Wave_normal_angle": VariableInfo[GFZVarNames](
            "wave_wna", "Frequency of the power spectral density.", u.degree, ["Epoch", "Wave_frequency"]
        ),
        "MLat": VariableInfo[GFZVarNames]("MLat", "Frequency of the power spectral density.", u.degree, ["Epoch"]),
        "Magnetic_Power_Spectral_Density": VariableInfo[GFZVarNames](
            "BB", "Frequency of the power spectral density.", u.dimensionless_unscaled, ["Epoch", "Wave_frequency"]
        ),
    }