autorino.api package

Created on 18/09/2024 18:13:25

@author: psakic

Submodules

autorino.api.check_rnx module

Created on 27/01/2025 09:50:23

@author: psakic

autorino.api.check_rnx.check_rnx(inp_dir_parent, inp_dir_structure, epoch_start, epoch_end, sites_list=[], output_dir=None)[source]

This function checks the RINEX files in the input directory.

Parameters:
  • inp_dir_parent (str) – The parent input directory.

  • inp_dir_structure (str) – The input directory structure.

  • epoch_start (str) – The start epoch.

  • epoch_end (str) – The end epoch.

  • sites_list (list, optional) – A list of site identifiers to filter the check.

  • output_dir (str, optional) – The output directory.

Returns:

  • tabu_chk_col (str) – The tabulated string of the check table with colored values.

  • tabu_chk_bnw (str) – The tabulated string of the check table with black and white values.

  • df_chk_sum (pd.DataFrame) – The values of the check table summarized in a dataframe.

  • df_chk_full_stats (pd.DataFrame) – The full statistics of the check table.

autorino.api.check_rnx.checkrnx_output(output_dir, eporng, tabu_chk_col, tabu_chk_bnw, df_chk_sum, df_chk_full_stats)[source]

This function saves the check_rnx results in the output directory.

Parameters:
  • output_dir (str) – The output directory.

  • eporng (EpochRange) – The epoch range.

  • tabu_chk_col (str) – The tabulated string of the check table with colored values.

  • tabu_chk_bnw (str) – The tabulated string of the check table with black and white values.

  • df_chk_sum (pd.DataFrame) – The values of the check table summarized in a dataframe.

  • df_chk_full_stats (pd.DataFrame) – The full statistics of the check table.

Return type:

None

autorino.api.configfile_run module

Created on 18/09/2024 18:23:30

@author: psakic

autorino.api.configfile_run.cfgfile_run(cfg_in, incl_cfg_in, sites_list=None, exclude_sites=False, epo_srt=None, epo_end=None, period='1D', steps_list=None, exclude_steps=False, force=False)[source]

Run the Autorino configuration files.

This function takes in a configuration file or a directory of configuration files, reads the configuration, and runs the steps specified in the configuration.

Parameters:
  • cfg_in (str) – The input configuration file or directory of configuration files. If a directory is provided, all files ending with ‘.yml’ will be used.

  • incl_cfg_in (str or list of str) – The include configuration files to be used for development/advanced purposes. If a list is provided, all files in the list will be included. It will override the include section of the cfg_in configuration file.

  • sites_list (list, optional) –

    A list of site identifiers to filter the configuration files.

    If provided, only configurations for sites in this list will be processed. Default is None.

  • exclude_sites (bool, optional) – If True, the site in sites_list will be ignored. It is the opposed behavior of the regular one using sites_list. Default is False.

  • epo_srt (str, list, optional) – The start date for the epoch range. Can be a list; if so, each epoch is considered separately. Can be a file path; if so, the file contains a list of start epochs The epoch can be formatted as: * a litteral, e.g. ‘yesterday’, ‘10 days ago’ * YYYY-DDD, year-day of year, e.g. 2025-140 * YYYY-MM-DD, classic calendar date, e.g. 2025-05-20 Default is None.

  • epo_end (str, optional) – The end date for the epoch range. Default is None.

  • period (str, optional) – The period for the epoch range. Default is “1D”.

  • steps_list (list, optional) – A list of selected steps to be executed. If not provided, all steps in ‘steps_lis’ will be executed. Default is None.

  • exclude_steps (bool, optional) – If True the selected steps indicated in step_select_list are excluded. It is the opposite behavior of the regular one using steps_select_list Default is False.

  • force (bool, optional) – If True, the steps will be executed even if the output files already exist. overrides the ‘force’ parameters in the configuration file. Default is False.

Raises:

