Skip to content

Commit

Permalink
Force flux_unit to be unit instance (#403)
Browse files Browse the repository at this point in the history
* Force flux_unit to be unit instance

instead of a str to be compatible with astropy v7.1

* Update CHANGES.rst
  • Loading branch information
pllim authored Jan 6, 2025
1 parent 63a63f2 commit 47a0396
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
1.6.0 (unreleased)
==================

- Compatibility with ``astropy`` 7.1. [#403]

1.5.0 (2024-11-19)
==================

Expand Down
2 changes: 1 addition & 1 deletion synphot/spectrum.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 47a0396

Please sign in to comment.