fwd#

Forward-projection functions, that use the rest of anri to project peaks onto detector images.

Functions

hkl_to_k_omega(ubi, hkl, etasign, ...)

Forward-project a reciprocal space vector (h,k,l) with basis vectors (a*, b*, c*) into k-vectors and omega angles.

get_cov_in(sig_origin, sig_wavelength, ...)

Generate the input variance-covariance matrix from your sigma values.

propagate_cov(J_func_out, cov_in)

Propagate an input covariance matrix with a Jacobian to yield an output covariance matrix.

propagate_cov_box(ubi, origin_sample, hkl, ...)

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

propagate_cov_box_all_grains(ubi, ...)

Vectorized version of propagate_cov_box.

propagate_cov_box_all(ubi, origin_sample, ...)

Vectorized version of propagate_cov_box.

propagate_cov_scan(ubi, origin_sample, hkl, ...)

Get output covariance matrix for a given forward-projected Scanning 3DXRD peak.

propagate_cov_scan_all_grains(ubi, ...)

Vectorized version of propagate_cov_scan.

propagate_cov_scan_all(ubi, origin_sample, ...)

Vectorized version of propagate_cov_scan.

get_centroid_box(ubi, origin_sample, hkl, ...)

Forward project (ubi, hkl) to get 3D peak centroid on detector (sc, fc, omega) in the box-beam case.

get_centroid_box_all_grains(ubi, ...)

Vectorized version of get_centroid_box.

get_centroid_box_all(ubi, origin_sample, ...)

Vectorized version of get_centroid_box.

get_centroid_scan(ubi, origin_sample, hkl, ...)

Forward project (ubi, hkl) to get 4D peak centroid (sc, fc, omega, dty) in the Scanning 3DXRD case.

get_centroid_scan_all_grains(ubi, ...)

Vectorized version of get_centroid_scan.

get_centroid_scan_all(ubi, origin_sample, ...)

Vectorized version of get_centroid_scan.

mahalanobis_sq(centroid, coord, inv_cov)

Get squared Mahalanobis distance for a coordinate given a centroid and an inverse covariance matrix.

sample_intensities(centroid, coord, inv_cov, ...)

Evaluate probability density of Mahalanobis distance.

prepare_cov(cov)

Get inverse covariance matrix and normalisation constant for sample_intensities().

peak_to_pixels(centroid, cov, amplitude, ...)

Get N*(window_size,) image of normalised pixel intensities around centroid in N dimensions.

peaks_to_pixels(centroid, cov, amplitude, ...)

Vectorized version of peak_to_pixels.