Skip to content

Commit 6e8e66b

Browse files
authored
Merge pull request #57 from mwcraig/add-gui-effects-to-docstrings
Describe GUI behavior
2 parents 6c512c9 + 48a205d commit 6e8e66b

File tree

1 file changed

+68
-6
lines changed

1 file changed

+68
-6
lines changed

src/astro_image_display_api/interface_definition.py

Lines changed: 68 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ def load_image(self, data: Any, image_label: str | None = None) -> None:
4242
4343
Notes
4444
-----
45-
Loading an image should also set the viewport for that image.
45+
46+
Loading an image should also set an appropriate viewport for that image.
4647
"""
4748
raise NotImplementedError
4849

@@ -76,6 +77,11 @@ def set_cuts(
7677
ValueError
7778
If the ``image_label`` is not provided when there are multiple images loaded,
7879
or if the ``image_label`` does not correspond to a loaded image.
80+
81+
Notes
82+
-----
83+
Setting cuts should update the display of the image to reflect the new
84+
cuts.
7985
"""
8086
raise NotImplementedError
8187

@@ -101,6 +107,10 @@ def get_cuts(self, image_label: str | None = None) -> BaseInterval:
101107
ValueError
102108
If the ``image_label`` is not provided when there are multiple images loaded,
103109
or if the ``image_label`` does not correspond to a loaded image.
110+
111+
Notes
112+
-----
113+
This has no effect on the displayed image.
104114
"""
105115
raise NotImplementedError
106116

@@ -127,6 +137,11 @@ def set_stretch(self, stretch: BaseStretch, image_label: str | None = None) -> N
127137
ValueError
128138
If the ``image_label`` is not provided when there are multiple images loaded
129139
or if the ``image_label`` does not correspond to a loaded image.
140+
141+
Notes
142+
-----
143+
Setting the stretch should update the display of the image to reflect the new
144+
stretch.
130145
"""
131146
raise NotImplementedError
132147

@@ -146,6 +161,10 @@ def get_stretch(self, image_label: str | None = None) -> BaseStretch:
146161
-------
147162
stretch : `~astropy.visualization.BaseStretch`
148163
The Astropy stretch object representing the current stretch.
164+
165+
Notes
166+
-----
167+
This has no effect on the displayed image.
149168
"""
150169
raise NotImplementedError
151170

@@ -171,6 +190,12 @@ def set_colormap(self, map_name: str, image_label: str | None = None) -> None:
171190
ValueError
172191
If the ``map_name`` is not a valid colormap name or if the ``image_label``
173192
is not provided when there are multiple images loaded.
193+
194+
Notes
195+
-----
196+
This should update the display of the image to reflect the new colormap.
197+
198+
.. _Matplotlib: https://matplotlib.org/stable/gallery/color/colormap_reference.html
174199
"""
175200
raise NotImplementedError
176201

@@ -196,6 +221,10 @@ def get_colormap(self, image_label: str | None = None) -> str:
196221
ValueError
197222
If the ``image_label`` is not provided when there are multiple images loaded
198223
or if the ``image_label`` does not correspond to a loaded image.
224+
225+
Notes
226+
-----
227+
This has no effect on the displayed image.
199228
"""
200229
raise NotImplementedError
201230

@@ -219,6 +248,10 @@ def save(self, filename: str | os.PathLike, overwrite: bool = False) -> None:
219248
------
220249
FileExistsError
221250
If the file already exists and ``overwrite`` is `False`.
251+
252+
Notes
253+
-----
254+
This has no effect on the displayed image.
222255
"""
223256
raise NotImplementedError
224257

@@ -267,6 +300,11 @@ def load_catalog(
267300
If the ``table`` does not contain the required columns, or if
268301
the ``catalog_label`` is not provided when there are multiple
269302
catalogs loaded.
303+
304+
Notes
305+
-----
306+
This should display the markers on the image in addition to storing
307+
the marker positions in the viewer.
270308
"""
271309
raise NotImplementedError
272310

@@ -296,17 +334,20 @@ def set_catalog_style(
296334
**kwargs
297335
Additional keyword arguments to pass to the marker style.
298336
299-
Note
300-
----
301-
The following shapes are supported: "circle", "square", "crosshair", "plus",
302-
"diamond".
303-
304337
Raises
305338
------
306339
ValueError
307340
If there are multiple catalog styles set and the user has not
308341
specified a ``catalog_label`` for which to set the style, or if
309342
an style is set for a catalog that does not exist.
343+
344+
Notes
345+
-----
346+
The following shapes are supported: "circle", "square", "crosshair", "plus",
347+
"diamond".
348+
349+
Changing the style of the markers should update the display of the
350+
markers in the image.
310351
"""
311352
raise NotImplementedError
312353

@@ -336,6 +377,10 @@ def get_catalog_style(self, catalog_label: str | None = None) -> dict:
336377
If there are multiple catalog styles set and the user has not
337378
specified a ``catalog_label`` for which to get the style.
338379
380+
Notes
381+
-----
382+
This has no effect on the displayed image.
383+
339384
"""
340385
raise NotImplementedError
341386

@@ -400,6 +445,10 @@ def get_catalog(
400445
ValueError
401446
If the ``catalog_label`` is not provided when there are multiple catalogs
402447
loaded.
448+
449+
Notes
450+
-----
451+
This has no effect on the displayed image.
403452
"""
404453
raise NotImplementedError
405454

@@ -412,6 +461,10 @@ def get_catalog_names(self) -> list[str]:
412461
-------
413462
list of str
414463
The names of the loaded catalogs.
464+
465+
Notes
466+
-----
467+
This has no effect on the displayed image.
415468
"""
416469
raise NotImplementedError
417470

@@ -453,6 +506,11 @@ def set_viewport(
453506
454507
`astropy.units.UnitTypeError`
455508
If the ``fov`` is a `~astropy.units.Quantity` but does not have an angular unit.
509+
510+
Notes
511+
-----
512+
Setting the viewport should update the display of the image to reflect the new
513+
viewport.
456514
"""
457515
raise NotImplementedError
458516

@@ -491,5 +549,9 @@ def get_viewport(
491549
If the ``sky_or_pixel`` parameter is not one of 'sky', 'pixel', or `None`,
492550
or if the ``image_label`` is not provided when there are multiple images
493551
loaded, or if the ``image_label`` does not correspond to a loaded image.
552+
553+
Notes
554+
-----
555+
This has no effect on the displayed image.
494556
"""
495557
raise NotImplementedError

0 commit comments

Comments
 (0)