geodezyx.operational.soft_frontend package

Submodules

geodezyx.operational.soft_frontend.anubis_frontend module

Created on Tue Jul 5 15:48:26 2022

@author: psakic

geodezyx.operational.soft_frontend.anubis_frontend.anubis_run(rnx_inp, out_dir_main, xml_config_generic, period=None, interval=None, dry_run=False, download_nav=True, download_sp3=False, force=False, anubis_path='/opt/gnss_softs/bin/anubis')

Run an Anubis quality check. Designed for Anubis 3.3. Works with Anubis 3.7 at least.

Parameters:
  • rnx_inp (str or list) –

    Input RINEXs. can be a RINEX path list, or the path of the parent archive directory

    Note that this function is optimized for the batch processing of several RINEXs. If you want to process a single RINEX, gives its path in a list ([rnx_inp])

  • out_dir_main (str) – output main directory.

  • xml_config_generic (str) – path of the generic XML configuration file. will be stored in <out_dir_main>/inp See note bellow to find some exemples

  • period (None or int) – nominal file period in the RINEX (in sec) if None is given, guess based on the RINEX name The default is None.

  • interval (None or int) – nominal data interval in the RINEX (in sec) if None is given, guess based on the RINEX name The default is None.

  • dry_run (bool, optional) – if True, do not run the Anubis QC. Anubis QC results are stored in <out_dir_main>/out The default is False.

  • download_nav (bool, optional) – Download automatically the Broadcast navigation files. will be stored in <out_dir_main>/nav The default is True.

  • download_sp3 (bool, optional) – Download automatically the SP3 orbit files. CODE’s MGEX or REPRO3 before 2018 are used per default. will be stored in <out_dir_main>/nav The default is False.

  • force (bool, optional) – Per default, skip anubis execution if a xtr file already exists in out_dir_main The default is False.

  • anubis_path (str, optional) – path of the Anubis executable. The default is “/opt/gnss_softs/bin/anubis”

Returns:

xml_cfg_list – list of the generated XML config files.

Return type:

list

Note

Generic Configuration files for Anubis version 2 and 3 can be found here:

<...>/geodezyx/exemples/anubis_configfiles

or directly on the geodezyx’s toolbox GitHub repository:

https://github.com/IPGP/geodezyx/tree/master/geodezyx/000_exemples/anubis_configfiles

geodezyx.operational.soft_frontend.common_frontend module

Created on Wed Feb 11 18:47:44 2026

@author: psakic

geodezyx.operational.soft_frontend.common_frontend.dl_brdc(prod_parent_dir, dates_inp, redwld_delta=4)

Downloads BRDC (Broadcast Ephemeris) files for PRIDE PPPAR from a given directory and date list.

Parameters:
  • prod_parent_dir (str) – The parent directory where the products are stored.

  • dates_inp (iterable of datetime) – If list, the list of dates for which the BRDC files are to be downloaded. If tuple, the start and end dates for which the BRDC files are to be downloaded.

  • redwld_delta (int, optional) – The age threshold in hours for re-downloading BRDC files. If a found BRDC file is older than this threshold, it will be re-downloaded. Defaults to 4 hours.

Returns:

brdc_path_lis – A list of downloaded BRDC files.

Return type:

list

Notes

This function first rounds the dates in the date list to the nearest day and removes duplicates. It then downloads the BRDC files for each unique date using the operational.download_gnss_rinex function. The downloaded files are appended to a list which is returned at the end.

geodezyx.operational.soft_frontend.common_frontend.dl_orbclk(prod_parent_dir, dates_inp, prod_ac_name, prod_types=('sp3', 'clk', 'bia', 'obx', 'erp'), data_centers=('cddis', 'esa', 'ign', 'whu'))

Downloads GNSS products for PRIDE PPPAR from a given directory and date list.

Parameters:
  • prod_parent_dir (str) – The parent directory where the products are stored.

  • dates_inp (iterable of datetime) – If list, the list of dates for which the products are to be downloaded. If tuple, the start and end dates for which the products are to be downloaded.

  • prod_ac_name (str) – The name of the analysis center providing the products.

  • prod_types (tuple of str, optional) – The types of GNSS products to be downloaded (e.g., “sp3”, “clk”, “bia”, “obx”, “erp”). Defaults to (“sp3”, “clk”, “bia”, “obx”, “erp”).

  • data_centers (tuple of str, optional) – The data centers from which to download the products Defaults to (“cddis”, “esa”, “ign”, “whu”).

Returns:

A list of downloaded GNSS products.

Return type:

list

Notes

This function downloads various GNSS products such as orbits, clocks, biases, etc. It iterates over specified data centers and attempts to download the products. If at least 5 products are found, the function stops further downloads.

geodezyx.operational.soft_frontend.common_frontend.dl_orbclk_tite(prod_parent_dir, dates_inp, prod_ac_name, login='sakic', password='')

Downloads GRG SP3 and CLK products from CNES’s TITE server.

