geodezyx.files_rw.read package

Submodules

geodezyx.files_rw.read.read_antex module

Created on Mon Apr 14 23:31:09 2025

@author: psakic

geodezyx.files_rw.read.read_antex.l_atx_cal(val_inp, noazi=True, newline=True)

Format calibration data for ANTEX.

Parameters:
  • val_inp (list) – Calibration values to be written.

  • noazi (bool, optional) – If True, format as NOAZI calibration. Default is True.

Returns:

Formatted calibration data.

Return type:

str

geodezyx.files_rw.read.read_antex.l_atx_std(val_inp, label_inp, newline=True)

Format a standard ANTEX line with a value and label.

Parameters:
  • val_inp (str) – The value to be written in the line.

  • label_inp (str) – The label to be written in the line.

Returns:

Formatted ANTEX line.

Return type:

str

geodezyx.files_rw.read.read_antex.read_antex(filepath, ant_type=None)

Parse an ANTEX file and extract antenna information.

Parameters:
  • filepath (str) – Path to the ANTEX file to be read.

  • ant_type (str, optional) – Specific antenna type to filter. If provided, only data for this antenna type will be included.

Returns:

A dictionary containing parsed antenna data. The structure includes: - HEADER: List of header lines (if header_in_output is True). - Antenna type as keys, with corresponding metadata and frequency-specific data as values.

Return type:

dict

Note

The <Antenna Type> key in the returned dictionary differs for satellite and non-satellite antennas:

  • Satellite Antennas: The key is SVN`_`VALID FROM`_`VALID UNTIL.

    Example: “G042”

  • Receiver Antennas: The key is TYPE.

    Example: “TPSPG_A1+GP NONE”

If the <Antenna Type> key already exists, it is incremented with a _01…`_nn` suffix

Structure of the returned dictionary:

dict # Root dictionary ├── HEADER (list of str) # List of header lines from the ANTEX file. ├── ANTS (dict) # Dictionary containing antenna data. │ ├── <Antenna Type> (str) # Key representing the antenna type (e.g., “AS-ANT3BCAL”). │ │ ├── TYPE (str) # Antenna type (e.g., “AS-ANT3BCAL”). │ │ ├── SERIAL (str) # Serial number of the antenna. │ │ ├── METH (str) # Method information (e.g., calibration method). │ │ ├── DAZI (float) # Azimuth increment in degrees. │ │ ├── ZEN (list of float) # Zenith angle range and increment [ZEN1, ZEN2, DZEN]. │ │ ├── NFREQ (int) # Number of frequencies for the antenna. │ │ ├── SINEX CODE (str, optional) # SINEX code for the antenna (optional). │ │ ├── COMMENT (list of str, optional) # List of comments related to the antenna (optional). │ │ ├── VALID FROM (datetime, optional) # Start of the validity period (optional). │ │ ├── VALID UNTIL (datetime, optional) # End of the validity period (optional). │ │ ├── FREQS (dict) # Dictionary containing frequency-specific data. │ │ │ ├── <Frequency> (str) # Key representing the frequency (e.g., “G01”). │ │ │ │ ├── PCO (list of float) # Phase center offset [NORTH, EAST, UP]. │ │ │ │ ├── NOAZI (numpy array) # Elevation-dependent phase center variations. │ │ │ │ ├── AZI (numpy array) # Azimuth-dependent phase center variations.

geodezyx.files_rw.read.read_antex.write_antex(atx_dic_inp, dir_out, fname_out='out.atx', erase_header=False)

Write antenna calibration information to an ANTEX file.

Parameters:
  • atx_dic_inp (dict) – Dictionary containing antenna calibration data to be written to the ANTEX file. See read_antex for dictionnary structure

  • dir_out (str) – Directory where the output ANTEX file will be saved.

  • fname_out (str, optional) – Name of the output ANTEX file. Default is ‘out.atx’.

  • erase_header (bool, optional) – If True, the header in the input dictionary will be replaced with a default header. Default is False.

Notes

  • The function formats the antenna data into the ANTEX file format and writes it to the specified directory.

  • If erase_header is True, a default header is used instead of the one provided in the input dictionary.

Returns:

Path to the generated ANTEX file.

Return type:

str

geodezyx.files_rw.read.read_atmo module

Created on Wed Jun 30 10:52:09 2021

@author: psakic

geodezyx.files_rw.read.read_atmo.read_bernese_trp(trpfile)

Read tropospheric solution in TRP format from Bernese GNSS software.

Parses Bernese TRP format and returns troposphere parameters including ZTD, north-south and east-west gradients with associated uncertainties.

Parameters:

trpfile (str) – Path to TRP file from Bernese GNSS software.

Returns:

df – DataFrame with columns: STAT, year, month, day, hour, minute, second, MOD_U, CORR_U, SIGMA_U, TOTAL_U, CORR_N, SIGMA_N, CORR_E, SIGMA_E, and datetime column ‘dt’. Numeric columns are converted to float type.

Return type:

pandas.DataFrame

Notes

Written by Chaiyaporn Kitpracha.

geodezyx.files_rw.read.read_atmo.read_gfz_trop(trpfile)

Read GFZ troposphere SINEX solution into pandas DataFrame.

Parses GFZ SINEX format and extracts station name, epoch, and ZTD with associated uncertainties plus horizontal gradients.

Parameters:

trpfile (str) – Path to GFZ troposphere SINEX file.

Returns:

df – DataFrame with columns: STAT, epoc, year, doy, secofday, ztd_est, ztd_est_std, num_sat, tgn_est, tgn_est_std, tge_est, tge_est_std. Numeric columns are converted to float type.

Return type:

pandas.DataFrame

geodezyx.files_rw.read.read_atmo.read_rinex_met(metfile)

Read RINEX meteorological files and convert to pandas DataFrame.

Handles single file or multiple files (as list or iterable). Concatenates multiple files into a single DataFrame with proper time indexing.

Parameters:

metfile (str or list of str) – Path(s) to RINEX meteorological file(s). Can be a single filename string or a list/iterable of filenames (e.g., from glob).

Returns:

df – Meteorological data from RINEX file(s). Index is set to epoch (datetime). Includes columns for temperature, pressure, humidity, and associated uncertainties if available.

Return type:

pandas.DataFrame

Notes

Written by Chaiyaporn Kitpracha.

geodezyx.files_rw.read.read_atmo.read_rinex_met_2(metfile)

Read a single RINEX meteorological file (internal function).

Worker function for read_rinex_met. Parses header for sensor metadata and converts meteorological observations to DataFrame with proper types and datetime indexing.

Parameters:

metfile (str) – Path to a single RINEX meteorological file.

Returns:

df – Meteorological data with datetime index. Includes temperature, pressure, humidity observations and sensor uncertainties. Station code (STA column) is added from RINEX header.

Return type:

pandas.DataFrame

Notes

Written by Chaiyaporn Kitpracha.

geodezyx.files_rw.read.read_atmo.read_snx_trop(snxfile, dataframe_output=True, auto_desc_cols=False)

Read troposphere solutions from a Troposphere SINEX file.

Dynamically parses the TROP/DESCRIPTION block to discover the column layout before reading the TROP/SOLUTION block. Both SINEX_TRO v0.01 (SOLUTION_FIELDS_1/_2 keywords, 2-digit years) and SINEX_TRO v2.00 (TROPO PARAMETER NAMES keyword, 4-digit years, long station names up to 9 characters) are supported.

Column naming convention (v2.00 Table 1-3):

  • trotot / trotot_sig – zenith total delay and its std dev

  • trowet / trowet_sig – zenith wet delay

  • trodry / trodry_sig – zenith dry (hydrostatic) delay

  • tgntot / tgntot_sig – total north gradient (wet + dry)

  • tgetot / tgetot_sig – total east gradient (wet + dry)

  • tgnwet, tgnwet_sig, tgedry, tgedry_sig – wet/dry components of the horizontal gradients

  • iwv – integrated water vapour

  • press – surface pressure

  • epress – partial water vapour pressure

  • temdry – dry temperature

  • humrel – relative humidity

  • nsat – number of satellites used

  • gdop – geometric dilution of precision

  • wmtemp / wmtemp_sig – weighted mean temperature

  • acok, acdl – combination quality counters (combined products)

  • dstax, dstay, dstaz – station coordinate differences (combined products, v0.01)

  • pwv / pwv_sig – precipitable water vapour (v0.01)

Every STDDEV token in TROP/DESCRIPTION is automatically renamed to {preceding_parameter}_sig.

