geospace-code / georinex

Python RINEX 2 / 3 NAV / OBS / sp3 reader & batch convert to HDF5 with C-like speed
MIT License
216 stars 89 forks source link

Error when loading high-rate data #71

Open danielecini opened 3 years ago

danielecini commented 3 years ago

High-rate data are usually available as Hatanaka-compressed files: https://cddis.nasa.gov/archive/gnss/data/highrate/2020/288/20d/00/ As I decompress one of these files, turning it into a readable observation file (for instance, gamb288a00.20o), I get an error by simply trying to load the file; in particular, the error is usually of this type:

File "...\Python\Python39\lib\site-packages\georinex\obs2.py", line 233, in rinexsystem2 data[i, j, isv] = darr[:, k] IndexError: index 37 is out of bounds for axis 2 with size 36

In some previous issues it has been reported that the error may arise from line 94 of obs2.py; nevertheless, even if I change that value (Nsvsys = 36) the error message does not change. Moreover, for certain high-rate observation files georinex works perfectly, so I guess there is some counting issue that I cannot detect. As of now, I've been using georinex for quite some months and I just started using it for high-rate data: I wonder if high-rate files differ in some crucial aspect, making them more likely to fail.

Python version: Python 3.9.0 64bit

scivision commented 2 years ago

Is there a specific file I can try? The hatanaka implementation was recently change to use the Python hatanaka library.

shradhamohanty commented 1 year ago

Hello, even I have the same issue while using gr.load(filename)

[/usr/local/lib/python3.7/dist-packages/georinex/obs2.py](https://localhost:8080/#) in rinexsystem2(fn, system, tlim, useindicators, meas, verbose, fast, interval)
    247                         data[i * 3 + 2, j, isv] = darr[:, k * 3 + 2]
    248                 else:
--> 249                     data[i, j, isv] = darr[:, k]
    250     # %% output gathering
    251     data = data[:, : times.size, :]  # trims down for unneeded preallocated

IndexError: index 39 is out of bounds for axis 2 with size 36

Attached here is one of the sample high rate (1Hz) file test_RINEX.zip

Thanks and regards, Shradha