Open SmirnGreg opened 5 years ago
the 'embedded null byte' issue is one I've seen but I thought I had fixed. I'll investigate; maybe there are py3.7 issues as I haven't tested against 3.7 yet
it does look like some of the tests are broken. However, I'm pretty sure the code is working in most cases... I won't be able to fix the bugs for at least a day though
Thanks for your response. You don't have to rush for me, I don't have a time pressure now.
I fixed a few of the bugs. I'm a little worried about the numerical differences in the README example, though - Jeff Mangum reported a similar issue, and I don't know what caused it. I want to validate against a clean RADEX run. That has to happen later, unfortunately. If you want to help with that, it would be welcome, though =)
I'm having the same issue listed by @SmirnGreg of the embedded null byte
despite having installed RADEX and updated my data path within the MAKEFILE in RADEX. I used homebrew gcc to install my gfortran compiler. I'm running python version 3.6 , I can't get any of the simpler examples listed in the README file to run since they all give the same error
Regarding the original issue, I just did a fresh install & run of the example using python 3.7:
import pyradex
import numpy as np
R = pyradex.Radex(collider_densities={'oH2':900,'pH2':100}, column=1e16, species='co', temperature=20)
Tlvg = R(escapeProbGeom='lvg')
Tslab = R(escapeProbGeom='slab')
Tsphere = R(escapeProbGeom='sphere')
Tlvg[:3].pprint()
Tslab[:3].pprint()
Tsphere[:3].pprint()
## -- End pasted text --
/Users/adam/miniconda3/lib/python3.7/site-packages/pyradex/core.py:910: RuntimeWarning: invalid value encountered in true_divide
frac_level_diff = level_diff/self.level_population
Tex tau frequency upperstateenergy upperlevel lowerlevel upperlevelpop lowerlevelpop brightness T_B
K GHz K erg / (cm2 Hz s sr) K
------------------ ------------------ ----------- ---------------- ---------- ---------- ------------------- ------------------- ---------------------- -----------------
13.290883580311629 1.1468849744920648 115.2712018 5.53 1 0 0.4690681835772442 0.23707418568311267 2.7509509930774456e-14 6.738597089663219
9.818841145513437 3.001401907034107 230.538 16.6 2 1 0.253345500331731 0.4690681835772442 7.92657371926513e-14 4.854323769676796
7.463146983160675 1.923670595076573 345.7959899 33.19 3 2 0.03837985573671704 0.253345500331731 6.197465478870997e-14 1.68695108408779
Tex tau frequency upperstateenergy upperlevel lowerlevel upperlevelpop lowerlevelpop brightness T_B
K GHz K erg / (cm2 Hz s sr) K
------------------ ------------------ ----------- ---------------- ---------- ---------- ------------------- ------------------ ---------------------- ------------------
15.033255537705188 0.8822636119487622 115.2712018 5.53 1 0 0.4187667856349173 0.2016829184801295 2.7746969242628808e-14 6.7967639792879995
12.96726846017353 2.2752960483725784 230.538 16.6 2 1 0.2973499665319058 0.4187667856349173 1.174470050344317e-13 7.192587975689052
9.881878806224918 2.0596268711954067 345.7959899 33.19 3 2 0.07763119330763295 0.2973499665319058 1.20717013122686e-13 3.2859190075271423
Tex tau frequency upperstateenergy upperlevel lowerlevel upperlevelpop lowerlevelpop brightness T_B
K GHz K erg / (cm2 Hz s sr) K
------------------ ------------------ ----------- ---------------- ---------- ---------- ------------------- ------------------- ---------------------- ------------------
12.643328614869603 1.2818237512839787 115.2712018 5.53 1 0 0.4930538787795504 0.2545664508826119 2.7244700714182203e-14 6.673730699068296
8.479008281968543 3.401580205974277 230.538 16.6 2 1 0.22286520293005335 0.4930538787795504 6.189487914094684e-14 3.7905126940903053
6.85804192779582 1.7288125158470458 345.7959899 33.19 3 2 0.02774741534234436 0.22286520293005335 4.779526844016607e-14 1.30098796329388
When you say you installed RADEX, could you give more details? On my machine, I have not installed radex (at least, radex
is not anywhere on my path).
If you're still having trouble, try running python setup.py install_radex install_myradex build install
and put the full results in a gist. Mine looks like this
Dear Adam,
I can't install pyradex and make it to go through tests. I am installing it into conda environment since I don't have root access on most machines.
Steps to reproduce:
This looks very different from what is in the readme, and started to work only after I have installed RADEX from https://personal.sron.nl/~vdtak/radex/index.shtml
Before that, and on other machine without RADEX, I get the following:
Is it expected? Does pyradex depend on pre-installed RADEX? Is it fine that tests don't run out of the box, and many of them fail if I run them manually?
I am sorry if I do something weird.