read_spatial#

anri.io.read_spatial(ds)[source]#

Read a DataSet’s detector distortion maps, as ImageD11 corrects its peaks with them.

ImageD11’s order: a pyFAI detector file (“detectorh5”: dx, dy from the mean of each pixel’s corners, as ImageD11.blobcorrector.get_e2dx_from_h5), else EDF maps (“e2dxfile”, “e2dyfile”, read with fabio). A pixel at (row, col) is at (row + dy[row, col], col + dx[row, col]), in pixels: dx along the fast axis, dy along the slow. Spline files are not supported.

Parameters:

ds (dict) – From read_dataset()

Returns:

tuple or None – (dx, dy) [n_slow, n_fast] float32, or None if the DataSet names no correction