When no TROP/DESCRIPTION block is found the function falls back to heuristics based on the number of value fields per data line (2, 6, or 10 values; see _TROP_FALLBACK_COLS). For any other count, generic names col1, col2, … are assigned.

The epoch year is auto-detected from the string length of the year token:

  • 4-character token → direct 4-digit year (SINEX_TRO v2.00 / modern files).

  • 2-character token → standard SINEX 2-digit convention: YY 80–99 → 1980–1999, YY 00–79 → 2000–2079.

Parameters:
  • snxfile (str) – Path to the SINEX troposphere solution file (plain text or ISO-8859-1 encoded).

  • dataframe_output (bool, optional) – If True (default), return a pandas.DataFrame. If False, return a sorted list of dicts (one dict per epoch/station record) with keys STAT, epoc, and one key per data column.

  • auto_desc_cols (bool, optional) – If True, column names are extracted from the TROP/DESCRIPTION block and used as-is (after post-processing). If False (default), the function falls back to predefined column names. Set to True to preserve original column names from the file; set to False to enforce a consistent naming convention based on field count.

Returns:

df – If dataframe_output=True: DataFrame with columns STAT, epoc (datetime), plus one column per parameter found in TROP/DESCRIPTION (or heuristic fallback names). All parameter columns are cast to float.

If dataframe_output=False: list of dicts sorted by (STAT, epoc).

Return type:

pandas.DataFrame or list of dict

See also

troposinex2df

Convert the list-of-dicts output to a DataFrame.

_parse_trop_description

Parse the TROP/DESCRIPTION block.

References

geodezyx.files_rw.read.read_atmo.read_spotgins_tropo(filepath, sinex_columns=False)

Read a SPOTGINS tropospheric time series file (ZTD or GRAD format).

Parses SPOTGINS ZTD (zenith total delay) or GRAD (horizontal gradients) format and returns tropospheric parameters with associated metadata. Column names are extracted from file headers and kept in their original case (e.g. TROTOT, MJD, Const). The datetime column (yyyy-mm-ddTHH:MM:SS) is always renamed to epoch. Header metadata is dynamically inferred from the file (no hardcoded fields).

Parameters:
  • filepath (str) – Path to a SPOTGINS .ztd or .grad file (can be gzip compressed).

  • sinex_columns (bool, optional) –

    If False (default), column names keep the original case from the file (e.g. TROTOT, TRODRY, Const), with site and epoch added by the reader.

    If True, column names are renamed to the SINEX_TRO convention used by read_snx_trop() (lowercase):

    • sitesite

    • epochepoch

    • MJDmjd

    • TROTOT / TRODRY / TROWETtrotot / trodry / trowet

    • STDWETtrowet_sig

    • TGNTOT / TGETOTtgntot / tgetot

    • STDTGN / STDTGEtgntot_sig / tgetot_sig

    • Auxiliary columns (Const, Dateofexe, GinsVersion, PrairieVersion, DecimalYear) are lowercased.

    The full mapping is available in the module-level dict _SPOTGINS_TO_SINEX_COLS.

Returns:

  • df (pandas.DataFrame) – DataFrame with one row per epoch. Columns use original file case (or SINEX_TRO names when sinex_columns=True). No index is set.

  • meta (dict) – Header metadata extracted from comment block. Keys are converted to lowercase with spaces replaced by underscores. Includes station information, constellation, coordinates, and other metadata.

geodezyx.files_rw.read.read_atmo.troposinex2df(records)

Convert a list of SINEX troposphere records to a pandas DataFrame.

Parameters:

records (list of dict) – List of per-record dicts as returned by read_snx_trop() with dataframe_output=False. Each dict must contain at least the keys STAT (str) and epoc (datetime); remaining keys are tropospheric parameter columns.

Returns:

df – DataFrame with STAT and epoc as the first two columns, followed by one column per parameter. All parameter columns are cast to float.

Return type:

pandas.DataFrame

geodezyx.files_rw.read.read_coords_epos_gfz module

@author: psakic

This sub-module of geodezyx.files_rw contains reading functions to import files containing geodetic time series.

it can be imported directly with: from geodezyx import files_rw

The GeodeZYX Toolbox is a software for simple but useful functions for Geodesy and Geophysics under the GNU LGPL v3 License

Copyright (C) 2019 Pierre Sakic et al. (IPGP, sakic@ipgp.fr) GitHub repository : https://github.com/GeodeZYX/geodezyx-toolbox

geodezyx.files_rw.read.read_coords_epos_gfz.read_epos_slv_times(p, convert_to_time=False)

Extract station and satellite clock/bias solution times from EPOS result file.

Parameters:
  • p (str or path-like) – Path to the EPOS solution file.

  • convert_to_time (bool, optional) – If True, convert offset values from meters to seconds by dividing by the speed of light (299792458 m/s). If False, values remain in meters. Default is False.

Returns:

Station and satellite solution times:

  • DF_stat : DataFrame with columns ‘epoch’, ‘stat’, ‘offset’, ‘offset_sig’ Station-specific clock parameters.

  • DF_sat : DataFrame with columns ‘epoch’, ‘sat’, ‘offset’, ‘offset_sig’ Satellite-specific bias parameters.

Return type:

tuple of (pd.DataFrame, pd.DataFrame)

geodezyx.files_rw.read.read_coords_epos_gfz.read_epos_sta_coords_mono(filein, return_df=True)

Read a single GFZ EPOS coordinate file.

For reading multiple files simultaneously, see read_epos_sta_coords_multi().

Parameters:
  • filein (str) – Path to the input EPOS coordinate file. Supports compressed files (.Z, .gz).

  • return_df (bool, optional) – If True, returns coordinates as a Pandas DataFrame. If False, returns a list of GeodeZYX Point objects (advanced usage). Default is True.

Returns:

Output coordinates. DataFrame contains columns: ‘site’, ‘site_num’, ‘tecto_plate’, ‘epoch’, ‘MJD_ref’, ‘MJD_start’, ‘MJD_end’, ‘x’, ‘y’, ‘z’, ‘sx’, ‘sy’, ‘sz’, ‘Vx’, ‘Vy’, ‘Vz’, ‘sVx’, ‘sVy’, ‘sVz’ if return_df=True. Otherwise a list of Point objects with velocity information stored in the ‘anex’ attribute.

Return type:

pd.DataFrame or list of Point

geodezyx.files_rw.read.read_coords_epos_gfz.read_epos_sta_coords_multi(filein_list, output_type='DataFrame')

Read multiple GFZ EPOS coordinate files.

Parameters:
  • filein_list (list of str) – List of input EPOS coordinate file paths.

  • output_type ({'DataFrame', 'TSobjects'}, optional) – Output format: - ‘DataFrame’: Returns a concatenated Pandas DataFrame containing all coordinates. - ‘TSobjects’: Returns a dictionary of GeodeZYX TimeSeries objects (advanced usage). Default is ‘DataFrame’.

Returns:

Concatenated coordinate data as specified by output_type parameter. If ‘DataFrame’, returns a single DataFrame with all coordinates. If ‘TSobjects’, returns a dictionary keyed by station names.

Return type:

pd.DataFrame or dict

geodezyx.files_rw.read.read_coords_epos_gfz.read_epos_sta_coords_multi_legacy(filein_list, return_dict=True)

Read multiple GFZ EPOS coordinate files (legacy version).

This is the legacy implementation that directly returns GeodeZYX TimeSeries objects. For new code, consider using read_epos_sta_coords_multi() instead.

Parameters:
  • filein_list (list of str) – List of input EPOS coordinate file paths.

  • return_dict (bool, optional) – If True, returns a dictionary of GeodeZYX TimeSeries objects keyed by station names. If False, returns a list of GeodeZYX TimeSeries objects. Default is True.

Returns:

Time series data for each station. Type determined by return_dict parameter. If return_dict=True, returns dict with station names as keys. If return_dict=False, returns list of TimeSeries objects.

Return type:

dict or list of TimeSeries

geodezyx.files_rw.read.read_coords_epos_gfz.read_epos_sta_kinematics(filein)

Read EPOS kinematic station solutions.

Parameters:

filein (str) – Path to the input EPOS kinematic solutions file.

Returns:

DataFrame containing kinematic solutions with columns: ‘site’, ‘site_num’, ‘MJD_epo’, ‘numobs’, ‘x’, ‘y’, ‘z’, ‘sx’, ‘sy’, ‘sz’, ‘N’, ‘E’, ‘U’, ‘sN’, ‘sE’, ‘s_u’.

Return type:

pd.DataFrame

geodezyx.files_rw.read.read_coords_epos_gfz.read_epos_tim(tim_file_in, convert_to_sec=False)

