webbpsf_ext.image_manip.replace_nans_griddata
- webbpsf_ext.image_manip.replace_nans_griddata(image, method='cubic', in_place=True, **kwargs)[source]
Replace NaNs in an image using griddata interpolation
- Parameters:
image (ndarray) – 2D image [ny,nx].
method (str) – Interpolation method to use for griddata. Options are ‘nearest’, ‘linear’, or ‘cubic’. Default is ‘cubic’.
in_place (bool) – Replace NaNs in place. Default is True.
- Keyword Arguments:
fill_value (float, optional) – Value used to fill in for requested points outside of the convex hull of the input points. If not provided, then the default is nan. This option has no effect for the ‘nearest’ method.
rescale (bool, optional) – Rescale points to unit cube before performing interpolation. This is useful if some of the input dimensions have incommensurable units and differ by many orders of magnitude.