Bugfix: check for matching units before rebinning

This commit is contained in:
Lukas Klass 2020-04-14 15:52:55 +02:00
parent 3ae1dd8733
commit 9263967251

View File

@ -248,7 +248,7 @@ class SpectralQty:
The rebinned spectral quantity
"""
if wl.unit != self.wl.unit:
if not wl.unit.is_equivalent(self.wl.unit):
error("Mismatching units for rebinning: " + wl.unit + ", " + self.wl.unit)
if not self._extrapolate:
if min(wl) < min(self.wl) or max(wl) > max(self.wl):