Skip to content

Commit

Permalink
Revert "Removing Levels Index Variable Within Atomic Data Preperation (
Browse files Browse the repository at this point in the history
…#1957)"

This reverts commit 507c50f.
  • Loading branch information
andrewfullard authored May 4, 2022
1 parent 76f4413 commit 6a76f98
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tardis/io/atom_data/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,10 @@ def prepare_atom_data(

self.nlte_species = nlte_species

self.levels_index = pd.Series(
np.arange(len(self.levels), dtype=int), index=self.levels.index
)

# cutting levels_lines
self.lines = self.lines[
self.lines.index.isin(
Expand All @@ -348,10 +352,22 @@ def prepare_atom_data(
"level_number_upper"
)

self.lines_lower2level_idx = (
self.levels_index.loc[tmp_lines_lower2level_idx]
.astype(np.int64)
.values
)

tmp_lines_upper2level_idx = self.lines.index.droplevel(
"level_number_lower"
)

self.lines_upper2level_idx = (
self.levels_index.loc[tmp_lines_upper2level_idx]
.astype(np.int64)
.values
)

if (
self.macro_atom_data_all is not None
and not line_interaction_type == "scatter"
Expand Down

0 comments on commit 6a76f98

Please sign in to comment.