Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions python/lsst/display/firefly/firefly.py
Original file line number Diff line number Diff line change
Expand Up @@ -592,3 +592,36 @@ def overlayFootprints(self, catalog, color='rgba(74,144,226,0.60)',
highlightColor=highlightColor,
selectColor=selectColor,
style=style)

def alignImages(self, match_type="Standard", lock_match=True):
"""Align and optionally lock the orientation of the images being
displayed.

See the Firefly native docs for additional kwargs reference:
https://caltech-ipac.github.io/firefly_client/api/firefly_client.FireflyClient.html#firefly_client.FireflyClient.align_images

Parameters
----------
match_type : `str`, optional
Match type to use to align the images: align by WCS (‘Standard’),
by target (‘Target’), by pixel prigins (‘Pixel’), and by pixel at
image centers (‘PixelCenter’).
lock_match : `bool`, optional
Whether to lock the alignment. Panning/zooming in one image will
preserve the alignment in other images.

Returns
-------
out : `dict`
Status of the request.

Raises
------
ValueError
Raised if match_type is not one of the allowed values.
"""
types = {"Standard", "Target", "Pixel", "PixelCenter"}
if match_type not in types:
raise ValueError(f"match_type={match_type} not allowed from expected types: {types}.")

return self._client.align_images(match_type=match_type, lock_match=lock_match)