Read satellite clock bias solutions from EPOS timing file.

Parameters:
  • tim_file_in (str or path-like) – Path to the input EPOS timing file.

  • convert_to_sec (bool, optional) – If True, convert offset values from microseconds to seconds. If False, values remain in microseconds. Default is False.

Returns:

Satellite timing solutions with columns: ‘epoch’ (datetime), ‘sat’ (satellite identifier), ‘offset’ (float).

Return type:

pd.DataFrame

geodezyx.files_rw.read.read_coords_epos_gfz.stations_in_epos_sta_coords_file_mono(coords_file_path)

Extract station names and mean epoch from a GFZ EPOS coordinate file.

Parameters:

coords_file_path (str or path-like) – Path to the EPOS coordinate file (YYYY_DDD_sta_coordinates format).

Returns:

  • epoch (datetime) – Mean epoch of the measurements in the file.

  • stats_list (list of str) – List of station names (typically 4-character identifiers).

geodezyx.files_rw.read.read_coords_gins_cnes module

@author: psakic

This sub-module of geodezyx.files_rw contains reading functions to import files containing geodetic time series.

it can be imported directly with: from geodezyx import files_rw

The GeodeZYX Toolbox is a software for simple but useful functions for Geodesy and Geophysics under the GNU LGPL v3 License

Copyright (C) 2019 Pierre Sakic et al. (IPGP, sakic@ipgp.fr) GitHub repository : https://github.com/GeodeZYX/geodezyx-toolbox

geodezyx.files_rw.read.read_coords_gins_cnes.MZB_GINS_2_ATM_GAMIT(listing_in, path_out)

Convert Mean Zonal Bias (MZB) from GINS listing to GAMIT ATM format.

Parameters:
  • listing_in (str) – Path to the input GINS listing file.

  • path_out (str) – Path to the output directory.

Returns:

Path to the generated output file.

Return type:

str

geodezyx.files_rw.read.read_coords_gins_cnes.convert_sp3_clk_2_GINS_clk(sp3_path_in, clk_gins_out, interpo_30sec=True, return_as_DF=True)

Convert SP3 satellite clock data to GINS clock format.

Parameters:
  • sp3_path_in (str) – Path to the input SP3 file.

  • clk_gins_out (str) – Path to the output GINS clock file.

  • interpo_30sec (bool, optional) – If True, interpolate clock data to 30-second intervals. Default is True.

  • return_as_DF (bool, optional) – If True, return results as a pandas DataFrame. If False, return the path to the output file. Default is True.

Returns:

If return_as_DF=True, returns a pandas DataFrame with columns:
  • epoch : datetime

  • sv : satellite vehicle number

  • clk : clock value

If return_as_DF=False, returns the path to the output file.

Return type:

str or DataFrame

Notes

This function is in beta status and currently only supports GPS clocks.

geodezyx.files_rw.read.read_coords_gins_cnes.diff_spotgins_quick(df1, df2)

Compute the difference between two SpotGINS coordinate dataframes.

Parameters:
  • df1 (DataFrame) – First SpotGINS dataframe with E, N, U columns indexed by date.

  • df2 (DataFrame) – Second SpotGINS dataframe with E, N, U columns indexed by date.

Returns:

DataFrame containing the differences (df1 - df2) with rounded hourly indices, with NaN values removed.

Return type:

DataFrame

geodezyx.files_rw.read.read_coords_gins_cnes.gins_readTROPOZ(filein)

Read TROPOZ (zenith tropospheric delay) from a GINS listing file.

Parameters:

filein (str) – Path to the input GINS listing file.

Returns:

pandas DataFrame with columns: - jjul_cnes : CNES Julian day number - tropoz_std : TROPOZ standard deviation - tropoz : TROPOZ value - epoch : datetime of the measurement (rounded to 1 second)

Return type:

DataFrame

geodezyx.files_rw.read.read_coords_gins_cnes.gins_read_MZB(filein, return_df=False)

Read Mean Zonal Bias (MZB) from a GINS listing file.

Parameters:
  • filein (str) – Path to the input GINS listing file.

  • return_df (bool, optional) – If True, return results as a pandas DataFrame. If False, return as separate lists. Default is False.

Returns:

If return_df=False: tuple of (Tstk, MZBstk, sMZBstk, NameStat)
  • Tstk : list of datetime objects

  • MZBstk : list of MZB values

  • sMZBstk : list of MZB standard deviations

  • NameStat : list of station names

If return_df=True: pandas DataFrame with columns:
  • epoch : datetime

  • mzb : MZB value (float)

  • mzb_std : MZB standard deviation (float)

  • site : station name

Return type:

tuple or DataFrame

geodezyx.files_rw.read.read_coords_gins_cnes.gins_read_time(line)

Extract and parse time information from a GINS listing line.

Parameters:

line (str) – A line from a GINS listing file containing time information at fixed character positions.

Returns:

The parsed datetime object. Returns 1970-01-01 if parsing fails.

Return type:

datetime.datetime

Notes

Extracts time components from fixed character positions in the line: - Characters 108-110: day (jour) - Characters 110-112: hour (h) - Characters 112-114: minute (m) - Characters 114-116: second (s) - Characters 125-127: year (yy)

Month is parsed from character 127 where letters O, N, D represent October, November, December respectively.

geodezyx.files_rw.read.read_coords_gins_cnes.read_gins(filein, kineorstatic='kine', flh_in_rad=True, force_get_convergence=False, kf_result=False)

Read a GINS listing file and extract coordinate time series.

Parameters:
  • filein (str) – Path to the input GINS listing file.

  • kineorstatic (str, optional) – Type of processing. Either ‘kine’ for kinematic processing (returns TimeSeriePoint) or ‘static’ for static processing (returns Point). Default is ‘kine’.

  • flh_in_rad (bool, optional) – If True, FLH coordinates are in radians and will be converted to degrees. Default is True.

  • force_get_convergence (bool, optional) – If True, forces retrieval of ‘convergence’ part even if ‘COORDONNEES DES STATIONS AJUSTEES EN HAUTE FREQUENCE’ field is present. Default is False.

  • kf_result (bool, optional) – If True, processes Kalman Filter results. Default is False.

Returns:

If kineorstatic=’kine’, returns a TimeSeriePoint object containing the time series. If kineorstatic=’static’, returns the first Point object.

Return type:

TimeSeriePoint or Point

Notes

The function handles special cases such as: - Double convergence fields (keeps the last one) - Final adjustment coordinates (‘COORDONNEES DES STATIONS AJUSTEES EN HAUTE FREQUENCE’) - Midnight boundary (hour=24) handling

geodezyx.files_rw.read.read_coords_gins_cnes.read_gins_double_diff(filein)

Extract point objects from a GINS double difference listing file.

Parameters:

filein (str) – Path to the input GINS double difference listing file.

Returns:

List of Point objects extracted from the file. Returns None if the file has no convergence section.

Return type:

list or None

geodezyx.files_rw.read.read_coords_gins_cnes.read_gins_double_diff_multi(filelistin)

Read multiple GINS double difference listing files and return a dictionary of time series.

Parameters:

filelistin (list) – List of input GINS double difference listing file paths.

Returns:

Dictionary with station names as keys and TimeSeriePoint objects as values.

Return type:

dict

geodezyx.files_rw.read.read_coords_gins_cnes.read_gins_multi_extracted(filelistin, flh_in_rad=True)

Read extracted GINS listing files and return a time series.

Parameters:
  • filelistin (list) – List of input file paths. Must contain exactly 3 files, one for each coordinate component (X/p, Y/L, Z/H).

  • flh_in_rad (bool, optional) – If True, FLH coordinates are in radians and will be converted to degrees. Default is True.

Returns:

A TimeSeriePoint object containing the time series if successful. Returns None if the list does not contain exactly 3 files.

Return type:

TimeSeriePoint or None

Notes

The input files are expected to have the format: S<HLP>__ddhhiissxxxxxxxxxyym.HOUE where one file contains X/p, one contains Y/L, and one contains Z/H coordinates.

geodezyx.files_rw.read.read_coords_gins_cnes.read_gins_multi_raw_listings(filelistin, kineorstatic='static', flh_in_rad=True)

Read multiple raw GINS listing files and return a single time series.

Parameters:
  • filelistin (list) – List of input GINS listing file paths.

  • kineorstatic (str, optional) – Type of processing. Either ‘static’ or ‘kine’ for kinematic. Default is ‘static’.

  • flh_in_rad (bool, optional) – If True, FLH coordinates are in radians. Default is True.

