pynrc.reduce.ref_pixels.channel_averaging
- pynrc.reduce.ref_pixels.channel_averaging(im, nchans=4, same_scan_direction=False, off_chans=True, mn_func=<function nanmedian>, **kwargs)[source]
Estimate common 1/f noise in image
For a given image, average the channels together to find the common pattern noise present within the channels. Returns an array the same size as the input image.
- Parameters:
im (ndarray) – Input image
- Keyword Arguments:
nchans (int) – Number of output channels
same_scan_direction (bool) – Are all the output channels read in the same direction? By default fast-scan readout direction is
[-->,<--,-->,<--]Ifsame_scan_direction, then all-->off_chans (bool) – Calculate indepenent values for each channel using the off channels.
mn_func (function) – What function should we use to calculate the average. Default np.nanmedian