islatu.refl_profile¶
A profile is a measurement resulting from a scan, or a series of scans. Profiles are the central objects in the islatu library, containing the total reflected intensity as a function of scattering vector data.
- class islatu.refl_profile.Profile(data: Data, scans: List[Scan])[source]¶
Bases:
Data
The object that is used to store all information relating to a reflectivity profile.
- bkg_sub(bkg_sub_function, **kwargs)[source]¶
Class method for the
bkg_sub()
method for eachScan
in the list.- Parameters
bkg_sub_function (
callable
) – Background subtraction function to be used.kwargs (
dict
, optional) – Keyword arguments for the background subtraction function. Defaults toNone
.
- concatenate()[source]¶
Class method for
concatenate()
.
- crop(crop_function, **kwargs)[source]¶
Calls the Class method for the
crop()
method for eachScan2D
inself.scans
.- Parameters
crop_function (
callable
) – Cropping function to be used.kwargs (
dict
, optional) – Keyword arguments for the cropping function. Defaults toNone
.
- footprint_correction(beam_width, sample_size)[source]¶
Class method for
footprint_correction()
for eachScan
in the list.- 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.
- classmethod fromfilenames(filenames, parser)[source]¶
Instantiate a profile from a list of scan filenames.
- Parameters
filenames (
list
) – List of files, one for each reflectometry scan. Can have length one.parser (
callable
) – Parser function for the reflectometry scan files.
- qdcd_normalisation(itp)[source]¶
Class method for
qdcd_normalisation()
for eachScan
in the list.- Parameters
normalisation_file (
str
) – The.dat
file that contains the normalisation data.
- rebin(new_q=None, rebin_as='linear', number_of_q_vectors=5000)[source]¶
Class method for
islatu.stitching.rebin()
.- Parameters
new_q (
array_like
) – Array of potential q-values. Defaults toNone
. If this argument is not specified, then the new q, R values are binned according to rebin_as and number_of_q_vectors.rebin_as (py:attr:str) – String specifying how the data should be rebinned. Options are “linear” and “log”. This is only used if the new_q are unspecified.
number_of_q_vectors (
int
, optional) – The max number of q-vectors to be using initially in the rebinning of the data. Defaults to400
.
- subsample_q(scan_identifier, q_min=0, q_max=inf)[source]¶
For the scan with identifier scan_identifier, delete all data points for which q < q_min or q > q_max.
- Parameters
scan_identifier – The scan ID of the scan to be subsampled. This must be a unique substring of the filename from which the scan was taken. For example, if a scan’s nexus filename is i07-413244.nxs, then a valid scan_ID would be “413244”, as this string will uniquely identify the correct scan from within the profile.
q_min – The smallest acceptable value of q. Defaults to 0 Å.
q_max – The largest acceptable value of q. Defaults to inf Å.