get_ipc_slice

jwst.ipc.ipc_corr.get_ipc_slice(input_model, ipc_model)[source]

Extract a slice from IPC kernel corresponding to science data.

Parameters:
input_modelJwstDataModel

The input science data.

ipc_modelIPCModel

The IPC kernel model.

Returns:
kernelndarray, either 2-D or 4-D

The data array for the IPC kernel. If the IPC kernel is 4-D and the science data array is a subarray, kernel will be a slice of the reference image; otherwise, this will be the full image.