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

RADEX path or moldata does not exist #84

Open
travisthieme opened this issue Dec 3, 2024 · 0 comments
Open

RADEX path or moldata does not exist #84

travisthieme opened this issue Dec 3, 2024 · 0 comments

Comments

@travisthieme
Copy link

travisthieme commented Dec 3, 2024

Hi @astropenguin,

Currently trying to use ndradex to fit some peak brightness temperatures. Was working very well before, but now for some reason when I run my fitting I get several warning messages stating: RADEX path or moldata does not exist. I wonder, is there a reason for this? I did try to install a few other RADEX python packages, so I wonder if that influenced anything?

The ndradex part of my code is simply the following:

result = ndradex.run("ph2co-h2.dat", 
                     transition, 
                     T_kin=np.power(10, temperature),
                     N_mol=np.power(10, column_density), 
                     n_H2=np.power(10, density), 
                     dv=linewidth, 
                     progress=False)

where I am fitting the values in log-space, but converting them back when feeding to ndradex. When I get this warning, my fitting process always throws an assertion error of AssertionError: nan.

When I run the package outside of my fitting procedure, I don't ever see this error. For example, the following code does not seem to ever produce this warning for me:

import ndradex

ds_303202 = ndradex.run("ph2co-h2.dat", 
                        "(3,0,3)-(2,0,2)", 
                        T_kin=21.49,
                        N_mol=1.17e15, 
                        n_H2=8.98e6, 
                        dv=1.946, 
                        progress=False)

Additionally, I checked

from ndradex import consts

print (consts.RADEX_BIN)

which returns: .../miniconda3/envs/astro38/lib/python3.8/site-packages/ndradex/bin.

Any guidance on how I can address this is appreciated. Thank you for such a nice and easy-to-use package!

Current Setup:

  • MacBook Pro 2023 (M3 Max)
  • MacOS 14.6.1 (23G93)
  • Python 3.8.15
  • ndradex 0.3.1
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

1 participant