gen_new_wcs#
- niriss_tools.isophotal.gen_new_wcs(ref_path, ref_hdu_index=0, resolution=0.04, padding=100)[source]#
Generate a new WCS for a given reference image.
The new WCS is North-aligned, and can optionally take on a specified pixel scale. Padding is applied relative to the minimal extent of the reference image (ignoring NaNs).
- Parameters:
- ref_path
PathLike The path of the reference image, to which all other images will be cropped.
- ref_hdu_index
int, optional The index of the HDU containing the reference image, by default 0.
- resolution
float|Quantity, optional The pixel scale used in the new WCS. If a float is supplied, the units are assumed to be arcseconds. By default 0.04.
- padding
int|tuple[int,int], optional The padding to apply around the reference image in pixels, by default 100. If a tuple is supplied, the values are applied in the order (axis2, axis1).
- ref_path
- Returns: