nabu.preproc.ccd module¶
- class nabu.preproc.ccd.CCDFilter(radios_shape: tuple, correction_type: str = 'median_clip', median_clip_thresh: float = 0.1, abs_diff=False, preserve_borders=False)[source]¶
Bases:
object
Filtering applied on radios.
Initialize a CCDCorrection instance.
- Parameters:
radios_shape (tuple) – A tuple describing the shape of the radios stack, in the form (n_radios, n_z, n_x).
correction_type (str) – Correction type for radios (“median_clip”, “sigma_clip”, …)
median_clip_thresh (float, optional) – Threshold for the median clipping method.
abs_diff (boolean) – by default False: the correction is triggered when img - median > threshold. If equals True: correction is triggered for abs(img-media) > threshold
borders (preserve) – by default False: If equals True: the borders (width=1) are not modified.
Notes
A CCD correction is a process (usually filtering) taking place in the radios space. Available filters:
median_clip: if the value of the current pixel exceeds the median of adjacent pixels (a 3x3 neighborhood) more than a threshold, then this pixel value is set to the median value.
- class nabu.preproc.ccd.Log(radios_shape, clip_min=None, clip_max=None)[source]¶
Bases:
object
Helper class to take -log(radios)
- Parameters:
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.