darfix.core.mapping.calculate_RSM_histogram#
- darfix.core.mapping.calculate_RSM_histogram(data, diffry_values, twotheta, eta, Q, a, map_range, units='poulsen', map_shape=(50, 50, 50), n=[1, 0, 0], E=17)[source]#
*Code originally written by Mads Carslen*
Calculate reciprocal space map from a ‘diffry’ scan without the objective lens. The RSM is calculated as a multidimensional histogram; :param array_like scan: usual scan object :param tuple ROI: tuple containing two slice objects to give the ROI. :param Union[list, tuple] Q: Scattering vector in oriented pseudocubic coordinates. :param float a: pseudocubic lattice parameter :param float map_range: range (in all 3 directions) of the histogram. Center-to edge-distance. :param str detector: either ‘basler’ or ‘pco’ depending on which detector is used. ‘pco’ implementation is not well-tested at the moment :param str units: either ‘poulsen’ [10.1107/S1600576717011037] or ‘gorfman’ [https://arxiv.org/pdf/2110.14311.pdf] :param float diffry_center: origin of the diffry axis. This changes the orientation of the sampe reciprocal space relative to lab frame :param array_like detect_orig: pixel coordinate of the detector origin, which is assumed to be placed at (x_detec, 0, ffz) relative to the sample :param float x_detec: x position of the detector :param array_like map_shape: Number of bins in each direction :param array_like n: surface normal of the sample in oriented pseudocubic hkl :param float E: energy