nabu.io.detector_distortion module

class nabu.io.detector_distortion.DetectorDistortionBase(detector_full_shape_vh=(0, 0))[source]

Bases: object

This is the basis class. A simple identity transformation which has the only merit to show how it works.Reimplement this function to have more parameters for other transformations

transform(source_data, do_full=False)[source]

performs the transformation

get_adapted_subregion(sub_region_xz)[source]
set_sub_region_transformation(target_sub_region=None)[source]

must return a source sub_region. It sets internally an object (a practical implementation would be a sparse matrice) which can be reused in further applications of “transform” method for transforming the source sub_region data into the target sub_region

set_full_transformation()[source]
get_actual_shapes_source_target()[source]
class nabu.io.detector_distortion.DetectorDistortionMapsXZ(map_x, map_z)[source]

Bases: DetectorDistortionBase

This class implements the distortion correction from the knowledge of two arrays, map_x and map_z. Pixel (i,j) of the corrected image is obtained by interpolating the raw data at position ( map_z(i,j), map_x(i,j) ).

Parameters:
  • map_x – float 2D array

  • map_z – float 2D array