islatu.scan¶
This module contains the Scan and Scan2D classes. A Scan is a measurement and so inherits from MeasurementBase. An instance of Scan contains scan metadata, as well as a suite of methods useful for data correction, uncertainty calculations and the like.
A Scan2D is a Scan whose Data object’s intensity values are computed from an image captured by an area detector. Many of Scan’s methods are overloaded to make use of the additional information provided by the area detector, and extra image manipulation methods are included in Scan2D.
- class islatu.scan.Scan(data: Data, metadata: Metadata)[source]¶
Bases:
MeasurementBase
A class used to store reflectometry scans taken with a point detector.
- footprint_correction(beam_width, sample_size)[source]¶
Class method for
islatu.corrections.footprint_correction()
.- Parameters
beam_width (
float
) – Width of incident beam, in metres.sample_size (
uncertainties.core.Variable
) – Width of sample in the dimension of the beam, in metres.theta (
float
) – Incident angle, in degrees.
- qdcd_normalisation(itp)[source]¶
Perform normalisation by DCD variance.
- Parameters
itp (
tuple
) – Containing interpolation knots (array_like
), B-spline coefficients (array_like
), and degree of spline (int
).
- class islatu.scan.Scan2D(data: Data, metadata: Metadata, images: List[Image])[source]¶
Bases:
Scan
- data¶
The intensity as a function of Q data for this scan.
- Type
- metadata¶
This scan’s metadata.
- images¶
The detector images in the given scan.
- Type
list
ofislatu.image.Image
- bkg_sub(bkg_sub_function, **kwargs)[source]¶
Perform background substraction for each image in a Scan.
- Parameters
bkg_sub_function (
callable
) – Background subtraction function to be used.kwargs (
dict
, optional) – Keyword arguments for the background subtraction function. Defaults toNone
.progress (
bool
, optional) – Show a progress bar. Requires thetqdm
package. Defaults toTrue
.
- crop(crop_function, **kwargs)[source]¶
Crop every image in images according to crop_function.
- Parameters
crop_function (
callable
) – Cropping function to be used.kwargs (
dict
, optional) – Keyword arguments for the cropping function. Defaults toNone
.progress (
bool
, optional) – Show a progress bar. Requires thetqdm
package. Defaults toTrue
.