corrections

Reflectometry data must be corrected as a part of reduction. These functions facilitate this, including the footprint and DCD q-variance corrections.

Module Contents

Functions

footprint_correction

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

get_interpolator

Get an interpolator object from scipy, this is useful for the DCD q-normalisation step.

API

corrections.footprint_correction(beam_width, 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_width (float):

Width of incident beam, in metres.

sample_size (float):

Width of sample in the dimension of the beam, in metres.

theta (float):

Incident angle, in degrees.

Returns:

Array of correction factors.

corrections.get_interpolator(file_path, parser, q_axis_name='qdcd_', intensity_axis_name='adc2')

Get an interpolator object from scipy, this is useful for the DCD q-normalisation step.

Args:

file_path (str): File path to the normalisation file. parser (callable): Parser function for the normalisation file. q_axis_name (str, optional): Label for the q-value in the normalisation file. Defaults to 'qdcd_'. intensity_axis_name (str, optional): Label for the intensity in the normalisation file. Defaults to 'adc2'.

Returns:
tuple: Containing:
  • array_like: Interpolation knots.

  • array_like: B-spline coefficients.

  • int: Degree of spline.