Returns:

A single TimeSeriePoint object containing points from all input files.

Return type:

TimeSeriePoint

Notes

Files must contain the “c o n v e r g e n c e” field to be processed. All points should have the same station name.

geodezyx.files_rw.read.read_coords_gins_cnes.read_gins_solution(filein, mode='cinematic')

Read a GINS solution file.

Parameters:
  • filein (str) – Path of the input file.

  • mode (str, optional) – Processing mode. Either ‘cinematic’ to return a TimeSeriePoint object or ‘static’ to return a Point object. Default is ‘cinematic’.

Returns:

If mode=’cinematic’, returns a TimeSeriePoint object containing the time series. If mode=’static’, returns the first Point object. Returns None if no points are found in the file.

Return type:

TimeSeriePoint or Point

geodezyx.files_rw.read.read_coords_gins_cnes.read_gins_solution_multi(filein_list, return_dict=True)

Read multiple GINS solution files and return a dictionary or list of time series.

Parameters:
  • filein_list (list) – List of input file paths.

  • return_dict (bool, optional) – If True, return a dictionary with station names as keys and TimeSeriePoint objects as values. If False, return a list of TimeSeriePoint objects. Default is True.

Returns:

If return_dict=True, a dictionary with station names as keys and TimeSeriePoint objects as values. If return_dict=False, a list of TimeSeriePoint objects.

Return type:

dict or list

geodezyx.files_rw.read.read_coords_gins_cnes.read_gins_wrapper(input_list_or_path, flh_in_rad=True)

Read multiple GINS listing files and return a list of time series.

Parameters:
  • input_list_or_path (str or list) – Either a list of file paths or a path glob pattern to match GINS files.

  • flh_in_rad (bool, optional) – If True, FLH coordinates are in radians. Default is True.

Returns:

List of TimeSeriePoint objects, one per GINS listing file.

Return type:

list

Notes

Files without the .gins extension are automatically excluded from processing.

geodezyx.files_rw.read.read_coords_gins_cnes.read_spotgins(filein)

Read a SPOTGINS ENU position file and return a TimeSeriePoint object.

The SPOTGINS ENU file is a whitespace-separated ASCII file with no header, containing daily positioning time series in the East-North-Up (ENU) frame.

Parameters:

filein (str) – Path to the input SPOTGINS ENU file (e.g. SPOTGINS_HOUZ00GLP.enu).

Returns:

Time series object containing the extracted ENU coordinates with their formal uncertainties (1-sigma). The station name is inferred from the filename (field between the first underscore and the dot extension).

Return type:

TimeSeriePoint

Notes

File columns (whitespace-separated, no header):

  1. MJD – Modified Julian Day

  2. East [m] – East displacement

  3. North [m] – North displacement

  4. Up [m] – Up displacement

  5. sigma_E [m] – Formal uncertainty of East

  6. sigma_N [m] – Formal uncertainty of North

  7. sigma_U [m] – Formal uncertainty of Up

  8. DateStr – Date string YYYYMMDDHHmmSS

  9. Year_decimal – Decimal year

  10. SatSys – Satellite system flag (e.g. G)

  11. ProductID – Solution product identifier

  12. QualityFlag – Quality flag (e.g. VALIDE_25_2)

Examples

>>> ts = read_spotgins("SPOTGINS_HOUZ00GLP.enu")
>>> ts.plot()
geodezyx.files_rw.read.read_coords_gins_cnes.read_spotgins_quick(p)

Read SpotGINS quick format file.

Parameters:

p (str) – Path to the input SpotGINS file.

Returns:

pandas DataFrame with columns: - E : East coordinate - N : North coordinate - U : Up coordinate Indexed by date (datetime).

Return type:

DataFrame

geodezyx.files_rw.read.read_coords_gins_cnes.write_ATM_GAMIT(Tstk, MZBstk, sMZBstk, namestat, file_out)

Write atmospheric data in GAMIT ATM_ZEN format.

Parameters:
  • Tstk (list) – List of datetime objects.

  • MZBstk (list) – List of Mean Zonal Bias (MZB) values.

  • sMZBstk (list) – List of MZB standard deviations.

  • namestat (str) – Station name.

  • file_out (str) – Path to the output file.

Returns:

Path to the output file.

Return type:

str

geodezyx.files_rw.read.read_coords_gipsyx_jpl module

@author: psakic

This sub-module of geodezyx.files_rw contains reading functions to import files containing geodetic time series.

it can be imported directly with: from geodezyx import files_rw

The GeodeZYX Toolbox is a software for simple but useful functions for Geodesy and Geophysics under the GNU LGPL v3 License

Copyright (C) 2019 Pierre Sakic et al. (IPGP, sakic@ipgp.fr) GitHub repository : https://github.com/GeodeZYX/geodezyx-toolbox

geodezyx.files_rw.read.read_coords_gipsyx_jpl.read_gipsy_apps(filein)

Read GIPSY APPS (Online processing tool) output file.

Parameters:

filein (str) – Path to the input file.

Returns:

Time series object containing the extracted coordinates in XYZ format with standard deviations.

Return type:

TimeSeriePoint

Notes

The file format contains timestamp, X, Y, Z coordinates and their corresponding standard deviations. Comment lines starting with ‘#’ and lines containing ‘Kinematic Processing’ are skipped.

geodezyx.files_rw.read.read_coords_gipsyx_jpl.read_gipsy_bosser(filein)

Read a GIPSY file in the format used by P. Bosser at ENSTA Brest.

Parameters:

filein (str) – Path to the input file.

Returns:

Time series object containing the extracted coordinates in FLH format.

Return type:

TimeSeriePoint

Notes

File format contains year, day of year, latitude, longitude, height, and RMS values. Latitude and longitude are converted from radians to degrees.

geodezyx.files_rw.read.read_coords_gipsyx_jpl.read_gipsy_gdcov(filein)

Read GIPSY GDCOV (geodetic covariance) file.

Parameters:

filein (str) – Path to the input GDCOV file.

Returns:

Time series object containing the extracted coordinates with covariance information.

Return type:

TimeSeriePoint

geodezyx.files_rw.read.read_coords_gipsyx_jpl.read_gipsy_gdcov_list(filelistin)

Read multiple GIPSY GDCOV (geodetic covariance) files.

Parameters:

filelistin (list) – List of input file paths.

Returns:

Merged time series object containing data from all input files.

Return type:

TimeSeriePoint

geodezyx.files_rw.read.read_coords_gipsyx_jpl.read_gipsy_tdp(filein)

Read legacy Gipsy TDP (Time Dependent Parameter) file.

Parameters:

filein (str) – Path to the input TDP file.

Returns:

Time series object containing the extracted coordinates.

Return type:

TimeSeriePoint

geodezyx.files_rw.read.read_coords_gipsyx_jpl.read_gipsy_tdp_list(filelistin)

Read multiple legacy Gipsy TDP (Time Dependent Parameter) files.

Parameters:

filelistin (list) – List of input file paths.

Returns:

Merged time series object containing data from all input files.

Return type:

TimeSeriePoint

geodezyx.files_rw.read.read_coords_gipsyx_jpl.read_gipsyx_tdp(filein)

Read GipsyX TDP (Time Dependent Parameter) file.

Parameters:

filein (str) – Path to the input GipsyX TDP file.

Returns:

Time series object containing the extracted coordinates.

Return type:

TimeSeriePoint

Raises:

Exception – If the file cannot be opened.

geodezyx.files_rw.read.read_coords_gipsyx_jpl.read_gipsyx_tdp_list(filelistin)

Read multiple GipsyX TDP (Time Dependent Parameter) files.

Parameters:

filelistin (list) – List of input file paths.

Returns:

Merged time series object containing data from all input files.

Return type:

TimeSeriePoint

geodezyx.files_rw.read.read_coords_gipsyx_jpl.read_gipsyx_xfile(filein)

Read GipsyX X file containing transformation parameters and residuals.

Parameters:

filein (str) – Input file path. Can handle gzip-compressed files (.gz).

Returns:

  • df_trans_out (DataFrame) – Helmert transformation parameters and their standard deviations. Columns include transformation parameters (e.g., TX, TY, TZ) and their corresponding standard deviations (sTX, sTY, sTZ).

  • df_resid_out (DataFrame) – Coordinates residuals (not implemented yet).

geodezyx.files_rw.read.read_coords_gipsyx_jpl.read_gipsyx_xfile_list(filelistin)

Read multiple GipsyX X files containing transformation parameters and residuals.

Parameters:

filelistin (list) – List of input file paths. Can handle gzip-compressed files (.gz).

