ess.amor.amor_data

This is the class for data reduction from the Amor instrument, which is a subclass of the broader ReflData class. Features of this class included correcting for the time-of-flight measurement at Amor.

class ess.amor.amor_data.AmorData(data, reduction_creator=None, data_owner=None, experiment_id=None, experiment_date=None, sample_description=None, reduction_file=None, data_file=None, reduction_creator_affiliation=None, sample_angle_offset=<scipp.Variable> ()      int64            [deg]  [0], gravity=True, beam_size=<scipp.Variable> ()    float64              [m]  [0.001000], sample_size=<scipp.Variable> ()    float64              [m]  [0.010000], detector_spatial_resolution=<scipp.Variable> ()    float64              [m]  [0.002500], chopper_sample_distance=<scipp.Variable> ()    float64              [m]  [15.000000], chopper_speed=<scipp.Variable> ()    float64           [1/us]  [0.000007], chopper_detector_distance=<scipp.Variable> ()    float64             [Å]  [190000000000.000000], chopper_chopper_distance=<scipp.Variable> ()    float64              [m]  [0.490000], chopper_phase=<scipp.Variable> ()    float64            [deg]  [-8.000000], wavelength_cut=<scipp.Variable> ()    float64             [Å]  [2.400000])

Bases: ess.reflectometry.data.ReflData

Reduction of a single Amor dataset.

Args:

data (scipp._scipp.core.DataArray or str): The data to be reduced or the path to the file to be reduced. reduction_creator (str, optional): The name of the creator of the reduction. Optional, default None. data_owner (str, optional): The name of the owner of the data. Optional, default None. experiment_id (str, optional): The experimental identifier. Optional, default None. experiment_date (str, optional): The date or date range for the experiment. Optional, default None. sample_description (str, optional): A short description of the sample. Optional, default None. reduction_file (str, optional): The name of the file used for reduction (.py script or .ipynb notebook). Optional, default None. data_file (str, optional): If a scipp._scipp.core.DataArray is given as the data, a data_file should be defined for output in the file. Optional, default None. reduction_creator_affiliation (str, optional): The affiliation of the reduction owner. Optional, defaults to None. sample_angle_offset (scipp.Variable, optional): Correction for omega or possibly misalignment of sample. Optional, default 0 degrees of arc. gravity (bool, optional): Should gravity be accounted for. Optional, default True. beam_size (scipp._scipp.core.Variable, optional): Size of the beam perpendicular to the scattering surface. Optional, default 0.001 m. sample_size (scipp._scipp.core.Variable, optional): Size of the sample in direction of the beam. Optional, default 0.01 m. detector_spatial_resolution (scipp._scipp.core.Variable, optional): Spatial resolution of the detector. Optional, default 2.5 mm chopper_sample_distance (scipp._scipp.core.Variable, optional): Distance from chopper to sample. Optional, default 15. m chopper_speed (scipp._scipp.core.Variable, optional): Rotational velocity of the chopper. Optional, default 6.6666... e-6 µs^{-1}. chopper_detector_distance (scipp._scipp.core.Variable, optional): Distance from chopper to detector. Optional, default 19 m. chopper_chopper_distance (scipp._scipp.core.Variable, optional): The distance between the wavelength defining choppers. Optional, default 0.49 m chopper_phase (scipp._scipp.core.Variable, optional): Phase offset between chopper pulse and ToF zero. Optional, default -8. degrees of arc. wavelength_cut (scipp._scipp.core.Variable, optional): Minimum cutoff for wavelength. Optional, default 2.4 Å.

Attributes:

tau (scipp._scipp.core.Variable): Half of the inverse of the chopper speed.

tof_correction()

A correction for the presense of the chopper with respect to the “true” ToF.

wavelength_masking(wavelength_min=None, wavelength_max=None)

Overwriting the ess.reflectometry.data.ReflData wavelength masking functionality.

Args:

wavelength_min (scipp._scipp.core.Variable, optional): Minimum wavelength to be used. Optional, default to wavelength_cut value. wavelength_max (scipp._scipp.core.Variable, optional): Maximum wavelength to be used. Optional, default to wavelength_min + tau * (ess.reflectometry.HDM / chopper_detector_distance).