Exception – If the provided cfg_in does not exist as a file or directory, an exception is raised.

Return type:

None

autorino.api.convert_rnx module

Created on 18/09/2024 18:24:43

@author: psakic

autorino.api.convert_rnx.convert_raw_wrap(args)[source]

Wrapper function for converting RAW GNSS files to RINEX format.

Parameters:

args (tuple) –

A tuple containing the following arguments: - raws : list

List of RAW files to be converted.

  • out_dir_usestr

    The output directory where the converted files will be stored.

  • tmp_dirstr

    Temporary directory used during the conversion process.

  • log_dirstr

    Directory where logs will be stored.

  • metadatastr or list

    Metadata to be included in the converted RINEX files.

  • force_rnxbool

    If True, forces the conversion even if output files already exist.

  • rinexmod_optionsdict

    Options for modifying the RINEX files during the conversion.

  • filter_prev_tablesbool

    If True, filters and skips previously converted files with tables stored in the tmp tables directory.

Returns:

An instance of the ConvertGnss class containing the results of the conversion.

Return type:

arocnv.ConvertGnss

autorino.api.convert_rnx.convert_rnx(inp_raws, out_dir, out_structure='%Y/%j', tmp_dir=None, log_dir=None, rinexmod_options=None, metadata=None, force_rnx=False, force_raw=False, raw_out_dir=None, raw_out_structure=None, processes=1, filter_prev_tables=False)[source]

Frontend function that performs RAW > RINEX conversion.

Parameters:
  • inp_raws (list) – The input RAW files to be converted. The input can be: * a python list * a text file path containing a list of files * a tuple containing several text files path * a directory path.

  • out_dir (str) – The output directory where the converted files will be stored.

  • out_structure (str, optional) – The structure of the output directory. If provided, the converted files will be stored in a subdirectory of out_dir following this structure. See README.md for more information. Typical values are ‘<SITE_ID4>/%Y/’ or ‘%Y/%j/’. Default value is ‘%Y/%j/’.

  • tmp_dir (str, optional) – The temporary directory used during the conversion process. If not provided, it defaults to <out_dir>/tmp_convert_rnx. Defaults to None.

  • log_dir (str, optional) –

    The directory where logs will be stored. If not provided, it defaults to tmp_dir.

    Defaults to None.

  • rinexmod_options (dict, optional) – The options for modifying the RINEX files during the conversion. Defaults to None.

  • metadata (str or list, optional) –

    The metadata to be included in the converted RINEX files. Possible inputs are:

    • list of string (sitelog file paths),

    • single string (single sitelog file path)

    • single string (directory containing the sitelogs)

    • list of MetaData objects

    • single MetaData object.

    Defaults to None.

  • force_rnx (bool, optional) – If set to True, the conversion will be forced even if the output files already exist. Defaults to False.

  • force_raw (bool, optional) – If set to True, the RAW file archiving will be forced even if the output files already exist. Defaults to False.

  • raw_out_dir (str, optional) – Directory where RAW files will be archived. No move/delete will occur, your input RAW files are sacred. Defaults to None.

  • raw_out_structure (str, optional) – Structure for archiving RAW files. Defaults to out_structure if not provided.

  • processes (int, optional) – Number of processes to use for parallel conversion. Default is 1.

  • filter_prev_tables (bool, optional) – If True, filters and skip previously converted files with tables stored in the tmp tables directory. Default is False.

Return type:

None

autorino.api.download_raw module

Created on 18/09/2024 18:24:17

@author: psakic

autorino.api.download_raw.download_raw(epoch_srt, epoch_end, period, hostname, inp_dir_parent, inp_dir_structure, inp_file_regex, out_dir_parent, out_structure='<SITE_ID9>/%Y/', site_id='XXXX00XXX', login='', password='', tmp_dir=None, log_dir=None, options={}, session={})[source]

Downloads raw GNSS data files.

