Issues with Eigenray Calculation and Bellhop Execution in arlpy
mbabeykoon opened this issue · comments
I tried to use Bellhop by following the instructions here: https://github.com/patel999jay/Bellhop-ARLPY-ECED6575/blob/master/README-Windows10_Users.md.
I'm encountering two separate issues when trying to run Bellhop through arlpy. First, there's an AttributeError during eigenray plotting, and second, running bellhop.exe directly results in a fatal error about not being able to open the environmental file.
pm.models()
['bellhop']
Issue 1: AttributeError in arlpy
When calling compute_eigenrays and then plot_rays, I receive an AttributeError. Here is the code snippet:
env = pm.create_env2d()
rays = pm.compute_eigenrays(env)
pm.plot_rays(rays, env=env, width=900)
This results in the following error:
AttributeError Traceback (most recent call last)
[~\AppData\Local\Temp\ipykernel_35784\1368683943.py] in <module>
1 rays = pm.compute_eigenrays(env)
----> 2 pm.plot_rays(rays, env=env, width=900)
Issue 2: Bellhop.exe Fatal Error
When running bellhop.exe, I receive a fatal error indicating it cannot open the environmental file. Here is the command I used
D:\Resarch\2024\Bellhop\atWin10_2020_11_4\windows-bin-20201102>bellhop.exe
Error:
BELLHOP/BELLHOP3D
ENVFile = .env
*** FATAL ERROR ***
Generated by program or subroutine: BELLHOP - READIN
Unable to open the environmental file
Any suggestion would appreciated. Thank you.
Hi,
Could you please provide information about your python enviornment ? which version of bellhop you're using, i can see its may be 2020 version, just wanted to confirm ?
For the issue 1 : i guess if you run the arlpy bellhop run in debug mode that will show you the env files and print files. please provide them. Refer this for more details.
For the issue 2 : it is expected as you did not give any files to bellhop.exe
, it can not run anything. when you provide an env file with it would work. Just use any example test file from the at/tests folders and then run below command :
bellhop.exe filename
P.S.: DO NOT INCLUDE filename.env; just filename (i use this to tell : bellhop.exe munkp
)
@mbabeykoon : i could not see the attachments, could you please update ?
Content of the env file.
'arlpy'
25000.000000
1
'SVWT'
1 0.0 25.000000
0.0 1500.000000 /
25.000000 1500.000000 /
'A' 0.000000
25.000000 1600.000000 0.0 1.600000 0.100000 /
1
5.000000 /
1
10.000000 /
1
1.000000 /
'E'
0
-80.000000 80.000000 /
0.0 25.250000 1.010000
I have no issue (see below) with the binary of bellhop or bokeh, it works fine, could you please provide your bokeh library version ?
C:\Users\jay_p>ipython3
Python 3.9.1 (tags/v3.9.1:1e5d33e, Dec 7 2020, 17:08:21) [MSC v.1927 64 bit (AMD64)]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.16.1 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import arlpy
In [2]: import arlpy.uwapm as pm^M
...: import arlpy.plot as plt^M
...: import numpy as np
In [3]: pm.models()
Out[3]: ['bellhop']
In [4]: env = pm.create_env2d()
In [5]: type(env)
Out[5]: dict
In [6]: pm.print_env(env)
name : arlpy
bottom_absorption : 0.1
bottom_density : 1600
bottom_roughness : 0
bottom_soundspeed : 1600
depth : 25
depth_interp : linear
frequency : 25000
max_angle : 80
min_angle : -80
nbeams : 0
rx_depth : 10
rx_range : 1000
soundspeed : 1500
soundspeed_interp : spline
surface : None
surface_interp : linear
tx_depth : 5
tx_directionality : None
type : 2D
In [7]: pm.plot_env(env, width=900)
In [8]: rays = pm.compute_eigenrays(env)
...: pm.plot_rays(rays, env=env, width=900)
In [9]: rays
Out[9]:
angle_of_departure ... ray
0 -22.548510 ... [[0.0, 5.0], [2.3088880023882794, 4.0413362464...
0 -22.516503 ... [[0.0, 5.0], [2.309423168063283, 4.04262618021...
0 -21.556311 ... [[0.0, 5.0], [2.325142287675045, 4.08146130072...
0 -21.524305 ... [[0.0, 5.0], [2.3256550362742816, 4.0827603081...
0 -20.084017 ... [[0.0, 5.0], [2.347975206646178, 4.14150571989...
.. ... ... ...
0 19.571914 ... [[0.0, 5.0], [2.355554433571443, 5.83747436407...
0 21.044209 ... [[0.0, 5.0], [2.3332590888729934, 5.8977204599...
0 21.076215 ... [[0.0, 5.0], [2.332757242863153, 5.89902371819...
0 22.036407 ... [[0.0, 5.0], [2.3173640807018314, 5.9379891883...
0 22.068414 ... [[0.0, 5.0], [2.3168397423735563, 5.9392835611...
[68 rows x 4 columns]
In [10]: arrivals = pm.compute_arrivals(env)
In [11]: arrivals[arrivals.arrival_number < 10][['time_of_arrival', 'angle_of_a
...: rrival', 'surface_bounces', 'bottom_bounces']]
Out[11]:
time_of_arrival angle_of_arrival surface_bounces bottom_bounces
1 0.721796 22.538254 9 8
2 0.716791 -21.553932 8 8
3 0.709687 20.084017 8 7
4 0.709687 20.052010 8 7
5 0.705226 -19.034414 7 7
6 0.698960 17.484421 7 6
7 0.695070 -16.436060 6 6
8 0.689678 14.842224 6 5
9 0.686383 -13.766296 5 5
10 0.681901 12.133879 5 4
In [12]: import bokeh
In [13]: print(bokeh.__version__)
3.3.0
In [14]:
try to update your bokeh version and should be fine. let me know.
can you run your bellhop with below commands and paste those output files here ?
rays = pm.compute_eigenrays(env,debug=True)
This will return the path of the files generated, go to that folder and copy and paste those files, especially *.prt
file.