Skip to content

Commit

Permalink
link to latest demo L1 file
Browse files Browse the repository at this point in the history
  • Loading branch information
bmorris3 committed Aug 25, 2023
1 parent 4a724d1 commit 85791bb
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Cubeviz
- Add Spectral Extraction plugin for Cubeviz, which converts spectral cubes
to 1D spectra with propagated uncertainties [#2039]

- Support for loading Roman WFI Level 1 (ramp) files [#2376]

Imviz
^^^^^

Expand Down
4 changes: 2 additions & 2 deletions jdaviz/configs/cubeviz/plugins/slice/slice.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def _watch_viewer(self, viewer, watch=True):
# conversion can be done efficiently
self._update_data(viewer_data[0].spectral_axis)

Check warning on line 120 in jdaviz/configs/cubeviz/plugins/slice/slice.py

View check run for this annotation

Codecov / codecov/patch

jdaviz/configs/cubeviz/plugins/slice/slice.py#L120

Added line #L120 was not covered by tests
else:
sample_index = np.arange(1, 1 + viewer_data[0].shape[-1]) * u.one
sample_index = np.arange(viewer_data[0].shape[-1]) * u.one
self._update_data(sample_index)

if viewer not in self._indicator_viewers:
Expand All @@ -143,7 +143,7 @@ def _update_reference_data(self, reference_data):
return # pragma: no cover

if reference_data.meta.get(cubeviz_ramp_meta_flag, False):
sample_index = np.arange(1, 1 + reference_data['flux'].shape[-1]) * u.one
sample_index = np.arange(reference_data['flux'].shape[-1]) * u.one
self._update_data(sample_index)

Check warning on line 147 in jdaviz/configs/cubeviz/plugins/slice/slice.py

View check run for this annotation

Codecov / codecov/patch

jdaviz/configs/cubeviz/plugins/slice/slice.py#L146-L147

Added lines #L146 - L147 were not covered by tests
else:
self._update_data(reference_data.get_object(cls=Spectrum1D).spectral_axis)
Expand Down
15 changes: 13 additions & 2 deletions notebooks/concepts/cubeviz-roman-ramp.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,13 @@
"import os\n",
"from urllib.request import urlretrieve\n",
"\n",
"url_L1 = \"https://stsci.box.com/shared/static/24gpvqb9676acdy6hjvymc2llgcny8ul.asdf\"\n",
"force_download = False\n",
"\n",
"# the L1 file linked below is compatible with roman_datamodels==0.17.1\n",
"url_L1 = \"https://stsci.box.com/shared/static/4zjln12uc72d6rwu8mkorsyt2s84zfhj.asdf\"\n",
"local_path = \"L1.asdf\"\n",
"\n",
"if not os.path.exists(local_path):\n",
"if not os.path.exists(local_path) or force_download:\n",
" urlretrieve(url_L1, local_path)"
]
},
Expand All @@ -54,6 +57,14 @@
"cubeviz.load_data(local_path, data_label='Roman L1')\n",
"cubeviz.show(height=1000)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "4312b177-e0d5-45da-95ba-81c910ffff4f",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down

0 comments on commit 85791bb

Please sign in to comment.