Returns:

  • df_trans_out (DataFrame) – Combined Helmert transformation parameters and their standard deviations from all input files. Columns include transformation parameters and their corresponding standard deviations.

  • df_resid_out (DataFrame) – Coordinates residuals (not implemented yet).

geodezyx.files_rw.read.read_coords_gipsyx_jpl.read_jpl_timeseries_solo(latlonrad_files_list)

Read JPL time series from separate latitude, longitude, and radial component files.

Parameters:

latlonrad_files_list (list) – List of three file paths containing latitude (.lat), longitude (.lon), and radial (.rad) components of the time series.

Returns:

Time series object containing the extracted coordinates in ENU (East-North-Up) format with standard deviations. Station name is extracted from the file names.

Return type:

TimeSeriePoint

Raises:

Exception – If the files have different epoch times or if station names do not match across the three input files.

Notes

The three input files are expected to contain the same epochs in the same order. Station name is extracted from the filename prefix (before the first dot). Coordinates are assumed to be in centimeter units and converted to meter units.

geodezyx.files_rw.read.read_coords_misc module

@author: psakic

This sub-module of geodezyx.files_rw contains reading functions to import files containing geodetic time series.

it can be imported directly with: from geodezyx import files_rw

The GeodeZYX Toolbox is a software for simple but useful functions for Geodesy and Geophysics under the GNU LGPL v3 License

Copyright (C) 2019 Pierre Sakic et al. (IPGP, sakic@ipgp.fr) GitHub repository : https://github.com/GeodeZYX/geodezyx-toolbox

geodezyx.files_rw.read.read_coords_misc.read_IGS_coords(filein, initype='auto')
geodezyx.files_rw.read.read_coords_misc.read_all_obs(filein)

selectionne automatiquement le type de fichier brut en entrée INPUT : chemin du fichier brut de observations génériques OUTPUT : Une LISTE de TimeSerieObs

geodezyx.files_rw.read.read_coords_misc.read_all_points(filein)

selectionne automatiquement le type de fichier brut en entrée INPUT : chemin du fichier brut de POINTS OUTPUT : Une TimeSeriePoint

geodezyx.files_rw.read.read_coords_misc.read_calais(filelist)

filelistin est une liste de 3 fichier E N & U

geodezyx.files_rw.read.read_coords_misc.read_groops_position(Filesin)
geodezyx.files_rw.read.read_coords_misc.read_hector_neu(filein)
geodezyx.files_rw.read.read_coords_misc.read_jump_file(filein, returned_events=('S', 'E', 'D'))

From a “Jump” File (p. Sakic internal file) Return a dictionnairy with events

Parameters:
  • filein (str) – path of the Jump File

  • returned_events (tuple or list) – contains the inital letter of the event type which will be stored in the dico (See below)

Returns:

jump_dico – outputed events, in the form jump_dico[“STAT”][“L”] = datetime where L is the inital letter of the event type

Return type:

dict of dict of datetime

Note

A jump file contains infos like this :

#>>> STAT S 2000 001 #>>> STAT E 2001 001 #>>> STAT D 2000 06 01

it can manage YEAR DOY or YEAR MM DD or DECIMAL YEAR

A non-blank 1st column is a commented line

After a #, it is a commentary

event type letters :

S : Start

E : End

D : Discontinuity

geodezyx.files_rw.read.read_coords_misc.read_nav_step1_geodesea(filein)
geodezyx.files_rw.read.read_coords_misc.read_nevada(filein, input_coords='enu')

input_coords=”enu” or “xyz”

geodezyx.files_rw.read.read_coords_misc.read_nrcan_csv(filein, associated_ps_file='', statname='')

associated_ps_file is highly recommanded because of the time managing

WARN : Must be avoided b/c of the weak decimal precision of the angles !!!

geodezyx.files_rw.read.read_coords_misc.read_nrcan_pos(filein)

.pos file are more precise than .csv, should be used !

geodezyx.files_rw.read.read_coords_misc.read_pbo_pos(filein)
geodezyx.files_rw.read.read_coords_misc.read_pride_pppar_kin(filein)
geodezyx.files_rw.read.read_coords_misc.read_pride_pppar_pos(files_list_in)
geodezyx.files_rw.read.read_coords_misc.read_pride_pppar_pos_mono(filein)
geodezyx.files_rw.read.read_coords_misc.read_renag_synthetic(filein, discont_file_in=None)
geodezyx.files_rw.read.read_coords_misc.read_spotgins_masterfile(master_inp)
geodezyx.files_rw.read.read_coords_misc.read_track(filein)

Read GAMIT/TRACK File

Parameters:

filein (str) – input file path.

Returns:

tsout – output TimeSerie.

Return type:

TimeSeries Object

geodezyx.files_rw.read.read_coords_misc.read_track_2(filein, site_name=None)

Read a kinematic track file

Parameters:

filein (str) – path of the file.

Returns:

DF

Return type:

Pandas DataFrame

geodezyx.files_rw.read.read_coords_misc.read_webobs(filein, typein='txt', coordtreat=False, dropna=False)
geodezyx.files_rw.read.read_coords_misc.sorting_a_calais_file(openedfile)

geodezyx.files_rw.read.read_coords_rtklib module

@author: psakic

This sub-module of geodezyx.files_rw contains reading functions to import files containing geodetic time series.

it can be imported directly with: from geodezyx import files_rw

The GeodeZYX Toolbox is a software for simple but useful functions for Geodesy and Geophysics under the GNU LGPL v3 License

Copyright (C) 2019 Pierre Sakic et al. (IPGP, sakic@ipgp.fr) GitHub repository : https://github.com/GeodeZYX/geodezyx-toolbox

geodezyx.files_rw.read.read_coords_rtklib.read_rtklib(filein, return_df=False)

Read a RTKLIB file.

Parameters:
  • filein (str) – Input file path

  • return_df (bool, optional) – If True, return DataFrame instead of TimeSeriePoint (default: False)

Returns:

TimeSeriePoint object or pandas DataFrame depending on return_df

Return type:

TimeSeriePoint or DataFrame

geodezyx.files_rw.read.read_eop module

Created on Wed Jun 23 10:24:42 2021

@author: psakic

geodezyx.files_rw.read.read_eop.read_IERS(file_path_in)
geodezyx.files_rw.read.read_eop.read_IERS_info(fil, mjd)
geodezyx.files_rw.read.read_eop.read_bull_B(file_path_in)

Read an Bulletin B file

Parameters:

file_path_in (str) – Path of the file in the local machine.

Returns:

DFout – Returns a panda table format with the data extracted from the file.

Return type:

pandas DataFrame

geodezyx.files_rw.read.read_eop.read_eop_C04(file_path_in)

read EOP C04 file

Parameters:

file_path_in (str) – path of the EOP C04 file.

Returns:

DF – out DataFrame.

Return type:

DataFrame

geodezyx.files_rw.read.read_eop.read_eop_finals(file_path_in, precnut_model=2000, simplified_EOP_DF='mixed')

read EOP finals file

Parameters:
  • file_path_in (str) – path of the EOP finals file.

  • precnut_model (int, optional) – IAU Precession-Nutation Model. Valid values are 1980 and 2000. The default is 2000.

Returns:

  • DF (DataFrame) – out DataFrame - Complete content of the finals file.

  • DF2 (DataFrame) – out DataFrame - Simplified content of the finals file. Based on C04 EOP DataFrame structure. If no Bulletin-B values provided, use Bulletin-A.

geodezyx.files_rw.read.read_eop.read_erp(file_path_in, ac=None)

Read IGS Analysis Center ERP files

Parameters:
  • file_path_in (str) – Path of the file in the local machine.

  • ac (str) – The analysis center that will be used. If not precised, will be the first 3 letters of the input name

Returns:

out1 – Returns a panda table format with the data extracted from the file.

Return type:

pandas table

Note

Columns name

(‘MJD’,’X-p (arcsec)’, ‘Y-p (arcsec)’, ‘UT1UTC (E-7S)’,’LOD (E-7S/D)’,’S-X (E-6” arcsec)’,’S-Y (E-6” arcsec)’, ‘S-UT (E-7S)’,’S-LD (E-7S/D)’,’NR (E-6” arcsec)’, ‘NF (E-6” arcsec)’, ‘NT (E-6” arcsec)’, ‘X-RT (arcsec/D)’,’Y-RT (arcsec/D)’,’S-XR (E-6” arcsec/D)’,’S-YR (E-6” arcsec/D)’, ‘C-XY’, ‘C-XT’, ‘C-YT’, ‘DPSI’, ‘DEPS’,’S-DP’,’S-DE’)

