Skip to content

Commit

Permalink
species not found
Browse files Browse the repository at this point in the history
  • Loading branch information
sarthak-dv committed Aug 11, 2024
1 parent cb1bf19 commit aaafee3
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions tardis/visualization/tools/liv_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,20 +216,19 @@ def _generate_plot_data(self, packets_mode):

plot_colors = []
plot_data = []
species_not_wvl_range = []
species_counter = 0

for specie_list in self._species_mapped.values():
full_v_last = []
for specie in specie_list:
if specie in self.species:
if specie not in groups.groups:
# atomic_number = specie // 100
# ion_number = specie % 100
# ion_numeral = int_to_roman(ion_number + 1)
# label = f"{atomic_number2element_symbol(atomic_number)} {ion_numeral}"
# logger.warning(
# f"Species {label} not found in the wavelength range."
# )
atomic_number = specie // 100
ion_number = specie % 100
ion_numeral = int_to_roman(ion_number + 1)
label = f"{atomic_number2element_symbol(atomic_number)} {ion_numeral}"
species_not_wvl_range.append(label)
continue
g_df = groups.get_group(specie)
r_last_interaction = (
Expand All @@ -243,7 +242,10 @@ def _generate_plot_data(self, packets_mode):
plot_data.append(full_v_last)
plot_colors.append(self._color_list[species_counter])
species_counter += 1

if species_not_wvl_range:
logger.info(
f"{species_not_wvl_range} were not found in the provided wavelength range."
)
return plot_data, plot_colors

def _prepare_plot_data(
Expand Down

0 comments on commit aaafee3

Please sign in to comment.