Skip to content

Commit 258bd06

Browse files
committed
Add lockDisplay to public API
1 parent f67bdaf commit 258bd06

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

python/lsst/display/firefly/firefly.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,3 +592,36 @@ def overlayFootprints(self, catalog, color='rgba(74,144,226,0.60)',
592592
highlightColor=highlightColor,
593593
selectColor=selectColor,
594594
style=style)
595+
596+
def alignImages(self, match_type="Standard", lock_match=True):
597+
"""Align and optionally lock the orientation of the images being
598+
displayed.
599+
600+
See the Firefly native docs for additional kwargs reference:
601+
https://caltech-ipac.github.io/firefly_client/api/firefly_client.FireflyClient.html#firefly_client.FireflyClient.align_images
602+
603+
Parameters
604+
----------
605+
match_type : `str`, optional
606+
Match type to use to align the images: align by WCS (‘Standard’),
607+
by target (‘Target’), by pixel prigins (‘Pixel’), and by pixel at
608+
image centers (‘PixelCenter’).
609+
lock_match : `bool`, optional
610+
Whether to lock the alignment. Panning/zooming in one image will
611+
preserve the alignment in other images.
612+
613+
Returns
614+
-------
615+
out : `dict`
616+
Status of the request.
617+
618+
Raises
619+
------
620+
ValueError
621+
Raised if match_type is not one of the allowed values.
622+
"""
623+
types = {"Standard", "Target", "Pixel", "PixelCenter"}
624+
if match_type not in types:
625+
raise ValueError(f"match_type={match_type} not allowed from expected types: {types}.")
626+
627+
return self._client.align_images(match_type=match_type, lock_match=lock_match)

0 commit comments

Comments
 (0)