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
doc.recalc_derivatives(self.preferences.window_size, self.preferences.overlap)
File "/Users/anaconda3/lib/python3.6/site-packages/snowmicropyn/pyngui/document.py", line 31, in recalc_derivatives
self._derivatives = proksch2015.calc(samples, window_size, overlap_factor)
File "/Users/anaconda3/lib/python3.6/site-packages/snowmicropyn/proksch2015.py", line 76, in calc
sn = snowmicropyn.loewe2012.calc(samples, window, overlap)
File "/Users/anaconda3/lib/python3.6/site-packages/snowmicropyn/loewe2012.py", line 89, in calc
sn = calc_step(spatial_res, chunk.force)
File "/Users/anaconda3/lib/python3.6/site-packages/snowmicropyn/loewe2012.py", line 61, in calc_step
lambda_ = (4. / 3) * (k1 ** 2) / k2 / delta # Intensity
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.