keflavich / pyradex

Python interface to RADEX
BSD 3-Clause "New" or "Revised" License
18 stars 12 forks source link

Molecules with only o-H2 or p-H2 rates #8

Open low-sky opened 9 years ago

low-sky commented 9 years ago

Molecules with only p-H2 rates (like p-NH3) raise errors when density is specified because they lack o-H2 collision rates. There is a workaround, namely specifying collider densities manually with collider_densities = {'pH2':1e4,'oH2':0}.

yxlinaqua commented 6 years ago

Do molecules like C2H that have electron as collisional partner also have similar issue? I tried to run pyradex.Radex specifying h2/h2+e, but the kernel died without giving an error message. CN also causes an error. C2H

keflavich commented 6 years ago

c2h works for me:

pyradex.Radex(species='c2h_h2_e', collider_densities={'e': 1e3}, abundance=1e-8, temperature=30)()

If you're seeing the kernel die without an error, that most likely indicates a compilation failure, not a runtime error. Try re-compiling the code.

yxlinaqua commented 6 years ago

This command also works for me. But once I specify h2 density, the kernel dies. R = pyradex.Radex(species='c2h_h2_e', collider_densities={'h2': 1e4}, abundance=1e-8, temperature=30)

keflavich commented 6 years ago

That should not happen; you may be on an outdated version of pyradex? On my machine, you get python tracebacks from doing the above command with h2-only, and different tracebacks with h2 + e.

However, while I don't understand exactly what's happening for you, there is a legitimate bug, which I'm fixing in this PR. This works for creating the Radex object, but fails because RADEX claims not to find any collision partners.... https://github.com/keflavich/pyradex/pull/19