geodezyx.operational.soft_frontend.common_frontend.dl_prods(prod_dir, dates_inp, prod_ac_name, download_lock=None, use_tite=False)

Download shared products (SP3/CLK and BRDC) once for all parallel runs.

Parameters:
  • prod_dir (str) – Directory where products will be downloaded.

  • dates_inp (iterable of datetime) – If list, the list of dates for which the products are to be downloaded. If tuple, the start and end dates for which the products are to be downloaded.

  • prod_ac_name (str) – Analysis center identifier.

  • download_lock (threading.Lock, optional) – Lock to protect concurrent downloads (if needed).

  • use_tite (bool, optional) – If True, attempts to download SP3/CLK products from CNES’s TITE server instead of the default method. Defaults to False.

Returns:

A tuple containing two lists: (orbclklis_out, brdclis_out) - orbclklis_out: List of downloaded SP3/CLK product files. - brdclis_out: List of downloaded BRDC files.

Return type:

tuple

geodezyx.operational.soft_frontend.common_frontend.get_best_prods(prod_list_inp, date_inp, prod_ac_name='', brdc_mode=False, period_stepback_max=None)

Finds the best matching product file(s) for a given date with progressive latency tolerance.

Searches through available product files to match the requested date, progressively increasing latency tolerance if no exact match is found. Falls back to returning all products if no match is found after maximum latency attempts.

Parameters:
  • prod_list_inp (list of str) – List of available product file names.

  • date_inp (datetime.datetime) – The target date to match.

  • prod_ac_name (str, optional) – Analysis center name (e.g., “ULT”, “NRT”, “FIN”). Determines maximum latency steps if not explicitly provided. Defaults to empty string.

  • brdc_mode (bool, optional) – If True, treats files as BRDC (Broadcast), and uses rinexname2dt for parsing. If False, treats files as SP3/CLK, and uses sp3name_v3_2dt. Defaults to False.

  • period_stepback_max (int, optional) – Maximum number of latency steps to attempt. If None, defaults are: - “ULT”: 3 steps - “NRT”: 23 steps - Others: 0 steps Defaults to None.

Returns:

List of matching product file names. If no matches found, returns the entire input list. For BRDC mode with 2+ matches, attempts to filter for “GOP” products.

Return type:

list of str

Notes

  • Performs iterative search: starts with exact date match, then incrementally steps back through latency periods to find products.

  • File naming convention interpretation varies by brdc_mode setting.

  • Contains potential bug in BRDC filtering logic: [e for e in best_prod_out if “GOP”][0] may raise IndexError if no products contain “GOP” substring.

geodezyx.operational.soft_frontend.common_frontend.get_dates_fmt(dates_inp, prod_date=True, prod_ac_name='')

Normalizes and formats input dates for GNSS product downloading.

Converts various date input formats to a standardized sorted list. Optionally applies product-specific date adjustments to account for data center latency.

Parameters:
  • dates_inp (datetime, list of datetime, or tuple of datetime) – Input dates in one of three formats: - Single datetime: converted to a single-element list - List of datetime: used as-is - Tuple of (start_date, end_date): generates daily range from start to end

  • prod_date (bool, optional) – If True, applies get_prod_date to adjust dates for product latency. Defaults to True.

  • prod_ac_name (str, optional) – Analysis center name passed to get_prod_date for latency adjustments. Defaults to empty string.

Returns:

dates_lis – Sorted list of unique datetime objects with duplicates removed.

Return type:

list of datetime

Raises:

Exception – If dates_inp is neither a datetime, list, tuple, nor iterable.

Examples

>>> get_dates_fmt(dt.datetime(2026, 2, 15))
[datetime(2026, 2, 15, 0, 0)]
>>> get_dates_fmt([dt.datetime(2026, 2, 15), dt.datetime(2026, 2, 15)])
[datetime(2026, 2, 15, 0, 0)]
>>> get_dates_fmt((dt.datetime(2026, 2, 15), dt.datetime(2026, 2, 17)))
[datetime(2026, 2, 15, 0, 0), datetime(2026, 2, 16, 0, 0), datetime(2026, 2, 17, 0, 0)]
geodezyx.operational.soft_frontend.common_frontend.get_prod_date(date_inp, prod_ac_name='', period_stepback=0, latency=3)

Adjusts product dates based on data center latency and product type.

Accounts for the delay before data centers provide products after the epoch time. Automatically increments latency stepback if the current time is within the latency window, then rounds the date according to the product type’s cadence.

Parameters:
  • date_inp (datetime.datetime) – The input date to be adjusted.

  • prod_ac_name (str, optional) – The product analysis center name. Determines rounding interval: - “ULT”: Ultra-rapid (6-hour intervals) - “NRT”: Near Real-Time (1-hour intervals) - “FIN” or “RAP”: Final or Rapid (1-day intervals) - “BRDC”: Broadcast ephemeris (1-day intervals) Default is empty string.

  • period_stepback (int, optional) – Number of periods to step back from the current time. Incremented internally if within the latency window. Defaults to 0.

  • latency (int, optional) – The latency in hours to consider for stepping back. the latency is because the data center does not provide the products before a certain time after the epoch of the products IGS Website: latency is offically 3 hours GRG on CDDIS: empircally, ~2 hours and 5 minutes If we are within the latency window, we step back one period to be able to get a substitute product Defaults to 3 hours.

