From 6e22f52285de97621f80b9d92d10b0692521a28f Mon Sep 17 00:00:00 2001 From: "P. L. Lim" <2090236+pllim@users.noreply.github.com> Date: Mon, 6 Jan 2025 11:55:59 -0500 Subject: [PATCH] Force flux_unit to be unit instance instead of a str to be compatible with astropy v7.1 --- synphot/spectrum.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synphot/spectrum.py b/synphot/spectrum.py index 196649e..e973eec 100644 --- a/synphot/spectrum.py +++ b/synphot/spectrum.py @@ -484,7 +484,7 @@ def integrate(self, wavelengths=None, integration_type=None, **kwargs): raise exceptions.SynphotError( 'flux_unit cannot be used with unitless spectrum') else: - self._validate_flux_unit(flux_unit, wav_only=True) + flux_unit = self._validate_flux_unit(flux_unit, wav_only=True) x = self._validate_wavelengths(wavelengths)