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 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 populate the viewers are below (note that in all cases, header values are converted to lower case):

  • Flux viewer: hdu.name is in the set ['flux', 'sci']

  • Uncertainty viewer: hdu.header.keys() includes “errtype” or hdu.name is in the set ['ivar', 'err', 'var', 'uncert']

  • Loaded but not displayed: hdu.data.dtype is int, numpy.uint or numpy.uint32, or hdu.name is in the set ['mask', 'dq']

The next section describes how to manually select data in cases where a viewer is not automatically populated or a user wants to change the data displayed. Different statistics for collapsing the spectrum displayed in the spectrum viewer can be chosen as described in Display Settings. Note that any spatial subsets will also be collapsed into a spectrum using the same statistic and displayed in the spectrum viewer along with the spectrum resulting from collapsing all the data in each spectral slice.

Much of the Cubeviz functionality can be handled within the tool or the 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.

Cubeviz Toolbar

Selecting a Data Set#

If you have already imported data into Cubeviz, you can select and deselect data within a viewer.

See also

Selecting a Data Set

Documentation on selecting data sets in the Jdaviz viewers.

Home#

This button will reset your zoom and panning to display the entire image.

Box Zoom and Linked Box Zoom#

See also

Box Zoom and Linked Box Zoom in Imviz

Documentation on panning and zooming in Imviz.

Pan/Zoom and Linked Pan/Zoom#

See also

Pan/Zoom and Linked Pan/Zoom in Imviz

Documentation on panning and zooming in Imviz.

Note

Pan/Zoom API and click-to-center feature in Imviz is not yet available on Cubeviz.

Defining Spatial Regions#

See also

Defining Spatial Regions

Documentation on defining spatial regions in an image viewer.

Spatial regions allow users to select subsets of the data array for specific analysis function in the plugin toolbar. Users can create spatial regions either in Cubeviz or the Jupyter notebook. Once a region is selected, the cube will be collapsed in wavelength space over the region, and the resulting spectrum will be displayed in the 1D spectrum viewer at the bottom of the UI.

Subset creation in Cubeviz

Spectrum At Spaxel#

This tool allows the user to create a single-spaxel subset in an image viewer. This subset will then be visualized in the spectrum viewer by showing the spectrum at that spaxel. While this tool is active, hovering over a pixel in the image viewer will show a preview of the spectrum at that spaxel in the spectrum viewer, and left-clicking will create a new subset at that spaxel. Click again to move the region to a new location under the cursor. Holding down the alt key (Alt key on Windows, Option key on Mac) while clicking on a spaxel creates a new subset at that point instead of moving the previously created region. You can then compare spectra at different spaxels using the spectrum viewer. You can also use the subset modes that are explained in the Spatial Regions section above in the same way you would with the other subset selection tools.

Note that moving the cursor outside of the image viewer or deactivating the spectrum-at-spaxel tool will revert the spectrum viewer zoom limits from the zoomed-in preview view to the limits set prior to using the tool. Thus it may be necessary to reset the zoom to see any single-spaxel subset spectra created using the tool.

Display Settings#

See also

Display Settings

Documentation on various display settings in the jdaviz viewers.

To access all of the different display settings for an image viewer, click the settings sliders icon icon in the viewer toolbar or open the Plot Options plugin. Changing the display settings does not change the underlying data, only the visualization of that data.