Skip to content

Commit

Permalink
Respect loaded mask cube properly in spectral extraction. (#3319)
Browse files Browse the repository at this point in the history
* Track loaded mask cube in cubeviz

* First pass at handling mask cube in extraction

* Fix type

* Add changelog

* Handle mask cubes that have NaNs instead of 0s

* Act on copy of this mask array

* Don't save DQ array as loaded_mask for JWST

* Add snackbar warning and note in docs

* codestyle

* Add extraction test on file with mask

* Codestyle

(cherry picked from commit bf8cb26)
  • Loading branch information
rosteen committed Dec 16, 2024
1 parent bfb1691 commit 42d1c3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jdaviz/configs/cubeviz/plugins/tests/test_parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def test_manga_cube(cubeviz_helper):
se.function = "Mean"
se.extract()
extracted_max = cubeviz_helper.get_data("Spectrum (mean)").max()
assert_allclose(extracted_max.value, 2.836957E-18, rtol=1E-5)
assert_allclose(extracted_max.value, 2.836957E-18)
assert extracted_max.unit == u.Unit("erg / Angstrom s cm**2 pix**2")


Expand Down

0 comments on commit 42d1c3a

Please sign in to comment.