Returns:

The adjusted and floored date according to the product cadence.

Return type:

datetime.datetime

Notes

  • The latency window is disabled for BRDC.

  • Dates are floored (rounded down) to the nearest interval boundary.

  • If prod_ac_name is unrecognized, the original date is returned with a warning.

  • ULT and NRT products are designed to be 2 days long, so an extra day is subtracted to get the correct product date.

Examples

>>> get_prod_date(dt.datetime(2026, 2, 15, 10, 30), "ULT")
datetime(2026, 2, 14, 6, 0)
>>> get_prod_date(dt.datetime(2026, 2, 15, 10, 30), "FIN")
datetime(2026, 2, 15, 0, 0)
geodezyx.operational.soft_frontend.common_frontend.run_command(command)

Runs a shell command and captures both stdout and stderr.

Parameters:

command (str) – The shell command to be executed.

Notes

This function uses subprocess.Popen to run the command in a new process. It continuously reads and prints stdout and stderr until the process finishes. The function prints the return code of the process once it completes.

geodezyx.operational.soft_frontend.groops_frontend module

Created on Tue Jan 17 10:54:49 2023

@author: psakicki

geodezyx.operational.soft_frontend.groops_frontend.groops_basic_run(xml_cfg_path='', global_var_dict={}, xml_var_dict={}, dry_run=False, verbosity='ERROR', log_dir=None, groops_bin_path='/opt/softs_gnss/groops/bin/groops')
Parameters:
  • xml_cfg_path (str, optional) – the XML config file for GROOPS. The default is “”.

  • global_var_dict (dict, optional) – A dictionnary to change the global variables values, like: global_var_dict[“global_var_name”] = new_value The default is dict().

  • xml_var_dict (dict, optional) – A dictionnary to change the values in the config XML file. Not implemented yet. The default is dict().

  • dry_run (bool, optional) – If True print the command but do not run it . The default is False.

  • verbosity (str, optional) – verbosity level of the console logger use keywords CRITICAL, ERROR, WARNING, INFO, DEBUG The default is ‘ERROR’.

  • log_dir (str, optional) – If provided, directory where the logs are stored. The default is None.

  • groops_bin_path (TYPE, optional) – Path of the GROOPS bin. The default is ‘/opt/softs_gnss/groops/bin/groops’.

Return type:

None.

geodezyx.operational.soft_frontend.groops_frontend.groops_ppp_full_run(rinex_path, project_name, igs_ac_10char, cfg_files_dict, log_root_dir, vmf_tropo_root_dir, prods_gnss_root_dir, cfg_files_root_dir, sitelogs_root_dir, groops_bin_path='/opt/softs_gnss/groops/bin/groops', verbosity='ERROR')

High level function to run a GROOPS’s PPP job This function download IGS’s products, convert them, and run the PPP job see the Notes below for more details

Parameters:
  • rinex_path (str) – the path of the RINEX file to process.

  • project_name (str) – a personalized name for your processing project

  • igs_ac_10char (str) – the 10 char. ID for the IGS AC you want to use e.g. ‘COD0OPSFIN’ can handle operational (OPS) and MGEX (MGX) lines

  • cfg_files_dict (dict) – a dictionary controlling the conversion/processing steps and the corresponding config files.

  • log_root_dir (str) – directory path where the frontend logs will be written

  • vmf_tropo_root_dir (str) – directory path where the VMF3/ECMWF grids will be stored (auto download)

  • prods_gnss_root_dir (str) – directory path where the IGS products (not converted) will be stored (auto download)

  • cfg_files_root_dir (str) – directory path where the config files are stored.

  • sitelogs_root_dir (str) – directory path where the sitelogs files are stored.

  • groops_bin_path (str, optional) – Path of the GROOPS bin. The default is ‘/opt/softs_gnss/groops/bin/groops’.

  • verbosity (str, optional) – verbosity level of the console logger for the GROOPS’s messages use keywords CRITICAL, ERROR, WARNING, INFO, DEBUG The default is ‘ERROR’. This verbosity level does not apply to this function

Note

the config files must be checked and edited manually to fit your environnement config it is the config files which contains the most useful parameters use groopsGui to help you

prototype for config files are in: …/geodezyx/000_exemples/groops_frontend/configfiles/

do not forget to update on a regular basis GROOPS’s data folder: ` https://ftp.tugraz.at/outgoing/ITSG/groops/data.zip`

Return type:

None.

geodezyx.operational.soft_frontend.groops_frontend.log_subprocess(pipe, logger=None, file=None, file2=None)

Intern fuction for subprocess_frontend2 to write the stdout/err in the console logger + a logfile

