Skip to content

Commit 32e2976

Browse files
committed
DOC: Fix broken ref in interface_definition.py
1 parent 582bf77 commit 32e2976

File tree

1 file changed

+32
-32
lines changed

1 file changed

+32
-32
lines changed

src/astro_image_display_api/interface_definition.py

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ def load_image(self, data: Any, image_label: str | None = None) -> None:
2929
"""
3030
Load data into the viewer. At a minimum, this should allow a FITS file
3131
to be loaded. Viewers may allow additional data types to be loaded, such as
32-
2D arrays or `astropy.nddata.NDData` objects.
32+
2D arrays or `~astropy.nddata.NDData` objects.
3333
3434
Parameters
3535
----------
3636
data :
3737
The data to load. This can be a FITS file, a 2D array,
38-
or an `astropy.nddata.NDData` object.
38+
or an `~astropy.nddata.NDData` object.
3939
4040
image_label : optional
4141
The label for the image.
@@ -74,8 +74,8 @@ def set_cuts(
7474
`astropy.visualization.BaseInterval` object.
7575
7676
ValueError
77-
If the `image_label` is not provided when there are multiple images loaded,
78-
or if the `image_label` does not correspond to a loaded image.
77+
If the ``image_label`` is not provided when there are multiple images loaded,
78+
or if the ``image_label`` does not correspond to a loaded image.
7979
"""
8080
raise NotImplementedError
8181

@@ -99,8 +99,8 @@ def get_cuts(self, image_label: str | None = None) -> BaseInterval:
9999
Raises
100100
------
101101
ValueError
102-
If the `image_label` is not provided when there are multiple images loaded,
103-
or if the `image_label` does not correspond to a loaded image.
102+
If the ``image_label`` is not provided when there are multiple images loaded,
103+
or if the ``image_label`` does not correspond to a loaded image.
104104
"""
105105
raise NotImplementedError
106106

@@ -122,11 +122,11 @@ def set_stretch(self, stretch: BaseStretch, image_label: str | None = None) -> N
122122
Raises
123123
------
124124
TypeError
125-
If the `stretch` is not a valid `BaseStretch` object
125+
If the ``stretch`` is not a valid `~astropy.visualization.BaseStretch` object.
126126
127127
ValueError
128-
if the `image_label` is not provided when there are multiple images loaded
129-
or if the `image_label` does not correspond to a loaded image.
128+
If the ``image_label`` is not provided when there are multiple images loaded
129+
or if the ``image_label`` does not correspond to a loaded image.
130130
"""
131131
raise NotImplementedError
132132

