Skip to content

Configuration

Configure the public workflow and inspect supported diagnostic names and TEC scope. See Configuration for examples and Scientific Conventions for interpretation.

TECConfig dataclass

Configure signal selection, geometry, calibration and TEC output.

Parameters:

Name Type Description Default
constellations str

Nonempty, case-insensitive constellation letters: C (BeiDou) and G (GPS). RINEX 2 defaults provide GPS pairs only.

'CG'
ipp_height float

Finite, positive shell height in km for the single layer model. The modified model uses a fixed 506.7 km height instead.

400
min_elevation float

Minimum accepted satellite elevation in degrees, within [0, 90].

30
min_snr float

Finite, nonnegative minimum SNR in dB-Hz. For each band, null SNR is accepted only when more than half its values are null within the station/selected-code-pair group. Otherwise null SNR is rejected; nonfinite or recorded values below the threshold also reject the row.

30
c1_codes mapping

First-band code priorities, keyed by RINEX major version ('2' or '3'), then constellation. Lists contain C-prefixed observation codes, in priority order starting at zero. Empty input uses the defaults; missing versions/constellations inherit defaults and supplied lists replace that constellation's list. Inputs are copied. RINEX 2: G=[C1]. RINEX 3: G=[C1W, C1C, C1X]; C=[C2I, C2D, C2X, C1I, C1D, C1X, C2W, C1C].

dict()
c2_codes mapping

Second-band priorities with the same mapping/merge rules as c1_codes. RINEX 2: G=[C2, C5]. RINEX 3: G=[C2W, C2C, C2X, C5W, C5C, C5X]; C=[C6I, C6D, C6X, C7I, C7D, C7X, C5I, C5D, C5X]. Selected constellations require supported frequency bands (GPS: 1/2/5; BeiDou: 1/2/5/6/7/8), distinct between the two lists.

dict()
rx_bias ('external', 'mstd', 'lsq', None)

Receiver code-bias correction from a supplied bias product, or estimation by minimum standard deviation/least squares after satellite correction. None skips receiver correction. Without a bias file this option is inactive. Failed estimation leaves null TEC and a failure status, rather than a zero correction.

'external'
mapping_function ('slm', 'mslm')

Single layer model or modified single layer model. The latter uses a fixed 506.7 km shell and dimensionless correction factor 0.9782.

'slm'
retain_diagnostics None, list of str, tuple of str, or 'all'

None returns accepted rows and base results, including azimuth and elevation. A list/tuple adds only the named supported diagnostics on accepted rows. 'all' adds all available diagnostics and retains rejected rows with null public TEC and rejection reasons. Selectable fields are epoch_flag, L1_lli, L2_lli, qc_valid, qc_reason, calibration_status, C1_freq, C2_freq, mf, stec_g, stec_p, stec_p_raw, stec_p_corrected, stec_g_corrected, arc_id, slip_status, slip_n1, slip_n2, slip_sigma_gf, slip_sigma_mw, slip_correction, slip_stec_correction, slip_dcb_correction, slip_sigma_phase, mw, C1_val, C2_val, L1_val, L2_val, S1, S2, tx_bias and rx_bias. Bias diagnostics exist only when bias data are supplied. Geometry requests are allowed but redundant. mw is Melbourne-Wuebbena in wide-lane cycles; Detection/repair follows cycle_slip_mode independently of retention. tx_bias_start/end, rx_bias_start/end, level_id, offset and weight are internal and unavailable in every output mode.

None
cycle_slip_mode ('basic', 'detect', 'repair')

Batch GF/MW localization and STEC continuity correction. Every detected edge is aligned to the local normal STEC rate, using up to 32 past/future epochs. Code, MW ambiguity, integer conventions and uncertainty do not veto correction. Short segments use the available neighboring rates. 'detect' never changes phase; 'basic' retains lock/event QC only.

'basic'
missing_bias ('drop', 'warn', 'keep_uncorrected', 'error')

Policy for required bias matches when a product is supplied. 'drop' rejects unmatched rows; 'warn' also warns; 'error' raises. 'keep_uncorrected' applies available corrections and marks missing calibration as uncorrected_missing_bias. Rejected rows are visible only with complete diagnostics. Without a product, TEC is retained as uncorrected_no_bias_product regardless of this setting.

'drop'

Raises:

Type Description
ValueError

If values, code mappings/frequencies or diagnostic names violate the constraints above.

Notes

Construction is keyword-only and the dataclass is frozen: fields cannot be reassigned. Nested code mappings are copied but remain mutable. Hiding calibration diagnostics does not imply absolute or fully calibrated TEC. Output selection does not change QC or calibration.

