propagate_cov_box_all#

anri.fwd.propagate_cov_box_all(ubi, origin_sample, hkl, etasign, wavelength, ky, kz, wedge, chi, y0, sc_lab, fc_lab, norm_lab, ostep, cov_in)#

Vectorized version of propagate_cov_box. Takes similar arguments as propagate_cov_box but with additional array axes over which propagate_cov_box is mapped.

Original documentation:

Vectorized version of propagate_cov_box. Takes similar arguments as propagate_cov_box but with additional array axes over which propagate_cov_box is mapped.

Original documentation:

Get output covariance matrix for a given forward-projected box-beam peak.

This can be vectorised over ubis and origin_samples, see propagate_cov_box_all_grains(). It can then be vectorised in an outer loop over hkl, see propagate_cov_box_all().

Parameters:
  • ubi (Array) – [3,3] (U.B)^(-1) matrix of the grain/voxel

  • origin_sample (Array) – [3] origin position of the voxel in the sample reference frame

  • hkl (Array) – [3] (h,k,l) reciprocal space vector

  • etasign (int) – +1 (omega1 in ImageD11) or -1 (omega2 in ImageD11) to select which omega solution to return

  • wavelength (float) – Wavelength in angstroms

  • ky (float) – y-component of the beam in the lab frame. Represents horizontal beam divergence, usually zero.

  • kz (float) – z-component of the beam in the lab frame. Represents vertical beam divergence, usually zero.

  • wedge (float) – Wedge motor value (degrees)

  • chi (float) – Chi motor value (degrees)

  • y0 (float) – The true value of dty when the rotation axis (untilted by wedge, chi) intersects the beam

  • sc_lab (Array) – [3] Laboratory basis vector for the slow direction on the detector from anri.geom.detector_basis_vectors_lab().

  • fc_lab (Array) – [3] Laboratory basis vector for the fast direction on the detector from anri.geom.detector_basis_vectors_lab().

  • norm_lab (Array) – [3] Laboratory basis vector for the detector normal from anri.geom.detector_basis_vectors_lab().

  • ostep (float) – Omega step size in degrees

  • cov_in (Array) – [6,6] Input covariance matrix - build with anri.fwd.get_cov_in()

Returns:

cov_integrated (jax.Array) – [3,3] Output covariance matrix for this peak.

Notes

Gets Jacobian of anri.fwd.get_centroid_box(), then uses that to propagate cov_in via anri.fwd.propagate_cov(). Adds single pixel widths (in sc, fc, ostep) as variances to outputs to “spread” the signal over 1 pixel.