Skip to content

Commit

Permalink
require specutils >= 1.16.0 (#3184)
Browse files Browse the repository at this point in the history
* require specutils >= 1.16.0

* specutils 1.16.0
  • Loading branch information
cshanahan1 authored Sep 6, 2024
1 parent cd70c2e commit 5ae74cb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ Specviz2d
Other Changes and Additions
---------------------------

- Bump required specutils version to 1.16. Moment 0 calculation is now in units
of flux*dx (rather than flux) [#3184]

3.11 (unreleased)
=================

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
from glue.core.roi import XRangeROI
from numpy.testing import assert_allclose

from jdaviz.configs.cubeviz.plugins.moment_maps.moment_maps import SPECUTILS_LT_1_15_1


def test_user_api(cubeviz_helper, spectrum1d_cube):
with warnings.catch_warnings():
Expand Down Expand Up @@ -51,12 +49,9 @@ def test_user_api(cubeviz_helper, spectrum1d_cube):


def test_moment_calculation(cubeviz_helper, spectrum1d_cube, tmp_path):
if SPECUTILS_LT_1_15_1:
moment_unit = "Jy"
moment_value_str = "+8.00000e+00"
else:
moment_unit = "Jy m"
moment_value_str = "+6.40166e-10"

moment_unit = "Jy m"
moment_value_str = "+6.40166e-10"

dc = cubeviz_helper.app.data_collection
with warnings.catch_warnings():
Expand Down Expand Up @@ -295,11 +290,9 @@ def test_momentmap_nirspec_prism(cubeviz_helper, tmp_path):
(sky_cube.ra.deg, sky_cube.dec.deg))


def test_correct_output_spectral_y_units(cubeviz_helper, spectrum1d_cube_custom_fluxunit):
if SPECUTILS_LT_1_15_1:
moment_unit = "Jy / sr"
else:
moment_unit = "Jy m / sr"
def test_correct_output_flux_or_sb_units(cubeviz_helper, spectrum1d_cube_custom_fluxunit):

moment_unit = "Jy m / sr"

# test that the output unit labels in the moment map plugin reflect any
# changes made in the unit conversion plugin.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ dependencies = [
"ipywidgets>=8.0.6",
"solara>=1.39.0",
"pyyaml>=5.4.1",
"specutils>=1.15",
"specutils>=1.16",
"specreduce>=1.4.1",
"photutils>=1.4",
"glue-astronomy>=0.10",
Expand Down

0 comments on commit 5ae74cb

Please sign in to comment.