Skip to content

Commit

Permalink
keep units with uncertainties if available
Browse files Browse the repository at this point in the history
  • Loading branch information
jrob93 committed Jul 16, 2024
1 parent 6e70913 commit f6ede62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/adler/science/PhaseCurve.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def FitModel(self, phase_angle, reduced_mag, mag_err=None, fitter=None, resample
# check if the parameter has units and then get array of the MC model values
m = mc_models[0]
p = getattr(m, x)
if hasattr(p, "unit"):
if hasattr(p, "unit") and (p.unit is not None):
fit_vals = np.array([getattr(m, x).value for m in mc_models]) * p.unit
else:
fit_vals = np.array([getattr(m, x) for m in mc_models])
Expand Down

0 comments on commit f6ede62

Please sign in to comment.