Skip to content

Problem reading LXcat data #5

@Leebre

Description

@Leebre

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions