From 926396725127261810445774798c1aa14fdb9338 Mon Sep 17 00:00:00 2001 From: LukasK13 Date: Tue, 14 Apr 2020 15:52:55 +0200 Subject: [PATCH] Bugfix: check for matching units before rebinning --- esbo_etc/classes/SpectralQty.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esbo_etc/classes/SpectralQty.py b/esbo_etc/classes/SpectralQty.py index 85216ec..c5be7f7 100644 --- a/esbo_etc/classes/SpectralQty.py +++ b/esbo_etc/classes/SpectralQty.py @@ -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):