diff --git a/.github/workflows/ci_cron_weekly.yml b/.github/workflows/ci_cron_weekly.yml index 5ce2bb6a6c..664dea7664 100644 --- a/.github/workflows/ci_cron_weekly.yml +++ b/.github/workflows/ci_cron_weekly.yml @@ -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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - fetch-depth: 0 - - name: Set up python - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.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 diff --git a/.github/workflows/ci_workflows.yml b/.github/workflows/ci_workflows.yml index 3984f9d713..bf5d9b9848 100644 --- a/.github/workflows/ci_workflows.yml +++ b/.github/workflows/ci_workflows.yml @@ -72,6 +72,12 @@ jobs: toxposargs: --remote-data --run-slow allow_failure: true + - name: Python 3.11 with stable versions of dependencies and Roman + python: '3.11' + runs-on: ubuntu-latest + toxenv: py311-test-romandeps + allow_failure: true + steps: - name: Checkout code uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 diff --git a/jdaviz/configs/rampviz/plugins/parsers.py b/jdaviz/configs/rampviz/plugins/parsers.py index 2444c584a9..4d30c8c90a 100644 --- a/jdaviz/configs/rampviz/plugins/parsers.py +++ b/jdaviz/configs/rampviz/plugins/parsers.py @@ -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 diff --git a/jdaviz/configs/rampviz/plugins/ramp_extraction/ramp_extraction.py b/jdaviz/configs/rampviz/plugins/ramp_extraction/ramp_extraction.py index a2e3395abb..ed69cba190 100644 --- a/jdaviz/configs/rampviz/plugins/ramp_extraction/ramp_extraction.py +++ b/jdaviz/configs/rampviz/plugins/ramp_extraction/ramp_extraction.py @@ -342,7 +342,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 diff --git a/jdaviz/conftest.py b/jdaviz/conftest.py index ec1fdc7a32..748a519905 100644 --- a/jdaviz/conftest.py +++ b/jdaviz/conftest.py @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 98d2ccb61a..14beb14f6a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -80,7 +80,7 @@ docs = [ "sphinx_design" ] roman = [ - "roman_datamodels>=0.17.1", + "roman_datamodels>=0.22.0", ] [build-system]