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

Problem reading LXcat data #5

Open
Leebre opened this issue Oct 20, 2020 · 1 comment
Open

Problem reading LXcat data #5

Leebre opened this issue Oct 20, 2020 · 1 comment

Comments

@Leebre
Copy link

Leebre commented Oct 20, 2020

Hi, I am going through the tutorial for BOLOS here: https://bolos.readthedocs.io/en/latest/tutorial.html

However, it seems to not be reading in the data from LXcat correctly. I have downloaded a zip file from LXcat, which contains a .txt file and a .xml. If I try to use the .txt file with parser.parse, I get the following error:

>>> processes = parser.parse(fp)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/sandbox/.local/lib/python3.8/site-packages/bolos/parser.py", line 48, in parse
    d = fread(fp)
  File "/home/sandbox/.local/lib/python3.8/site-packages/bolos/parser.py", line 108, in _read_excitation
    lhs, rhs = [s.strip() for s in RE_ARROW.split(target)]
ValueError: not enough values to unpack (expected 2, got 1)

If I try to parse in the .xml file, no error is reported; however, when I go to do boltzmann.target['N2'].density = 0.8, I get the following:

>>> boltzmann.target['N2'].density = 0.8
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
KeyError: 'N2'

also, if I type processes, it just reports empty brackets - [ ].

It seems the data parsing is not working? I am doing something wrong?

@arichar6
Copy link

It is hard to know exactly what is going wrong without knowing which files you downloaded from LXcat. The error that you mentioned (KeyError: 'N2') could occur if the dataset that you downloaded does not contain any cross sections for nitrogen.

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

2 participants