Bugfix: check for matching units before rebinning
This commit is contained in:
parent
3ae1dd8733
commit
9263967251
@ -248,7 +248,7 @@ class SpectralQty:
|
|||||||
The rebinned spectral quantity
|
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)
|
error("Mismatching units for rebinning: " + wl.unit + ", " + self.wl.unit)
|
||||||
if not self._extrapolate:
|
if not self._extrapolate:
|
||||||
if min(wl) < min(self.wl) or max(wl) > max(self.wl):
|
if min(wl) < min(self.wl) or max(wl) > max(self.wl):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user