autorino.handle package
Submodules
autorino.handle.handle_cls module
Created on Wed Jan 10 15:00:40 2024
@author: psakic
- class autorino.handle.handle_cls.HandleGnss(out_dir, tmp_dir, log_dir, inp_dir=None, inp_file_regex=None, epoch_range=None, site=None, session=None, options=None, metadata=None)[source]
Bases:
StepGnss
- __init__(out_dir, tmp_dir, log_dir, inp_dir=None, inp_file_regex=None, epoch_range=None, site=None, session=None, options=None, metadata=None)[source]
Initialize a HandleGnss object.
This constructor initializes a HandleGnss object, which is used for handling GNSS data processing. It inherits from the StepGnss class.
- Parameters:
out_dir (str) – The output directory for the processed files.
tmp_dir (str) – The temporary directory for intermediate files.
log_dir (str) – The directory for log files.
inp_dir (str, optional) – The input directory for raw files. Default is None.
epoch_range (EpochRange, optional) – The range of epochs to be processed. Default is None.
site (dict, optional) – Information about the site. Default is None.
session (dict, optional) – Information about the session. Default is None.
options (dict, optional) – Additional options for the processing operation. Default is None.
metadata (dict, optional) – Metadata for the processing operation. Default is None.
- feed_by_epochs(step_obj_feeder, mode='split', print_table=False)[source]
For a HandleGnss object, with a predefined epoch range find the corresponding RINEX for splice/split in the step_obj_feeder StepGnss, which a list of possible RINEXs candidates for the splice/split operation
- Parameters:
step_obj_feeder (StepGnss) – StepGnss object, which a list of possible RINEXs candidates for the splice/split operation
mode (str) – split or splice if split: for fpath_inp, only one RINEX is returned (the need one for the split) if splice: for fpath_inp, a SpliceGnss object with several RINEXs is returned (all the needed ones for the splice)
print_table (bool, optional) – If True, prints the tables for debugging purposes. Default is False.
- Return type:
None
- find_local_inp(return_as_step_obj=True, rnx3_regex=False)[source]
Guess the paths and name of the local raw files based on the EpochRange and inp_basename attributes of the DownloadGnss object.
- Parameters:
return_as_step_obj (bool, optional) – If True, returns the result as a StepGnss object. If False, returns a list of file paths. Default is True.
rnx3_regex (bool, optional) – If True, uses a regex pattern for RINEX 3 filenames. If False, uses a wildcard pattern. Default is False.
- Returns:
If return_as_step_obj is True, returns a StepGnss object populated with the found RINEX files. If return_as_step_obj is False, returns a list of found file paths.
- Return type:
StepGnss or list
- group_by_epochs(period='1d', rolling_period=False, rolling_ref=-1, round_method='floor', drop_epoch_rnd=False)[source]
Group the data by epochs.
This method groups the data in the table by epochs, rounding the epochs according to the specified period and method. It creates a main HandleGnss object and individual HandleGnss objects for each epoch group.
- Parameters:
period (str, optional) – The period for rounding the epochs. Default is “1d”.
rolling_period (bool, optional) – Whether to use a rolling period for rounding. Default is False.
rolling_ref (int, optional) – The reference for the rolling period. Default is -1.
round_method (str, optional) – The method for rounding the epochs. Default is “floor”.
drop_epoch_rnd (bool, optional) – Whether to drop the temporary epoch_rnd column after grouping. Default is False.
- Returns:
A tuple containing the main HandleGnss object and a list of individual HandleGnss objects for each epoch group.
- Return type:
tuple
- load_input_rnxs(input_mode, input_rinexs=None)[source]
Get the input RINEX files for handeling (splice or split).
This method retrieves the input RINEX files based on the specified input mode and input RINEXs. It can find local input files or use a provided input list.
- Parameters:
input_mode (str) – The mode for finding input RINEX files. It can be: - “find”: to find local input files. - “given”: to use provided input RINEX files.
input_rinexs (str or list or StepGnss) – The input RINEX files. Only useful for “given” mode. It can be: - A list of RINEX file paths. - An existing StepGnss object.
- Returns:
A StepGnss object containing the input RINEX files, or None if an error occurs.
- Return type:
StepGnss or None
autorino.handle.rinexmod_cls module
Created on 20/05/2025 20:27:15
@author: psakic
- class autorino.handle.rinexmod_cls.RinexmodGnss(out_dir, tmp_dir, log_dir, inp_dir=None, inp_file_regex=None, epoch_range=None, site=None, session=None, options=None, metadata=None)[source]
Bases:
HandleGnss
- __init__(out_dir, tmp_dir, log_dir, inp_dir=None, inp_file_regex=None, epoch_range=None, site=None, session=None, options=None, metadata=None)[source]
Initialize a RinexmodGnss object.
This constructor initializes a RinexmodGnss object, which is used for a stand-alone application of RinexMod actions on RINEX files. It inherits from the HandleGnss class.
- Parameters:
out_dir (str) – The output directory for the modified RINEX files.
tmp_dir (str) – The temporary directory for intermediate files.
log_dir (str) – The directory for log files.
inp_dir (str, optional) – The input directory for raw files. Default is None.
inp_file_regex (str, optional) – The regular expression for filtering input files. Default is None.
epoch_range (EpochRange, optional) – The range of epochs to be processed. Default is None.
site (dict, optional) – Information about the site. Default is None.
session (dict, optional) – Information about the session. Default is None.
options (dict, optional) – Additional options for the modification operation. Default is None.
metadata (dict, optional) – Metadata for the modification operation. Default is None.
- rinexmod(verbose=False, force=False, rinexmod_options=None)[source]
Apply RINEX modifications to the data.
This method iterates over the rows of the table and applies RINEX modifications using the specified options. It checks if the operation is valid for each row before proceeding.
- Parameters:
**kwargs (dict) – Additional options for the RINEX modification. These options are updated for each row using the updt_rnxmodopts method.
- Return type:
None
autorino.handle.splice_cls module
Created on 20/05/2025 20:26:56
@author: psakic
- class autorino.handle.splice_cls.SpliceGnss(out_dir, tmp_dir, log_dir, inp_dir=None, inp_file_regex=None, epoch_range=None, site=None, session=None, options=None, metadata=None)[source]
Bases:
HandleGnss
- __init__(out_dir, tmp_dir, log_dir, inp_dir=None, inp_file_regex=None, epoch_range=None, site=None, session=None, options=None, metadata=None)[source]
Initialize a SpliceGnss object.
This constructor initializes a SpliceGnss object, which is used for handling the splicing of RINEX files. It inherits from the HandleGnss class.
- Parameters:
out_dir (str) – The output directory for the spliced RINEX files.
tmp_dir (str) – The temporary directory for intermediate files.
log_dir (str) – The directory for log files.
inp_dir (str, optional) – The input directory for raw files. Default is None.
inp_file_regex (str, optional) – The regular expression for filtering input files. Default is None.
epoch_range (EpochRange, optional) – The range of epochs to be processed. Default is None.
site (dict, optional) – Information about the site. Default is None.
session (dict, optional) – Information about the session. Default is None.
options (dict, optional) – Additional options for the splicing operation. Default is None.
metadata (dict, optional) – Metadata for the splicing operation. Default is None.
- mono_splice(irow, out_dir=None, table_col='fpath_inp', handle_software='converto')[source]
“on row” method
for each row of the table, splice the ‘table_col’ entry, typically ‘fpath_inp’ file
in the splice case, fpath_inp in another SpliceGnss object, containing the RINEXs to splice
- splice(input_mode='find', input_rinexs=None, handle_software='converto', rinexmod_options=None, verbose=False, force=False)[source]
Splice RINEX files.
This method splices RINEX files based on the provided input. It can find local input files, convert a list of RINEX files to a StepGnss object, or use an existing StepGnss object. The splicing operation is performed using the specified software and options.
- Parameters:
input_mode (str, optional) – The mode for finding input RINEX files. It can be: - “find”: to find local input files. - “given”: to use provided input RINEX files. Default is “find”.
input_rinexs (str or list or StepGnss, optional) – The input RINEX files. It can be: - A list of RINEX file paths. - An existing StepGnss object. Default is None.
handle_software (str, optional) – The software to use for handling the RINEX files. Default is “converto”.
rinexmod_options (dict, optional) – Additional options for the RINEX modification. Default is None.
verbose (bool, optional) – If True, prints the table for debugging purposes. Default is False.
force (bool, optional) – If True, forces the splicing operation. Default is False.
- Return type:
None
- splice_core(handle_software='converto', rinexmod_options=None, rm_inp_files=False)[source]
Perform the core splicing operation.
This method handles the core splicing operation for RINEX files. It iterates over each row in the table, performs the splicing operation using the specified software, and applies RINEX modifications if necessary. Temporary files are removed after the operation.
- Parameters:
handle_software (str, optional) – The software to use for handling the RINEX files. Default is “converto”.
rinexmod_options (dict, optional) – Additional options for the RINEX modification. Default is None.
- Return type:
None
autorino.handle.split_cls module
Created on 20/05/2025 20:26:44
@author: psakic
- class autorino.handle.split_cls.SplitGnss(out_dir, tmp_dir, log_dir, inp_dir=None, inp_file_regex=None, epoch_range=None, site=None, session=None, options=None, metadata=None)[source]
Bases:
HandleGnss
- __init__(out_dir, tmp_dir, log_dir, inp_dir=None, inp_file_regex=None, epoch_range=None, site=None, session=None, options=None, metadata=None)[source]
Initialize a SplitGnss object.
This constructor initializes a SplitGnss object, which is used for handling the splitting of RINEX files. It inherits from the HandleGnss class.
- Parameters:
out_dir (str) – The output directory for the split RINEX files.
tmp_dir (str) – The temporary directory for intermediate files.
log_dir (str) – The directory for log files.
inp_dir (str, optional) – The input directory for raw files. Default is None.
inp_file_regex (str, optional) – The regular expression for filtering input files. Default is None.
epoch_range (EpochRange, optional) – The range of epochs to be processed. Default is None.
site (dict, optional) – Information about the site. Default is None.
session (dict, optional) – Information about the session. Default is None.
options (dict, optional) – Additional options for the splitting operation. Default is None.
metadata (dict, optional) – Metadata for the splitting operation. Default is None.
- mono_split(irow, out_dir=None, table_col='fpath_inp', handle_software='converto')[source]
“on row” method
for each row of the table, split the ‘table_col’ entry, typically ‘fpath_inp’ file
- split(input_mode='given', input_rinexs=None, handle_software='converto', rinexmod_options=None, verbose=False, force=False)[source]
Split RINEX files.
This method splits RINEX files based on the provided input. It can find local input files, convert a list of RINEX files to a StepGnss object, or use an existing StepGnss object. The splitting operation is performed using the specified software and options.
- Parameters:
input_mode (str, optional) – The mode for finding input RINEX files. It can be: - “find”: to find local input files. - “given”: to use provided input RINEX files. Default is “given”.
input_rinexs (str or list or StepGnss, optional) – The input RINEX files. It can be: - A list of RINEX file paths. - An existing StepGnss object. Default is None.
handle_software (str, optional) – The software to use for handling the RINEX files. Default is “converto”.
rinexmod_options (dict, optional) – Additional options for the RINEX modification. Default is None.
verbose (bool, optional) – If True, prints the table for debugging purposes. Default is False.
force (bool, optional) – If True, forces the splitting operation. Default is False.
- Return type:
None
- split_core(handle_software='converto', rinexmod_options=None)[source]
Perform the core splitting operation.
This method handles the core splitting operation for RINEX files. It iterates over each row in the table, performs the splitting operation using the specified software, and applies RINEX modifications if necessary. Temporary files are removed after the operation.
- Parameters:
handle_software (str, optional) – The software to use for handling the RINEX files. Default is “converto”.
rinexmod_options (dict, optional) – Additional options for the RINEX modification. Default is None.
- Return type:
None