simplify equivalence test
@@ -159,12 +159,7 @@ class IRF:
@quantity.setter
def quantity(self, val):
- val = u.Quantity(val, copy=False)
-
- if not val.unit.is_equivalent(self.unit):
- raise u.UnitConversionError(
- f"Unit must be equivalent to {self.unit}"
- )
+ val = u.Quantity(val, copy=False, unit=self.unit)
self.data = val.value
self.unit = val.unit
