fwd#

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

Functions

beam_weight(pos_lab, omega, geom)

How much of a voxel the beam illuminates: its profile integrated over the voxel.

check_render(entries, hkls, geom, row, det_shape)

Check rendered peaks against a Monte Carlo simulation of the beam spreads.

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(ubi, origin_sample, ...)

Vectorized version of get_centroid_box.

get_centroid_box_all_both(ubi, ...)

Vectorized version of get_centroid_box_both.

get_centroid_box_all_grains(ubi, ...)

Vectorized version of get_centroid_box.

get_centroid_box_all_grains_both(ubi, ...)

Vectorized version of get_centroid_box_both.

get_centroid_box_both(ubi, origin_sample, ...)

Forward project (ubi, hkl) to both Friedel 3D peak centroids on the detector in the box-beam case.

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(ubi, origin_sample, ...)

Vectorized version of get_centroid_scan.

get_centroid_scan_all_both(ubi, ...)

Vectorized version of get_centroid_scan_both.

get_centroid_scan_all_grains(ubi, ...)

Vectorized version of get_centroid_scan.

get_centroid_scan_all_grains_both(ubi, ...)

Vectorized version of get_centroid_scan_both.

get_centroid_scan_both(ubi, origin_sample, ...)

Forward project (ubi, hkl) to both Friedel 4D peak centroids in the Scanning 3DXRD case.

get_cov_in(sig_origin, sig_wavelength, ...)

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

guess_batch_size(entries, hkls, F2, geom, ...)

Largest batch for render_row() whose render step fits in a fraction of the free memory.

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.

hkl_to_k_omega_both(ubi, hkl, wavelength, ...)

Forward-project (h,k,l) into k-vectors and omega angles for both Friedel solutions.

lorentz(k_in, k_out, rot_axis)

Lorentz factor for rotation about rot_axis.

make_row(omega, dty[, transmission])

Build the row dict for render_row() from one scan's per-frame motor positions.

polarisation(k_in, k_out, factor)

Polarisation factor for a beam polarised horizontally, with degree of polarisation factor.

propagate_cov(J_func_out, cov_in)

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

propagate_cov_box(*args)

propagate_cov_box_all(*args)

Vectorized version of _propagate.

propagate_cov_box_all_grains(*args)

Vectorized version of _propagate.

propagate_cov_scan(*args)

propagate_cov_scan_all(*args)

Vectorized version of _propagate.

propagate_cov_scan_all_both(*args)

Vectorized version of _propagate.

propagate_cov_scan_all_grains(*args)

Vectorized version of _propagate.

propagate_cov_scan_all_grains_both(*args)

Vectorized version of _propagate.

propagate_cov_scan_both(*args)

render_peaks(entry, hkl_idx, branch, ...[, ...])

Render a fixed-size batch of peaks into sparse contributions for one dty row.

render_row(entries, hkls, F2, geom, row, ...)

Render all peaks of one phase that reach one dty row into sparse pixels.

select_peaks(ubi, pos, hkls, geom, row, ...)

Mask of the (entry, hkl, branch) peaks that can put intensity into this dty row.