File tree 2 files changed +41
-0
lines changed
2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ """Module containing ``astrowidgets`` implemented with ``glue-jupyter``
2
+ (that uses ``bqplot``) backend.
3
+
4
+ For this to work, ``astrowidgets`` must be installed along with the optional
5
+ dependencies specified for the ``glue-jupyter`` (a.k.a. Glupyter or
6
+ ``glupyter``) backend; e.g.,::
7
+
8
+ pip install 'astrowidgets[glupyter]'
9
+
10
+ """
11
+ from glue_jupyter import jglue
12
+
13
+ from astrowidgets .core import BaseImageWidget
14
+
15
+ __all__ = ['ImageWidget' ]
16
+
17
+
18
+ class ImageWidget (BaseImageWidget ):
19
+ """Image widget for Jupyter notebook using ``glue-jupyter``/``bqplot``
20
+ viewer.
21
+
22
+ Parameters
23
+ ----------
24
+ kwargs : dict
25
+ See `~astrowidgets.core.BaseImageWidget`.
26
+
27
+ """
28
+ def __init__ (self , ** kwargs ):
29
+ super ().__init__ (** kwargs )
30
+
31
+ self ._app = jglue ()
32
+ self ._viewer = self ._app .imshow ()
33
+
34
+ # UNTIL HERE -- imshow errors out without data
35
+ # TODO: This builds on PR 126. Example notebook in test_data/ztmp...
36
+
37
+ @property
38
+ def viewer (self ):
39
+ self ._viewer
Original file line number Diff line number Diff line change @@ -45,6 +45,8 @@ ginga =
45
45
ginga
46
46
pillow
47
47
aggdraw
48
+ glupyter =
49
+ glue-jupyter
48
50
test =
49
51
pytest-astropy
50
52
pytest-cov
You can’t perform that action at this time.
0 commit comments