webbpsf_ext.image_manip

Functions

add_ipc(im[, alpha_min, alpha_max, kernel])

Convolve image with IPC kernel

add_ppc(im[, ppc_frac, nchans, kernel, ...])

Add Post-Pixel Coupling (PPC)

apply_pixel_diffusion(im, pixel_sigma)

Apply charge diffusion kernel to image

bp_fix(im[, sigclip, niter, pix_shift, ...])

Find and fix bad pixels in image with median of surrounding values

convolve_image(hdul_sci_image, hdul_psfs[, ...])

Convolve image with various PSFs

crop_image(imarr, xysub[, xyloc])

Crop input image around center using integer offsets only

crop_observation(im_full, ap, xysub[, ...])

Crop around aperture reference location

crop_zero_rows_cols(image[, symmetric, ...])

Crop off rows and columns that are all zeros.

cv_shift(image, xshift, yshift[, pad, cval, ...])

Use OpenCV library for image shifting

distort_image(hdulist_or_filename[, ext, ...])

Distort an image

expand_mask(bpmask, npix[, grow_diagonal])

Expand bad pixel mask by npix pixels

fourier_imshift(image, xshift, yshift[, ...])

Fourier shift image

fractional_image_shift(imarr, xshift, yshift)

Shift image(s) by a fractional amount

frebin(image[, dimensions, scale, total])

Fractional rebin

fshift(inarr[, delx, dely, pad, cval, interp])

Fractional image shift

get_im_cen(im)

Returns pixel position (xcen, ycen) of array center.

image_convolution(image, psf[, method, use_fft])

Perform image convolution with a PSF kernel

image_rescale(HDUlist_or_filename, pixscale_out)

Rescale image flux

image_shift_with_nans(image, xshift, yshift)

Shift image by a fractional amount accounting for NaNs

make_disk_image(inst, disk_params[, ...])

Rescale disk model flux to desired pixel scale and distance.

model_to_hdulist(args_model, sp_star, bandpass)

HDUList from model FITS file.

pad_or_cut_to_size(array, new_shape[, ...])

Resize an array to a new shape by either padding with zeros or trimming off rows and/or columns.

replace_nans(image[, mean_func, in_place, ...])

Replace NaNs in an image with interpolated values

replace_nans_griddata(image[, method, in_place])

Replace NaNs in an image using griddata interpolation

rotate_offset(data, angle[, cen, cval, ...])

Rotate and offset an array.

rotate_shift_image(hdul[, index, angle, ...])

Rotate/Shift image

zrebin(image, oversample[, order, mode, ...])

Rebin image using scipy.ndimage.zoom