geodezyx.files_rw.read.read_eop.read_erp_multi(path_list, return_array=False, smart_mode=True, ac=None)
Parameters:
  • path_list (list) – a list of ERP files.

  • return_array (ool, optional) – retur results in Array or DataFrame. The default is False.

  • smart_mode (bool, optional) – keep only the latest value (True is recommended). The default is True.

  • ac (str, optional) – select a specific AC. The default is None.

Returns:

output ERPs.

Return type:

Array or DataFrame

geodezyx.files_rw.read.read_eop.read_erp_snx(snx_in)

Read ERP in SINEX Format

Parameters:

snx_in (str) – path of the SINEX file.

Return type:

None.

geodezyx.files_rw.read.read_gnss_prods module

Created on Wed Jun 23 10:24:19 2021

@author: psakic

geodezyx.files_rw.read.read_gnss_prods.clk_decimate(file_inp, file_out, step=300)

Decimate a .clk file

Parameters:
  • file_inp (str) – path of the input clk file.

  • file_out (str) – path of the output clk file.

  • step (int, optional) – decimation step in sec. The default is 300.

Returns:

file_out – path of the output clk file.

Return type:

str

geodezyx.files_rw.read.read_gnss_prods.clk_diff(file_1, file_2)

Compute the clock differences between two .clk file

Parameters:
  • file_1 (str or pandas DataFrame) – file 1 path.

  • file_2 (str or pandas DataFrame) – file 2 path.

Returns:

DFdiff – clock differences epoch byx epoch between the two files.

Return type:

DataFrame

geodezyx.files_rw.read.read_gnss_prods.load_sp3(sp3_inp)

Load a SP3 file and return its content as a list of strings

Parameters:

sp3_inp (str or list) – path of the SP3 file can handle gzip-compressed file (with .gz/.GZ or .Z extension) can also handle the sp3 content as a list of strings

Returns:

lines

Return type:

list

geodezyx.files_rw.read.read_gnss_prods.read_clk(file_path_inp, names_4char=False)

Read an IGS clk file

Parameters:
  • file_path_inp (str) – Path of the file in the local machine. can handle gzip-compressed file (with .gz/.GZ extension)

  • names_4char (bool) – Force the station names to have 4 charaters (new naming convention is longer)

Returns:

clk_df – Returns a panda table format with the data extracted from the file.

Return type:

pandas DataFrame

Note

Bias is given in seconds

geodezyx.files_rw.read.read_gnss_prods.read_clk_from_sp3(file_path_or_orb_df_inp)

Get the clock values from a SP3 file of an Orbit DataFrame, formated as a Clock DataFrame

Parameters:

file_path_or_orb_df_inp (str or DataFrame) – the input SP3 file path or an Orbit DataFrame.

Returns:

clk_df_sp3 – Clock DataFrame.

Return type:

DataFrame

geodezyx.files_rw.read.read_gnss_prods.read_sp3(file_path_inp, returns_pandas=True, name='', epoch_as_pd_index=False, km_conv_coef=1, skip_null_epoch=True, new_col_names=True, pos_vel_col=False)

Read a SP3 file (GNSS Orbits standard file) and return X,Y,Z coordinates for each satellite and for each epoch

Parameters:
  • file_path_inp (str) – path of the SP3 file can handle gzip-compressed file (with .gz/.GZ or .Z extension)

  • returns_pandas (bool) – if True, return a Pandas DataFrame. if False, return separated lists.

  • name (str) – a manual name for the file

  • epoch_as_pd_index (bool) – if True, the index of the output dataframe contains if False, it contains generic integer indexs

  • km_conv_coef (float) – a conversion coefficient to change the units to get meters : 10**3 to get milimeters : 10**6

  • skip_null_epoch (bool) – Do not write an epoch if all sats are null (filtering)

  • new_col_names (bool) – A legacy option to have (or not) consistent column names with read_rinex Default is False

Returns:

  • df (Pandas DataFrame) – if returns_pandas == True

  • epoch_stk , Xstk , Ystk , Zstk , Clkstk (lists) – if returns_pandas == False

Note

SP3 coordinates are usually given in ITRF, i.e. an ECEF system

If the SP3 contains velocity records, this option adds a ‘pv’ column containing ‘p’ for position or ‘v’ for velocity.

Warning: velocity ‘v’ records are in dm/s per default, and the same km_conv_coef coefficient as the position records will be applied!

geodezyx.files_rw.read.read_gnss_prods.read_sp3_header(sp3_inp, ac_name_inp=None)

Read a SP3 file header and return a Pandas DataFrame with sat. PRNs and sigmas contained in the header

Parameters:
  • sp3_inp (str or list) –

    path of the SP3 file can handle gzip-compressed file (with .gz/.GZ extension)

    can also handle the sp3 content as a list of strings (useful when read_sp3_header is used as a subfunction of read_sp3)

  • ac_name_inp (str) – force the AC name (necessary when read_sp3_header is used as a subfunction of read_sp3)

Returns:

header_df – 2 columns “sat”, “sigma”

Return type:

Pandas DataFrame

Note

More infos about the sigma http://acc.igs.org/orbacc.txt

geodezyx.files_rw.read.read_gnss_prods.sp3_data_frame_zero_epoch_filter(orb_df_inp)

Filter an Orbit DataFrame (from a SP3) by removing the null epochs

Parameters:

orb_df_inp (DataFrame) – Orbit DataFrame (from a SP3).

Returns:

orb_df_out – Filtered Orbit DataFrame.

Return type:

DataFrame

geodezyx.files_rw.read.read_gnss_prods.sp3_decimate(file_inp, file_out, step=15)

Decimate a SP3 file

Parameters:
  • file_inp (str) – path of the input SP3 file.

  • file_out (str) – path of the output SP3 file.

  • step (int, optional) – decimation step in minutes. The default is 15.

Returns:

file_out – path of the output SP3 file.

Return type:

str

geodezyx.files_rw.read.read_gnss_qc module

Created on Fri Dec 1 17:46:14 2023

@author: psakic

geodezyx.files_rw.read.read_gnss_qc.read_anubis_xtr_sum(xtr_in)

Read ANUBIS XTR summary information

Input

xtr_instr

Path to the XTR file

returns:
  • df_totsum (pandas.DataFrame) – DataFrame containing the TOTSUM information

  • df_gnssum (pandas.DataFrame) – DataFrame containing the GNSSUM information

geodezyx.files_rw.read.read_gnss_qc.read_ringo_qc(file_in)
geodezyx.files_rw.read.read_gnss_qc.read_ringo_systems(file_in)

Read RINGO satellite systems summary tables

Input

file_instr

Path to the RINGO QC file

returns:

tables – Dictionary containing DataFrames for each satellite system

rtype:

dict

geodezyx.files_rw.read.read_igs_combi module

Created on Wed Jun 23 11:42:14 2021

@author: psakic

geodezyx.files_rw.read.read_igs_combi.prn_int_2_prn_str(prn_int, full_out=False)

for read_combi_sum_full

if full_out : return e.g. “G04”,”G”,4

geodezyx.files_rw.read.read_igs_combi.read_combi_REPORT(Path_list)
geodezyx.files_rw.read.read_igs_combi.read_combi_clk_rms(sum_file, return_as_df=True, clk_ref_cen_gal='com', index_useful_col=-4, convert_to_int=True)

based on : read_good_clk_rms_one

geodezyx.files_rw.read.read_igs_combi.read_combi_clk_rms_full_table(path_in, with_stats_rms=False, detailed_df=False)

recommended for .out file

detailed_df: the outlier values are more detailled X (excuded) => np.inf - (not proivided) => np.nan >>> (too big for a print, but still kept) => 999999

geodezyx.files_rw.read.read_igs_combi.read_combi_sum_exclu(sum_file, return_as_df=True, use_intuitive_bool=True)
geodezyx.files_rw.read.read_igs_combi.read_combi_sum_full(sum_full_file, RMS_lines_output=True, set_PRN_as_index=True)

geodezyx.files_rw.read.read_logsheets module

@author: psakic

This sub-module of geodezyx.files_rw contains reading functions to import GNSS logsheets/sitelogs.

it can be imported directly with: from geodezyx import files_rw

The geodezyx toolbox is a software for simple but useful functions for Geodesy and Geophysics under the GNU LGPL v3 License

Copyright (C) 2019 Pierre Sakic et al. (IPGP, sakic@ipgp.fr) GitHub repository : https://github.com/IPGP/geodezyx

class geodezyx.files_rw.read.read_logsheets.Antenna