geodezyx.operational.soft_frontend.groops_frontend.subprocess_frontend2(cmd_in, save_log=True, log_dir=None, log_name_out='out.log', log_name_err='err.log', logname_timestamp=True, err_also_in_outfile=True, logger_objt_level_out=None, logger_objt_level_err=None)

A generic frontend to run an extern command through subprocess and write the stdout and stderr outputs in log files.

Parameters:
  • cmd_in (str) – The subprocess command.

  • save_log (str, optional) – export as log the stdout/stderr in files. The default is True.

  • log_dir (str, optional) – directory where the logs will be stored. The default is None.

  • log_name_out (str, optional) – filename of the stdout log. The default is “out.log”.

  • log_name_err (str, optional) – filename of the stderr log. The default is “err.log”.

  • logname_timestamp (str, optional) – add a timestamp as prefix. The default is True.

  • logger_objt_level_out (method of a Logger object, optional) – set the logger level of the stdout messages. can be logger.info or logger.debug for instance. The default is None (logger.info per default then).

  • logger_objt_level_err (method of a Logger object, optional) – set the logger level of the stderr messages. can be logger.error or logger.critical for instance. The default is None (logger.error per default then).

Returns:

exitcode – the exit code of the command.

Return type:

int

Notes

Inspired by: https://stackoverflow.com/questions/21953835/run-subprocess-and-print-output-to-logging And for the threading: https://stackoverflow.com/questions/6809590/merging-a-python-scripts-subprocess-stdout-and-stderr-while-keeping-them-disti

geodezyx.operational.soft_frontend.groops_frontend.vmf_tropo_downloader(output_dir, startdate=datetime.datetime(2019, 1, 1, 0, 0), enddate=datetime.datetime(2019, 1, 1, 0, 0), model='VMF3', version='OP')

geodezyx.operational.soft_frontend.hector_frontend module

@author: psakic

This sub-module of geodezyx.operational contains functions to run the time series velocities estimation software HECTOR.

it can be imported directly with: from geodezyx import operational

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.operational.soft_frontend.hector_frontend.MJD2dt(mjd_in)
geodezyx.operational.soft_frontend.hector_frontend.get_FLH_from_NEUfile(neufilepath)
geodezyx.operational.soft_frontend.hector_frontend.keeping_specific_stats(listoffiles, specific_stats, invert=False)

if invert = True : NOT keeping BUT removing specific stats

geodezyx.operational.soft_frontend.hector_frontend.momfile_trend_processing(inp_momfile, generik_conf_file, outdir='', remove_ctl_file=True)
geodezyx.operational.soft_frontend.hector_frontend.multi_momfile_trend_processing(inpdir, generik_conf_file, outdir='', extention='pre.mom', remove_ctl_file=True, specific_stats=(), invert_specific=False)
geodezyx.operational.soft_frontend.hector_frontend.multi_neufile_outlier_removing(inpdir, generik_conf_file, outdir='', extention='neu', specific_stats=(), invert_specific=False, remove_ctl_file=True)
geodezyx.operational.soft_frontend.hector_frontend.multi_sumfiles_trend_extract(inp_dir, out_dir, out_prefix, raw_neu_dir='', specific_stats=(), invert_specific=False, style='epc')

style = globk OR epc make a GLOBK style .vel file or make a dirty velocity file compatible with EPC

geodezyx.operational.soft_frontend.hector_frontend.neufile_outlier_removing(inp_neufile, generik_conf_file, outdir='', remove_ctl_file=True)

from a NEU file => removeoutlier preprocessing => 3 MOM files (one per component)

geodezyx.operational.soft_frontend.hector_frontend.sumfiles_to_statdico(inpdir, specific_stats=(), invert_specific=False)

this fct search for every sum file in a folder a stat dico contains no data only the paths to the E,N,U sum files statdico[stat] = [path/E.sum,path/N.sum,path/U.sum ] for each stat getting the 3 ENU sum files

Thoses lists will be send in sumfiles_trend_extract

geodezyx.operational.soft_frontend.hector_frontend.sumfiles_trend_extract(listof3ENUsumfile)
geodezyx.operational.soft_frontend.hector_frontend.velfile_from_a_list_of_statVsV_tuple(listoftup, out_dir, out_prefix, raw_neu_dir='', style='epc')

geodezyx.operational.soft_frontend.midas_frontend module

@author: psakic

This sub-module of geodezyx.operational contains functions to run the time series velocities estimation software MIDAS.

it can be imported directly with: from geodezyx import operational

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.operational.soft_frontend.midas_frontend.midas_plot(path_tenu, path_vel='', path_step='')

based on a plot for TimeSeriePoint

geodezyx.operational.soft_frontend.midas_frontend.midas_run(tenu_file_path, work_dir='', path_midas_soft='', step_file_path='', with_plot=True, keep_plot_open=True)
geodezyx.operational.soft_frontend.midas_frontend.midas_vel_files_2_pandas_DF(vel_files_in)

