ess.reflectometry.corrections

Corrections to be used for neutron reflectometry reduction processes.

ess.reflectometry.corrections.angle_with_gravity(data, pixel_position, sample_position)

Find the angle of reflection when accounting for the presence of gravity.

Args:

data (scipp._scipp.core.DataArray): Reduction data array. pixel_position (scipp._scipp.core.VariableView): Detector pixel positions, should be a vector_3_float64-type object. sample_position (scipp._scipp.core.VariableView): Scattered neutron origin position.

Returns:

(scipp._scipp.core.Variable): Gravity corrected angle values.

ess.reflectometry.corrections.illumination_correction(beam_size, sample_size, theta)

The factor by which the intensity should be multiplied to account for the scattering geometry, where the beam is Gaussian in shape.

Args:

beam_size (scipp._scipp.core.Variable): Width of incident beam. sample_size (scipp._scipp.core.Variable): Width of sample in the dimension of the beam. theta (scipp._scipp.core.Variable): Incident angle.

Returns:

(scipp._scipp.core.Variable): Correction factor.

ess.reflectometry.corrections.illumination_of_sample(beam_size, sample_size, theta)

Determine the illumination of the sample by the beam and therefore the size of this illuminated length.

Args:

beam_size (scipp._scipp.core.Variable): Width of incident beam, in metres. sample_size (scipp._scipp.core.Variable): Width of sample in the dimension of the beam, in metres. theta (scipp._scipp.core.Variable): Incident angle.

Returns:

(scipp._scipp.core.Variable): The size of the beam, for each theta, on the sample.

ess.reflectometry.corrections.y_dash0(velocity, z_origin, y_origin, z_measured, y_measured)

Evaluation of the first dervative of the kinematic equations for for the trajectory of a neutron reflected from a surface.

Args:

velocity (scipp._scipp.core.VariableView): Neutron velocity. z_origin (scipp._scipp.core.Variable): The z-origin position for the reflected neutron. y_origin (scipp._scipp.core.Variable): The y-origin position for the reflected neutron. z_measured (scipp._scipp.core.Variable): The z-measured position for the reflected neutron. y_measured (scipp._scipp.core.Variable): The y-measured position for the reflected neutron.

Returns:

(scipp._scipp.core.VariableView): The gradient of the trajectory of the neutron at the origin position.