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.ReflDataReduction of a single Amor dataset.
- Args:
data (
scipp._scipp.core.DataArrayorstr): 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, defaultNone. data_owner (str, optional): The name of the owner of the data. Optional, defaultNone. experiment_id (str, optional): The experimental identifier. Optional, defaultNone. experiment_date (str, optional): The date or date range for the experiment. Optional, defaultNone. sample_description (str, optional): A short description of the sample. Optional, defaultNone. reduction_file (str, optional): The name of the file used for reduction (.pyscript or.ipynbnotebook). Optional, defaultNone. data_file (str, optional): If ascipp._scipp.core.DataArrayis given as thedata, adata_fileshould be defined for output in the file. Optional, defaultNone. reduction_creator_affiliation (str, optional): The affiliation of the reduction owner. Optional, defaults toNone. sample_angle_offset (scipp.Variable, optional): Correction for omega or possibly misalignment of sample. Optional, default0 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, default0.001 m. sample_size (scipp._scipp.core.Variable, optional): Size of the sample in direction of the beam. Optional, default0.01 m. detector_spatial_resolution (scipp._scipp.core.Variable, optional): Spatial resolution of the detector. Optional, default2.5 mmchopper_sample_distance (scipp._scipp.core.Variable, optional): Distance from chopper to sample. Optional, default15. mchopper_speed (scipp._scipp.core.Variable, optional): Rotational velocity of the chopper. Optional, default6.6666... e-6 µs^{-1}. chopper_detector_distance (scipp._scipp.core.Variable, optional): Distance from chopper to detector. Optional, default19 m. chopper_chopper_distance (scipp._scipp.core.Variable, optional): The distance between the wavelength defining choppers. Optional, default0.49 mchopper_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, default2.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.ReflDatawavelength masking functionality.- Args:
wavelength_min (
scipp._scipp.core.Variable, optional): Minimum wavelength to be used. Optional, default towavelength_cutvalue. wavelength_max (scipp._scipp.core.Variable, optional): Maximum wavelength to be used. Optional, default towavelength_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.AmorDataAdditional functionality over the
ess.amor.AmorDataclass for use with reference supermirror measurements.- Args:
data (
scipp._scipp.core.DataArrayorstr): 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, default0 degrees of arc. gravity (bool, optional): Should gravity be accounted for. Optional, defaultTrue. beam_size (scipp._scipp.core.Variable, optional): Size of the beam perpendicular to the scattering surface. Optional, default0.001 m. sample_size (scipp._scipp.core.Variable, optional): Size of the sample in direction of the beam. Optional, default0.01 m. detector_spatial_resolution (scipp._scipp.core.Variable, optional): Spatial resolution of the detector. Optional, default2.5 mmchopper_sample_distance (scipp._scipp.core.Variable, optional): Distance from chopper to sample. Optional, default15. m,chopper_speed (scipp._scipp.core.Variable, optional): Rotational velocity of the chopper. Optional, default6.6666... e-6 µs^{-1}. chopper_detector_distance (scipp._scipp.core.Variable, optional): Distance from chopper to detector. Optional, default19 m. chopper_chopper_distance (scipp._scipp.core.Variable, optional): The distance between the wavelength defining choppers. Optional, default0.49 mchopper_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, default2.4 Å. m_value (scipp._scipp.core.Variable, optional): m-value of supermirror for reference. Optional, default5. data_file (str, optional): If ascipp._scipp.core.DataArrayis given as thedata, adata_fileshould be defined for output in the file. Optional, defaultNone. supermirror_critical_edge (scipp._scipp.core.Variable, optional): The q-value at the critial edge for the supermirror. Optional, defaults to0.022 Å`. supermirror_alpha (float): The alpha value for the supermirror. Optional, defaults to2.841 Å.- Attributes:
tau (
scipp._scipp.core.Variable): Half of the inverse of the chopper speed.
- class ess.amor.amor_data.Normalisation(sample, reference)¶
Bases:
objectNormalisation between a sample and a reference measurement.
- Args:
sample (
ess.reflectometry.ReflDataoress.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 (
tupleofarray_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.
- 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 (tupleofarray_like): wavelength and theta edges.