A python package to read, export and post process data (*.pnt files) recorded by SnowMicroPen, a snow penetration probe for scientific applications developed at SLF.
Just checked in the pnt files where it happens and in the files where it does not happen. If there are more than 900 entries of the same value in the end of the file, pyngui crashes. If there are only something like 300 entries of the same value in the end of the file, than it still works.
Thanks for reporting, fixed with commit 65c70c4. Beware though that there was a good numerical reason for this crash and if you now merely get a warning instead you should still check your data integrity.
Hi there,
sometimes my pyngui just closes/crashes while trying to open PNT files.
That's the failure report from the terminal:
Read 24782 raw samples from file /Users/Documents/06_EQUIPMENT/SMP/test_data/S44M0295.pnt
Timestamp of profile as reported by pnt header is 2020-10-20 06:49:37+00:00
/Users/anaconda3/lib/python3.6/site-packages/snowmicropyn/loewe2012.py:58: RuntimeWarning: invalid value encountered in double_scalars
delta = -(3. / 2) c_f[n - 1] / (c_f[n] - c_f[n - 1]) spatial_res
Traceback (most recent call last):
File "/Users/anaconda3/lib/python3.6/site-packages/snowmicropyn/pyngui/main_window.py", line 354, in _open_triggered
File "/Users/anaconda3/lib/python3.6/site-packages/snowmicropyn/pyngui/main_window.py", line 366, in open_pnts
File "/Users/anaconda3/lib/python3.6/site-packages/snowmicropyn/pyngui/document.py", line 31, in recalc_derivatives
File "/Users/anaconda3/lib/python3.6/site-packages/snowmicropyn/proksch2015.py", line 76, in calc
File "/Users/anaconda3/lib/python3.6/site-packages/snowmicropyn/loewe2012.py", line 89, in calc
File "/Users/anaconda3/lib/python3.6/site-packages/snowmicropyn/loewe2012.py", line 61, in calc_step
ZeroDivisionError: float division by zero
Abort trap: 6
Just checked in the pnt files where it happens and in the files where it does not happen. If there are more than 900 entries of the same value in the end of the file, pyngui crashes. If there are only something like 300 entries of the same value in the end of the file, than it still works.