Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display units (unit conversion refactor) #2127

Merged
merged 51 commits into from
Jun 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
a51eb0e
Added .ico and .svg files
Dec 9, 2022
0a39808
app-wide display unit in specviz (#2048)
pllim Apr 4, 2023
81bd3c9
bump glue-core to necessary version for display units
kecnry Apr 5, 2023
efc5fd7
change PR number in changelog to main PR
kecnry Apr 4, 2023
c267347
Display units line analysis (#2128)
kecnry Apr 5, 2023
9db4468
cubeviz/slice plugin unit conversion support
kecnry Apr 5, 2023
63ddd82
Display units support for markers plugin (#2130)
kecnry Apr 11, 2023
e19b25c
display units: fix failing tests (#2132)
kecnry Apr 13, 2023
9e364bc
Display units: line lists (#2148)
kecnry Apr 17, 2023
b9de21e
remove unit conversion plugin from all bug specviz
kecnry May 4, 2023
d942d09
get_display_unit fallback for configs without unit conversion plugin
kecnry May 4, 2023
bff781b
Update glue-core dependency
rosteen May 15, 2023
15e755d
Update Subset Tools plugin to use display units (#2195)
rosteen May 16, 2023
2b2b6c3
allow downstream apps to set what classes are considered native marks
kecnry May 26, 2023
2535c87
Fix unit conversion for PluginMarks and y-limits (#2215)
rosteen May 26, 2023
9d3c64e
Merge branch 'main' into dev-display-units-main-merge
kecnry May 30, 2023
d86fd9a
Replace subset_to_apply in docs where possible (#2223)
javerbukh May 30, 2023
ccbe546
Replace subset_to_apply in docs where possible (#2223)
javerbukh May 30, 2023
75d542e
Avoid trying to convert units of empty marks arrays
rosteen May 30, 2023
a937636
Add open method to automatically detect config and load data
duytnguyendtn May 26, 2023
cc513b3
Update demo notebooks
duytnguyendtn May 26, 2023
9b4d335
Codestyle
duytnguyendtn May 26, 2023
66c7f1a
Add autoconfig test coverage
duytnguyendtn May 30, 2023
1fb46da
Revert "Update demo notebooks"
duytnguyendtn May 31, 2023
73163b2
Add mention of open to relevant example notebooks
duytnguyendtn May 31, 2023
1bd26f4
Prepare to support open via cli
duytnguyendtn May 31, 2023
f6ca9e8
Remove the need to open file twice for autoconfig detection
duytnguyendtn May 31, 2023
c85dbd5
Fix Helper vs App Docstring
duytnguyendtn May 31, 2023
8169a6d
TST: Change PIP_EXTRA_INDEX_URL
pllim Jun 1, 2023
bd488f8
Merge pull request #2231 from pllim/scientific-python-nightlies
kecnry Jun 1, 2023
f5a56b0
Merge pull request #2226 from kecnry/downstream-native-marks
kecnry Jun 1, 2023
7af857e
Display units: model fitting (#2216)
kecnry Jun 1, 2023
3caae35
Add clarity for kwargs
duytnguyendtn Jun 1, 2023
1c5a8c1
plugin results: support overwriting when data loaded in multiple view…
kecnry Jun 1, 2023
a9151a4
reverts removal of call to set_plot_axes when loading data into viewe…
kecnry Jun 2, 2023
956b9c4
Subsume failing identifier test into autoconfig test
duytnguyendtn Jun 2, 2023
56fb20e
Update subset plugin UI (#2234)
javerbukh Jun 2, 2023
61e6ef9
Changelog
duytnguyendtn Jun 2, 2023
2a35e27
Add docs page to explain how to create jdaviz-readable products (#2228)
camipacifici Jun 5, 2023
7ffaa26
Merge pull request #2221 from duytnguyendtn/open
duytnguyendtn Jun 5, 2023
beb45e0
FEAT: Load annulus from file
pllim May 12, 2023
e0a1fd6
disallow gaussian smooth output as input
kecnry Jun 6, 2023
62948ba
Merge pull request #2239 from kecnry/dataset-plugin-filter
pllim Jun 7, 2023
f530f52
BUG: Fix ellipse translation
pllim Jun 7, 2023
c421b5e
Merge pull request #2244 from pllim/ellipse-quick-fix
pllim Jun 7, 2023
28395a2
Merge pull request #2201 from pllim/annulus-eclipse-of-my-heart
pllim Jun 7, 2023
4cf39b7
Merge pull request #1912 from Jenneh/icoIcons
pllim Jun 8, 2023
ba01f97
DOC: Use pydata-sphinx-theme (#2243)
pllim Jun 8, 2023
2093786
Add app method to simplify spectral subset (#2237)
javerbukh Jun 8, 2023
05bc853
Fix conflicts with main
rosteen Jun 13, 2023
35dfc58
Fix missed conflict
rosteen Jun 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
version: 2

build:
os: ubuntu-20.04
os: ubuntu-22.04
apt_packages:
- graphviz
tools:
python: "3.9"
python: "3.11"
jobs:
post_checkout:
# Use `git log` to check if the latest commit contains "skip rtd" or "rtd skip",
Expand Down
19 changes: 19 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,22 @@
New Features
------------

- Introduce jdaviz.open to automatically detect the appropriate config and load data [#2221]

- Add Simplify button to subset plugin to make composite spectral subsets more user
friendly. [#2237]

Cubeviz
^^^^^^^

Imviz
^^^^^

- Added the ability to load DS9 region files (``.reg``) using the ``IMPORT DATA``
button. However, this only works after loading at least one image into Imviz. [#2201]

- Added support for new ``CircularAnnulusROI`` subset from glue. [#2201]

Mosviz
^^^^^^

Expand All @@ -22,6 +32,8 @@ Specviz2d
API Changes
-----------

- Subset Plugin now respects the chosen display unit after using Unit Conversion. [#2195]

kecnry marked this conversation as resolved.
Show resolved Hide resolved
Cubeviz
^^^^^^^

Expand All @@ -34,12 +46,16 @@ Mosviz
Specviz
^^^^^^^

* Re-enabled unit conversion support. [#2127]

Specviz2d
^^^^^^^^^

Bug Fixes
---------

- Fixed wrong elliptical region translation in ``app.get_subsets()``. [#2244]

Cubeviz
^^^^^^^

Expand All @@ -58,6 +74,9 @@ Specviz2d
Other Changes and Additions
---------------------------

- Gaussian smooth plugin excludes results from the gaussian smooth plugin from the input
dataset dropdown. [#2239]

3.5.1 (unreleased)
==================

Expand Down
74 changes: 74 additions & 0 deletions docs/_static/jdaviz.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
/* Main page overview cards */

.sd-card {
background: #fff;
border-radius: 0;
padding: 30px 10px 20px 10px;
margin: 10px 0px;
}

.sd-card .sd-card-header {
text-align: center;
}

.sd-card .sd-card-header .sd-card-text {
margin: 0px;
}

.sd-card .sd-card-img-top {
height: 52px;
width: 52px;
margin-left: auto;
margin-right: auto;
}

.sd-card .sd-card-header {
border: none;
background-color: white;
color: #150458 !important;
font-size: var(--pst-font-size-h5);
font-weight: bold;
padding: 2.5rem 0rem 0.5rem 0rem;
}

.sd-card .sd-card-footer {
border: none;
background-color: white;
}

.sd-card .sd-card-footer .sd-card-text {
max-width: 220px;
margin-left: auto;
margin-right: auto;
}

/* Dark theme tweaking */
html[data-theme=dark] .sd-card img[src*='.svg'] {
filter: invert(0.82) brightness(0.8) contrast(1.2);
}

/* Main index page overview cards */
html[data-theme=dark] .sd-card {
background-color:var(--pst-color-background);
}

html[data-theme=dark] .sd-shadow-sm {
box-shadow: 0 .1rem 1rem rgba(250, 250, 250, .6) !important
}

html[data-theme=dark] .sd-card .sd-card-header {
background-color:var(--pst-color-background);
color: #150458 !important;
}

html[data-theme=dark] .sd-card .sd-card-footer {
background-color:var(--pst-color-background);
}

html[data-theme=dark] h1 {
color: var(--pst-color-primary);
}

html[data-theme=dark] h3 {
color: #0a6774;
}
101 changes: 49 additions & 52 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,42 +25,32 @@
# Thus, any C-extensions that are needed to build the documentation will *not*
# be accessible, and the documentation will not build correctly.

import os
import sys
import datetime
import importlib.metadata as importlib_metadata

from pathlib import Path

if sys.version_info < (3, 11):
import tomli as tomllib
else:
import tomllib
from jdaviz import __version__

try:
from sphinx_astropy.conf.v1 import * # noqa
from sphinx_astropy.conf.v2 import * # noqa
except ImportError:
print('ERROR: the documentation requires the sphinx-astropy package to be installed')
sys.exit(1)

with open(Path(__file__).parent.parent / "pyproject.toml", "rb") as configuration_file:
metadata = tomllib.load(configuration_file)

# -- General configuration ----------------------------------------------------

# By default, highlight as Python 3.
highlight_language = 'python3'

# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.2'
# needs_sphinx = '1.2'

# To perform a Sphinx version check that needs to be more specific than
# major.minor, call `check_sphinx_version("x.y.z")` here.
# check_sphinx_version("1.2.1")

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns.append('_templates')
exclude_patterns.append('_templates') # noqa: F405

# This is added to the end of RST files - a good place to put substitutions to
# be used globally.
Expand Down Expand Up @@ -134,13 +124,13 @@
.. |icon-viewer-data-select| image:: /img/icons/viewer_data_select.png
:scale: 30
:alt: data select icon
"""
""" # noqa: F405

# -- Project information ------------------------------------------------------

# This does not *have* to match the package name, but typically does
project = metadata['project']['name']
author = metadata['project']['authors'][0]['name']
project = "jdaviz"
author = "JDADF Developers"
copyright = '{0}, {1}'.format(
datetime.datetime.now().year, author)

Expand All @@ -149,15 +139,15 @@
# built documents.

# The full version, including alpha/beta/rc tags.
release = importlib_metadata.version(project)
release = __version__
dev = "dev" in release
# The short X.Y version.
version = '.'.join(release.split('.')[:2])

extensions += ['sphinx.ext.extlinks']
extensions += ['sphinx.ext.extlinks', 'sphinx_design'] # noqa: F405
gh_tag = f'v{release}' if '.dev' not in release else 'main'
extlinks = {'gh-tree': (f'https://github.com/spacetelescope/jdaviz/tree/{gh_tag}/%s', '%s'),
'gh-notebook': (f'https://github.com/spacetelescope/jdaviz/blob/{gh_tag}/notebooks/%s.ipynb',
'%s notebook')}
'gh-notebook': (f'https://github.com/spacetelescope/jdaviz/blob/{gh_tag}/notebooks/%s.ipynb', '%s notebook')} # noqa: E501

# -- Options for HTML output --------------------------------------------------

Expand All @@ -168,33 +158,54 @@
# variables set in the global configuration. The variables set in the
# global configuration are listed below, commented out.

html_css_files = ["jdaviz.css"]
html_copy_source = False

html_theme_options.update( # noqa: F405
{
"github_url": "https://github.com/spacetelescope/jdaviz",
"external_links": [
{"name": "Help Desk", "url": "http://jwsthelp.stsci.edu/"},
],
"use_edit_page_button": True,
}
)

html_context = {
"default_mode": "light",
"to_be_indexed": ["stable", "latest"],
"is_development": dev,
"github_user": "spacetelescope",
"github_repo": "jdaviz",
"github_version": "main",
"doc_path": "docs",
}

# Add any paths that contain custom themes here, relative to this directory.
# To use a different custom theme, add the directory containing the theme.
#html_theme_path = []
# html_theme_path = []

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes. To override the custom theme, set this to the
# name of a builtin theme or the name of a custom theme in html_theme_path.
#html_theme = None

html_theme = "sphinx_rtd_theme"
# html_theme = "sphinx_rtd_theme"

# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# html_sidebars = {}

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = ''
html_logo = 'logos/jdaviz.svg'

# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = ''
html_favicon = 'logos/specviz2d.ico'

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = ''
# html_last_updated_fmt = ''

# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
Expand All @@ -220,21 +231,6 @@
[author], 1)]


# -- Options for the edit_on_github extension ---------------------------------

if metadata['tool']['build_sphinx']['edit_on_github']:

extensions += ['sphinx_astropy.ext.edit_on_github']

edit_on_github_project = metadata['tool']['build_sphinx']['github_project']
edit_on_github_branch = "main"

edit_on_github_source_root = ""
edit_on_github_doc_root = "docs"

# -- Resolving issue number to links in changelog -----------------------------
github_issues_url = 'https://github.com/{0}/issues/'.format(metadata['tool']['build_sphinx']['github_project'])

# -- Turn on nitpicky mode for sphinx (to warn about references not found) ----
nitpicky = True

Expand Down Expand Up @@ -263,15 +259,16 @@
nitpick_ignore.append((dtype, target))

# Extra intersphinx in addition to what is already in sphinx-astropy
intersphinx_mapping['glue'] = ('http://docs.glueviz.org/en/stable/', None)
intersphinx_mapping['glue_jupyter'] = ('https://glue-jupyter.readthedocs.io/en/stable/', None)
intersphinx_mapping['regions'] = ('https://astropy-regions.readthedocs.io/en/stable/', None)
intersphinx_mapping['skimage'] = ('https://scikit-image.org/docs/stable/', None)
intersphinx_mapping['specutils'] = ('https://specutils.readthedocs.io/en/stable/', None)
intersphinx_mapping['specreduce'] = ('https://specreduce.readthedocs.io/en/stable/', None)
intersphinx_mapping['photutils'] = ('https://photutils.readthedocs.io/en/stable/', None)
intersphinx_mapping['traitlets'] = ('https://traitlets.readthedocs.io/en/stable/', None)
intersphinx_mapping['roman_datamodels'] = ('https://roman-datamodels.readthedocs.io/en/stable/', None)
intersphinx_mapping.update({ # noqa: F405
'glue': ('http://docs.glueviz.org/en/stable/', None),
'glue_jupyter': ('https://glue-jupyter.readthedocs.io/en/stable/', None),
'photutils': ('https://photutils.readthedocs.io/en/stable/', None),
'regions': ('https://astropy-regions.readthedocs.io/en/stable/', None),
'roman_datamodels': ('https://roman-datamodels.readthedocs.io/en/stable/', None),
'skimage': ('https://scikit-image.org/docs/stable/', None),
'specreduce': ('https://specreduce.readthedocs.io/en/stable/', None),
'specutils': ('https://specutils.readthedocs.io/en/stable/', None),
'traitlets': ('https://traitlets.readthedocs.io/en/stable/', None)})

# Options for linkcheck
linkcheck_ignore = ['https://github.com/spacetelescope/jdaviz/settings/branches']
Loading