cycle_slip_mode class-attribute instance-attribute

cycle_slip_mode: Literal['basic', 'detect', 'repair'] = 'repair'

Batch GF/MW policy: basic QC, detection, or scientific phase repair.

Repair aligns all localized edges by time continuity, with up to 32 future epochs and no fixed minimum support. Raw phase is immutable. Continuous offsets and their rate-scatter diagnostics are in TECU; per-carrier integer fields remain null. Code/MW scales are diagnostic and never veto repair.

ipp_height_m property

ipp_height_m: float

Return the configured SLM shell height.

Returns:

Type Description
float

Height in meters, equal to ipp_height * 1000.

mslm_height_m property

mslm_height_m: float

Return the fixed MSLM shell height.

Returns:

Type Description
float

Height in meters (506700), independent of ipp_height.

alpha property

alpha: float

Return the MSLM angular correction factor.

Returns:

Type Description
float

Dimensionless factor 0.9782.

iter_c1_codes

iter_c1_codes(version: Literal['2', '3']) -> Iterator[tuple[str, str, int]]

Iterate first-band code priorities for a RINEX major version.

Parameters:

Name Type Description Default
version ('2', '3')

RINEX major version key.

'2'

Yields:

Type Description
tuple of (str, str, int)

Constellation, observation code and zero-based priority.

iter_c2_codes

iter_c2_codes(version: Literal['2', '3']) -> Iterator[tuple[str, str, int]]

Iterate second-band code priorities for a RINEX major version.

Parameters:

Name Type Description Default
version ('2', '3')

RINEX major version key.

'2'

Yields:

Type Description
tuple of (str, str, int)

Constellation, observation code and zero-based priority.

code2band

code2band(version: Literal['2', '3']) -> Mapping[str, int]

Map codes to first/second selection slots.

Parameters:

Name Type Description Default
version ('2', '3')

RINEX major version key.

'2'

Returns:

Type Description
mapping of str to int

Constellation_code keys mapped to selection slots 1 or 2, rather than physical RINEX frequency-band numbers.

c1_priority

c1_priority(version: Literal['2', '3']) -> Mapping[str, int]

Return first-band priority indices.

Parameters:

Name Type Description Default
version ('2', '3')

RINEX major version key.

'2'

Returns:

Type Description
mapping of str to int

Constellation_code keys mapped to zero-based priorities.

c2_priority

c2_priority(version: Literal['2', '3']) -> Mapping[str, int]

Return second-band priority indices.

Parameters:

Name Type Description Default
version ('2', '3')

RINEX major version key.

'2'

Returns:

Type Description
mapping of str to int

Constellation_code keys mapped to zero-based priorities.

validate_codes staticmethod

validate_codes(codes, default) -> dict[str, dict[str, list[str]]]

Copy and merge partial observation-code priorities.

Parameters:

Name Type Description Default
codes mapping

Overrides keyed by RINEX version, then constellation. Empty input uses all defaults; supplied constellation lists replace their defaults.

required
default mapping

Complete default version/constellation priority lists.

required

Returns:

Type Description
dict of str to dict of str to list of str

Independent merged mappings with copied observation-code lists.

Raises:

Type Description
ValueError

If version/constellation keys or C-prefixed code formats are invalid. Frequency-pair constraints are checked at construction.

DIAGNOSTIC_COLUMNS module-attribute

DIAGNOSTIC_COLUMNS = frozenset(
    {
        "epoch_flag",
        "L1_lli",
        "L2_lli",
        "qc_valid",
        "qc_reason",
        "calibration_status",
        "C1_freq",
        "C2_freq",
        "mf",
        "stec_g",
        "stec_p",
        "stec_p_raw",
        "stec_p_corrected",
        "slip_status",
        "slip_n1",
        "slip_n2",
        "slip_sigma_gf",
        "slip_sigma_mw",
        "slip_correction",
        "slip_stec_correction",
        "slip_dcb_correction",
        "slip_sigma_phase",
        "stec_g_corrected",
        "arc_id",
        "mw",
        "C1_val",
        "C2_val",
        "L1_val",
        "L2_val",
        "S1",
        "S2",
        "tx_bias",
        "rx_bias",
    }
)

Optional public TEC diagnostics; availability also depends on bias inputs.

SUPPORTED_CONSTELLATIONS module-attribute

SUPPORTED_CONSTELLATIONS = {'C': 'BDS', 'G': 'GPS'}

Supported GNSS constellations for TEC calculation.

SUPPORTED_RINEX_VERSIONS module-attribute

SUPPORTED_RINEX_VERSIONS = ['2', '3']

Supported RINEX major versions.