Skip to content

Commit fe551b2

Browse files
Merge pull request #116 from IPGP/dev-tpx1_01a
update rinexmod imports to version 4 compatibility
2 parents 6b1d0d7 + 1e81226 commit fe551b2

22 files changed

Lines changed: 49 additions & 48 deletions

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# autorino
44
autorino is a tool for _Assisted Unloading, Treatment & Organisation of RINex Observations_ 🛰️ 🌐 🦏
55

6-
**Version: 2.3.2**
7-
**Date: 2025-11-20**
6+
**Version: 2.4.0**
7+
**Date: 2025-12-03**
88

99
**Main developper:** [Pierre Sakic](https://github.com/PierreS-alpha) (IPGP-OVS, Paris, France)
1010
**Contact e-mail:** sakic@ipgp.fr

autorino/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import os
1111
from os import path
1212

13-
__version__ = "2.3.2" # changed automaticcaly with bump-my-version
13+
__version__ = "2.4.0" # changed automaticcaly with bump-my-version
1414

1515
#### IMPORT CONFIG FOR LOGGER
1616
log_file_path = os.path.join(

autorino/cfgfiles/cfgfile_read.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
import autorino.handle as arohdl
2121

2222
#### new rinexmod v4 import
23-
# import rinexmod.api as rimo_api
24-
# import rinexmod.classes.metadata as rimo_mda
23+
import rinexmod.api as rimo_api
24+
import rinexmod.classes as rimo_cls
2525
#### old rinexmod import (for compatibility with older versions)
26-
from rinexmod import rinexmod_api as rimo_api
27-
from rinexmod import metadata as rimo_mda
26+
#from rinexmod import rinexmod_api as rimo_api
27+
#from rinexmod import metadata as rimo_mda
2828

2929
import datetime as dt
3030

@@ -613,7 +613,7 @@ def _device2mda(y_station):
613613
)
614614
y_dev[attkw] = "unknown"
615615

616-
metadata = rimo_mda.MetaData()
616+
metadata = rimo_cls.MetaData()
617617
rec_dic = dict()
618618
rec_dic["Receiver Type"] = y_dev["rec_type"]
619619
rec_dic["Serial Number"] = str(y_dev["rec_sn"])

autorino/check/check_cls.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
import autorino.handle as arohdl
1212
import autorino.check as arochk
13-
import rinexmod
13+
import rinexmod.classes as rimo_cls
1414
import tqdm
1515

1616

@@ -73,7 +73,7 @@ def analyze_rnxs(self):
7373
ds["%"] = 0
7474
else:
7575
### get RINEX as an rinexMod's Object
76-
rnxobj = rinexmod.rinexfile.RinexFile(ds["fpath"])
76+
rnxobj = rimo_cls.RinexFile(ds["fpath"])
7777
### get RINEX site code
7878
ds["site"] = rnxobj.get_site(lower_case=False, only_4char=False)
7979

autorino/common/step_cls.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@
2121
import autorino.common as arocmn
2222
import autorino.cfglog as arologcfg
2323

24-
import rinexmod
24+
#import rinexmod
2525
# new rinexmod v4 import
26-
# import rinexmod.api as rimo_api
26+
import rinexmod.api as rimo_api
27+
import rinexmod.classes as rimo_cls
2728
# old rinexmod import
28-
from rinexmod import rinexmod_api as rimo_api
29+
#from rinexmod import rinexmod_api as rimo_api
2930

3031
from geodezyx import utils, conv
3132

@@ -851,11 +852,11 @@ def updt_epotab_rnx(self, use_rnx_filename_only=False, update_epoch_range=True):
851852

852853
for irow, row in self.table.iterrows():
853854
if not use_rnx_filename_only:
854-
rnx = rinexmod.rinexfile.RinexFile(row["fpath_inp"])
855+
rnx = rimo_cls.RinexFile(row["fpath_inp"])
855856
epo_srt = rnx.start_date
856857
epo_end = rnx.end_date
857858
else:
858-
epo_srt, epo_end, _ = rinexmod.rinexfile.dates_from_rinex_filename(
859+
epo_srt, epo_end, _ = rimo_api.dates_from_rinex_filename(
859860
row["fpath_inp"]
860861
)
861862

@@ -2518,7 +2519,7 @@ def mono_rinexmod(
25182519
not self.table.loc[irow, "epoch_srt"]
25192520
or not self.table.loc[irow, "epoch_end"]
25202521
):
2521-
epo_srt_ok, epo_end_ok = rinexmod.rinexfile.dates_from_rinex_filename(
2522+
epo_srt_ok, epo_end_ok = rimo_api.dates_from_rinex_filename(
25222523
frnxmod
25232524
)
25242525
self.table.loc[irow, "epoch_srt"] = epo_srt_ok
@@ -2818,7 +2819,7 @@ def mono_guess_rnx(self, irow, io="out", shortname=False):
28182819
epo_end = epo_end.replace(tzinfo=None)
28192820

28202821
# Determine the file period string based on the epoch range
2821-
prd_str = rinexmod.rinexfile.file_period_from_timedelta(epo_srt, epo_end)[0]
2822+
prd_str = rimo_api.file_period_from_timedelta(epo_srt, epo_end)[0]
28222823

28232824
# Generate the RINEX file name using site and session information
28242825
if not shortname:

autorino/convert/cnv_cls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ def convert(
278278
converter_name_use = converter # converter is forced
279279
else:
280280
# ++ do a first converter selection by identifying odd files
281-
converter_name_use = arocnv.select_conv_odd_file(fraw)
281+
converter_name_use = arocnv.slct_conv_odd_f(fraw)
282282
# NB: converter selection for regular files is done in
283283
# autorino.conv_cmd_run._convert_select
284284

autorino/convert/cnv_cmd_build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def _options_list2str(options):
9696
9797
Returns
9898
-------
99-
cmd_list : list
99+
cmd_list : list of str
100100
A list where the elements are command line options and their values.
101101
cmd_str : str
102102
A string that represents the command line options and their values.

autorino/convert/cnv_cmd_run.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def _convert_select(converter_inp, inp_raw_fpath=None):
3636
Returns directly those attributes based on `converter_inp` keyword,
3737
or can do a basic research based on the RAW file extension
3838
39-
See also autorino.conv_fcts.select_conv_odd_file
39+
See also autorino.conv_fcts.slct_conv_odd_f
4040
for the converter selection of oddly named files
4141
4242
Parameters
@@ -156,7 +156,7 @@ def _convert_select(converter_inp, inp_raw_fpath=None):
156156
bin_kwoptions = dict()
157157

158158
# +++++ SEPTENTRIO
159-
elif re.match(".([0-9]{2}_|A)", ext) or converter_inp == "sbf2rin":
159+
elif re.match(".([0-9]{2}_|.*A)", ext) or converter_inp == "sbf2rin":
160160
converter_name = "sbf2rin"
161161
brand = "Septentrio"
162162
cmd_build_fct = arocnv.cmd_build_sbf2rin

autorino/convert/cnv_fcts.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
import grp
1717

1818
### new rinexmod v4 import
19-
# import rinexmod.api as rimo_api
19+
import rinexmod.api as rimo_api
2020
### old rinexmod import
21-
from rinexmod import rinexmod_api as rimo_api
21+
#from rinexmod import rinexmod_api as rimo_api
2222

2323
#### Import the logger
2424
import logging
@@ -112,7 +112,7 @@ def site_search_from_list(fraw_inp, site_list_inp):
112112
return site_out
113113

114114

115-
def select_conv_odd_file(fraw_inp, ext_excluded=None):
115+
def slct_conv_odd_f(fraw_inp, ext_excluded=None):
116116
"""
117117
Identifies the right converter for a raw file with an unconventional extension, or excludes the file
118118
if its extension matches an excluded one.
@@ -129,7 +129,7 @@ def select_conv_odd_file(fraw_inp, ext_excluded=None):
129129
The name of the raw file with an unconventional extension.
130130
ext_excluded : list, optional
131131
A list of file extensions to be excluded. If a file's extension matches one in this list, the file is skipped.
132-
Default is [".TG!$", ".DAT", ".Z", ".BCK", "^.[0-9]{3}$", ".A$", "Trimble", ".ORIG"].
132+
Default is [".TG!$", ".DAT", ".Z", ".BCK", "^.[0-9]{3}$", "Trimble", ".ORIG"].
133133
134134
Returns
135135
-------
@@ -147,7 +147,7 @@ def select_conv_odd_file(fraw_inp, ext_excluded=None):
147147
".Z",
148148
".BCK",
149149
"^.[0-9]{3}$",
150-
".A$",
150+
#".A$", # allowed .A files allowed as Septentrio
151151
"Trimble",
152152
".ORIG",
153153
]

docs/_modules/autorino/convert/cnv_cls.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ <h1>Source code for autorino.convert.cnv_cls</h1><div class="highlight"><pre>
368368
<span class="n">converter_name_use</span> <span class="o">=</span> <span class="n">converter</span> <span class="c1"># converter is forced</span>
369369
<span class="k">else</span><span class="p">:</span>
370370
<span class="c1"># ++ do a first converter selection by identifying odd files</span>
371-
<span class="n">converter_name_use</span> <span class="o">=</span> <span class="n">arocnv</span><span class="o">.</span><span class="n">select_conv_odd_file</span><span class="p">(</span><span class="n">fraw</span><span class="p">)</span>
371+
<span class="n">converter_name_use</span> <span class="o">=</span> <span class="n">arocnv</span><span class="o">.</span><span class="n">slct_conv_odd_f</span><span class="p">(</span><span class="n">fraw</span><span class="p">)</span>
372372
<span class="c1"># NB: converter selection for regular files is done in</span>
373373
<span class="c1"># autorino.conv_cmd_run._convert_select</span>
374374

0 commit comments

Comments
 (0)