Bases: Event

ARPSmart()
AntTypSmart()
property Antenna_Radome_Type
class geodezyx.files_rw.read.read_logsheets.Event

Bases: object

property Date_Installed
property Date_Removed
class geodezyx.files_rw.read.read_logsheets.Location

Bases: object

export_as_string()
class geodezyx.files_rw.read.read_logsheets.Receiver

Bases: Event

FirmwareSmart()
class geodezyx.files_rw.read.read_logsheets.Site

Bases: object

property IERS_DOMES_Number
geodezyx.files_rw.read.read_logsheets.mono_logsheet_read(logsheet_path, return_lists=False)

Read a sigle LogSheet File to Logsheet block objects

Parameters:
  • logsheet_path (str) – Logsheet path.

  • return_lists (Bool, optional) – The default is False. if True, this legacy mode returns each Logsheet Block object in a list, so each of them can be managed immediatly by write_station_info_from_datalists function. Useful only for such write_<…> functions.

Returns:

  • period_lis (List of Period Block Object) – Period description in Period Block Object.

  • sit (Site Block Object) – Site description in Site Block Object.

  • loc (Location Block Object) – Location description in Site Block Object.

geodezyx.files_rw.read.read_logsheets.multi_logsheet_read(pathin, wildcardin='*log', return_dico=True, output_mode='classic')

Read multiple logsheets

Parameters:
  • pathin (list or str) – If list: list of the Logsheet paths. If str: path of the directory containing the Logsheets.

  • wildcardin (str, optional) – a wildcard describing the logsheet pattern. used only for pathin in a string path. The default is '*log'.

  • return_dico (bool, optional) – If False, returns period_lis_lis, stat_lis, loc_lis the False mode is useful for station.info generation with write_station_info_from_datalists The default is True.

  • output_mode (str, optional) –

    Defines the output mode if a dictionary is asked. (It is not relevant if list are asked)

    • 'classic': returns in the period_lis, stat, loc

    • 'pretty': returns the period_lis, stat, loc but with period_lis as a DataFrame

    • 'legacy': returns in the dico period_lis_lis, stat_lis, loc_lis (should not be used anymore)

    The default is 'classic'.

Returns:

stations_dico – a dictionnary like stations_dico['STAT'] = (period_lis, station, loc).

Return type:

dict

geodezyx.files_rw.read.read_logsheets.read_blocks_logsheet(input_file, block_id)

Read a Logsheet Block

Parameters:
  • input_file (str) – Logsheet path.

  • block_id (int) – the ID of the wished block. 1. Site Identification of the GNSS Monument 2. Site Location Information 3. GNSS Receiver Information 4. GNSS Antenna Information 5. Surveyed Local Ties 6. Frequency Standard 7. Collocation Information 8. Meteorological Instrumentation etc. etc. …

Returns:

ObjList – List of Block Objects. Warning: if the Block contains only one sub-block Then the output is a 1-item List

Return type:

List of Block Objects

geodezyx.files_rw.read.read_rinex module

@author: psakic

This sub-module of geodezyx.files_rw contains functions to read RINEX files observation files.

it can be imported directly with: from geodezyx import files_rw

The geodezyx toolbox is a software for simple but useful functions for Geodesy and Geophysics under the GNU LGPL v3 License

Copyright (C) 2019 Pierre Sakic et al. (IPGP, sakic@ipgp.fr) GitHub repository : https://github.com/IPGP/geodezyx

geodezyx.files_rw.read.read_rinex.df_rnx_clean_lli_ssi(df_rnx_in)

Remove the Loss of Lock Indicator (LLI) and Signal Strength Indicator (SSI) columns in a DataFrame RINEX

Parameters:

