Skip to content

Commit

Permalink
species weight stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunsavel committed Feb 29, 2024
1 parent ec0ab78 commit 213a9d3
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/cortecs/fit/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,10 @@ def calc_metrics(fitter, tp_undersample_factor=1, wl_under_sample_factor=8, plot
evaluator = Evaluator(fitter.opac, fitter)
AMU = 1.6605390666e-24 # atomic mass unit in cgs. From astropy!

try:
if not hasattr(evaluator.load_obj, "species_weight"):
species_weight = 1
else:
species_weight = evaluator.load_obj.species_weight
except AttributeError:
raise AttributeError(
"Object has not been loaded to include the species weight. Please load the opacities appropriately."
)

vals = []
orig_vals = []
Expand Down

0 comments on commit 213a9d3

Please sign in to comment.