Skip to content

Commit

Permalink
Jdaviz Subset Theory Docs (spacetelescope#207)
Browse files Browse the repository at this point in the history
Describes Jdaviz's working theory behind subset and region language
  • Loading branch information
duytnguyendtn authored Aug 3, 2020
1 parent 6d9a65a commit 077f131
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,6 @@ pip-wheel-metadata

# Mac OSX
.DS_Store

# Environments
/env*
13 changes: 12 additions & 1 deletion docs/dev/infrastructure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Known component widgets for the target applications include:
Libraries
=========

The above layers are focused primaril on visualization. All actual *operations* and analysis tasks to be applied to visualized data sets are to be implemented in the various Python libraries aimed at these astronomical datasets. It is important to note that these libraries are *independent* efforts from jdaviz, and can therefore be used in whole, part, or not at all with the jdaviz tools. This allows a full range of workflows, while also maintaining transparency to scientific users exactly how an operation in the jdaviz tools actually works. I.e., they can at any time simply use the library directly instead of accessing it through jdaviz. Known libraries include:
The above layers are focused primarily on visualization. All actual *operations* and analysis tasks to be applied to visualized data sets are to be implemented in the various Python libraries aimed at these astronomical datasets. It is important to note that these libraries are *independent* efforts from jdaviz, and can therefore be used in whole, part, or not at all with the jdaviz tools. This allows a full range of workflows, while also maintaining transparency to scientific users exactly how an operation in the jdaviz tools actually works. I.e., they can at any time simply use the library directly instead of accessing it through jdaviz. Known libraries include:

* astropy_
* `specutils <https://specutils.readthedocs.io>`_
Expand All @@ -66,6 +66,17 @@ The above layers are focused primaril on visualization. All actual *operations*

Note that those libraries themselve depend on the wider scientific Python ecosystem, so this is by no means a comprehensive list of the libraries jdaviz depends on. But these are the primary "top-level" libraries, meaning it is these that most users are likely to focus on to parallel or extend their jdaviz workflows.


Selections
==========

This section explains the working theory behind the selection tool and was inspired by the the introduction of two methods to the SpecViz helper:
`specviz.get_spectra()` and `specviz.get_spectral_regions()`

Data loaded in are imported into jdaviz and immediately converted into a `specutils.SpectralRegion`. These are a spectral analog to the Astropy `regions` (which instead focuses on spatial regions and their associated WCS). These spectral regions are returned by the `specviz.get_spectra()` method.

The selection tool allows the user to specify a specific range on the graph. This is defined by the underlying Glue Library upon which jdaviz relies on as a "Glue Subset." Thus throughout this section, we will refer to these user defined ranges as "subsets." Effectively, the selection tool defines a mask that can be thought of as "definition" of which data is and is not included in the subset. Upon extraction via `specviz.get_spectral_regions()`, the method will return a new `specutils.SpectralRegion` object that applies that mask atop of the proper region (data) displayed, and realizes the subset the user defined in jdaviz.

Related Documents
=================

Expand Down

0 comments on commit 077f131

Please sign in to comment.