readgssi icon indicating copy to clipboard operation
readgssi copied to clipboard

Unable to read DZG files

Open pwernette opened this issue 3 years ago • 1 comments

When trying to open any GPR transect (DZT file) that has associated GPS info (DZG file), I am unable to read the DZG file info:

$ readgssi -i MI_MANISTEE__021.DZT -p 5
Traceback (most recent call last):
  File "c:\programdata\anaconda3\envs\readgssi\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\programdata\anaconda3\envs\readgssi\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\ProgramData\Anaconda3\envs\readgssi\Scripts\readgssi.exe\__main__.py", line 7, in <module>
  File "c:\programdata\anaconda3\envs\readgssi\lib\site-packages\readgssi\readgssi.py", line 489, in main
    showmarks=showmarks)
  File "c:\programdata\anaconda3\envs\readgssi\lib\site-packages\readgssi\readgssi.py", line 89, in readgssi
    r = readdzt(infile, gps=normalize, spm=spm, start_scan=start_scan, num_scans=num_scans, epsr=epsr, antfreq=antfreq, verbose=verbose)
  File "c:\programdata\anaconda3\envs\readgssi\lib\site-packages\readgssi\dzt.py", line 223, in readdzt
    gps = readdzg(infile_gps, 'dzg', header, verbose=verbose)
  File "c:\programdata\anaconda3\envs\readgssi\lib\site-packages\readgssi\gps.py", line 147, in readdzg
    z0 = array['altitude'].iat[rowgga]
  File "c:\programdata\anaconda3\envs\readgssi\lib\site-packages\pandas\core\indexing.py", line 2025, in __getitem__
    return self.obj._get_value(*key, takeable=self._takeable)
  File "c:\programdata\anaconda3\envs\readgssi\lib\site-packages\pandas\core\series.py", line 986, in _get_value
    return self._values[label]
IndexError: index 11 is out of bounds for axis 0 with size 10

If I copy the DZT file to a new directory and open that then I don't get the out of bounds error. Assuming this is an issue with the reading the DZG file strings.

pwernette avatar Nov 06 '20 18:11 pwernette

Hi @pwernette can you kindly post the files that are giving you issues? Or if you'd prefer they weren't public, can you email them to me? ian dot nesbitt at gmail dot com

iannesbitt avatar Nov 10 '20 20:11 iannesbitt