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.

Module Contents

Classes

Profile

The object that is used to store all information relating to a reflectivity profile.

API

class refl_profile.Profile(data: islatu.data.Data, scans: List[islatu.scan.Scan])

Bases: islatu.data.Data

The object that is used to store all information relating to a reflectivity profile.

Initialization

classmethod fromfilenames(filenames, parser, adjustments=None)

Instantiate a profile from a list of scan filenames.

Args:
filenames (list):

List of files, one for each reflectometry scan. Can have length one.

parser (callable):

Parser function for the reflectometry scan files.

crop(crop_function, **kwargs)

Calls the Class method for the crop() method for each Scan2D in self.scans.

Args:

crop_function (callable): Cropping function to be used. kwargs (dict, optional): Keyword arguments for the

cropping function. Defaults to None.

bkg_sub(bkg_sub_function, **kwargs)

Class method for the bkg_sub() method for each Scan in the list.

Args:
bkg_sub_function (callable): Background subtraction

function to be used.

kwargs (dict, optional): Keyword arguments for

the background subtraction function. Defaults to None.

subsample_q(scan_identifier, q_min=0, q_max=float('inf'))

For the scan with identifier scan_identifier, delete all data points for which q < q_min or q > q_max.

Args:
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 Å.

footprint_correction(beam_width, sample_size)

Class method for footprint_correction() for each Scan in the list.

Args:

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.

transmission_normalisation(overwrite_transmissions=None)

Perform the transmission correction.

qdcd_normalisation(itp)

Class method for qdcd_normalisation() for each Scan in the list.

Args:
normalisation_file (str): The .dat file that

contains the normalisation data.

concatenate()

Class method for concatenate().

rebin(new_q=None, rebin_as='linear', number_of_q_vectors=5000)

Class method for islatu.stitching.rebin().

Args:
new_q (array_like):

Array of potential q-values. Defaults to None. 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 to 400.