Convert MIDAS Velocity files to a Pandas DataFrame

Parameters:

vel_files_in (str or list of str) – if list of str, will consider directly the files inside the list if str, can be the path of a single file, or a generic (wilcard) path to consider several files

Returns:

DF

Return type:

Pandas DataFrame

geodezyx.operational.soft_frontend.pride_pppar_frontend module

Created on Wed Feb 14 18:01:49 2024

@author: psakic

geodezyx.operational.soft_frontend.pride_pppar_frontend.pride_best_latency(prod_lis_inp)

Selects the best latency from a list of product files.

Internal function for get_right_prod.

Parameters:

prod_lis_inp (list) – A list of product file paths.

Returns:

The best latency found in the list. But can be several if the latency is the same for several products.

Return type:

list

geodezyx.operational.soft_frontend.pride_pppar_frontend.pride_pppar_mp_wrap(kwargs_inp)
geodezyx.operational.soft_frontend.pride_pppar_frontend.pride_pppar_run(rnx_path_list, cfg_template_path, prod_ac_name, prod_parent_dir, tmp_dir, cfg_dir, run_dir, multi_process=1, cfg_prefix='pride_pppar_cfg_1a', mode='K', options_dic={}, bin_dir=None, force=False, dl_prods=False, default_fallback=False, dl_prods_only=False, clean_run_dir=True)

Runs the PRIDE PPPAR process for a single RINEX file.

Parameters:
  • rnx_path (str) – The path to the RINEX file.

  • cfg_template_path (str) – The path to the configuration template file.

  • prod_ac_name (str) – The name of the analysis center providing the products.

  • prod_parent_dir (str) – The parent directory where the products are stored.

  • tmp_dir (str) – The temporary directory for intermediate files.

  • cfg_dir (str) – The directory for configuration files.

  • run_dir (str) – The directory where the run results will be stored.

  • cfg_prefix (str, optional) – The prefix for the configuration file name. Default is “pride_pppar_cfg_1a”.

  • mode (str, optional) – The mode for the PRIDE PPPAR process. Default is “K”.

  • options_dic (dict, optional) – Additional options for the PRIDE PPPAR process. Default is an empty dictionary.

  • bin_dir (str, optional) – The directory where the PRIDE PPPAR binaries are located. Default is None.

  • force (bool, optional) – If True, forces the process to run even if logs already exist. Default is False.

  • dl_prods (bool, optional) – If True, downloads the necessary products. Default is False.

  • default_fallback (bool, optional) – If True, uses default values if products are not found. Default is False.

  • dl_prods_only (bool, optional) – If True, only downloads the products and exits. Default is False.

  • clean_run_dir (bool, optional) – If True, removes temporary files inside the run directory. Default is True.

Return type:

None

geodezyx.operational.soft_frontend.pride_pppar_frontend.pride_pppar_run_mono(rnx_path, cfg_template_path, prod_ac_name, prod_parent_dir, tmp_dir, cfg_dir, run_dir, cfg_prefix='pride_pppar_cfg_1a', mode='K', options_dic={}, bin_dir=None, force=False, dl_prods=False, default_fallback=False, dl_prods_only=False, clean_run_dir=True)

Runs the PRIDE PPPAR process for a single RINEX file.

Parameters:
  • rnx_path (str) – The path to the RINEX file.

  • cfg_template_path (str) – The path to the configuration template file.

  • prod_ac_name (str) – The name of the analysis center providing the products.

  • prod_parent_dir (str) – The parent directory where the products are stored.

  • tmp_dir (str) – The temporary directory for intermediate files.

  • cfg_dir (str) – The directory for configuration files.

  • run_dir (str) – The directory where the run results will be stored.

  • cfg_prefix (str, optional) – The prefix for the configuration file name. Default is “pride_pppar_cfg_1a”.

  • mode (str, optional) – The mode for the PRIDE PPPAR process. Default is “K”.

  • options_dic (dict, optional) – Additional options for the PRIDE PPPAR process. Default is an empty dictionary.

  • bin_dir (str, optional) – The directory where the PRIDE PPPAR binaries are located. Default is None.

  • force (bool, optional) – If True, forces the process to run even if logs already exist. Default is False.

  • dl_prods (bool, optional) – If True, downloads the necessary products. Default is False.

  • default_fallback (bool, optional) – If True, uses default values if products are not found. Default is False.

  • dl_prods_only (bool, optional) – If True, only downloads the products and exits. Default is False.

  • clean_run_dir (bool, optional) – If True, removes temporary files inside the run directory. Default is True.

Return type:

None

geodezyx.operational.soft_frontend.pride_pppar_frontend.pride_right_brdc(brdc_lis_inp, tmp_dir_inp)

Selects the appropriate BRDC (Broadcast Ephemeris) file from a list and unzips it.

Parameters:
  • brdc_lis_inp (list) – A list of BRDC file paths.

  • tmp_dir_inp (str) – The directory where the unzipped BRDC file will be stored.

