Skip to content

Commit 9985c3d

Browse files
Read dev docs (#3685)
1 parent 876d9b5 commit 9985c3d

25 files changed

+141
-124
lines changed

docs/cubeviz/displaycubes.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Box Zoom and Linked Box Zoom
6161

6262
.. seealso::
6363

64-
:ref:`Box Zoom and Linked Box Zoom in Imviz <imviz_box_zoom>`
64+
:ref:`Box Zoom and Linked Box Zoom in Imviz <imviz-box-zoom>`
6565
Documentation on panning and zooming in Imviz.
6666

6767
.. _cubeviz-pan-zoom:
@@ -71,19 +71,19 @@ Pan/Zoom and Linked Pan/Zoom
7171

7272
.. seealso::
7373

74-
:ref:`Pan/Zoom and Linked Pan/Zoom in Imviz <imviz_pan_zoom>`
74+
:ref:`Pan/Zoom and Linked Pan/Zoom in Imviz <imviz-pan-zoom>`
7575
Documentation on panning and zooming in Imviz.
7676

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

79-
.. _cubeviz_defining_spatial_regions:
79+
.. _cubeviz-defining-spatial-regions:
8080

8181
Defining Spatial Regions
8282
========================
8383

8484
.. seealso::
8585

86-
:ref:`Defining Spatial Regions <imviz_defining_spatial_regions>`
86+
:ref:`Defining Spatial Regions <imviz-defining-spatial-regions>`
8787
Documentation on defining spatial regions in an image viewer.
8888

8989
Spatial regions allow users to select subsets of the data array for
@@ -109,7 +109,7 @@ alt key (Alt key on Windows, Option key on Mac) while clicking on a spaxel creat
109109
that point instead of moving the previously created region.
110110
You can then compare spectra at different spaxels using the spectrum viewer.
111111
You can also use the subset modes that are explained in the
112-
:ref:`Spatial Regions <imviz_defining_spatial_regions>`
112+
:ref:`Spatial Regions <imviz-defining-spatial-regions>`
113113
section above in the same way you would with the other subset selection tools.
114114

115115
Note that moving the cursor outside of the image viewer or deactivating the spectrum-at-spaxel tool

docs/cubeviz/export_data.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ Exporting Data from Cubeviz
77
After data have been manipulated or analyzed, it is possible to export
88
those data back into your Jupyter notebook.
99

10-
.. _cubeviz_export_regions:
10+
.. _cubeviz-export-regions:
1111

1212
Spatial and Spectral Regions
1313
============================
1414

1515
.. seealso::
1616

17-
:ref:`Export Spatial Regions <imviz_export>`
17+
:ref:`Export Spatial Regions <imviz-export>`
1818
Documentation on how to export spatial regions.
1919

2020
To extract all the subsets created in the viewers, call the Subset Tools plugin:
@@ -101,7 +101,7 @@ All mouseover information in the :ref:`markers plugin <markers-plugin>` can be e
101101
by calling :meth:`~jdaviz.core.template_mixin.TableMixin.export_table` (see :ref:`plugin-apis`).
102102

103103

104-
.. _cubeviz_export_photometry:
104+
.. _cubeviz-export-photometry:
105105

106106
Aperture Photometry
107107
===================
@@ -114,10 +114,10 @@ Cubeviz can export photometry output table like Imviz through the Aperture Photo
114114
115115
.. seealso::
116116

117-
:ref:`Imviz Aperture Photometry <imviz_export_photometry>`
117+
:ref:`Imviz Aperture Photometry <imviz-export-photometry>`
118118
Imviz documentation describing exporting of aperture photometry results in Jdaviz.
119119

120-
In addition to the columns that :ref:`Imviz Aperture Photometry <imviz_export_photometry>` provides,
120+
In addition to the columns that :ref:`Imviz Aperture Photometry <imviz-export-photometry>` provides,
121121
the table from Cubeviz has an extra column after ``data_label`` entitled ``slice_wave`` that stores
122122
the wavelength value at the selected slice of the cube used for computation.
123123
If a 2D data (e.g., collapsed cube) is selected, the value will be NaN.

docs/cubeviz/plugins.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Metadata Viewer
2525

2626
.. seealso::
2727

28-
:ref:`Metadata Viewer <imviz_metadata-viewer>`
28+
:ref:`Metadata Viewer <imviz-metadata-viewer>`
2929
Documentation on using the metadata viewer.
3030

3131
.. _cubeviz-plot-options:

docs/dev/infrastructure.rst

Lines changed: 37 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,22 @@
22
Jdaviz Design and Infrastructure
33
********************************
44

5+
This section outlines the top-level structure of Jdaviz.
6+
57
.. note::
68

79
At the time of writing, Jdaviz was still in heavy development.
810
If you notice that this page has fallen behind, please
911
`report an issue to the Jdaviz GitHub issues <https://github.com/spacetelescope/jdaviz/issues/new>`_.
1012

11-
This section outlines the top-level structure of Jdaviz. At the highest level,
12-
Jdaviz layers different, sometimes changing technologies in the Jupyter platform
13-
to do its visualization, and therefore provides a framework for these technologies
14-
to work together. This document describes that framework, as well as the high-level
15-
sets of components needed for the Jdaviz use cases; it lists the layers of the Jdaviz
16-
framework in essentially the order in which they contact users in a typical
17-
visualization-heavy workflow. An overview of the layers is in this diagram,
18-
and each is described in more details below:
13+
At the highest level, Jdaviz uses different, sometimes changing technologies in
14+
the Jupyter platform to do its visualization, and therefore provides a framework
15+
for these technologies to work together. This document describes that framework,
16+
as well as the high-level sets of components needed for the Jdaviz use cases;
17+
it lists the layers of the Jdaviz framework in approximately the order in which
18+
a user would interact with them in a typical visualization-heavy workflow.
19+
The following diagram presents an overview of the framework's layers, with each being described
20+
in more detail below:
1921

2022
.. figure:: jdaviz.svg
2123
:alt: Jdaviz design and infrastructure chart.
@@ -26,13 +28,19 @@ and each is described in more details below:
2628
visualization libraries involved. The bottom layer consists of low-level
2729
data analysis and I/O libraries.
2830

31+
.. note::
32+
33+
In the diagram above, optional dependencies of Jdaviz have dotted lines.
34+
Optional dependencies are only required for certain Jdaviz
35+
workflows and are not explicitly installed by default when Jdaviz is installed.
36+
2937
Jdaviz: Interfaces and Applications
3038
===================================
3139

3240
Interfaces
3341
----------
3442

35-
"Interfaces" are the tools the user is using to access the analysis tools.
43+
"Interfaces" are the tools employed by the user to access the analysis tools.
3644
The word "platform" might at first seem more applicable, but in this case
3745
all of the interfaces are using Jupyter as the platform, to ensure a
3846
consistent look-and-feel and a single platform for which to target the tools.
@@ -63,8 +71,8 @@ The target interfaces are:
6371
maximum flexibility in embedding.
6472

6573
Each of these interfaces uses a common set of applications implemented in Python
66-
and leveraging ipywidgets_ as the communication layer between Python and the
67-
JavaScript-level layout, rendering, and interactivity libraries. Hence the following
74+
and leverages ipywidgets_ as the communication layer between Python and the
75+
JavaScript-level layout, rendering, and interactivity libraries. Hence, the following
6876
layers are primarily implemented in Python, but utilize tools like ipyvuetify_ and
6977
ipygoldenlayout_ to allow the Python code to interact with the JavaScript
7078
implementations at the interface level.
@@ -84,23 +92,27 @@ applications and individual widgets.
8492

8593
Specific target applications include:
8694

87-
* *Specviz*: A view into a single astronomical spectrum. It provides a UI to
95+
* :ref:`specviz`: A view into a single astronomical spectrum. It provides a UI to
8896
view the spectrum, as well as perform common scientific operations like marking
8997
spectral regions for further analysis (e.g., in a notebook), subtracting continua,
9098
measuring and fitting spectral lines, etc.
91-
* *Mosviz*: A view into many astronomical spectra, typically the output of a
99+
* :ref:`specviz2d`: A view into 2D spectral data. It offers similar capabilities to
100+
*Specviz*, namely that it provides a UI to visualize 2D spectra,
101+
and can perform the same scientific operations on data. In addition to these, Specviz2D
102+
can also extract 1D spectra from a selected region of the 2D spectrum.
103+
* :ref:`mosviz`: A view into many astronomical spectra, typically the output of a
92104
multi-object spectrograph (e.g.,
93105
`JWST NIRSpec <https://jwst.nasa.gov/content/observatory/instruments/nirspec.html>`_).
94-
It provides capabilities for individual spectra like Specviz, but for multiple spectra
106+
It provides capabilities for individual spectra like *Specviz*, but for multiple spectra
95107
at a time along with additional contextual information like on-sky views of the
96108
spectrograph slit.
97-
* *Cubeviz*: A view of spectroscopic data cubes (e.g., from
109+
* :ref:`cubeviz`: A view of spectroscopic data cubes (e.g., from
98110
`JWST MIRI <https://jwst.nasa.gov/content/observatory/instruments/miri.html>`_),
99111
along with 1D spectra extracted from the cube. In addition to common visualization
100112
capabilities like viewing slices or averages in image or wavelength space,
101-
the application will provide some standard manipulations like smoothing, moment maps,
102-
parallelized line fitting, etc.
103-
* *Imviz*: An image-viewer for 2D images leveraging the same machinery as the other
113+
the application also provides the ability to perform smoothing operations and
114+
parallelized line fitting, as well as generate moment maps, etc.
115+
* :ref:`imviz`: An image-viewer for 2D images leveraging the same machinery as the other
104116
applications. While this application is not intended to encapsulate a complete
105117
range of astronomical imaging-based workflows, it enables quick-look style
106118
visualization of images in a way that is compatible with the rest of the Jdaviz framework.
@@ -123,9 +135,10 @@ also provides the interface for registering new functionality (both UI and data/
123135
via glue-core's registries.
124136

125137
Note that most of the application engine implementation belongs in glue-jupyter_
126-
or glue-core, as it is not unique to Jdaviz (or even astronomy). However, Jdaviz has
127-
customized it for specific use cases, though some of the implementations might be moved
128-
upstream as Jdaviz matures, especially if they are useful beyond Jdaviz.
138+
or `glue-core <https://github.com/glue-viz/glue>`_, as it is not unique to Jdaviz
139+
(or even astronomy). However, Jdaviz has customized it for specific use cases,
140+
though some of the implementations might be moved upstream as Jdaviz matures,
141+
especially if they are useful beyond Jdaviz.
129142

130143
Visualization: Component Widgets
131144
================================
@@ -168,9 +181,9 @@ Known component widgets for the target applications include:
168181
and selection of specific rows (to then be highlighted in other viewers or interacted
169182
with in notebook/lab).
170183

171-
In addition to the component widgets above, there are also *plugins* that go with
172-
them to provide the necessary user interactions. Each plugin is specialized to do one
173-
thing, e.g., a "model fitting" plugin to allow users to fit
184+
In addition to the component widgets above, there are also *plugins* (e.g. :ref:`imviz-plugins`)
185+
that go with them to provide the necessary user interactions. Each plugin is specialized to do one
186+
thing, e.g., a :ref:`"model fitting" <specviz-model-fitting>` plugin that allows users to fit
174187
:ref:`astropy models <astropy:astropy-modeling>` to spectra.
175188

176189
Data Analysis and I/O Libraries
@@ -196,13 +209,6 @@ so the list and the diagram above do not fully cover all of Jdaviz's dependencie
196209
but are the primary "top-level" data analysis or I/O libraries that most users are likely
197210
to focus on to complement or extend their Jdaviz workflows.
198211

199-
.. note::
200-
201-
In the diagram above, optional dependencies of Jdaviz have dotted lines.
202-
Optional dependencies mean they are only required for certain Jdaviz
203-
workflows and are not explicitly installed by default when you install Jdaviz.
204-
205-
206212
.. _ipywidgets: https://ipywidgets.readthedocs.io
207213
.. _ipyvuetify: https://github.com/mariobuikhuizen/ipyvuetify
208214
.. _ipygoldenlayout: https://github.com/nmearl/ipygoldenlayout

docs/dev/links.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Linking of datasets in glue
66

77
.. note:: The ``glue`` documentation includes a page about
88
`linking <http://docs.glueviz.org/en/stable/developer_guide/linking.html>`_ but
9-
the present page should be considered a
10-
more up-to-date guide with a focus on links useful to Jdaviz.
9+
the present page is intended to provide a more focused description of the
10+
the linking mechanisms used by Jdaviz.
1111

1212
The 'why' of linking
1313
====================
@@ -84,7 +84,7 @@ in another dataset.
8484
Linking by WCS
8585
==============
8686

87-
There are two main ways of linking by WCS, as follow.
87+
There are two main ways of linking by WCS, as follows.
8888

8989
Using WCSLink (recommended)
9090
---------------------------

docs/dev/release.rst

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ procedure.
5151
You can do a release from your fork directly without a clean code check-out.
5252

5353
1. Ensure `CI on Actions for main <https://github.com/spacetelescope/jdaviz/actions/workflows/ci_workflows.yml?query=branch%3Amain>`_
54-
and `RTD build for latest <https://readthedocs.org/projects/jdaviz/builds/>`_
54+
and `readthedocs (RTD) build for latest <https://readthedocs.org/projects/jdaviz/builds/>`_
5555
are passing.
5656

5757
2. Lock down the ``main`` branch of the repository by setting the
5858
`branch protection <https://github.com/spacetelescope/jdaviz/settings/branches>`_
59-
rule for ``main`` to some high number required to merge, so that more PRs don't
60-
get merged while you're releasing.
59+
rule for ``main`` (note: only available to Jdaviz admins) to some high number
60+
required to merge, so that more PRs don't get merged while you're releasing.
6161

6262
3. Create a new local branch and make sure you have updated tags too. Note
6363
that the "x" here should actually be the letter "x", whereas the upper case "X"
@@ -93,8 +93,9 @@ You can do a release from your fork directly without a clean code check-out.
9393
9494
7. Push the ``vX.Y.x`` branch to upstream.
9595
Make sure the CI passes. If any of the CI fails,
96-
abandon this way. Stop here; do not continue! Otherwise,
97-
go to the next step.
96+
stop here; do not continue! Contact the maintainers
97+
for information on how to proceed.
98+
Otherwise, go to the next step.
9899

99100
8. Go to `Releases on GitHub <https://github.com/spacetelescope/jdaviz/releases>`_
100101
and `create a new GitHub release <https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository>`_
@@ -244,7 +245,7 @@ You can do a release from your fork directly without a clean code check-out.
244245
245246
17. Follow procedures for :ref:`release-milestones` and :ref:`release-labels`.
246247

247-
18. For your own sanity unrelated to the release, grab the new tag for your fork:
248+
18. For your own sanity (unrelated to the release), grab the new tag for your fork:
248249

249250
.. code-block:: bash
250251
@@ -267,12 +268,12 @@ The procedure for a bugfix release is a little different from a feature release
267268
be releasing from an existing release branch, and will also need to do some
268269
cleanup on the ``main`` branch. In the following, X and Y refer to the minor release for
269270
which you're doing a bugfix release. For example, if you are releasing v3.5.2, replace all
270-
instances of ``vX.Y.x`` with ``v3.5.x``.
271+
instances of ``vX.Y.x`` with ``v3.5.x``.
271272

272273
1. Lock down the ``vX.Y.x`` branch of the repository by setting the
273274
`branch protection <https://github.com/spacetelescope/jdaviz/settings/branches>`_
274-
rule for ``v*.x`` to some high number required to merge, so that more PRs don't
275-
get merged while you're releasing.
275+
rule for ``v*.x`` (note: only available to Jdaviz admins) to some high number required to merge,
276+
so that more PRs don't get merged while you're releasing.
276277

277278
2. Review the appropriate `Milestone <https://github.com/spacetelescope/jdaviz/milestones>`_
278279
to see which PRs should be released in this version, and double check that any open
@@ -299,7 +300,8 @@ instances of ``vX.Y.x`` with ``v3.5.x``.
299300
300301
7. Push the ``vX.Y.x`` branch to upstream.
301302
Make sure the CI passes. If any of the CI fails,
302-
abandon this way. Stop here; do not continue! Otherwise,
303+
stop here; do not continue! Contact the maintainers for
304+
information on how to proceed. Otherwise,
303305
go to the next step.
304306

305307
8. Go to `Releases on GitHub <https://github.com/spacetelescope/jdaviz/releases>`_
@@ -368,7 +370,7 @@ instances of ``vX.Y.x`` with ``v3.5.x``.
368370

369371
16. Follow procedures for :ref:`release-milestones`.
370372

371-
17. For your own sanity unrelated to the release, grab the new tag for your fork::
373+
17. For your own sanity (unrelated to the release), grab the new tag for your fork::
372374

373375
git fetch upstream --tags
374376

@@ -381,13 +383,13 @@ Milestones bookkeeping
381383

382384
1. Go to `Milestones <https://github.com/spacetelescope/jdaviz/milestones>`_.
383385

384-
2. Create a new milestone for the next release and the next bugfix release, if
385-
doing a feature release, or for just the next bugfix release if you just did
386-
one. You do not need to fill in the description and due date fields.
386+
2. If you are doing a bugfix release, create a new milestone for the next bugfix release.
387+
If you are doing a feature release, create a new milestone for **both**
388+
feature and bugfix releases.
389+
You do not need to fill in the description and due date fields.
387390

388-
3. For the milestone of this release, if there are any open issues or pull requests
389-
still milestoned to it, move their milestones to the next feature or bugfix
390-
milestone as appropriate.
391+
3. If there are any open issues or pull requests still attached to the current release,
392+
move their milestones to the next feature or bugfix milestone as appropriate.
391393

392394
4. Make sure the milestone of this release ends up with "0 open" and then close it.
393395

docs/dev/specviz_selection.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ Specviz Selections
55
This section explains the working theory behind the selection tool and was inspired by
66
the the introduction of two methods to the Specviz helper:
77

8-
* ``specviz.get_spectra()``
9-
* ``specviz.get_spectral_regions()``
8+
* `~jdaviz.configs.specviz.helper.Specviz.get_spectra()`
9+
* `~jdaviz.configs.specviz.helper.Specviz.get_spectral_regions()` (deprecated as of v4.1 in favor of
10+
`~jdaviz.configs.default.plugins.subset_tools.subset_tools.SubsetTools.get_regions()`)
1011

1112
Data loaded in are imported into Jdaviz and immediately converted into a
1213
``specutils.SpectralRegion`` object. These are a spectral analog to the Astropy ``regions``
@@ -18,6 +19,7 @@ This is defined by the underlying ``glue`` library upon which Jdaviz relies on a
1819
"glue subset." Thus throughout the software documentation, we will refer to these
1920
user defined ranges as "subsets." Effectively, the selection tool defines a mask that
2021
can be thought of as "definition" of which data is and is not included in the subset.
21-
Upon extraction via ``specviz.get_spectral_regions()``, the method will return a new
22-
``specutils.SpectralRegion`` object that applies that mask atop of the proper region
23-
(data) displayed, and realizes the subset the user defined in Jdaviz.
22+
Upon extraction via `~jdaviz.configs.default.plugins.subset_tools.subset_tools.SubsetTools.get_regions()`,
23+
the method will return a new ``specutils.SpectralRegion`` object that applies that
24+
mask atop of the proper region (data) displayed, and realizes the subset the user
25+
defined in Jdaviz.

0 commit comments

Comments
 (0)