Skip to content

Commit

Permalink
Merge pull request #1385 from pllim/contrast-bias-doc
Browse files Browse the repository at this point in the history
DOC: Fix Imviz Contrast/Bias doc and other minor updates
  • Loading branch information
kecnry authored Jun 10, 2022
2 parents b91701b + 4d94d64 commit fbb644d
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 34 deletions.
14 changes: 5 additions & 9 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,17 @@
# be used globally.
rst_epilog += """
.. |icon-white-to-black| image:: /img/icons/white_to_black.png
:scale: 40
:scale: 80
:alt: white to black icon
.. |icon-blink| image:: /img/icons/blink.png
:scale: 80
:alt: blink icon
.. |icon-plus| image:: /img/icons/picture_with_plus.png
:scale: 40
:alt: picture with a plus icon
.. |icon-hammer-and-screwdriver| image:: /img/icons/hammer_and_screwdriver.png
:scale: 40
:alt: hammer and screwdriver icon
.. |icon-plugins| image:: /img/icons/plugins.png
:scale: 40
:alt: plugins icon
Expand All @@ -98,10 +98,6 @@
:scale: 40
:alt: vertical zoom/pan icon
.. |icon-region-rect| image:: /img/icons/region_rect.png
:scale: 40
:alt: rectangular region icon
.. |icon-region-horiz| image:: /img/icons/region_horiz.png
:scale: 40
:alt: horizontal region icon
Expand Down
15 changes: 9 additions & 6 deletions docs/cubeviz/displaycubes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ To change the wavelength slice, use the :ref:`Slice Plugin <slice>`.
Defining Spatial Regions
========================

Regions can be created by first clicking the |icon-hammer-and-screwdriver| icon and
selecting either the |icon-region-rect| icon (to draw a rectangular region) or the
|icon-region-circ| icon (to draw a circular region), then clicking and dragging (using the mouse) until the
Regions can be created by first clicking the |icon-region-circ| icon (to draw a circular region),
then clicking and dragging (using the mouse) until the
desired region is covered by a colored shape, after which you release the mouse button.
If you want to draw other shapes, right click on the icon to see a dropdown of supported shapes
and left click on it to choose the shape, then draw as mentioned above.
Once you have completed the action of clicking and dragging, there is an opportunity to reposition
the region of interest by clicking on it and moving the region to a different location in the image viewer.
If you are satisfied with the positioning of your region of interest, simply click another part of the
Expand Down Expand Up @@ -109,8 +110,8 @@ Pan/Zoom
Panning and zooming in the Cubeviz viewers works the same as described in the
section on :ref:`Panning and Zooming in Specviz <pan-zoom>`, with the exception
that image viewers have only the bidirectional Pan/Zoom tool and the two-dimensional
box zoom enabled. Note that the box zoom in this case will always respect the x range
of the selected area, but will expand or limit the y range to preserve the aspect
box zoom enabled. Note that the box zoom in this case will always respect the X-range
of the selected area, but will expand or limit the Y-range to preserve the aspect
ratio of the image. The 1D spectrum viewer allows panning and zooming along a single
axis as in Specviz.

Expand All @@ -131,7 +132,7 @@ Display Settings
================

To access all of the different display settings for an image viewer, , click the
|icon-settings-sliders| icon in the viewer toolbar or open the :ref:`Plot Options<cubeviz-plot-options>` plugin..
|icon-settings-sliders| icon in the viewer toolbar or open the :ref:`Plot Options <cubeviz-plot-options>` plugin.
Changing the display settings DOES NOT change the underlying data, only the
visualization of that data.

Expand Down Expand Up @@ -169,6 +170,8 @@ Contrast

Change the luminance of the color in the image.

.. _bias:

Bias
^^^^

Expand Down
Binary file added docs/img/icons/blink.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 removed docs/img/icons/hammer_and_screwdriver.png
Binary file not shown.
Binary file removed docs/img/icons/region_rect.png
Binary file not shown.
Binary file modified docs/img/icons/white_to_black.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 15 additions & 14 deletions docs/imviz/displayimages.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Selecting Data Set

.. seealso::

:ref:`Selecting Data Set<cubeviz-selecting-data>`
Documentation on selecting data sets in the Jdaviz viewers.
:ref:`Selecting Data Set <cubeviz-selecting-data>`
Documentation on selecting data sets in the Jdaviz viewers.

Adding New Viewers
==================
Expand All @@ -32,24 +32,25 @@ Spatial regions can be created the same way as in Cubeviz.
.. seealso::

:ref:`Defining Spatial Regions <spatial-regions>`
Documentation on defining spatial regions in an image viewer.
Documentation on defining spatial regions in an image viewer.

Blinking
========

Blinking is an Imviz-specific functionality that allows a user to quickly switch
between viewing two or more images, as long as they are linked
(see :ref:`imviz_pan_zoom` for more on linking behavior). This can be done
by selecting the |icon-hammer-and-screwdriver| icon and then clicking the
:guilabel:`right arrow` icon. You can also blink by selecting the "b" key on your keyboard.
by selecting the |icon-blink| icon and then clicking on the image.
You can also blink by selecting the "b" key on your keyboard while moused over the image.

Contrast/Bias
=============

In addition to changing contrast and bias information in the :guilabel:`layer` tab
(see :ref:`Contrast <contrast>`), Imviz has a |icon-white-to-black| button
under the |icon-hammer-and-screwdriver| menu that can also edit those options. After clicking
that button, you can click and drag on the image viewer to change to change the contrast
In addition to changing :ref:`contrast` and :ref:`bias` in the :ref:`display-settings`,
Imviz has a |icon-white-to-black| button under the |icon-blink| menu that can also
adjust those values.
After right-clicking on the blink icon, left click on the constrast/bias icon to activate it.
Now you can click and drag on the image viewer to change to change the contrast
and bias. Moving along the X-axis will change the bias and moving along the Y-axis will change the
contrast. If you would like to reset to the default contrast and bias settings, you can
double-click on the display while the mode is active.
Expand All @@ -69,10 +70,10 @@ middle-right side.
Pan/Zoom and Linked Pan/Zoom
============================

Linked pan zoom is an Imviz-specific feature that allows the user to Pan and Zoom
Linked Pan/Zoom is an Imviz-specific feature that allows the user to pan and zoom
images in multiple different viewers simultaneously. This works by matching images
based on the way they are linked together. Images are linked by pixels on load time,
but you can re-link them via WCS using `~jdaviz.configs.imviz.helper.Imviz.link_data`.
but you can re-link them via WCS using :ref:`imviz-link-control`.

Regular Pan/Zoom is also available and is used in a similar way as other Jdaviz tools.

Expand All @@ -81,8 +82,8 @@ location under cursor.

.. seealso::

:ref:`Pan/Zoom <cubeviz-pan-zoom>`
Documentation on using Pan/Zoom in the Jdaviz viewers.
:ref:`image-pan-zoom`
Documentation on using image Pan/Zoom in the Jdaviz viewers.


Display Settings
Expand All @@ -91,4 +92,4 @@ Display Settings
.. seealso::

:ref:`Display Settings <display-settings>`
Documentation on various display settings in the jdaviz viewers.
Documentation on various display settings in the Jdaviz viewers.
2 changes: 1 addition & 1 deletion docs/imviz/plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ via the API unless an interactive region is drawn after.
.. seealso::

:ref:`Subset Tools <specviz-subset-plugin>`
Specviz documentation on the Subset Tools plugin.
Specviz documentation on the Subset Tools plugin.

.. _imviz-link-control:

Expand Down
11 changes: 7 additions & 4 deletions docs/specviz/displaying.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ interest.

Interactive Pan/Zoom (Desktop or Notebook Interface)
----------------------------------------------------
You can find the following Pan/Zoom tools available under the |icon-hammer-and-screwdriver| icon in the viewer toolbar:
You can find the following Pan/Zoom tools available in the viewer toolbar
on the top right of the viewer:

.. _image-pan-zoom:

2D Bidirectional Pan/Zoom
^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -122,16 +125,16 @@ To quickly flip an axis to change to and from ascending/descending, use
Defining Spectral Regions
=========================

Spectral regions can be defined by clicking on the |icon-hammer-and-screwdriver| icon at the right of the
viewer toolbar. Then, click the |icon-region-horiz| icon to set the cursor dragging function in "spectral region selection" mode.
Spectral regions can be defined by clicking on the |icon-region-horiz| icon at the right of the
viewer toolbar.

.. image:: img/spectral_region_1.png

Now, you can move the mouse to one of the end points (in wavelength) of the region you want to select, and drag
it to the other end point. The selected region background will display in light gray color, and the spectral trace
in color, coded to subset number.

You also see in the top tool bar that the region was added to the data hold, and is named "Subset 1".
You also see in the top toolbar that the region was added to the data hold, and is named "Subset 1".

.. image:: img/spectral_region_2.png

Expand Down

0 comments on commit fbb644d

Please sign in to comment.