Returns:

A tuple containing the original BRDC file path and the unzipped BRDC file path.

Return type:

tuple

geodezyx.operational.soft_frontend.pride_pppar_frontend.pride_right_prod(prod_lis_inp, tmp_dir_inp, prod_name, default_fallback)

Selects the appropriate product file from a list and unzips it if necessary.

Parameters:
  • prod_lis_inp (list) – A list of product file paths.

  • tmp_dir_inp (str) – The directory where the unzipped product file will be stored.

  • prod_name (str) – The name of the product.

  • default_fallback (bool) – If True, uses default values if products are not found.

Returns:

A tuple containing the unzipped product file path and the original product file path.

Return type:

tuple

geodezyx.operational.soft_frontend.pride_pppar_frontend.remove_regex_reserved_characters(input_string)

Removes all REGEX reserved characters from the input string.

Parameters:

input_string (str) – The string to be cleaned of REGEX reserved characters.

Returns:

The cleaned string with all REGEX reserved characters removed.

Return type:

str

geodezyx.operational.soft_frontend.rtklib_frontend module

@author: psakic

This sub-module of geodezyx.operational contains functions to run the GNSS processing software RTKLIB.

it can be imported directly with: from geodezyx import operational

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.operational.soft_frontend.rtklib_frontend.make_pairs(rnx_dir, sites_rovers, sites_bases, date_srt=None, date_end=None)

Find RINEX files and match rover/base pairs based on time coverage.

Parameters:
  • rnx_dir (str or os.PathLike) – Directory containing RINEX files.

  • sites_rovers (str or list of str) – List of rover site codes.

  • sites_bases (str or list of str) – Base site code.

  • date_srt (datetime.datetime, optional) – Start date for RINEX file search.

  • date_end (datetime.datetime, optional) – End date for RINEX file search.

Returns:

  • rnxs_pairs (list of tuples) – rover_path, base_path

  • df_all (pandas DataFrame) – all RINEX file information

geodezyx.operational.soft_frontend.rtklib_frontend.parquet2csv(prq_inp: str | PathLike, out_dir: str | PathLike, sample: str = '15min')

Convert merged RTKLIB parquet file to CSV format, processed by rover/base pairs.

Reads a merged parquet file containing GNSS solutions from multiple rover/base station pairs, resamples each pair’s data independently, and exports to CSV files. This function uses PyArrow filters to minimize memory usage by reading only the data relevant to each rover/base pair.

Parameters:
  • prq_inp (str or os.PathLike) – Path to the merged parquet file containing rover/base pair GNSS solutions. The file must contain columns: ‘epoch’, ‘rover’, ‘base’, ‘x’, ‘y’, ‘z’.

  • out_dir (str or os.PathLike) – Output directory where CSV files will be saved. Created if it doesn’t exist.

  • sample (str, default="15min") – Resampling interval for position data. Passed to _resample_df(). Examples: “1min”, “15min”, “1H”, “1D”

Returns:

  • None

  • Output Files

  • ————

  • CSV files in out_dir with naming pattern – {rover}_{base}_{sample}.csv

  • Each CSV contains columns

    • epoch: datetime of the resampled position

    • x, y, z: median position coordinates for the resampling interval

Notes

  • Uses PyArrow filter expressions to read only necessary data from the parquet file

  • Efficiently handles large parquet files by filtering at read time (minimal RAM usage)

  • Processes each rover/base pair sequentially

  • Prints rover/base pair names to console as they are processed

geodezyx.operational.soft_frontend.rtklib_frontend.rtklib_merge_parquet(parquet_inp, exp_prefix='', fast_merge=False, rtklib_out_files=None, sample=None)

Merge individual RTKLIB parquet files into a single consolidated parquet file.

Parameters:
  • parquet_inp (str or os.PathLike or list of str) – Either a directory path (all *.parquet files inside are collected recursively) or an explicit list of parquet file paths. The merged output file is written to the directory (or, for a list, to the directory of the first file in the list).

  • exp_prefix (str, default="") – Prefix used to name the merged output file (<exp_prefix>_all.parquet).

  • fast_merge (bool, default=False) – If True, only merges the parquet files corresponding to rtklib_out_files (or those in the explicit list) and appends them to an already-existing <exp_prefix>_all.parquet file. If False, scans the whole directory recursively for parquet files.

  • rtklib_out_files (list of str, optional) – List of .out file paths produced by a previous RTKLIB run. Only used when fast_merge=True and parquet_inp is a directory, to avoid a full recursive scan.

  • sample (str, optional) – Resampling interval for position data (default: None, no resampling). If provided, uses _resample_df to resample each table to the specified interval before merging. Examples: “1min”, “15min”, “1H” (1 hour), “1D” (1 day).

Returns:

Path to the merged parquet file.

Return type:

str

geodezyx.operational.soft_frontend.rtklib_frontend.rtklib_parquet(resdir, pattern='*out', force=False, sample=None)

