islatu.data¶
This module contains both the Data class and the MeasurementBase class. In a reflectometry measurement, the experimental data corresponds to the reflected intensity as a function of scattering vector Q. In a typical diffractometer, Q is a virtual axis, calculated geometrically from various motor positions. The Data class takes care of these conversions, exposing q, theta, intensity, reflectivity, and energy.
The MeasurementBase class defines a simple class that is Data, but that also has metadata.
- class islatu.data.Data(intensity, intensity_e, energy, theta=None, q_vectors=None)[source]¶
Bases:
object
The base class of all Islatu objects that contain data.
- intensity¶
A numpy array containing intensities in this dataset.
- intensity_e¶
A numpy array containing the corresponding errors in intensity.
- theta¶
A numpy array containing the probe particle’s angle of incidence at each intensity.
- q_vectors¶
A numpy array containing the magnitude of the probe particle’s scattering vector for each intensity value.
- energy¶
The energy of the probe particle used to acquire this data. This is necessary to swap between theta and q.
- Parameters
intensity – A numpy array of the intensities in this dataset.
intensity_e – The errors on the intensities.
energy – The energy of the probe particle used to acquire this data.
theta – A numpy array containing the probe particle’s angle of incidence at each intensity. NOTE: only one of theta/q needs to be provided.
q_vectors – A numpy array containing the magnitude of the probe particle’s scattering vector for each intensity value. NOTE: only one of theta/q needs to be provided.
- property q_vectors: array¶
Returns self._q if this instance of Data was generated from q-data. Otherwise, converts from self._theta to q.
- property reflectivity: array¶
Returns the intensity, normalized such that the maximum value of the intensity is equal to 1. To acquire
- property reflectivity_e: array¶
Returns the errors on the intensity, divided by the maximum value of the intensity array.
- remove_data_points(indices)[source]¶
Convenience method for the removal of a specific data point by its index.
- Parameters
indices – The indices to be removed.
- property theta: array¶
Returns self._theta if this instance of Data was generate from th-data. Otherwise, converts from scattered q to theta.