This function downloads raw GNSS data files for a specified epoch range and stores them in the specified output directory.

Parameters:
  • epoch_srt (datetime-like) – The start epoch for the splicing operation.

  • epoch_end (datetime-like) – The end epoch for the splicing operation.

  • period (str) – The period for the splicing operation.

  • out_dir_parent (str) – The parent output directory where the downloaded files will be stored.

  • out_structure (str) – The structure of the output sub-directory where the downloaded files will be stored. Typical values are ‘<SITE_ID4>/%Y/’ or ‘%Y/%j/’. Default value is ‘<SITE_ID4>/%Y/’.

  • hostname (str) – The hostname of the server from which the data files will be downloaded.

  • inp_dir_parent (str) – The parent directory on the server where the raw data files are located.

  • inp_dir_structure (str) – The raw file generic name structure on the server.

  • inp_file_regex (str) – The regular expression used to match the raw data files on the server

  • site_id (str, optional) – The site identifier for the data files. Default is “XXXX00XXX”.

  • login (str, optional) – The login username for the server. Default is an empty string.

  • password (str, optional) – The login password for the server. Default is an empty string.

  • tmp_dir (str, optional) – The temporary directory used during the download process. Default is None.

  • log_dir (str, optional) – The directory where logs will be stored. If not provided, it defaults to tmp_dir. Default is None.

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

  • session (dict, optional) – Session information for the download process. Default is an empty dictionary.

Returns:

The DownloadGnss object after the download operation.

Return type:

object

autorino.api.splice_rnx_abs module

Created on 18/09/2024 18:26:05

@author: psakic

autorino.api.splice_rnx_abs.splice_rnx_abs(rnxs_inp, epoch_srt, epoch_end, period, out_dir, tmp_dir, log_dir=None, site=None, data_frequency='30S', handle_software='converto', rinexmod_options=None, metadata=None)[source]

Splice RINEX files together in an absolute way, based on the provided epoch range.

This function takes in a list of RINEX files and splices them together based on the specified epoch range and other criteria. The spliced files are stored in the specified output directory.

Parameters:
  • rnxs_inp (list) – The input RINEX files to be spliced.

  • epoch_srt (str) – The start epoch for the splicing operation.

  • epoch_end (str) – The end epoch for the splicing operation.

  • period (str) – The period for the splicing operation.

  • out_dir (str) – The output directory where the spliced files will be stored.

  • tmp_dir (str) – The temporary directory used during the splicing process.

  • log_dir (str, optional) – The directory where logs will be stored. If not provided, it defaults to tmp_dir.

  • site (str, optional) – The site name to be used for the spliced RINEX files. Defaults to None. Facultative but highly recommended to detect exisiting files to be skipped.

  • data_frequency (str, optional) – The data frequency for the spliced RINEX files. Facultative but highly recommended to detect exisiting files to be skipped.

  • handle_software (str, optional) – The software to be used for handling the RINEX files during the splice operation. Defaults to “converto”.

  • rinexmod_options (dict, optional) – The options for modifying the RINEX files during the splice operation. Defaults to None.

  • metadata (str or list, optional) –

    The metadata to be included in the spliced RINEX files. Possible inputs are:
    • list of string (sitelog file paths),

    • single string (single sitelog file path),

    • single string (directory containing the sitelogs),

    • list of MetaData objects,

    • single MetaData object. Defaults to None.

Returns:

The SpliceGnss object after the splice operation.

Return type:

object

autorino.api.splice_rnx_rel module

Created on 18/09/2024 18:26:37

@author: psakic

autorino.api.splice_rnx_rel.splice_rnx_rel(rnxs_inp, out_dir, tmp_dir, log_dir=None, handle_software='converto', period='1d', rolling_period=False, rolling_ref=-1, round_method='floor', drop_epoch_rnd=False, rinexmod_options=None, metadata=None)[source]

