align_direct_images#
- niriss_tools.grism.align_direct_images(ref_beam, info_dict, out_dir=None, cutout=200, overwrite=False)[source]#
Align a set of images to the orientation of a dispersed beam.
Given a nested dictionary, containing both
"sci"and"var"keys pointing to the location of the images, this blots the images to the same coordinate system used in the direct image of agrizli.model.BeamCutout.- Parameters:
- ref_beam
BeamCutout The dispersed beam to be used as a reference. All images will be aligned to the direct image in this beam.
- info_dict
dict A nested dictionary, where each value is a dictionary containing
"sci"and"var"keys. The values for these should point to the location of the original FITS images to be blotted.- out_dir
PathLike, optional The location in which the realigned images will be saved. This will default to the current working directory.
- cutout
int, optional Make a slice of the original image with size
[-cutout,+cutout]around the centre position of the desired object, before passing to blot. By default,cutout=200.- overwritebool, optional
Overwrite existing images if they exist already. By default
False.
- ref_beam
- Returns:
dictAn updated version of
info_dict, now with the locations of the realigned images.