Convert RTKLIB output files to Parquet format.

Parameters:
  • resdir (str) – Results directory containing RTKLIB output files.

  • pattern (str, optional) – File pattern to search for (default: “*out”).

  • force (bool, optional) – Force conversion even if parquet file already exists (default: False).

  • sample (str, optional) – Resampling interval for position data (default: None, no resampling). If provided, uses _resample_df to resample to the specified interval. Examples: “1min”, “15min”, “1H” (1 hour), “1D” (1 day).

Returns:

List of created/updated parquet files.

Return type:

list

geodezyx.operational.soft_frontend.rtklib_frontend.rtklib_run(rnx_dir, cfgfile_generik, sites_rovers, sites_bases, out_dir, tmp_dir=None, prod_dir=None, igs_prods='GRG0OPSFIN', exp_prefix='', date_srt=None, date_end=None, xyz_dic=None, posmode=None, solformat=None, sateph=None, force=False, keep_tmp=False, procs=8, exe_path='rnx2rtkp', fast_parquet_merge=False, sample=None)
geodezyx.operational.soft_frontend.rtklib_frontend.rtklib_run_mono(rnx_rover, rnx_base, cfgfile_generik, out_dir, tmp_dir, prod_dir=None, igs_prods='GRG0OPSFIN', download_prods=True, orbclklis_inp=[], brdclis_inp=[], exp_prefix='', rover_auto_conf=True, base_auto_conf=True, xyz_rover=[0, 0, 0], xyz_base=[0, 0, 0], posmode=None, solformat=None, sateph=None, force=False, keep_tmp=False, exe_path='rnx2rtkp')

Worker function for parallel RTKLIB processing. Uses pre-downloaded shared products to avoid download concurrency issues.

This is the function that gets parallelized.

geodezyx.operational.soft_frontend.rtklib_frontend.rtklib_run_pair(rinex_pairs, cfgfile_generik, out_dir, tmp_dir=None, prod_dir=None, orbclklis_inp=None, brdclis_inp=None, igs_prods='GRG0OPSFIN', exp_prefix='', xyz_dic=None, posmode=None, solformat=None, sateph=None, force=False, keep_tmp=False, procs=4, exe_path='rnx2rtkp')

Run RTKLIB processing in parallel for multiple rover/base RINEX pairs.

This function:
  1. Downloads all required products (SP3/CLK and BRDC) once in a preliminary step

  2. Runs RTKLIB processing in parallel using ThreadPoolExecutor

This avoids download concurrency issues by separating the download phase from the processing phase.

Parameters:
  • rinex_pairs (list of tuples) – List of (rnx_rov, rnx_bas) file path tuples to process.

  • cfgfile_generik (str or os.PathLike) – Path to generic RTKLIB configuration file.

  • out_dir (str or os.PathLike) – Directory where results are saved.

  • tmp_dir (str or os.PathLike or None, default=None) – Temporary directory for intermediate files.

  • prod_dir (str or os.PathLike or None, default=None) – Directory where to search for orbits, clocks, and BRDC files.

  • orbclklis_inp (list of str, optional) – List of orbit/clock files to select from if not downloading.

  • brdclis_inp (list of str, optional) – List of BRDC files to select from if not downloading.

  • igs_prods (str, default="GRG0OPSFIN") – Analysis center/product identifier.

  • procs (int, default=4) – Maximum number of parallel workers.

  • exp_prefix (str, default="") – Prefix added to output file stems.

  • rover_auto_conf (bool, default=False) – If True, reads rover RINEX header for antenna configuration.

  • base_auto_conf (bool, default=True) – If True, reads base RINEX header for antenna configuration.

  • xyz_dic (dict, optional) – [X, Y, Z] coordinates (dict value) for each station (dict key). If None, uses [0, 0, 0] for all.

  • solformat (str, default=None) – Output solution format.

  • force (bool, default=False) – If True, forces reprocessing even if output exists.

  • keep_tmp (bool, default=False) – If True, deletes tmp_dir contents at start.

  • exe_path (str) – Filesystem path to the RTKLIB rnx2rtkp executable.

Returns:

List of output file paths for all processed pairs.

Return type:

list

Examples

>>> pairs = [
...     ('/path/to/rover1.rnx', '/path/to/base1.rnx'),
...     ('/path/to/rover2.rnx', '/path/to/base2.rnx'),
... ]
>>> results = rtklib_run_pair(
...     pairs,
...     '/path/to/config.conf',
...     '/path/to/output',
...     procs=4
... )

geodezyx.operational.soft_frontend.rtklib_frontend_legacy module

geodezyx.operational.soft_frontend.rtklib_frontend_legacy.rtklib_run_from_rinex(rnx_rover, rnx_base, generik_conf, out_dir, tmp_dir=None, prod_dir=None, experience_prefix='', rover_auto_conf=False, base_auto_conf=True, xyz_rover=[0, 0, 0], xyz_base=[0, 0, 0], outtype='auto', calc_center='IGS0OPSFIN', force=False, clean_tmp=False, exe_path='/home/psakicki/SOFTWARE/RTKLIB_explorer/RTKLIB/app/consapp/rnx2rtkp/gcc/rnx2rtkp')

