pynrc.reduce.calib.ipc_deconvolve

pynrc.reduce.calib.ipc_deconvolve(imarr, kernel, kfft=None, **kwargs)[source]

Simple IPC image deconvolution

Given an image (or image cube), apply an IPC deconvolution kernel to obtain the intrinsic flux distribution. Should also work for PPC kernels. This simply calculates the FFT of the image(s) and kernel, divides them, then applies an iFFT to determine the deconvolved image.

If performing PPC deconvolution, make sure to perform channel-by-channel with the kernel in the appropriate scan direction. IPC is usually symmetric, so this restriction may not apply. See ppc_deconvolve function. Calls ppc_deconvolve for asymmetric (left-right) IPC kernels.

Parameters
  • im (ndarray) – Image or array of images.

  • kernel (ndarry) – Deconvolution kernel. Ignored if kfft is specified.

  • kfft (Complex ndarray) – Option to directy supply the kernel’s FFT rather than calculating it within the function. The supplied ndarray should have shape (ny,nx) equal to the input im. Useful if calling ipc_deconvolve multiple times.

  • symmetric (bool) – Is the input IPC kernel symmetric?

Keyword Arguments
  • in_place (bool) – Perform calculate in place (overwrites original image).

  • nchans (int) – Number of amplifier channels.

  • same_scan_direction (bool) – Are all the output channels read in the same direction? By default fast-scan readout direction is [-->,<--,-->,<--] If same_scan_direction, then all -->

  • reverse_scan_direction (bool) – If reverse_scan_direction, then [<--,-->,<--,-->] or all <--