org-arl / arlpy

ARL Python Tools
BSD 3-Clause "New" or "Revised" License
117 stars 36 forks source link

Not able to compute or plot arrival times/ rays using bellhop model in python #101

Open vtzirakis opened 3 months ago

vtzirakis commented 3 months ago

Hello!

I'm trying to use python to simulate marine environments and compute rays, arrival times etc, as I am not familiar with matlab. All works fine ( I can set and plot the environment), however when I try to compute the rays or arrival times ( arrivals = pm.compute_arrivals(env) ) I get the following message in jupyter:

[WARN] Bellhop did not generate expected output file.

As a result I can not plot the rays or arrival times, as the variable values are probably set to Nan or something. Specifically, when I try to plot arrival times I get this error:

AttributeError Traceback (most recent call last) Cell In[16], line 2 1 arrivals = pm.compute_arrivals(env) ----> 2 pm.plot_rays(arrivals, env=env, width=900)

File ~\AppData\Roaming\Python\Python311\site-packages\arlpy\uwapm.py:478, in plot_rays(rays, env, invert_colors, kwargs) 461 def plot_rays(rays, env=None, invert_colors=False, kwargs): 462 """Plots ray paths. 463 464 :param rays: ray paths (...) 476 >>> pm.plot_rays(rays, width=1000) 477 """ --> 478 rays = rays.sort_values('bottom_bounces', ascending=False) 479 max_amp = _np.max(_np.abs(rays.bottom_bounces)) if len(rays.bottom_bounces) > 0 else 0 480 if max_amp <= 0:

AttributeError: 'NoneType' object has no attribute 'sort_values'

I do not know what the problem is and since there is not much information online about bellhop in python, I am stuck. Any help would be really appriciated. Thanks in advance!

Vassilis

mchitre commented 3 months ago

Run your code with debug=True and copy out the generated files. Looking at their content might give you a hint as to what is wrong.