class ess.amor.amor_data.AmorReference(data, sample_angle_offset=<scipp.Variable> ()      int64            [deg]  [0], gravity=True, beam_size=<scipp.Variable> ()    float64              [m]  [0.001000], sample_size=<scipp.Variable> ()    float64              [m]  [0.010000], detector_spatial_resolution=<scipp.Variable> ()    float64              [m]  [0.002500], chopper_sample_distance=<scipp.Variable> ()    float64              [m]  [15.000000], chopper_speed=<scipp.Variable> ()    float64           [1/us]  [0.000007], chopper_detector_distance=<scipp.Variable> ()    float64             [Å]  [190000000000.000000], chopper_chopper_distance=<scipp.Variable> ()    float64              [m]  [0.490000], chopper_phase=<scipp.Variable> ()    float64            [deg]  [-8.000000], wavelength_cut=<scipp.Variable> ()    float64             [Å]  [2.400000], m_value=<scipp.Variable> ()      int64  [dimensionless]  [5], data_file=None, supermirror_critical_edge=<scipp.Variable> ()    float64           [1/Å]  [0.022000], supermirror_alpha=2.8409090909090913)

Bases: ess.amor.amor_data.AmorData

Additional functionality over the ess.amor.AmorData class for use with reference supermirror measurements.

Args:

data (scipp._scipp.core.DataArray or str): The data to be reduced or the path to the file to be reduced. sample_angle_offset (scipp.Variable, optional): Correction for omega or possibly misalignment of sample. Optional, default 0 degrees of arc. gravity (bool, optional): Should gravity be accounted for. Optional, default True. beam_size (scipp._scipp.core.Variable, optional): Size of the beam perpendicular to the scattering surface. Optional, default 0.001 m. sample_size (scipp._scipp.core.Variable, optional): Size of the sample in direction of the beam. Optional, default 0.01 m. detector_spatial_resolution (scipp._scipp.core.Variable, optional): Spatial resolution of the detector. Optional, default 2.5 mm chopper_sample_distance (scipp._scipp.core.Variable, optional): Distance from chopper to sample. Optional, default 15. m, chopper_speed (scipp._scipp.core.Variable, optional): Rotational velocity of the chopper. Optional, default 6.6666... e-6 µs^{-1}. chopper_detector_distance (scipp._scipp.core.Variable, optional): Distance from chopper to detector. Optional, default 19 m. chopper_chopper_distance (scipp._scipp.core.Variable, optional): The distance between the wavelength defining choppers. Optional, default 0.49 m chopper_phase (scipp._scipp.core.Variable, optional): Phase offset between chopper pulse and ToF zero. Optional, default -8. degrees of arc. wavelength_cut (scipp._scipp.core.Variable, optional): Minimum cutoff for wavelength. Optional, default 2.4 Å. m_value (scipp._scipp.core.Variable, optional): m-value of supermirror for reference. Optional, default 5. data_file (str, optional): If a scipp._scipp.core.DataArray is given as the data, a data_file should be defined for output in the file. Optional, default None. supermirror_critical_edge (scipp._scipp.core.Variable, optional): The q-value at the critial edge for the supermirror. Optional, defaults to 0.022 Å`. supermirror_alpha (float): The alpha value for the supermirror. Optional, defaults to 2.841 Å.

Attributes:

tau (scipp._scipp.core.Variable): Half of the inverse of the chopper speed.

class ess.amor.amor_data.Normalisation(sample, reference)

Bases: object

Normalisation between a sample and a reference measurement.

Args:

sample (ess.reflectometry.ReflData or ess.reflectometry.AmorData): The sample to be normalised. reference (ess.reflectometry.AmorReference): The reference measurement to normalise to.

q_bin(bins=None, unit=1 / Å)

Perform q-binned normalisation.

Args:

bins (array_like, optional): q-bin edges. Optional, defaults to the minimum q-range available with 100 bins. unit (scipp._scipp.core.Unit, optional): Unit for q. Optional, defaults to 1/Å.

Returns:

(scipp._scipp.core.DataArray): Normalised data array binned into qz with resolution.

wavelength_theta_bin(bins)

Perform wavelength/theta-binned normalisation.

Args:

bins (tuple of array_like): wavelength and theta edges.

Returns:

(scipp._scipp.core.DataArray): Normalised data array binned into wavelength and theta.

write_reflectometry(filename, bin_kwargs=None)

Write the reflectometry intensity data to a file.

Args:

filename (str): The file path for the file to be saved to. bin_kwargs (dict, optional): A dictionary of keyword arguments to be passed to the q_bin() class method. Optional, default is that default q_bin() keywords arguments are used.

write_wavelength_theta(filename, bins)

Write the reflectometry intensity data as a function of wavelength-theta to a file.

Args:

filename (str): The file path for the file to be saved to. bins (tuple of array_like): wavelength and theta edges.