Run RTKLIB rnx2rtkp from rover/base RINEX observations using a generic RTKLIB configuration file, optionally overriding antenna/receiver metadata from RINEX headers and downloading required GNSS products (SP3 precise orbits and BRDC nav).

The function:
  • creates output and temporary directory structure

  • uncompresses compressed RINEX inputs if needed

  • reads start/end times and sampling interval from the rover/base RINEX

  • builds a run-specific RTKLIB config file from generik_conf

  • optionally fills rover/base antenna positions and eccentricities from RINEX headers

  • downloads required products into prod_dir: - SP3 precise orbit from calc_center - BRDC navigation RINEX

  • calls the external executable rnx2rtkp with assembled arguments

  • writes outputs to the out_dir directory

Parameters:
  • rnx_rover (str | os.PathLike) – Path to rover observation RINEX. May be compressed (e.g. .gz, .Z and other formats supported by geodezyx.operational.check_if_compressed_rinex).

  • rnx_base (str | os.PathLike) – Path to base observation RINEX. May be compressed.

  • generik_conf (str | os.PathLike) – Path to a generic RTKLIB configuration file (key=value format). This file is parsed by read_conf_file and then overridden according to function options.

  • out_dir (str | os.PathLike) – Directory where results are saved. This parameter is mandatory.

  • tmp_dir (str | os.PathLike | None, default=None) – Temporary directory for intermediate files. Optional. If not provided, defaults to out_dir/TMP.

  • prod_dir (str | os.PathLike | None, default=None) – Directory where to search for orbits, clocks, and BRDC files. Optional. If not provided, defaults to tmp_dir.

  • experience_prefix (str, default="") – Prefix added to the output file stem used to name the generated .conf and .out files.

  • rover_auto_conf (bool, default=False) – If True, reads rover RINEX header and injects rover antenna type, XYZ position, and antenna eccentricities into the produced config (keys ant1-*). If False, rover settings remain those defined in generik_conf.

  • base_auto_conf (bool, default=True) – If True, reads base RINEX header and injects base antenna type, XYZ position, and antenna eccentricities into the produced config (keys ant2-*).

  • xyz_rover (list[float], default=[0, 0, 0]) – Rover station ECEF XYZ coordinates in meters ([X, Y, Z]). If xyz_rover[0] != 0, these coordinates override the rover RINEX header coordinates; otherwise the rover header coordinates are used.

  • xyz_base (list[float], default=[0, 0, 0]) – Base station ECEF XYZ coordinates in meters ([X, Y, Z]). If xyz_base[0] != 0, these coordinates override the base RINEX header coordinates; otherwise the base header coordinates are used. Note: this is a simple sentinel check; a real X coordinate of 0 would be treated as “not provided”.

  • outtype (str, default="auto") – Output solution format. If not “auto”, sets RTKLIB out-solformat to one of: “dms”, “deg”, “xyz”, “enu” (case-insensitive). If “auto”, uses whatever is defined in generik_conf.

  • calc_center (str, default="IGS0OPSFIN") – Analysis center/product identifier used when downloading GNSS precise products via geodezyx.operational.download_gnss_products. Must match what that downloader expects.

  • force (bool, default=False) – If True, forces reprocessing even if output file already exists.

  • clean_tmp (bool, default=False) – If True, deletes all contents of tmp_dir at the beginning of the function execution.

  • exe_path (str, default=...) – Filesystem path to the RTKLIB rnx2rtkp executable.

Returns:

out_result_fil – Path to the RTKLIB output solution file (.out).

Return type:

str

Raises:

FileNotFoundError – If no SP3 orbit file or no BRDC navigation file can be found locally or downloaded.

Notes

  • The generated config file is written to out_dir and named using: <experience_prefix>_<rover4>_<base4>_<YYYY_DOY>.conf.

  • The RTKLIB command is executed via subprocess.call(…, shell=True) using /bin/bash, with a single concatenated command string.

  • A warning is emitted if the base RINEX time span does not fully cover the rover span.

geodezyx.operational.soft_frontend.track_frontend module

@author: psakic

This sub-module of geodezyx.operational contains functions to run the GNSS processing software TRACK.

it can be imported directly with: from geodezyx import operational

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.operational.soft_frontend.track_frontend.run_track(temp_dir, exp_full_name, out_conf_fil, date, rnx_rover)
geodezyx.operational.soft_frontend.track_frontend.track_run(rnx_rover, rnx_base, working_dir, experience_prefix, XYZbase=[], XYZrover=[], outtype='XYZ', mode='short', interval=None, antmodfile='~/gg/tables/antmod.dat', calc_center='igs', forced_sp3_path='', const='G', silent=False, rinex_full_path=False, run_on_gfz_cluster=False, forced_iono_path='')