nabu.preproc.ccd_cuda module

class nabu.preproc.ccd_cuda.CudaCCDFilter(radios_shape, correction_type='median_clip', median_clip_thresh=0.1, abs_diff=False, cuda_options=None)[source]

Bases: CCDFilter

Initialize a CudaCCDCorrection instance. Please refer to the documentation of CCDCorrection.

median_clip_correction(radio, output=None)[source]

Compute the median clip correction on one image.

Parameters:
  • radio (pycuda.gpuarray) – A radio image

  • output (pycuda.gpuarray, optional) – Output data.

class nabu.preproc.ccd_cuda.CudaLog(radios_shape, clip_min=None, clip_max=None)[source]

Bases: Log

Helper class to take -log(radios)

Initialize a Log processing.

Parameters:
  • radios_shape (tuple) – The shape of 3D radios stack.

  • clip_min (float, optional) – Data smaller than this value is replaced by this value.

  • clip_max (float, optional.) – Data bigger than this value is replaced by this value.

take_logarithm(radios, clip_min=None, clip_max=None)[source]

Take the negative logarithm of a radios chunk.

Parameters:
  • radios (pycuda.gpuarray.GPUArray) – Radios chunk If not provided, a new GPU array is created.

  • clip_min (float, optional) – Before taking the logarithm, the values are clipped to this minimum.

  • clip_max (float, optional) – Before taking the logarithm, the values are clipped to this maximum.