islatu.corrections

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

islatu.corrections.footprint_correction(beam_width, sample_size, theta)[source]

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

Parameters
  • 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.

islatu.corrections.get_interpolator(file_path, parser, q_axis_name='qdcd_', intensity_axis_name='adc2')[source]

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

Parameters
  • 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

Containing:
  • array_like: Interpolation knots.

  • array_like: B-spline coefficients.

  • int: Degree of spline.

Return type

tuple