From 3eb5a2cb080725c291ce22140eb74d62d9014d25 Mon Sep 17 00:00:00 2001 From: Kyle Conroy Date: Thu, 26 Jun 2025 12:54:22 -0400 Subject: [PATCH 1/2] update docstring for fov --- src/astro_image_display_api/interface_definition.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/astro_image_display_api/interface_definition.py b/src/astro_image_display_api/interface_definition.py index 8a2e26e..1427578 100644 --- a/src/astro_image_display_api/interface_definition.py +++ b/src/astro_image_display_api/interface_definition.py @@ -441,9 +441,10 @@ def set_viewport( The center of the viewport. If not given, the current center is used. fov : `astropy.units.Quantity` or float, optional The field of view (FOV) of the viewport. If not given, the current FOV - is used. If a float is given, it is interpreted a size in pixels. For images - that are not square, the FOV is interpreted as the size of the longer side - of the image. + is used. If a float is given, it is interpreted a size in pixels. For viewers + that are not square, the FOV is interpreted as the size of the shorter side + of the viewer such that the FOV is guaranteed to be entirely visible + regardless of the aspect ratio of the viewer. image_label : str, optional The label of the image to set the viewport for. If not given and there is only one image loaded, the viewport for that image is set. If there are From 62955015dada0a15fb8266a1d41c703e543a55cf Mon Sep 17 00:00:00 2001 From: Kyle Conroy Date: Thu, 26 Jun 2025 13:29:47 -0400 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Brett M. Morris --- src/astro_image_display_api/interface_definition.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/astro_image_display_api/interface_definition.py b/src/astro_image_display_api/interface_definition.py index 1427578..243906d 100644 --- a/src/astro_image_display_api/interface_definition.py +++ b/src/astro_image_display_api/interface_definition.py @@ -441,7 +441,7 @@ def set_viewport( The center of the viewport. If not given, the current center is used. fov : `astropy.units.Quantity` or float, optional The field of view (FOV) of the viewport. If not given, the current FOV - is used. If a float is given, it is interpreted a size in pixels. For viewers + is used. If a float is given, it is interpreted as a size in pixels. For viewers that are not square, the FOV is interpreted as the size of the shorter side of the viewer such that the FOV is guaranteed to be entirely visible regardless of the aspect ratio of the viewer.