LANL-Seismoacoustics / infrapy

An infrasound array processing toolkit
Other
39 stars 7 forks source link

Beamformer Settings Crash #1

Closed kwz-github closed 4 years ago

kwz-github commented 4 years ago

In the “Beamformer settings” dialog window, I’ve consistently been able to crash the app when I use the following values: Back Azimuth Start F: 0.00 Hz Back Azimuth End F: -90.00 Hz

Reversing the start/end values works as expected; therefore, just needs catch logic to eliminate/ignore/modify user input error.

The following is the Traceback received:

Traceback (most recent call last): File ".../infrapy/InfraView/widgets/IPBeamformingWidget.py", line 1128, in run avg_beam_power = np.average(beam_power, axis=0) File "<__array_function__ internals>", line 6, in average File ".../anaconda3/envs/infrapy_env/lib/python3.6/site-packages/numpy/lib/function_base.py", line 394, in average scl = avg.dtype.type(a.size/avg.size) ZeroDivisionError: division by zero Aborted (core dumped)

jwebster-LANL commented 4 years ago

KWZ

I apologize for this taking so long. I think I must only get notifications if the issue is assigned to me.

Anyway, I fixed the problem I believe. The baz start/end angle spin boxes will show red text if the start angle is greater than or equal to the stop angle. And if you try to run the beamformer with that situation, an warning will popup telling you to fix it.

Do a git pull and try it out. If it seems to be fixed, please mark the issue closed.

Cheers Jeremy

kwz-github commented 4 years ago

Checked out and working.