Skip to content

Commit

Permalink
add molecule exposure for vald linelists
Browse files Browse the repository at this point in the history
  • Loading branch information
jvshields committed Aug 22, 2024
1 parent f46667b commit 82a364a
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions tardis/io/atom_data/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ class AtomData:
"photoionization_data",
"yg_data",
"two_photon_data",
"linelist",
"linelist_atoms",
"linelist_molecules",
"decay_radiation_data",
]

Expand Down Expand Up @@ -226,8 +227,10 @@ def from_hdf(cls, fname=None):
raise ValueError(
f"Current carsus version, {carsus_version}, is not supported."
)
if "linelist" in store:
dataframes["linelist"] = store["linelist"]
if "linelist_atoms" in store:
dataframes["linelist_atoms"] = store["linelist_atoms"]
if "linelist_molecules" in store:
dataframes["linelist_molecules"] = store["linelist_molecules"]

if "molecules" in store:
molecule_data = MoleculeData(
Expand Down Expand Up @@ -275,7 +278,8 @@ def __init__(
photoionization_data=None,
yg_data=None,
two_photon_data=None,
linelist=None,
linelist_atoms=None,
linelist_molecules=None,
decay_radiation_data=None,
molecule_data=None,
):
Expand Down Expand Up @@ -346,8 +350,10 @@ def __init__(

self.two_photon_data = two_photon_data

if linelist is not None:
self.linelist = linelist
if linelist_atoms is not None:
self.linelist_atoms = linelist_atoms
if linelist_molecules is not None:
self.linelist_molecules = linelist_molecules

if molecule_data is not None:
self.molecule_data = molecule_data
Expand Down

0 comments on commit 82a364a

Please sign in to comment.