-
Notifications
You must be signed in to change notification settings - Fork 38
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
Comments
Run your code with |
Hi, I assume the previous poster managed to find their issue and, instead of opening a new one, I figured this is quite appropriate since I also cannot generate rays (in the domain I need). The problem is that rays with more vertical source angles bounce off the bottom and go off the domain to the left. I saw something about drawing a box out of which Bellhop stops tracing rays (http://oalib.hlsresearch.com/Rays/HLS-2010-1.pdf page 10), but didn't find anything about how to define it in arlpy. It is automatically set to 101% of the distance to the furthest receiver, and indeed defining an extra sound speed column at 102% of the distance, but backwards, fixed it. Would it be possible to define that value (and by extension its depth equivalent) in arlpy? The current values are good for defaults, but it would be good to be able to set them as well. Also, I assume that is more dependent on Bellhop, but it would be great to be able to define the box in -range, or just stop tracing rays that go into "negative" range. |
|
have you solved the issue? I encountered the same problem as you |
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
The text was updated successfully, but these errors were encountered: