pynrc.maths.image_manip.scale_ref_image

pynrc.maths.image_manip.scale_ref_image(im1, im2, mask=None, smooth_imgs=False, return_shift_values=False)[source]

Reference image scaling

Find value to scale a reference image by minimizing residuals. Assumes everything is already aligned if return_shift_values=False.

Or simply turn on return_shift_values to return (dx,dy,scl). Then fshift(im2,dx,dy) to shift the reference image.

Parameters
  • im1 (ndarray) – Science star observation.

  • im2 (ndarray) – Reference star observation.

  • mask (bool array or None) – Use this mask to exclude pixels for performing standard deviation. Boolean mask where True is included and False is excluded.

  • smooth_imgs (bool) – Smooth the images with nearest neighbors to remove bad pixels?

  • return_shift_values (bool) – Option to return x and y shift values