generate_facet_uncertainty¶
- marxs.design.uncertainties.generate_facet_uncertainty(n, xyz, angle_xyz, trans_offset=0, rot_offset=0)[source] [edit on github]¶
Generate 4d matrices that represent facet misalignment.
Positional and rotational uncertainties are input to this function. It then draws randomnly from Gaussians centered on 0 (the correct position) for the displacement and rotation, where the \(\sigma\) of the Gaussian is given by the numbers in the input. The linear displacements and angles are expressed as (4,4) matrixes suitable for use with homogeneous coordinates.
- Parameters:
- nint
Number of 4d matrixes to be calculated
- xyztuple of 3 floats
accuracy of grating positioning in x, y, z (in mm) - Gaussian sigma, not FWHM!
- angle_xyztuple of 3 floats
accuracy of grating positioning. Rotation around x, y, z (in rad) - Gaussian sigma, not FWHM!
- trans_offsetarray_like
will be passed to
numpy.random.normal
as theloc
parameter when drawing translantions.- rot_offsetarray_like
will be passed to
numpy.random.normal
as theloc
parameter when drawing rotations.
- Returns:
- pos_uncertlist of n (4,4) np.arrays
Random realizations of the uncertainty