Splices RINEX files together in a relative way, based on certain criteria.

This function takes in a list of RINEX files and splices them together based on the provided criteria. The spliced files are stored in the specified output directory.

Parameters:
  • rnxs_inp (list) – The input RINEX files to be spliced. The input can be: * a python list * a text file path containing a list of files * a tuple containing several text files path * a directory path.

  • out_dir (str) – The output directory where the spliced files will be stored.

  • tmp_dir (str) – The temporary directory used during the splicing process.

  • log_dir (str, optional) – The directory where logs will be stored. If not provided, it defaults to tmp_dir.

  • handle_software (str, optional) – The software to be used for handling the RINEX files during the splice operation. Defaults to “converto”.

  • period (str, optional) – The period for splicing the RINEX files. Defaults to “1d”.

  • rolling_period (bool, optional) – Whether to use a rolling period for splicing the RINEX files. If False, the spliced files will be based only on the “full” period provided, i.e. Day1 00h-24h, Day2 00h-24h, etc. If True, the spliced files will be based on the rolling period. i.e. Day1 00h-Day2 00h, Day1 01h-Day2 01h, Day1 02h-Day2 02h etc. Defaults to False. see also eporng_fcts.round_epochs function

  • rolling_ref (datetime-like or int, optional) – The reference for the rolling period. If datetime-like object, use this epoch as reference. If integer, use the epoch of the corresponding index Use -1 for the last epoch for instance. The default is -1. see also eporng_fcts.round_epochs function

  • round_method (str, optional) – The method for rounding the epochs during the splice operation. Defaults to “floor”.

  • drop_epoch_rnd (bool, optional) – Whether to drop the rounded epochs during the splice operation. Defaults to False.

  • rinexmod_options (dict, optional) – The options for modifying the RINEX files during the splice operation. Defaults to None.

  • metadata (str or list, optional) –

    The metadata to be included in the spliced RINEX files. Possible inputs are:
    • list of string (sitelog file paths),

    • single string (single sitelog file path)

    • single string (directory containing the sitelogs)

    • list of MetaData objects

    • single MetaData object. Defaults to None.

Returns:

spc_main_obj – The main SpliceGnss object after the splice operation.

Return type:

object

autorino.api.split_rnx module

Created on 18/09/2024 18:25:28

@author: psakic

autorino.api.split_rnx.split_rnx(rnxs_inp, epoch_srt, epoch_end, period, out_dir, tmp_dir, log_dir=None, site=None, data_frequency='30S', handle_software='converto', rinexmod_options=None, metadata=None)[source]

Frontend function to split RINEX files based on certain criteria

Parameters:
  • rnxs_inp (list) – The input RINEX files to be split The input can be: * a python list * a text file path containing a list of files * a tuple containing several text files path * a directory path.

  • epoch_srt (datetime-like) – The start epoch for the splicing operation.

  • epoch_end (datetime-like) – The end epoch for the splicing operation.

  • period (str) – The period for the splicing operation.

  • out_dir (str) – The output directory where the split files will be stored

  • tmp_dir (str) – The temporary directory used during the splitting process

  • log_dir (str, optional) – The directory where logs will be stored. If not provided, it defaults to tmp_dir

  • site (str, optional) – The site name to be used for the split RINEX files Facultative but highly recommended to detect exisiting files to be skipped. data_frequency : str, optional The data frequency for the spliced RINEX files. Facultative but highly recommended to detect exisiting files to be skipped.

  • handle_software (str, optional) – The software to be used for handling the RINEX files during the split operation

  • rinexmod_options (dict, optional) – The options for modifying the RINEX files during the split operation

  • metadata (str or list, optional) –

    The metadata to be included in the split RINEX files Possible inputs are:

    • list of string (sitelog file paths),

    • single string (single sitelog file path)

    • single string (directory containing the sitelogs)

    • list of MetaData objects

    • single MetaData object

Return type:

None