geom_from_pars#
- anri.io.geom_from_pars(pars, y0, sig_wavelength, sig_ky, sig_kz, sig_beam, voxel_size, pol_factor=1.0, sig_psf=0.0, k_in_lab=None, width_beam=0.0, sig_beam_v=0.0, width_beam_v=0.0, voxel_3d=False, sig_omega=0.0)[source]#
Build the geometry dict for
anri.fwd.render_row()from ImageD11 parameters.Combines
beam_from_pars(),gonio_from_pars()anddetector_from_pars()with the spreads the renderer needs.- Parameters:
pars (
dict) – ImageD11 parameters: detector geometry (y_center…o22),wavelength,wedge,chi. ImageD11’s wedge has the opposite sign to anri’s, so the returned geometry has-wedge.y0 (
float) – dty at which the rotation axis is in the beamsig_wavelength (
float) – Standard deviations of the wavelength (angstrom) and of the beam divergence (radians)sig_ky (
float) – Standard deviations of the wavelength (angstrom) and of the beam divergence (radians)sig_kz (
float) – Standard deviations of the wavelength (angstrom) and of the beam divergence (radians)sig_beam (
float) – The beam’s profile across it, horizontally: a flat top ofwidth_beam(default 0: a Gaussian) blurred by a Gaussian of standard deviationsig_beam(same units as dty; must be > 0), seeanri.fwd.beam_weight(). A pencil beam is narrow, a box or horizontal line beam wider than the sample.width_beam (
float, default:0.0) – The beam’s profile across it, horizontally: a flat top ofwidth_beam(default 0: a Gaussian) blurred by a Gaussian of standard deviationsig_beam(same units as dty; must be > 0), seeanri.fwd.beam_weight(). A pencil beam is narrow, a box or horizontal line beam wider than the sample.voxel_size (
float) – Side length of the voxels (same units as dty)pol_factor (
float, default:1.0) – Degree of horizontal polarisation, seeanri.fwd.polarisation()sig_psf (
float, default:0.0) – Standard deviation of the detector point spread, in pixels. Spots much narrower than a pixel have intensity-weighted centroids snapped towards pixel centres (by up to ~0.3 px at 0.1 px wide); a real detector’s point spread prevents that.k_in_lab (
Array|ndarray|bool|number|bool|int|float|complex|None, default:None) – [3] Direction of the incoming beam (default lab x), seebeam_from_pars()sig_beam_v (
float, default:0.0) – The beam’s profile across it, vertically, as forsig_beamandwidth_beam. Only used for cubes: for columns (2D maps) the whole vertical profile crosses the voxel.width_beam_v (
float, default:0.0) – The beam’s profile across it, vertically, as forsig_beamandwidth_beam. Only used for cubes: for columns (2D maps) the whole vertical profile crosses the voxel.voxel_3d (
bool, default:False) – Whether the voxels are cubes (a 3D map) rather than columns (a 2D map, e.g. a TensorMap layer)sig_omega (
float, default:0.0) – Extra standard deviation of every peak in omega, in degrees (default 0): a simple stand-in for mosaicity, and a way to smooth the loss at the start of a refinement.
- Return type: