pride-ppp API
PRIDE-PPPAR integration — RINEX input, kinematic positions output.
Specifications
PRIDE PPP-AR configuration file models.
Read/write the config_file format consumed by the pdp3 binary.
- class pride_ppp.specifications.config.AmbiguityFixingOptions(*, ambiguity_co_var='Default', ambiguity_duration=600, cutoff_elevation=15, pco_on_wide_lane='YES', widelane_decision=<factory>, narrowlane_decision=<factory>, critical_search=<factory>, truncate_at_midnight='Default', verbose_output='NO')[source]
Bases:
BaseModelAmbiguity resolution parameters for the pdp3 config file.
Attributes
- ambiguity_co_varstr
"YES"to use LAMBDA method for ambiguity fixing.- ambiguity_durationint
Minimum time duration in seconds for a resolvable ambiguity.
- cutoff_elevationint
Cutoff mean elevation angle (degrees) for eligible ambiguities.
- pco_on_wide_lanestr
"YES"/"NO"— apply PCO corrections on Melbourne-Wübbena.- widelane_decisionList[float]
[deviation, sigma, threshold]in cycles for wide-lane ambiguities.- narrowlane_decisionList[float]
[deviation, sigma, threshold]in cycles for narrow-lane ambiguities.- critical_searchList[float]
[max_exclude, min_reserve, fixed_float, ratio_threshold].- truncate_at_midnightstr
"YES"to truncate ambiguities at midnight (avoids day-boundary discontinuities).- verbose_outputstr
"YES"/"NO"— output detailed ambiguity resolution info.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pride_ppp.specifications.config.DataProcessingStrategies(*, strict_editing='Default', rck_model='Default', ztd_model='Default', htg_model='Default', iono_2nd='Default', tides='SOLID/OCEAN/POLE', multipath='Default')[source]
Bases:
BaseModelData processing strategy defaults for the pdp3 config file.
Attributes
- strict_editingstr
"YES"/"NO"/"Default". Set to"NO"for high-dynamic data with poor quality.- rck_modelstr
Receiver clock model:
"WNO"(white noise) or"STO"(random walk).- ztd_modelstr
Zenith troposphere delay model:
"PWC:60"(piece-wise constant, 60 min) or"STO"(random walk).- htg_modelstr
Horizontal troposphere gradient model:
"PWC"/"STO"/"NON".- iono_2ndstr
"YES"to correct 2nd-order ionospheric delays.- tidesstr
Tidal corrections to apply (e.g.
"SOLID/OCEAN/POLE").- multipathstr
"YES"/"NO"— enable multipath correction model.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pride_ppp.specifications.config.ObservationConfig(*, table_directory, frequency_combination='Default', interval='Default', time_window=0.01, session_time='-YYYY- -MM- -DD- -HH- -MI- -SS- -SE-')[source]
Bases:
BaseModelObservation section of the pdp3 config file.
Attributes
- table_directorystr
Path to the directory containing ANTEX, leap-second, and satellite metadata tables required by pdp3.
- frequency_combinationstr
Frequency combination string (e.g.
"Default").- intervalstr
Processing interval in seconds, or
"Default"for auto.- time_windowfloat
Observation time window tolerance in seconds.
- session_timedatetime | str
Session time template. When a string, pdp3 substitutes date/time placeholders at runtime.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pride_ppp.specifications.config.PRIDEPPPFileConfig(*, observation, satellite_products, processing=<factory>, ambiguity=<factory>, satellites=<factory>, station_used=<factory>)[source]
Bases:
BaseModelTop-level pdp3
config_filemodel with read/write support.Mirrors every section of the PRIDE-PPPAR 3 config template. Instances can be serialised to disk via
write_config_fileand deserialised withread_config_fileorload_default.Attributes
- observationObservationConfig
Observation-related settings (table dir, interval, time window).
- satellite_productsSatelliteProducts
Paths to resolved GNSS product files (SP3, CLK, ERP, …).
- processingDataProcessingStrategies
Processing strategy flags (clock model, tides, troposphere).
- ambiguityAmbiguityFixingOptions
Ambiguity resolution thresholds and decision criteria.
- satellitesSatelliteList
Active satellite PRNs and their variance weights.
- station_usedList[StationUsed]
Per-station processing parameters.
Example
>>> cfg = PRIDEPPPFileConfig.load_default() >>> cfg.write_config_file("/tmp/config_file")
- ambiguity: AmbiguityFixingOptions
- classmethod load_default()[source]
Load the default
config_templateshipped with PRIDE-PPPAR.Searches
~/.PRIDE_PPPAR_BIN/config_templatefirst, then falls back to/opt/PRIDE-PPPAR/.PRIDE_PPPAR_BIN/config_template.Returns
- PRIDEPPPFileConfig
Config populated from the template.
Raises
- FileNotFoundError
If neither installation path exists.
- Return type:
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- observation: ObservationConfig
- processing: DataProcessingStrategies
- classmethod read_config_file(file_path)[source]
Parse a PRIDE PPP
config_filefrom disk.Note: the
station_usedsection is not fully parsed; a single defaultStationUsedinstance is always returned regardless of the file contents.Parameters
- file_pathstr
Path to an existing PRIDE-PPPAR config file.
Returns
- PRIDEPPPFileConfig
Populated config model.
- Parameters:
file_path (str)
- Return type:
- satellite_products: SatelliteProducts
- satellites: SatelliteList
- station_used: list[StationUsed]
- write_config_file(filepath)[source]
Write the PRIDE PPP configuration to a file.
Parent directories are created automatically. Note: modifies
self.ambiguity.critical_searchin-place, converting the first two elements to integers before serialising.Parameters
- filepathstr | Path
Destination path. Parent directories are created if needed.
- Parameters:
observation (ObservationConfig)
satellite_products (SatelliteProducts)
processing (DataProcessingStrategies)
ambiguity (AmbiguityFixingOptions)
satellites (SatelliteList)
station_used (list[StationUsed])
- class pride_ppp.specifications.config.SatelliteList(*, satellites=<factory>)[source]
Bases:
BaseModelList of active GNSS satellites and their PRN variances.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pride_ppp.specifications.config.SatelliteProducts(*, product_directory='Default', satellite_orbit='Default', satellite_clock='Default', erp='Default', quaternions='Default', code_phase_bias='Default', leo_quaternions='Default')[source]
Bases:
BaseModelSatellite product file paths for the pdp3 config file.
Each field holds the filename (not full path) of a specific GNSS product.
product_directoryis the common parent directory. When set to"Default", pdp3 resolves the file automatically.Attributes
- product_directorystr, optional
Directory containing all satellite product files.
- satellite_orbitstr, optional
SP3 precise orbit filename (must end in
.SP3).- satellite_clockstr, optional
CLK precise clock filename (must end in
.CLK).- erpstr, optional
Earth rotation parameters filename (must end in
.ERP).- quaternionsstr, optional
Satellite attitude quaternions filename (must end in
.OBX).- code_phase_biasstr, optional
Observable-specific signal bias filename (must end in
.BIA).- leo_quaternionsstr, optional
LEO satellite quaternions filename.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- Parameters:
product_directory (str | None)
satellite_orbit (Annotated[str | None, _PydanticGeneralMetadata(pattern='.*\\.SP3')])
satellite_clock (Annotated[str | None, _PydanticGeneralMetadata(pattern='.*\\.CLK')])
erp (Annotated[str | None, _PydanticGeneralMetadata(pattern='.*\\.ERP')])
quaternions (Annotated[str | None, _PydanticGeneralMetadata(pattern='.*\\.OBX')])
code_phase_bias (Annotated[str | None, _PydanticGeneralMetadata(pattern='.*\\.BIA')])
leo_quaternions (str | None)
- class pride_ppp.specifications.config.StationUsed(*, name='xxxx', tp='X', map='XXX', clkm=9000, podm='xxxxx', ev='xx', ztdm=0.2, htgm=0.005, ragm=0.3, phsc=0.01, polns='xxxxx', poxem=10.0, poynm=10.0, pozhm=10.0)[source]
Bases:
BaseModelStation configuration entry in the pdp3 config file.
Each field corresponds to a column in the
+Station usedblock of the PRIDE-PPPAR config_file. Default values are placeholder tokens that pdp3 replaces at runtime.Attributes
- namestr
4-character station identifier.
- tpstr
Positioning mode (
Sstatic,Ppiece-wise,Kkinematic,Ffixed).- mapstr
Mapping function code (
NIE,GMF,VM1,VM3).- clkmint
Receiver clock model noise in mm.
- podmstr
Position/orbit determination mode.
- evstr
Elevation-dependent weighting strategy.
- ztdmfloat
Zenith troposphere delay model noise in m.
- htgmfloat
Horizontal troposphere gradient model noise in m.
- ragmfloat
Receiver antenna geocenter model noise in m.
- phscfloat
Phase screen model noise in cycles.
- polnsstr
Pole / nutation series identifier.
- poxemfloat
A priori coordinate sigma in X/East direction (m).
- poynmfloat
A priori coordinate sigma in Y/North direction (m).
- pozhmfloat
A priori coordinate sigma in Z/Height direction (m).
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
PRIDE PPP-AR CLI configuration.
Builds the pdp3 command line from processing parameters.
- class pride_ppp.specifications.cli.Constellations(*values)[source]
-
GNSS constellation identifiers for pdp3
--systemflag.- BDS = 'C'
- BDS_THREE = '3'
- BDS_TWO = '2'
- GALILEO = 'E'
- GLONASS = 'R'
- GPS = 'G'
- QZSS = 'J'
- class pride_ppp.specifications.cli.PrideCLIConfig(*, sample_frequency=1, system='GREC23J', frequency=['G12', 'R12', 'E15', 'C26', 'J12'], loose_edit=True, cutoff_elevation=7, interval=None, high_ion=None, tides='SOP', pride_configfile_path=None)[source]
Bases:
BaseModelConfiguration for generating
pdp3CLI commands.Attributes
- sample_frequencyfloat
Processing sample rate passed to pdp3 via the
-iflag, in samples per second (Hz). A value of1means 1 Hz (one epoch per second). Default:1.- systemstr
Constellation string, e.g.
"GREC23J".- frequencylist
Frequency combination per constellation.
- loose_editbool
Enable loose editing (recommended for high-dynamic data).
- cutoff_elevationint
Elevation cutoff angle in degrees (0-60).
- intervalfloat, optional
Processing interval in seconds (0.02-30).
- high_ionbool, optional
Correct 2nd-order ionospheric delay.
- tidesstr
Tide corrections (any combination of
S,O,P).- local_pdp3_pathstr, optional
Explicit path to the
pdp3binary.- overridebool
Re-process even if outputs already exist.
- override_products_downloadbool
Re-download products even if already present.
- pride_configfile_pathPath, optional
Path to a PRIDE config file to pass via
--config.
- generate_pdp_command(site, local_file_path)[source]
Generate the
pdp3command-line argument list.Builds the full argument vector by comparing each config field against its default value and only emitting flags that differ.
Parameters
- sitestr
4-character station identifier (e.g.
"NCC1").- local_file_pathstr
Path to the RINEX observation file.
Returns
- List[str]
Argument list suitable for
subprocess.run().
Example
>>> cfg = PrideCLIConfig(cutoff_elevation=10) >>> cmd = cfg.generate_pdp_command("NCC1", "/data/NCC12540.25o") >>> cmd[:5] ['pdp3', '-m', 'K', '-i', '1']
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pride_ppp.specifications.cli.Tides(*values)[source]
-
Tidal correction identifiers for pdp3
--tidesflag.- OCEAN = 'O'
- POLAR = 'P'
- SOLID = 'S'
PRIDE-PPP kinematic position model.
Provides the PridePPP Pydantic model for individual kinematic records
parsed from pdp3 .kin output files.
- pride_ppp.specifications.output.PRIDE_PPP_LOG_INDEX = {0: 'modified_julian_date', 1: 'second_of_day', 2: 'east', 3: 'north', 4: 'up', 5: 'latitude', 6: 'longitude', 7: 'height', 8: 'number_of_satellites', 9: 'pdop'}
Column-index → field-name mapping for PRIDE-PPPAR
.kinoutput lines. The pdp3 binary writes fixed-width records; this dict maps positional token indices (after whitespace-split) to the corresponding field names used byPridePPP.
- class pride_ppp.specifications.output.PridePPP(*, modified_julian_date, second_of_day, east, north, up, latitude, longitude, height, number_of_satellites=1, pdop=0, time=None)[source]
Bases:
BaseModelSingle-epoch kinematic position record from a pdp3
.kinfile.Each instance represents one line of output. The
east,north, andupfields store ECEF X/Y/Z coordinates in metres (despite the field names, which mirror the column order in the pdp3 output file). Geodetic lat/lon/height are also provided.Attributes
- modified_julian_datefloat
Modified Julian Date of the epoch (≥ 0).
- second_of_dayfloat
Seconds elapsed since midnight UTC (0–86 400).
- eastfloat
ECEF X-coordinate in metres (field name mirrors pdp3 column order).
- northfloat
ECEF Y-coordinate in metres (field name mirrors pdp3 column order).
- upfloat
ECEF Z-coordinate in metres (field name mirrors pdp3 column order).
- latitudefloat
Geodetic latitude in decimal degrees (−90–90).
- longitudefloat
Geodetic longitude in decimal degrees (0–360, east-positive).
- heightfloat
WGS-84 ellipsoidal height in metres.
- number_of_satellitesint
Number of satellites used in the solution.
- pdopfloat
Position Dilution of Precision.
- timedatetime, optional
UTC timestamp derived from
modified_julian_dateandsecond_of_day(populated automatically by a validator).
Docs: https://github.com/PrideLab/PRIDE-PPPAR
- classmethod from_kin_file(data)[source]
Parse a single line (as split tokens) from a
.kinfile.Parameters
- dataList[str]
A list of strings representing a line from the kin file.
Returns
- Union[“PridePPP”, ValidationError]
A PridePPP object or a validation error.
- model_config = {'coerce': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- Parameters:
time (datetime | None)
Factories
RINEX utility functions.
Extract timestamps and time ranges from RINEX observation files, and merge RINEX 2 broadcast ephemerides into RINEX 3 BRDM format.
- pride_ppp.factories.rinex.epoch_get_time(line)[source]
Extract the epoch timestamp from a RINEX 2 observation record.
Assumes a 2-digit year (added to 2000). The line is whitespace-split and the first six tokens are interpreted as
YY MM DD HH MI SS.sss.
- pride_ppp.factories.rinex.merge_broadcast_files(brdn, brdg, output_folder)[source]
Merge GPS and GLONASS RINEX 2 broadcast files into a RINEX 3 BRDM file.
Both input files must have matching day-of-year (characters 4–6) and year (characters 9–10) in their filenames — e.g.
brdn0200.25nandbrdg0200.25g. A mismatch causes the function to returnNonewith an error log.Inspired by
PrideLab/PRIDE-PPPAR/scripts/merge2brdm.py.
- pride_ppp.factories.rinex.rinex_get_time_range(source)[source]
Extract the time range from a RINEX observation file.
Parameters
- sourcestr | Path
Path to the RINEX observation file.
Returns
- Tuple[datetime, datetime]
Start and end timestamps.
Raises
- ValueError
If the time range cannot be extracted.
PrideProcessor — concurrent-safe RINEX → kinematic position pipeline.
Owns all internal state (ProductEnvironment, WorkSpace, DependencySpec).
Each process() call runs pdp3 in a date-partitioned working directory
(pride_dir/{year}/{doy}/) so concurrent calls never collide.
- class pride_ppp.factories.processor.PrideProcessor(pride_dir, output_dir, *, pride_install_dir=None, cli_config=PrideCLIConfig(sample_frequency=1, system='GREC23J', frequency=['G12', 'R12', 'E15', 'C26', 'J12'], loose_edit=True, cutoff_elevation=7, interval=None, high_ion=None, tides='SOP', pride_configfile_path=None), mode=ProcessingMode.DEFAULT)[source]
Bases:
objectRINEX observation file in → kinematic PPP-AR positions out.
Owns its own
ProductRegistry,WorkSpace, andGNSSClient. No global state; a single instance is safe to reuse across manyprocess()/process_batch()calls.The full pipeline per RINEX file:
Infer site ID and observation date from the RINEX filename/header.
Resolve IGS products (orbit, clock, bias, ERP, ATX) for that date via
GNSSClient.resolve_dependencies(). Skips resolution if a validDependencyLockFilealready exists.Return a cached
ProcessingResultif a valid.kinoutput already exists inoutput_dir(unless override isTrue).Write a
pdp3config_filetopride_dir/{year}/{doy}/.Execute
pdp3and move.kin/.resoutputs tooutput_dir.
For a full station-year, use
process_batch(): it resolves products once per unique date, writes configs for all dates, skips cached results, then dispatchespdp3subprocesses in parallel.Example:
processor = PrideProcessor( pride_dir=Path("/data/pride"), output_dir=Path("/data/output"), mode=ProcessingMode.FINAL, ) for result in processor.process_batch(rinex_files, max_workers=4): if result.success: print(result.date, len(result.positions()), "epochs")
- Parameters:
pride_dir (Path)
output_dir (Path)
pride_install_dir (Path | None)
cli_config (PrideCLIConfig | None)
mode (ProcessingMode | Literal['FINAL', 'DEFAULT'])
- __init__(pride_dir, output_dir, *, pride_install_dir=None, cli_config=PrideCLIConfig(sample_frequency=1, system='GREC23J', frequency=['G12', 'R12', 'E15', 'C26', 'J12'], loose_edit=True, cutoff_elevation=7, interval=None, high_ion=None, tides='SOP', pride_configfile_path=None), mode=ProcessingMode.DEFAULT)[source]
Initialise the processor and all its owned subsystems.
Construction is intentionally eager: the ProductEnvironment is built, all spec YAMLs are parsed, and the WorkSpace is registered so that every subsequent
process()/process_batch()call can proceed without further setup.- Parameters:
pride_dir (Path) – Root directory for PRIDE products and working state. Config files and pdp3 working directories will be written under
pride_dir/{year}/{doy}/.output_dir (Path) – Final destination for
.kin/.resoutput files produced by pdp3.pride_install_dir (Path | None) – Optional path to a PRIDE-PPPAR installation that provides additional table files. When set, its spec is registered on the WorkSpace.
cli_config (PrideCLIConfig | None) – Override the default pdp3 CLI flags. When
Nonea defaultPrideCLIConfig(kinematic, 1 s, loose edit) is used.mode (ProcessingMode | Literal['FINAL', 'DEFAULT']) –
Product timeliness mode. Selects which dependency-spec YAML governs product resolution:
ProcessingMode.DEFAULT— FIN → RAP → ULT cascade.ProcessingMode.FINAL— only FINAL products.
Also accepts the string literals
"DEFAULT"or"FINAL"for convenience.
- Return type:
None
- process(rinex, *, site=None, date=None, override=False)[source]
Process one RINEX file end-to-end.
This is the primary single-file entry point. The full pipeline is:
Infer metadata — site ID and observation date are extracted from the RINEX filename / header if not provided explicitly.
Resolve products —
GNSSClient.resolve_dependencies()walks the preference cascade (centre × timeliness) and downloads any missing products topride_dir.Check cache — if a valid
.kinoutput already exists inoutput_dirand override isFalse, the run is skipped and a cachedProcessingResultis returned immediately.Write config — a
config_fileis written topride_dir/{year}/{doy}/.Run pdp3 — the binary is executed with
cwdset to the same{year}/{doy}/directory. Outputs are moved tooutput_dir.
- Parameters:
rinex (Path) – Path to the RINEX observation file.
site (str | None) – 4-char site ID. Inferred from the filename if omitted.
date (date | None) – Override observation date. When
Nonethe date is extracted from the RINEX header viarinex_get_time_range.override (bool) – When
True, re-run pdp3 even if a valid.kinfile already exists.
- Returns:
A
ProcessingResultsummarising the run outcome, including paths to output files, the resolved products, and pdp3’s return code.- Raises:
FileNotFoundError – If rinex does not exist.
- Return type:
- process_batch(rinex_files, *, sites=None, max_workers=1, override=False)[source]
Process multiple RINEX files, sharing product resolution per date.
This is the preferred entry point when processing many files. The pipeline is structured to minimise redundant network calls:
Group by date — RINEX files are sorted by observation date so that product resolution (the expensive step) happens exactly once per unique date.
Resolve & write configs — for each unique date, resolve products and write a
config_fileto the year/doy working directory underpride_dir.Skip cached results — any RINEX whose
.kinoutput already exists and validates is returned immediately without running pdp3 (unless override isTrue).Dispatch pdp3 — remaining jobs are dispatched to a
ThreadPoolExecutorfor parallel subprocess execution. Resolution and config generation are always single-threaded (main thread) to avoid race conditions.
- Parameters:
rinex_files (Sequence[Path]) – Paths to RINEX observation files.
sites (Sequence[str] | None) – Per-file 4-char site IDs. When
None, inferred from filenames via_infer_site.max_workers (int) – Maximum number of concurrent pdp3 subprocesses.
1means fully sequential execution.override (bool) – Re-run pdp3 even when valid output already exists.
- Yields:
A
ProcessingResultfor each file as it completes. Cached results are yielded first, then pdp3 results in completion order. Wrap inlist()if you need all results at once.- Raises:
ValueError – If sites length does not match rinex_files.
- Return type:
- class pride_ppp.factories.processor.ProcessingMode(*values)[source]
Bases:
EnumIGS product timeliness mode for dependency resolution.
Selects which dependency-spec YAML governs which products are accepted.
DEFAULT— cascades through FIN → RAP → ULT. Uses the best available product at run time. Suitable for near-real-time processing or when the observation date is within the last two weeks.FINAL— accepts only IGS final (FIN) products (available ≥13 days after observation). Suitable for post-processing campaigns where reproducibility and highest accuracy are required.
IGS product latency reference (approximate):
FIN (final) : orbit ≈ 13 days, clock ≈ 13 days
RAP (rapid) : orbit ≈ 17 hours, clock ≈ 17 hours
ULT (ultra-rapid) : orbit ≈ 3 hours, clock predicted half
- DEFAULT = 'default'
- FINAL = 'final'
- class pride_ppp.factories.processor.ProcessingResult(rinex_path, site, date, kin_path, res_path, config_path, resolution, returncode=0, stderr='')[source]
Bases:
objectImmutable result from a single RINEX → kinematic processing run.
Attributes
- rinex_pathPath
Path to the input RINEX observation file.
- sitestr
4-character station identifier (e.g.
"NCC1").- datedatetime.date
Observation date for this processing run.
- kin_pathPath or None
Path to the output
.kinfile, orNoneif pdp3 did not produce one.- res_pathPath or None
Path to the output
.resresiduals file, orNone.- config_pathPath
Path to the
config_fileused for this run.- resolutionDependencyResolution
Product resolution result (fulfilled and missing dependencies).
- returncodeint
pdp3 process exit code (0 = success).
- stderrstr
Captured stderr from the pdp3 subprocess.
- positions()[source]
Parse the
.kinfile into a DataFrame of kinematic positions.Returns
- pd.DataFrame or None
Kinematic position DataFrame indexed by UTC epoch, or
Noneif the run failed. Columns:Latitude— geodetic latitude (degrees)Longitude— geodetic longitude (degrees)Height— ellipsoidal height (metres)Nsat— number of satellites used in the epoch solutionPDOP— position dilution of precisionwrms— phase residual WRMS per epoch (mm), merged from the.resfile
Coordinates are in the reference frame of the resolved orbit/clock products (IGS20/ITRF2020 for Repro3+ products; IGS14/ITRF2014 for earlier series). Epochs with
Nsat ≤ 4orPDOP ≥ 5should be treated with caution.
- Return type:
DataFrame | None
- residuals()[source]
Parse the
.resfile into a WRMS DataFrame.Returns
- pd.DataFrame or None
WRMS residuals indexed by timestamp, or
None.
- Return type:
DataFrame | None
- resolution: DependencyResolution
PRIDE-PPP output parsing and validation.
Helpers for reading .kin / .res files into DataFrames and
validating pdp3 output.
- pride_ppp.factories.output.get_wrms_from_res(res_path)[source]
Compute per-epoch phase residual WRMS from a pdp3
.resfile.The WRMS is computed as \(\sqrt{\sum w_i r_i^2 / \sum w_i}\) where \(r_i\) are the double-differenced phase residuals (cycles) and \(w_i\) are the corresponding weights, then converted to millimetres.
Parameters
- res_pathstr or Path
Path to the pdp3 residual output file (
res_{YYYY}{DOY}_{site}.res).
Returns
- pd.DataFrame
Two-column DataFrame:
date— UTC epoch timestampwrms— phase residual WRMS (mm) for that epoch
- pride_ppp.factories.output.kin_to_kin_position_df(source)[source]
Parse a pdp3
.kinfile into a DataFrame with optional WRMS residuals.Reads the kinematic position records after the
END OF HEADERmarker and converts them to a DataFrame indexed by UTC timestamp. Attempts to merge WRMS residuals from a co-located.resfile (same directory, stem derived from the.kinfilename); thewrmscolumn will beNoneif the.resfile is missing or cannot be parsed.Parameters
- sourcestr | Path
Path to the pdp3
.kinoutput file.
Returns
- pd.DataFrame | None
DataFrame with columns including
time,latitude,longitude,height,pdop, andwrms, indexed by record number. ReturnsNoneif the file has no header or contains no valid data records.
- pride_ppp.factories.output.plot_kin_results_wrms(kin_df, title=None, save_as=None)[source]
Plot kinematic results with WRMS in a 6-panel figure.
Subplots (top → bottom): Latitude, Longitude, Height, Nsat (red = ≤ 4), PDOP on log scale (red = ≥ 5), WRMS (mm).
Expects DataFrame columns:
Latitude,Longitude,Height,Nsat,PDOP,wrms.Parameters
- kin_dfpd.DataFrame
Output from
read_kin_datamerged with WRMS residuals.- titlestr, optional
RINEX filename or label used in the figure title.
- save_asstr, optional
If provided, save the figure to this path.
- pride_ppp.factories.output.read_kin_data(kin_path)[source]
Read a
.kinfile into a DataFrame using fixed-width column specs.The column widths match the pdp3 output format (PRIDE-PPPAR 3). The resulting DataFrame is indexed by UTC timestamps derived from MJD + seconds-of-day.
Parameters
- kin_pathstr
Path to the
.kinfile.
Returns
- pd.DataFrame
Fixed-width columns: Mjd, Sod, *, X, Y, Z, Latitude, Longitude, Height, Nsat, G (GPS sats), R (GLONASS), E (Galileo), C2 (BDS-2), C3 (BDS-3), J (QZSS), PDOP. Indexed by UTC datetime derived from MJD + seconds-of-day.