diff --git a/lcviz/helper.py b/lcviz/helper.py index 586675e..e9207c2 100644 --- a/lcviz/helper.py +++ b/lcviz/helper.py @@ -22,6 +22,7 @@ def equivalent_units(self, data, cid, units): def to_unit(self, data, cid, values, original_units, target_units): # for some reason, glue is trying to request a change for cid='flux' from d to electron / s if target_units not in self.equivalent_units(data, cid, original_units): + raise ValueError(f"to_unit cannot convert units, cid={cid}, original_units={original_units}, target_units={target_units}, values={values}") # noqa return values return (values * u.Unit(original_units)).to_value(u.Unit(target_units))