Skip to content

Commit c23916d

Browse files
committed
test nav3 header add
1 parent b4de7cb commit c23916d

File tree

5 files changed

+25
-21
lines changed

5 files changed

+25
-21
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,16 @@ python -m pytest
7171

7272
## Usage
7373

74-
The simplest command-line use is through the top-level `ReadRinex` script.
74+
The simplest command-line use is through the top-level `python -m georinex.read` script.
7575
Normally you'd use the `-p` option with single files to plot, if not converting.
7676

7777
* Read single RINEX3 or RINEX 2 Obs or Nav file:
7878
```sh
79-
ReadRinex myrinex.XXx
79+
python -m georinex.read myrinex.XXx
8080
```
8181
* Read NetCDF converted RINEX data:
8282
```sh
83-
ReadRinex myrinex.nc
83+
python -m georinex.read myrinex.nc
8484
```
8585
* Batch convert RINEX to NetCDF4 / HDF5 (this example for RINEX 2 OBS):
8686
```sh
@@ -215,7 +215,7 @@ obs = gr.load('myfile.o', use='E')
215215
```
216216

217217
loads only Galileo data by the parameter E.
218-
`ReadRinex` allow this to be specified as the -use command line parameter.
218+
`python -m georinex.read` allow this to be specified as the -use command line parameter.
219219

220220
If however you want to do this after loading all the data anyway, you can make a Boolean indexer
221221

src/georinex/nav3.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
import math
88
from datetime import datetime
99

10-
11-
#
1210
from .rio import opener, rinexinfo
1311
from .common import rinex_string_to_float
1412

src/georinex/tests/test_nav3.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,16 @@
55
from datetime import datetime
66
import georinex as gr
77

8-
#
8+
99
R = Path(__file__).parent / "data"
1010

1111

12+
def test_nav3header():
13+
hdr = gr.rinexheader(R / "demo.17n")
14+
assert hdr['IONOSPHERIC CORR']['GPSA'] == approx([1.1176e-08, -1.4901e-08, -5.9605e-08, 1.1921e-07])
15+
assert hdr['TIME SYSTEM CORR']['GPUT'] == approx([-3.7252902985e-09, -1.065814104e-14, 61440, 1976])
16+
17+
1218
def test_time():
1319
times = gr.gettime(R / "VILL00ESP_R_20181700000_01D_MN.rnx.gz")
1420

@@ -193,10 +199,10 @@ def test_large_all(sv, size):
193199
)
194200
def test_ref(rfn, ncfn):
195201
"""
196-
python ReadRinex.py tests/data/galileo3.15n -o r3galileo.nc
197-
python ReadRinex.py tests/data/demo.17n -o r3gps.nc
198-
python ReadRinex.py tests/data/qzss3.14n -o r3qzss.nc
199-
python ReadRinex.py tests/data/demo3.10n -o r3sbas.nc
202+
python -m georinex.read tests/data/galileo3.15n -o r3galileo.nc
203+
python -m georinex.read tests/data/demo.17n -o r3gps.nc
204+
python -m georinex.read tests/data/qzss3.14n -o r3qzss.nc
205+
python -m georinex.read tests/data/demo3.10n -o r3sbas.nc
200206
"""
201207
pytest.importorskip("netCDF4")
202208

src/georinex/tests/test_obs2.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,8 @@ def test_one_sv():
193193
@pytest.mark.parametrize("use", (None, {"G", "R", "S"}))
194194
def test_all_systems(tmp_path, use):
195195
"""
196-
./ReadRinex.py tests/demo.10o -o r2all.nc
197-
./ReadRinex.py tests/demo.10n -o r2all.nc
196+
python -m georinex.read tests/demo.10o -o r2all.nc
197+
python -m georinex.read tests/demo.10n -o r2all.nc
198198
"""
199199
pytest.importorskip("netCDF4")
200200

@@ -222,7 +222,7 @@ def test_all_systems(tmp_path, use):
222222

223223
@pytest.mark.parametrize("use", ("G", ["G"]))
224224
def test_one_system(use):
225-
"""./ReadRinex.py tests/demo.10o -u G -o r2G.nc"""
225+
"""python -m georinex.read tests/demo.10o -u G -o r2G.nc"""
226226
pytest.importorskip("netCDF4")
227227

228228
truth = xarray.open_dataset(R / "r2G.nc", group="OBS")
@@ -233,7 +233,7 @@ def test_one_system(use):
233233

234234

235235
def test_multi_system():
236-
"""./ReadRinex.py tests/demo.10o -u G R -o r2GR.nc"""
236+
"""python -m georinex.read tests/demo.10o -u G R -o r2GR.nc"""
237237
pytest.importorskip("netCDF4")
238238

239239
truth = xarray.open_dataset(R / "r2GR.nc", group="OBS")
@@ -245,7 +245,7 @@ def test_multi_system():
245245

246246
def test_all_indicators():
247247
"""
248-
./ReadRinex.py tests/demo.10o -useindicators -o r2all_indicators.nc
248+
python -m georinex.read tests/demo.10o -useindicators -o r2all_indicators.nc
249249
"""
250250
pytest.importorskip("netCDF4")
251251

@@ -258,7 +258,7 @@ def test_all_indicators():
258258

259259
def test_meas_indicators():
260260
"""
261-
./ReadRinex.py tests/demo.10o -useindicators -m C1 -o r2_C1_indicators.nc
261+
python -m georinex.read tests/demo.10o -useindicators -m C1 -o r2_C1_indicators.nc
262262
"""
263263
pytest.importorskip("netCDF4")
264264

src/georinex/tests/test_obs3.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def test_bad_system():
141141
@pytest.mark.parametrize("use", ("G", ["G"]))
142142
def test_one_system(use):
143143
"""
144-
./ReadRinex.py -q tests/demo3.10o -u G -o r3G.nc
144+
python -m georinex.read -q tests/demo3.10o -u G -o r3G.nc
145145
"""
146146
pytest.importorskip("netCDF4")
147147

@@ -159,7 +159,7 @@ def test_one_system(use):
159159

160160
def test_multi_system():
161161
"""
162-
./ReadRinex.py -q tests/demo3.10o -u G R -o r3GR.nc
162+
python -m georinex.read -q tests/demo3.10o -u G R -o r3GR.nc
163163
"""
164164
pytest.importorskip("netCDF4")
165165

@@ -173,7 +173,7 @@ def test_multi_system():
173173

174174
def test_all_system():
175175
"""
176-
./ReadRinex.py -q tests/demo3.10o -o r3all.nc
176+
python -m georinex.read -q tests/demo3.10o -o r3all.nc
177177
"""
178178
pytest.importorskip("netCDF4")
179179

@@ -185,7 +185,7 @@ def test_all_system():
185185

186186
def tests_all_indicators():
187187
"""
188-
./ReadRinex.py -q tests/demo3.10o -useindicators -o r3all_indicators.nc
188+
python -m georinex.read -q tests/demo3.10o -useindicators -o r3all_indicators.nc
189189
"""
190190
pytest.importorskip("netCDF4")
191191

0 commit comments

Comments
 (0)