Skip to content

Commit

Permalink
Updates to cubeviz docs (#2769)
Browse files Browse the repository at this point in the history
* Updates to docs and images in docs for cubeviz import and display cubes

* Fix typo in cubeviztoolbar

* Updates to displayspectra

* Better sentence

* Fix fail building docs

---------

Co-authored-by: Camilla Pacifici <cpacifici@stsci.edu>
  • Loading branch information
camipacifici and Camilla Pacifici authored Mar 27, 2024
1 parent d007a4b commit b0d70b8
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 13 deletions.
7 changes: 4 additions & 3 deletions docs/cubeviz/displaycubes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Displaying Cubes
The Cubeviz layout includes two image viewers (at the top of the app)
and one spectrum viewer (at the bottom of the app), which it attempts to
populate automatically when the first dataset is loaded. By default, Cubeviz
attempts to parse and display the flux in the top left viewer, the uncertainty
attempts to parse and display the flux in the top left viewer and the uncertainty
in the top right viewer. The spectrum
viewer is populated by default by collapsing the spatial axes using the "Sum"
function. The indicators that the load machinery looks for in each HDU to
Expand All @@ -34,8 +34,8 @@ Jupyter notebook using an API. The Toolbar below gives you several spectroscopic
display options. Right click will open a dropdown with access to different options
for each button.

.. image:: ./img/cubeviztoolbar.jpg
:alt: Speciz Toolbar
.. image:: ./img/cubeviztoolbar.png
:alt: Cubeviz Toolbar

.. _cubeviz-selecting-data:

Expand Down Expand Up @@ -93,6 +93,7 @@ over the region, and the resulting spectrum will be displayed in the 1D spectrum
the bottom of the UI.

.. image:: img/subset_creation.png
:alt: Subset creation in Cubeviz

.. _cubeviz-spectrum-at-spaxel:

Expand Down
9 changes: 5 additions & 4 deletions docs/cubeviz/displayspectra.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ Displaying Spectra
******************

A collapsed spectrum of the cube displayed in the upper-left viewer
automatically appears in the 1D spectrum viewer, using the Maximum
collapse method. The collapse method can be changed in the :guilabel:`Viewer`
tab of the |icon-settings-sliders| icon in the spectrum viewer. Additional spectra
automatically appears in the 1D spectrum viewer, using the set collapse function.
The collapse function can be changed in the :guilabel:`Line`
tab of the Plot Options plugin, which can be reached by clicking the |icon-settings-sliders|
icon in the spectrum viewer. Additional spectra
can be loaded into the spectrum viewer, as detailed in the linked documentation
below.
below.

.. seealso::

Expand Down
Binary file removed docs/cubeviz/img/cubeviztoolbar.jpg
Binary file not shown.
Binary file added docs/cubeviz/img/cubeviztoolbar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/cubeviz/img/subset_creation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 8 additions & 2 deletions docs/cubeviz/import_data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Importing Data into Cubeviz

By design, Cubeviz only supports data that can be parsed as
:class:`~specutils.Spectrum1D` objects. Despite the name, :class:`~specutils.Spectrum1D`
now supports 3D cubes and allows the Python-level interface and parsing tools to
supports 3D cubes and allows the Python-level interface and parsing tools to
be defined in ``specutils`` instead of being duplicated in Jdaviz.
:class:`~specutils.Spectrum1D` objects are very flexible in their capabilities, however,
and hence should address most astronomical spectrum use cases.
Expand Down Expand Up @@ -139,8 +139,14 @@ object, you can load it into Cubeviz as follows:
.. code-block:: python
import numpy as np
import astropy.wcs as fitswcs
from astropy.wcs import wcs
import astropy.units as u
from specutils import Spectrum1D
from jdaviz import Cubeviz
from jwst import datamodels
file = "/path/to/data/file.fits"
mydatamodel = datamodels.open(file)
# mydatamodel is a jwst.datamodels object
# Due to current schema in jwst.datamodels, you'll need to create your own WCS object before you create your Spectrum1D object
Expand Down
7 changes: 3 additions & 4 deletions docs/cubeviz/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,17 @@ with IFU data cubes. It uses
the `specutils <https://specutils.readthedocs.io/en/latest/>`_ package
from `Astropy <https://www.astropy.org>`_ .

Cubeviz is a tool for visualization and quick-look analysis of 3D data cubes,
primarily from integral field units (IFUs). It incorporates visualization tools
Cubeviz incorporates visualization tools
with analysis capabilities, such as Astropy regions and :ref:`specutils` packages.
Users can interact with their data from within the tool.
Cubeviz allows spectra of regions within the cube to be easily plotted and examined,
offering all the same capabilities as :ref:`specviz`.

In addition, Cubeviz also allows users to interacting with their cube to:
In addition, Cubeviz also allows users to interact with their cube to:

* view the wavelength slices (RA, DEC),

* view flux, error, and data quality cubes simultaneously,
* view flux and error or data quality cubes simultaneously,

* view spectra from selected spatial (RA, DEC) regions,

Expand Down

0 comments on commit b0d70b8

Please sign in to comment.