@@ -158,7 +158,7 @@ def set_colormap(self, map_name: str, image_label: str | None = None) -> None:
158158
----------
159159
map_name
160160
The name of the colormap to set. This should be a
161-
valid colormap name from Matplotlib`_;
161+
valid colormap name from `Matplotlib`_;
162162
not all backends will support
163163
all colormaps, so the viewer should handle errors gracefully.
164164
image_label : optional
@@ -169,7 +169,7 @@ def set_colormap(self, map_name: str, image_label: str | None = None) -> None:
169169
Raises
170170
------
171171
ValueError
172-
If the `map_name` is not a valid colormap name or if the `image_label`
172+
If the ``map_name`` is not a valid colormap name or if the ``image_label``
173173
is not provided when there are multiple images loaded.
174174
175175
.. _Matplotlib: https://matplotlib.org/stable/gallery/color/colormap_reference.html
@@ -196,8 +196,8 @@ def get_colormap(self, image_label: str | None = None) -> str:
196196
Raises
197197
------
198198
ValueError
199-
If the `image_label` is not provided when there are multiple images loaded
200-
or if the `image_label` does not correspond to a loaded image.
199+
If the ``image_label`` is not provided when there are multiple images loaded
200+
or if the ``image_label`` does not correspond to a loaded image.
201201
"""
202202
raise NotImplementedError
203203

@@ -220,7 +220,7 @@ def save(self, filename: str | os.PathLike, overwrite: bool = False) -> None:
220220
Raises
221221
------
222222
FileExistsError
223-
If the file already exists and `overwrite` is `False`.
223+
If the file already exists and ``overwrite`` is `False`.
224224
"""
225225
raise NotImplementedError
226226

@@ -266,8 +266,8 @@ def load_catalog(
266266
Raises
267267
------
268268
ValueError
269-
If the `table` does not contain the required columns, or if
270-
the `catalog_label` is not provided when there are multiple
269+
If the ``table`` does not contain the required columns, or if
270+
the ``catalog_label`` is not provided when there are multiple
271271
catalogs loaded.
272272
"""
273273
raise NotImplementedError
@@ -307,7 +307,7 @@ def set_catalog_style(
307307
------
308308
ValueError
309309
If there are multiple catalog styles set and the user has not
310-
specified a `catalog_label` for which to set the style, or if
310+
specified a ``catalog_label`` for which to set the style, or if
311311
an style is set for a catalog that does not exist.
312312
"""
313313
raise NotImplementedError
@@ -336,7 +336,7 @@ def get_catalog_style(self, catalog_label: str | None = None) -> dict:
336336
337337
ValueError
338338
If there are multiple catalog styles set and the user has not
339-
specified a `catalog_label` for which to get the style.
339+
specified a ``catalog_label`` for which to get the style.
340340
341341
"""
342342
raise NotImplementedError
@@ -356,12 +356,12 @@ def remove_catalog(self, catalog_label: str | None = None) -> None:
356356
Raises
357357
------
358358
ValueError
359-
If the `catalog_label` is not provided when there are multiple
359+
If the ``catalog_label`` is not provided when there are multiple
360360
catalogs loaded, or if the `catalog_label` does not correspond to a
361361
loaded catalog.
362362
363363
TypeError
364-
If the `catalog_label` is not a string or `None`, or if it is not
364+
If the ``catalog_label`` is not a string or `None`, or if it is not
365365
one of the allowed values.
366366
"""
367367
raise NotImplementedError
@@ -400,7 +400,7 @@ def get_catalog(
400400
Raises
401401
------
402402
ValueError
403-
If the `catalog_label` is not provided when there are multiple catalogs
403+
If the ``catalog_label`` is not provided when there are multiple catalogs
404404
loaded.
405405
"""
406406
raise NotImplementedError
@@ -446,15 +446,15 @@ def set_viewport(
446446
Raises
447447
------
448448
TypeError
449-
If the `center` is not a `SkyCoord` object or a tuple of floats, or if
450-
the `fov` is not a angular `Quantity` or a float, or if there is no WCS
449+
If the ``center`` is not a `~astropy.coordinates.SkyCoord` object or a tuple of floats, or if
450+
the ``fov`` is not a angular `~astropy.units.Quantity` or a float, or if there is no WCS
451451
and the center or field of view require a WCS to be applied.
452452
453453
ValueError
454-
If `image_label` is not provided when there are multiple images loaded.
454+
If ``image_label`` is not provided when there are multiple images loaded.
455455
456456
`astropy.units.UnitTypeError`
457-
If the `fov` is a `Quantity` but does not have an angular unit.
457+
If the ``fov`` is a `~astropy.units.Quantity` but does not have an angular unit.
458458
"""
459459
raise NotImplementedError
460460

@@ -468,9 +468,9 @@ def get_viewport(
468468
Parameters
469469
----------
470470
sky_or_pixel : str, optional
471-
If 'sky', the center will be returned as a `SkyCoord` object.
471+
If 'sky', the center will be returned as a `~astropy.coordinates.SkyCoord` object.
472472
If 'pixel', the center will be returned as a tuple of pixel coordinates.
473-
If `None`, the default behavior is to return the center as a `SkyCoord` if
473+
If `None`, the default behavior is to return the center as a `~astropy.coordinates.SkyCoord` if
474474
possible, or as a tuple of floats if the image is in pixel coordinates and
475475
has no WCS information.
476476
image_label : str, optional
@@ -483,15 +483,15 @@ def get_viewport(
483483
dict
484484
A dictionary containing the current viewport settings.
485485
The keys are 'center', 'fov', and 'image_label'.
486-
- 'center' is an `astropy.coordinates.SkyCoord` object or a tuple of floats.
487-
- 'fov' is an `astropy.units.Quantity` object or a float.
486+
- 'center' is an `~astropy.coordinates.SkyCoord` object or a tuple of floats.
487+
- 'fov' is an `~astropy.units.Quantity` object or a float.
488488
- 'image_label' is a string representing the label of the image.
489489
490490
Raises
491491
------
492492
ValueError
493-
If the `sky_or_pixel` parameter is not one of 'sky', 'pixel', or `None`,
494-
or if the `image_label` is not provided when there are multiple images
495-
loaded, or if the `image_label` does not correspond to a loaded image.
493+
If the ``sky_or_pixel`` parameter is not one of 'sky', 'pixel', or `None`,
494+
or if the ``image_label`` is not provided when there are multiple images
495+
loaded, or if the ``image_label`` does not correspond to a loaded image.
496496
"""
497497
raise NotImplementedError

0 commit comments

Comments
 (0)