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 a grizli.model.BeamCutout.

Parameters:
ref_beamBeamCutout

The dispersed beam to be used as a reference. All images will be aligned to the direct image in this beam.

info_dictdict

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_dirPathLike, optional

The location in which the realigned images will be saved. This will default to the current working directory.

cutoutint, 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.

Returns:
dict

An updated version of info_dict, now with the locations of the realigned images.