Skip to content

Commit bd983c8

Browse files
committed
Describe GUI behavior
1 parent d427a23 commit bd983c8

File tree

1 file changed

+66
-6
lines changed

1 file changed

+66
-6
lines changed

src/astro_image_display_api/interface_definition.py

Lines changed: 66 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

@@ -172,6 +191,10 @@ def set_colormap(self, map_name: str, image_label: str | None = None) -> None:
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.
174193
194+
Notes
195+
-----
196+
This should update the display of the image to reflect the new colormap.
197+
175198
.. _Matplotlib: https://matplotlib.org/stable/gallery/color/colormap_reference.html
176199
"""
177200
raise NotImplementedError
@@ -198,6 +221,10 @@ def get_colormap(self, image_label: str | None = None) -> str:
198221
ValueError
199222
If the `image_label` is not provided when there are multiple images loaded
200223
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.
201228
"""
202229
raise NotImplementedError
203230

@@ -221,6 +248,10 @@ def save(self, filename: str | os.PathLike, overwrite: bool = False) -> None:
221248
------
222249
FileExistsError
223250
If the file already exists and `overwrite` is `False`.
251+
252+
Notes
253+
-----
254+
This has no effect on the displayed image.
224255
"""
225256
raise NotImplementedError
226257

@@ -269,6 +300,11 @@ def load_catalog(
269300
If the `table` does not contain the required columns, or if
270301
the `catalog_label` is not provided when there are multiple
271302
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.
272308
"""
273309
raise NotImplementedError
274310

@@ -298,17 +334,20 @@ def set_catalog_style(
298334
**kwargs
299335
Additional keyword arguments to pass to the marker style.
300336
301-
Notes
302-
-----
303-
The following shapes are supported: "circle", "square", "crosshair", "plus",
304-
"diamond".
305-
306337
Raises
307338
------
308339
ValueError
309340
If there are multiple catalog styles set and the user has not
310341
specified a `catalog_label` for which to set the style, or if
311342
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.
312351
"""
313352
raise NotImplementedError
314353

@@ -338,6 +377,10 @@ def get_catalog_style(self, catalog_label: str | None = None) -> dict:
338377
If there are multiple catalog styles set and the user has not
339378
specified a `catalog_label` for which to get the style.
340379
380+
Notes
381+
-----
382+
This has no effect on the displayed image.
383+
341384
"""
342385
raise NotImplementedError
343386

@@ -402,6 +445,10 @@ def get_catalog(
402445
ValueError
403446
If the `catalog_label` is not provided when there are multiple catalogs
404447
loaded.
448+
449+
Notes
450+
-----
451+
This has no effect on the displayed image.
405452
"""
406453
raise NotImplementedError
407454

@@ -414,6 +461,10 @@ def get_catalog_names(self) -> list[str]:
414461
-------
415462
list of str
416463
The names of the loaded catalogs.
464+
465+
Notes
466+
-----
467+
This has no effect on the displayed image.
417468
"""
418469
raise NotImplementedError
419470

@@ -455,6 +506,11 @@ def set_viewport(
455506
456507
`astropy.units.UnitTypeError`
457508
If the `fov` is a `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.
458514
"""
459515
raise NotImplementedError
460516

@@ -493,5 +549,9 @@ def get_viewport(
493549
If the `sky_or_pixel` parameter is not one of 'sky', 'pixel', or `None`,
494550
or if the `image_label` is not provided when there are multiple images
495551
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.
496556
"""
497557
raise NotImplementedError

0 commit comments

Comments
 (0)