scippneutron.absorption.base.compute_transmission_map#
- scippneutron.absorption.base.compute_transmission_map(sample_shape, sample_material, beam_direction, wavelength, detector_position, quadrature_kind='medium')[source]#
Computes transmission probability of single-scattered neutrons.
Computes the probability that a neutron is transmitted to
detector_position
given that it travelled inbeam_direction
and scattered incoherently a single time when passing through the sample.\[C(\mathbf{p}, \lambda) = \int_{Sample} \exp{(-\mu(\lambda) L(\mathbf{p}, \mathbf{x}))} \ d\mathbf{x}\]where \(L\) is the length of the path through the sample, \(\mu\) is the material dependent attenuation factor, and \(\mathbf{p}\) is the
detector_position
.- Parameters:
sample_shape (
SampleShape
) – The size and shape of the sample.sample_material (
Material
) – The sample material, this parameter determines the absorption and scattering coefficients.beam_direction (
Variable
) – The direction of the incoming beam.wavelength (
Variable
) – An array of wavelengths for which to evaluate the transmission fraction.detector_position (
Variable
) – An array of vectors representing the scattering directions where the transmission fraction is evaluated.quadrature_kind (
Union
[Literal
['cheap'
,'medium'
,'expensive'
],Any
], default:'medium'
) – What kind of quadrature to use. A denser quadrature makes the result more accurate but takes longer to compute. What options exists depend on the sample shape.
- Returns:
DataArray
– the transmission fraction as a function of detector_position and wavelength