Skip to content

Commit

Permalink
Merge 71b010d into 14084ae
Browse files Browse the repository at this point in the history
  • Loading branch information
jvshields authored Oct 4, 2023
2 parents 14084ae + 71b010d commit a47e347
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ John Reichenbach <[email protected]>
Jordi Eguren <[email protected]>
Jordi Eguren <[email protected]> jordi5 <[email protected]>

Josh Shields <[email protected]>

Karan Desai <[email protected]>
Karan Desai <[email protected]> karandesai-96 <[email protected]>

Expand Down
11 changes: 7 additions & 4 deletions tardis/io/atom_data/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ class AtomData(object):
"photoionization_data",
"yg_data",
"two_photon_data",
"linelist",
]

# List of tuples of the related dataframes.
Expand Down Expand Up @@ -165,7 +166,6 @@ def from_hdf(cls, fname=None):
fname = resolve_atom_data_fname(fname)

with pd.HDFStore(fname, "r") as store:

for name in cls.hdf_names:
try:
dataframes[name] = store.select(name)
Expand All @@ -182,7 +182,6 @@ def from_hdf(cls, fname=None):
# Checks for various collisional data from Carsus files
if "collisions_data" in store:
try:

dataframes["collision_data_temperatures"] = store[
"collisions_metadata"
].temperatures
Expand Down Expand Up @@ -211,6 +210,8 @@ 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"]

Check warning on line 214 in tardis/io/atom_data/base.py

View check run for this annotation

Codecov / codecov/patch

tardis/io/atom_data/base.py#L214

Added line #L214 was not covered by tests

atom_data = cls(**dataframes)

Expand Down Expand Up @@ -273,8 +274,8 @@ def __init__(
photoionization_data=None,
yg_data=None,
two_photon_data=None,
linelist=None,
):

self.prepared = False

# CONVERT VALUES TO CGS UNITS
Expand Down Expand Up @@ -333,6 +334,9 @@ def __init__(

self.two_photon_data = two_photon_data

if linelist is not None:
self.linelist = linelist

Check warning on line 338 in tardis/io/atom_data/base.py

View check run for this annotation

Codecov / codecov/patch

tardis/io/atom_data/base.py#L338

Added line #L338 was not covered by tests

self._check_related()

self.symbol2atomic_number = OrderedDict(
Expand Down Expand Up @@ -426,7 +430,6 @@ def prepare_atom_data(
self.macro_atom_data_all is not None
and not line_interaction_type == "scatter"
):

self.macro_atom_data = self.macro_atom_data_all.loc[
self.macro_atom_data_all["atomic_number"].isin(
self.selected_atomic_numbers
Expand Down

0 comments on commit a47e347

Please sign in to comment.