df_rnx_in (Pandas DataFrame / geodezyx's RINEX format) – A RINEX DataFrame with LLI/SSI columns.

Returns:

df_rnx_out – A RINEX DataFrame without LLI/SSI columns.

Return type:

Pandas DataFrame / geodezyx’s RINEX format

geodezyx.files_rw.read.read_rinex.dict_sys_obs_clean_lli_ssi(dict_sys_obs_in)

Clean a dict_sys_obs (generated by observables_dict_per_sys) of its LLI and SSI values

Parameters:

dict_sys_obs_in (dict) – A dictionnary with GNSS system as key (G,R,E…). And the observalbes for each system as values.

Returns:

dict_sys_obs_out – Same dictionnary cleanned of its LLI and SSI values.

Return type:

dict

geodezyx.files_rw.read.read_rinex.observables_dict_per_sys(df_rnx_in)

Gives the GNSS observables for each GNSS system in a dictionnary

Parameters:

df_rnx_in (Pandas DataFrame / geodezyx's RINEX format) – A RINEX DataFrame.

Returns:

dict_sys_obs – A dictionnary with GNSS system as key (G,R,E…). And the observalbes for each system as values

Return type:

dict

Note

Use dict_sys_obs_clean_LLI_SSI if your want to remove the LLI & SSI values

geodezyx.files_rw.read.read_rinex.open_rinex(rnx_inp, verbose=False)
geodezyx.files_rw.read.read_rinex.read_rinex2_obs(rnx_in, set_index=None, return_header=False)

Read a RINEX Observation, version 2

Parameters:
  • rnx_in (see below) – input RINEX. can be the path of a RINEX file as string or as Path object, or directly the RINEX content as a string, bytes, StringIO object or a list of lines

  • set_index (str or list of str, optional) – define the columns for the index. If None, the output DataFrame is “flat”, with integer index [“epoch”,”prn”] for instance set the epoch and the prn as MultiIndex The default is None.

  • return_header (bool, optional) – If True, the function returns a tuple (df_rnx_obs, header_lines), where header_lines is a list of strings containing the header lines.

Returns:

  • df_rnx_obs (Pandas DataFrame / geodezyx’s RINEX format)

  • header_lines (list of str, optional) – If return_header is True, this contains the header lines of the RINEX file. Otherwise, it is not returned.

geodezyx.files_rw.read.read_rinex.read_rinex3_obs(rnx_in, set_index=None, return_header=False)

Read a RINEX Observation, version 3 or 4

Parameters:
  • rnx_in (see below) – input RINEX. can be the path of a RINEX file as string or as Path object, or directly the RINEX content as a string, bytes, StringIO object or a list of lines

  • set_index (str or list of str, optional) – define the columns for the index. If None, the output DataFrame is “flat”, with integer index [“epoch”,”prn”] for instance set the epoch and the prn as MultiIndex The default is None.

  • return_header (bool, optional) – If True, the function returns a tuple (df_rnx_obs, header_lines), where header_lines is a list of strings containing the header lines.

Returns:

  • df_rnx_obs (Pandas DataFrame / geodezyx’s RINEX format)

  • header_lines (list of str, optional) – If return_header is True, this contains the header lines of the RINEX file. Otherwise, it is not returned.

geodezyx.files_rw.read.read_rinex.read_rinex3_obs_legacy(rnx_in, set_index=None)

Read a RINEX Observation, version 3 or 4

This legacy version is much slower but maybe mor relaible than the new one

Parameters:
  • rnx_in (see below) – input RINEX. can be the path of a RINEX file as string or as Path object, or directly the RINEX content as a string, bytes, StringIO object or a list of lines

  • set_index (str or list of str, optional) – define the columns for the index. If None, the output DataFrame is “flat”, with integer index [“epoch”,”prn”] for instance set the epoch and the prn as MultiIndex The default is None.

Returns:

df_rnxobs

Return type:

Pandas DataFrame / geodezyx’s RINEX format

geodezyx.files_rw.read.read_rinex.read_rinex_obs(rnx_in, set_index=None, return_header=False)

Frontend function to read a RINEX Observation, version 2 or 3

Parameters:
  • rnx_in (see below) – input RINEX. can be the path of a RINEX file as string or as Path object, or directly the RINEX content as a string, bytes, StringIO object or a list of lines

  • set_index (str or list of str, optional) – define the columns for the index. If None, the output DataFrame is “flat”, with integer index [“epoch”,”prn”] for instance set the epoch and the prn as MultiIndex The default is None.

  • return_header (bool, optional) – If True, the function returns a tuple (df_rnx_obs, header_lines), where header_lines is a list of strings containing the header lines.

Returns:

  • df_rnx_obs (Pandas DataFrame / geodezyx’s RINEX format)

  • header_lines (list of str, optional) – If return_header is True, this contains the header lines of the RINEX file. Otherwise, it is not returned.

geodezyx.files_rw.read.read_rinex_nav module

Created on 27/08/2025 22:34:53

@author: psakic

geodezyx.files_rw.read.read_rinex_nav.read_rinex_nav(fn, writeh5=None)

Read a RINEX 2 or RINEX 3 navigation file into a DataFrame.

Based on Michael Hirsch readRinexNav function. http://gage14.upc.es/gLAB/HTML/GPS_Navigation_Rinex_v2.11.html

The RINEX version is auto-detected from the file header. Compressed files (.gz / .Z) are decompressed automatically.

RINEX3 reading is optimized for GOP files.

Parameters:
  • fn (str) – Path to the RINEX navigation file (plain or .gz / .Z compressed).

  • writeh5 (ignored) – Kept for backward compatibility.

Returns:

nav – Navigation data with columns defined in _NAV_COLS plus ‘sys’ and ‘svni’.

Return type:

pd.DataFrame

geodezyx.files_rw.read.read_rinex_nav.read_rinex_nav_v3_header(f)

Parse IONOSPHERIC CORR and TIME SYSTEM CORR records from a RINEX 3 navigation file header.

Compressed files (.gz / .Z) are decompressed automatically.

Parameters:

f (str) – Path to the RINEX 3 navigation file (plain or .gz / .Z compressed).

Returns:

  • iono_corr_dic (dict) – Keys are the 4-character correction type (e.g. 'GPSA', 'GPSB', 'GAL', 'BDSA' …). Values are numpy arrays of the numeric parameters found on that line.

  • time_sys_corr_dic (dict) – Keys are the 4-character correction type (e.g. 'GAUT', 'GPUT', 'GLUT' …). Values are numpy arrays of the numeric parameters (2 floats + 2 ints) found on that line.

Examples

>>> iono, tsys = read_rinex_nav_v3_header('BRDC00GOP_R_20191760000_01D_MN.rnx')
>>> iono['GPSA']
array([ 4.6566e-09,  1.4901e-08, -5.9605e-08, -1.1921e-07])
>>> tsys['GAUT']
array([ 1.9557774067e-08, -1.154631946e-14,  1.72800e+05,  2.059e+03])

geodezyx.files_rw.read.read_sinex module

Created on 27/08/2025 22:26:15

@author: psakic

geodezyx.files_rw.read.read_sinex.read_sinex(sinex_path_in, keep_sites_as_index=False, drop_nan=False)

Read a coordinate SINEX file as DataFrame

Parameters:
  • sinex_path_in (str) – path of the SINEX.

  • keep_sites_as_index (Bool, optional) – use the site names as index. The default is False.

  • drop_nan (bool or str, optional) – remove the NaN in the DataFrame. False: do not remove them ‘all’: remove the row if all values are NaN ‘any’: remove the row if at least one value is NaN (dangerous) The default is False.

Returns:

DFout – SINEX DataFrame.

Return type:

DataFrame

geodezyx.files_rw.read.read_sinex.read_sinex_bench_antenna(sinex_in)
geodezyx.files_rw.read.read_sinex.read_sinex_legacy(snxfile, dataframe_output=True)

This function is depreciated !!!!

geodezyx.files_rw.read.read_sinex.read_sinex_versatile(sinex_path_in, id_block, convert_date_2_dt=True, header_line_idx=-1, improved_header_detection=True, verbose=True)

Read a block from a SINEX and return the data as a DataFrame

Parameters:
  • sinex_path_in (str) – Description param1

  • id_block (str) – Name of the block (without “+” or “-“)

  • convert_date_2_dt (bool) – Try to convert a SINEX formated date as a python datetime

  • header_line_idx (int or None) – If the block header contains several lines, use this line index Per default, the last (-1) For the first line, use 0 If no header is properly defined, use None

  • improved_header_detection (bool) – Improved header detection. Works for most cases but sometime the simple version works better. (advenced usage) Default is True

  • verbose (bool) – print the header and its field size Default is True

Returns:

df – Returned DataFrame

Return type:

Pandas DataFrame

geodezyx.files_rw.read.read_sinex.sinex_bench_antenna_df_2_disconts(df_antenna_in, stat, return_full=False)
geodezyx.files_rw.read.read_sinex.sinex_data_frame(read_sinex_result)
geodezyx.files_rw.read.read_sinex.stations_in_coords_file_multi(files_path_list, files_type='sinex')

Gives stations list in a SINEX or EPOS coords. file

Parameters:
  • files_path_list (iterable (list)) – path of the SINEX/coords files list (e.g. made with glob).

  • files_type (str, optional) – “sinex” or “EPOS_sta_coords” depending on the type. The default is “sinex”.

Returns:

datadico – a dico with stat 4 char. code as key and epoch list as values (for timeline_plotter)

Return type:

dict.

geodezyx.files_rw.read.read_sinex.stations_in_sinex_mono(sinex_path)

Gives stations list in a SINEX file

Parameters:

sinex_path (str) – path of the SINEX file.

Returns:

  • epoch (datetime) – the main mean epoch in the SINEX.

  • stats_list (list) – list of 4 char station list.

geodezyx.files_rw.read.read_sinex.stations_in_sinex_multi(sinex_path_list)

Gives stations list in a SINEX

Just a wrapper of stations_in_sinex_or_EPOS_sta_coords_file_multi !!! This other function should be used !!!

Args :

sinex_path_list : path of the SINEX files list (e.g. made with glob)

Returns :

datadico : a dico with stat 4 char. code as key and epoch list as values (for timeline_plotter)

geodezyx.files_rw.read.read_slr module

Created on Wed Jun 23 10:55:04 2021

@author: psakic

geodezyx.files_rw.read.read_slr.read_pdm_res_slr_mono(res_file_in, sol='sol')

Read a PDM7 res(idual) file for SLR Validation

Parameters:
  • res_file_in (str) – path of the input res file.

  • sol (str or lambda fct) – solution name if it is a lambda fct, it will grab the sol name from the full residual path e.g. : solnam = lambda x: x.split(“/”)[-5][4:]

Returns:

DFout – output DataFrame.

Return type:

Pandas DataFrame

geodezyx.files_rw.read.read_slr.read_pdm_res_slr_multi(Res_file_list_in, sol='sol')

Read a PDM7 res(idual) file for SLR Validation

Parameters:
  • Res_file_list_in (list of str) – List of path of the input res files.

  • sol (str or lambda fct) – solution name if it is a lambda fct, it will grab the sol name from the full residual path e.g. : solnam = lambda x: x.split(“/”)[-5][4:]

Returns:

DFout – output DataFrame

Return type:

Pandas DataFrame

geodezyx.files_rw.read.read_stats_rtklib module

@author: psakic

This sub-module of geodezyx.files_rw contains reading functions to import RTKLIB solution status (.stat) files.

it can be imported directly with: from geodezyx import files_rw

The GeodeZYX Toolbox is a software for simple but useful functions for Geodesy and Geophysics under the GNU LGPL v3 License

Copyright (C) 2019 Pierre Sakic et al. (IPGP, sakic@ipgp.fr) GitHub repository : https://github.com/GeodeZYX/geodezyx-toolbox

RTKLIB stat file format reference: rtkpos.c (RTKLIB source)

Record types

$POS,week,tow,stat,posx,posy,posz,posxf,posyf,poszf $VELACC,week,tow,stat,vele,veln,velu,acce,accn,accu,velef,velnf,veluf,accef,accnf,accuf $CLK,week,tow,stat,clk1,clk2,clk3,clk4,clk5,clk6 $ION,week,tow,stat,sat,az,el,ion,ion_fixed $TROP,week,tow,stat,rcv,ztd,ztdf $HWBIAS,week,tow,stat,frq,bias,biasf $SAT,week,tow,sat,frq,az,el,resp,resc,vsat,snr,fix,slip,lock,outc,slipc,rejc,icbias,bias,bias_var,lambda

geodezyx.files_rw.read.read_stats_rtklib.read_rtklib_stat(filein, keys=None)

Read a RTKLIB solution status (.stat) file.

Parameters:
  • filein (str) – Path to the .stat file (plain text or gzip-compressed .stat.gz).

  • keys (str or list of str, optional) – Record type(s) to parse, e.g. 'SAT' or ['POS', 'CLK']. If None (default), all record types present in the file are returned.

Returns:

Dictionary with record-type keys ('POS', 'VELACC', 'CLK', 'SAT', 'ION', 'TROP', 'HWBIAS') and pandas DataFrame values. Each DataFrame contains an epoch column (Python datetime.datetime) computed from the week / tow GPS time fields, plus all other fields defined in the RTKLIB source. Only record types actually present in the file are included in the output dictionary.

Return type:

dict