Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
vtzirakis opened this issue Mar 25, 2024 · 1 comment
Assignees

Comments

@vtzirakis
Copy link

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
Copy link
Member

mchitre commented Mar 28, 2024

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.

@mchitre mchitre self-assigned this Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants