org-arl / arlpy

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

`nbeams` is messing up the uwapm notebook tutorial #97

Closed schielb closed 7 months ago

schielb commented 7 months ago

I am following along with the uwapm - bellhop tutorial, and I notice that there is a difference between what the create_env2d function does in the tutorial vs in my environment.

When I run that line and print the output (see code segment 3), I get the dict of all the elements of env, but an additional term is added: nbeams : 0 can be seen on my version.

Later, in code block 5, I try to run pm.compute_eigenrays(env), and I get a warning: [WARN] Bellhop did not generate expected output file. The next line, where I try to plot the rays, fails because rays is left as a NoneType.

I tried to pop the nbeams term from the env, and as a result I got the same dict values as in the tutorial, but I then ran into the issue on my compute_eigenrays line that the term nbeams couldn't be found (KeyError).

I see that the nbeams line has been in the code for a while now, so I'm curious why it doesn't show up in the tutorial. If that's not my issue, could it be my installation with bellhop? (I'm using bellhopcuda.) I run code block 2, the pm.models() function, and I get ['bellhop'] just fine, so I don't know if that's the issue.

Any help is appreciated!

mchitre commented 7 months ago

nbeams = 0 is fine. It just means we ask BELLHOP to select the number of beams automatically. This option has been around for 5 years, and can't be the source of the problem. The tutorial has not been run and updated, so it doesn't appear in the tutorial, but doesn't change anything materially.

I suspect the problem may be with your BELLHOP installation. I have never used bellhopcuda and have never tested arlpy with it. If there is an error, you can set debug=True and examine the intermediate files passed to BELLHOP and returned by BELLHOP. They may give you a clue to the problem.

schielb commented 7 months ago

You know what, I apologize profusely, this was a $PATH issue, my Jupyter notebook wasn't updating my PATH as I needed it. I closed VS Code and called code . on an updated terminal, and everything works just fine. My bad