Skip to content

Commit

Permalink
Merge branch 'v4.0.x' of https://github.com/spacetelescope/jdaviz int…
Browse files Browse the repository at this point in the history
…o v4.0.x
  • Loading branch information
rosteen committed Dec 16, 2024
2 parents 8ee5da2 + be5caf3 commit b21a6db
Show file tree
Hide file tree
Showing 9 changed files with 110 additions and 67 deletions.
20 changes: 0 additions & 20 deletions .github/workflows/ci_cron_weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,23 +54,3 @@ jobs:
python -m pip install tox
- name: Test with tox
run: tox -e py311-test-devdeps-romandeps

ci_cron_tests_stable_roman:
name: Python 3.10 with stable versions of dependencies and Roman
runs-on: ubuntu-latest
if: (github.repository == 'spacetelescope/jdaviz' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'Extra CI')))
steps:
- name: Checkout code
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0
- name: Set up python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: '3.10'
- name: Install base dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Test with tox
run: tox -e py310-test-romandeps
6 changes: 6 additions & 0 deletions .github/workflows/ci_workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ jobs:
toxposargs: --remote-data --run-slow
allow_failure: true

- name: Python 3.11 with stable versions of dependencies and Roman
os: ubuntu-latest
python: '3.11'
toxenv: py311-test-romandeps
allow_failure: true

steps:
- name: Checkout code
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
Expand Down
11 changes: 2 additions & 9 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
4.0.1 (unreleased)
4.0.1 (2024-12-13)
==================

Bug Fixes
Expand Down Expand Up @@ -41,14 +41,7 @@ Imviz

- Updates UI language in the orientation plugin to better match API. [#3276]

Mosviz
^^^^^^

Specviz
^^^^^^^

Specviz2d
^^^^^^^^^
- Update Roman L2 example files in example notebook. [#3346]

4.0 (2024-10-17)
================
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ authors:
- family-names: "Volfman"
given-names: "Sabrina"
title: "Jdaviz"
version: 4.0
version: 4.0.1
doi: https://doi.org/10.5281/zenodo.5513927
date-released: 2024-10-17
date-released: 2024-12-13
url: "https://github.com/spacetelescope/jdaviz"

# see a full list of contributors here: https://github.com/spacetelescope/jdaviz/graphs/contributors
6 changes: 6 additions & 0 deletions jdaviz/configs/rampviz/plugins/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,12 @@ def _roman_3d_to_glue_data(
data_reshaped = move_group_axis_last(data)
diff_data_reshaped = move_group_axis_last(diff_data)

# if the ramp cube has no units, assume DN:
if getattr(data_reshaped, 'unit', None) is None:
assumed_unit = u.DN
data_reshaped <<= assumed_unit
diff_data_reshaped <<= assumed_unit

# load these cubes into the cache:
app._jdaviz_helper.cube_cache[ramp_cube_data_label] = NDDataArray(
data_reshaped
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,9 @@ def _extract_from_aperture(self, **kwargs):
# after the fancy indexing above, axis=1 corresponds to groups, and
# operations over axis=0 corresponds to individual pixels:
axis=0
) << nddata.unit
)
if nddata.unit is not None:
collapsed <<= nddata.unit

def expand(x):
# put the resulting 1D profile (counts vs. groups) into the
Expand Down
4 changes: 1 addition & 3 deletions jdaviz/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ def roman_level_1_ramp():
shape = (10, 25, 25)
data_model = mk_datamodel(RampModel, shape=shape, dq=False)

data_model.data = u.Quantity(
100 + 3 * np.cumsum(rng.uniform(size=shape), axis=0), u.DN
)
data_model.data = 100 + 3 * np.cumsum(rng.uniform(size=shape), axis=0)
return data_model


Expand Down
Loading

0 comments on commit b21a6db

Please # to comment.