Skip to content

Commit

Permalink
add base profile viewer class
Browse files Browse the repository at this point in the history
  • Loading branch information
bmorris3 committed Jul 30, 2024
1 parent 407915a commit 7e4f6b6
Show file tree
Hide file tree
Showing 9 changed files with 499 additions and 399 deletions.
9 changes: 6 additions & 3 deletions jdaviz/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@

# Top-level API as exposed to users.
from jdaviz.app import * # noqa: F401, F403
from jdaviz.configs.specviz import Specviz # noqa: F401
from jdaviz.configs.specviz2d import Specviz2d # noqa: F401
from jdaviz.configs.mosviz import Mosviz # noqa: F401

from jdaviz.configs.cubeviz import Cubeviz # noqa: F401
from jdaviz.configs.imviz import Imviz # noqa: F401
from jdaviz.configs.mosviz import Mosviz # noqa: F401
from jdaviz.configs.rampviz import Rampviz # noqa: F401
from jdaviz.configs.specviz import Specviz # noqa: F401
from jdaviz.configs.specviz2d import Specviz2d # noqa: F401

from jdaviz.utils import enable_hot_reloading # noqa: F401
from jdaviz.core.launcher import open # noqa: F401

Expand Down
7 changes: 4 additions & 3 deletions jdaviz/configs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from .cubeviz import * # noqa
from .specviz import * # noqa
from .specviz2d import * # noqa
from .default import * # noqa
from .mosviz import * # noqa
from .imviz import * # noqa
from .mosviz import * # noqa
from .rampviz import * # noqa
from .specviz import * # noqa
from .specviz2d import * # noqa
424 changes: 422 additions & 2 deletions jdaviz/configs/default/plugins/viewers.py

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions jdaviz/configs/rampviz/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from .plugins import * # noqa
from .helper import Rampviz # noqa
Empty file.
23 changes: 23 additions & 0 deletions jdaviz/configs/rampviz/plugins/viewers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from astropy.nddata import NDDataArray

from jdaviz.core.registries import viewer_registry
from jdaviz.core.freezable_state import FreezableProfileViewerState
from jdaviz.configs.default.plugins.viewers import JdavizProfileView

__all__ = ['RampvizProfileView']


@viewer_registry("rampviz-profile-viewer", label="Profile 1D (Rampviz)")
class RampvizProfileView(JdavizProfileView):
# categories: zoom resets, zoom, pan, subset, select tools, shortcuts
tools_nested = [
['jdaviz:homezoom', 'jdaviz:prevzoom'],
['jdaviz:boxzoom', 'jdaviz:xrangezoom', 'jdaviz:yrangezoom'],
['jdaviz:panzoom', 'jdaviz:panzoom_x', 'jdaviz:panzoom_y'],
['bqplot:xrange'],
['jdaviz:sidebar_plot', 'jdaviz:sidebar_export']
]

default_class = NDDataArray
_state_cls = FreezableProfileViewerState
_default_profile_subset_type = 'temporal'
Loading

0 comments on commit 7e4f6b6

Please sign in to comment.