BornAgain
1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
|
Scan type with inclination angles as coordinate values and a unique wavelength. Features footprint correction.
Definition at line 27 of file AlphaScan.h.
Public Member Functions | |
AlphaScan (double wl, const IAxis &inc_angle) | |
AlphaScan (double wl, int nbins, double alpha_i_min, double alpha_i_max) | |
Sets angle-defined specular scan. The first parameter is always a wavelength in nm. Second parameter is either a numpy array of incident angles in radians or an IAxis object with angle values. Alternatively an axis can be defined in-place, then the second passed parameter is the number of bins, third - minimum on-axis angle value, fourth - maximum on-axis angle value. More... | |
AlphaScan (double wl, std::vector< double > inc_angle) | |
~AlphaScan () override | |
const PolFilter * | analyzer () const |
const ScanResolution * | angleResolution () const |
AlphaScan * | clone () const override |
const IAxis * | coordinateAxis () const override |
Returns coordinate axis assigned to the data holder. More... | |
CoordSystem1D * | createCoordSystem () const override |
std::vector< double > | createIntensities (const std::vector< SpecularElement > &eles) const override |
Returns intensity vector corresponding to convolution of given simulation elements. More... | |
std::vector< double > | footprint (size_t start, size_t n_elements) const override |
Returns footprint correction factor for a range of simulation elements of size n_elements and starting from element with index i. More... | |
const IFootprintFactor * | footprintFactor () const override |
Returns IFootprintFactor object pointer. More... | |
std::vector< SpecularElement > | generateElements () const override |
Generates simulation elements for specular simulations. More... | |
size_t | numberOfElements () const override |
Returns the number of simulation elements. More... | |
bool | polarized () const |
PolMatrices | polMatrices () const |
void | setAbsoluteAngularResolution (const IRangedDistribution &distr, const std::vector< double > &std_dev) |
Sets angular resolution values via IRangedDistribution and values of standard deviations. std_dev can be either single-valued or a numpy array. In the latter case the length of the array should coinside with the length of the inclination angle axis. More... | |
void | setAbsoluteAngularResolution (const IRangedDistribution &distr, double std_dev) |
void | setAbsoluteWavelengthResolution (const IRangedDistribution &distr, const std::vector< double > &std_dev) |
Sets wavelength resolution values via IRangedDistribution and values of standard deviations. std_dev can be either single-valued or a numpy array. In the latter case the length of the array should coinside with the length of the inclination angle axis. More... | |
void | setAbsoluteWavelengthResolution (const IRangedDistribution &distr, double std_dev) |
void | setAnalyzer (R3 direction, double efficiency, double total_transmission) |
Sets the polarization analyzer characteristics of the detector. More... | |
void | setAngleResolution (const ScanResolution &resolution) |
Sets angle resolution values via ScanResolution object. More... | |
void | setFootprintFactor (const IFootprintFactor *f_factor) |
Sets footprint correction factor. More... | |
void | setPolarization (R3 bloch_vector) |
Sets the polarization density matrix according to the given Bloch vector. More... | |
void | setRelativeAngularResolution (const IRangedDistribution &distr, const std::vector< double > &rel_dev) |
Sets angular resolution values via IRangedDistribution and values of relative deviations (that is, rel_dev equals standard deviation divided by the mean value). rel_dev can be either single-valued or a numpy array. In the latter case the length of the array should coinside with the length of the inclination angle axis. More... | |
void | setRelativeAngularResolution (const IRangedDistribution &distr, double rel_dev) |
void | setRelativeWavelengthResolution (const IRangedDistribution &distr, const std::vector< double > &rel_dev) |
Sets wavelength resolution values via IRangedDistribution and values of relative deviations (that is, rel_dev equals standard deviation divided by the mean value). rel_dev can be either single-valued or a numpy array. In the latter case the length of the array should coinside with the length of the inclination angle axis. More... | |
void | setRelativeWavelengthResolution (const IRangedDistribution &distr, double rel_dev) |
void | setWavelengthResolution (const ScanResolution &resolution) |
Sets wavelength resolution values via ScanResolution object. More... | |
virtual void | transferToCPP () |
Used for Python overriding of clone (see swig/tweaks.py) More... | |
double | wavelength () const override |
const ScanResolution * | wavelengthResolution () const |
Protected Attributes | |
std::unique_ptr< R3 > | m_beamPolarization |
Bloch vector encoding the beam's polarization. More... | |
std::unique_ptr< PolFilter > | m_polAnalyzer |
Private Types | |
using | DistrOutput = std::vector< std::vector< ParameterSample > > |
Private Member Functions | |
DistrOutput | applyIncResolution () const |
DistrOutput | applyWlResolution () const |
void | checkInitialization () |
Private Attributes | |
std::unique_ptr< IFootprintFactor > | m_footprint |
const std::unique_ptr< IAxis > | m_inc_angle |
std::unique_ptr< ScanResolution > | m_inc_resolution |
const double | m_wl |
std::unique_ptr< ScanResolution > | m_wl_resolution |
|
private |
Definition at line 109 of file AlphaScan.h.
AlphaScan::AlphaScan | ( | double | wl, |
std::vector< double > | inc_angle | ||
) |
Definition at line 48 of file AlphaScan.cpp.
References checkInitialization().
Referenced by clone().
AlphaScan::AlphaScan | ( | double | wl, |
const IAxis & | inc_angle | ||
) |
Definition at line 57 of file AlphaScan.cpp.
References checkInitialization().
AlphaScan::AlphaScan | ( | double | wl, |
int | nbins, | ||
double | alpha_i_min, | ||
double | alpha_i_max | ||
) |
Sets angle-defined specular scan. The first parameter is always a wavelength in nm. Second parameter is either a numpy array of incident angles in radians or an IAxis object with angle values. Alternatively an axis can be defined in-place, then the second passed parameter is the number of bins, third - minimum on-axis angle value, fourth - maximum on-axis angle value.
Definition at line 66 of file AlphaScan.cpp.
References checkInitialization().
|
overridedefault |
|
inlineinherited |
Definition at line 45 of file ISpecularScan.h.
References ISpecularScan::m_polAnalyzer.
|
inline |
|
private |
Definition at line 278 of file AlphaScan.cpp.
References m_inc_angle, and m_inc_resolution.
Referenced by createIntensities(), footprint(), and generateElements().
|
private |
Definition at line 273 of file AlphaScan.cpp.
References m_inc_angle, m_wl, and m_wl_resolution.
Referenced by createIntensities(), and generateElements().
|
private |
Definition at line 259 of file AlphaScan.cpp.
References m_inc_angle, and m_wl.
Referenced by AlphaScan().
|
overridevirtual |
Implements ISpecularScan.
Definition at line 75 of file AlphaScan.cpp.
References AlphaScan(), ISpecularScan::m_beamPolarization, m_footprint, m_inc_angle, m_inc_resolution, ISpecularScan::m_polAnalyzer, m_wl, and m_wl_resolution.
|
inlineoverridevirtual |
Returns coordinate axis assigned to the data holder.
Implements ISpecularScan.
Definition at line 45 of file AlphaScan.h.
References m_inc_angle.
Referenced by createCoordSystem().
|
overridevirtual |
Implements ISpecularScan.
Definition at line 230 of file AlphaScan.cpp.
References coordinateAxis(), and wavelength().
|
overridevirtual |
Returns intensity vector corresponding to convolution of given simulation elements.
Implements ISpecularScan.
Definition at line 235 of file AlphaScan.cpp.
References applyIncResolution(), applyWlResolution(), m_inc_angle, and ParameterSample::weight.
|
overridevirtual |
Returns footprint correction factor for a range of simulation elements of size n_elements and starting from element with index i.
Implements ISpecularScan.
Definition at line 188 of file AlphaScan.cpp.
References applyIncResolution(), m_footprint, m_inc_resolution, M_PI_2, m_wl_resolution, numberOfElements(), and ParameterSample::value.
|
inlineoverridevirtual |
Returns IFootprintFactor object pointer.
Implements ISpecularScan.
Definition at line 48 of file AlphaScan.h.
References m_footprint.
|
overridevirtual |
Generates simulation elements for specular simulations.
Implements ISpecularScan.
Definition at line 90 of file AlphaScan.cpp.
References applyIncResolution(), applyWlResolution(), SpecularElement::FromAlphaScan(), m_inc_angle, M_PI_2, numberOfElements(), ISpecularScan::polMatrices(), ParameterSample::value, and wavelength().
|
overridevirtual |
Returns the number of simulation elements.
Implements ISpecularScan.
Definition at line 225 of file AlphaScan.cpp.
References m_inc_angle, m_inc_resolution, and m_wl_resolution.
Referenced by footprint(), and generateElements().
|
inherited |
Definition at line 31 of file ISpecularScan.cpp.
References ISpecularScan::m_beamPolarization, and ISpecularScan::m_polAnalyzer.
|
inherited |
Definition at line 36 of file ISpecularScan.cpp.
References SpinMatrix::FromBlochVector(), ISpecularScan::m_beamPolarization, ISpecularScan::m_polAnalyzer, PolMatrices::setAnalyzerMatrix(), and PolMatrices::setPolarizerMatrix().
Referenced by generateElements(), and QzScan::generateElements().
void AlphaScan::setAbsoluteAngularResolution | ( | const IRangedDistribution & | distr, |
const std::vector< double > & | std_dev | ||
) |
Sets angular resolution values via IRangedDistribution and values of standard deviations. std_dev can be either single-valued or a numpy array. In the latter case the length of the array should coinside with the length of the inclination angle axis.
Definition at line 180 of file AlphaScan.cpp.
References ScanResolution::scanAbsoluteResolution(), and setAngleResolution().
void AlphaScan::setAbsoluteAngularResolution | ( | const IRangedDistribution & | distr, |
double | std_dev | ||
) |
Definition at line 173 of file AlphaScan.cpp.
References ScanResolution::scanAbsoluteResolution(), and setAngleResolution().
void AlphaScan::setAbsoluteWavelengthResolution | ( | const IRangedDistribution & | distr, |
const std::vector< double > & | std_dev | ||
) |
Sets wavelength resolution values via IRangedDistribution and values of standard deviations. std_dev can be either single-valued or a numpy array. In the latter case the length of the array should coinside with the length of the inclination angle axis.
Definition at line 145 of file AlphaScan.cpp.
References ScanResolution::scanAbsoluteResolution(), and setWavelengthResolution().
void AlphaScan::setAbsoluteWavelengthResolution | ( | const IRangedDistribution & | distr, |
double | std_dev | ||
) |
Definition at line 138 of file AlphaScan.cpp.
References ScanResolution::scanAbsoluteResolution(), and setWavelengthResolution().
|
inherited |
Sets the polarization analyzer characteristics of the detector.
Definition at line 26 of file ISpecularScan.cpp.
References ISpecularScan::m_polAnalyzer.
void AlphaScan::setAngleResolution | ( | const ScanResolution & | resolution | ) |
Sets angle resolution values via ScanResolution object.
Definition at line 153 of file AlphaScan.cpp.
References ScanResolution::clone(), and m_inc_resolution.
Referenced by setAbsoluteAngularResolution(), and setRelativeAngularResolution().
void AlphaScan::setFootprintFactor | ( | const IFootprintFactor * | f_factor | ) |
Sets footprint correction factor.
Definition at line 113 of file AlphaScan.cpp.
References IFootprintFactor::clone(), and m_footprint.
|
inherited |
Sets the polarization density matrix according to the given Bloch vector.
Definition at line 21 of file ISpecularScan.cpp.
References ISpecularScan::m_beamPolarization.
void AlphaScan::setRelativeAngularResolution | ( | const IRangedDistribution & | distr, |
const std::vector< double > & | rel_dev | ||
) |
Sets angular resolution values via IRangedDistribution and values of relative deviations (that is, rel_dev equals standard deviation divided by the mean value). rel_dev can be either single-valued or a numpy array. In the latter case the length of the array should coinside with the length of the inclination angle axis.
Definition at line 165 of file AlphaScan.cpp.
References ScanResolution::scanRelativeResolution(), and setAngleResolution().
void AlphaScan::setRelativeAngularResolution | ( | const IRangedDistribution & | distr, |
double | rel_dev | ||
) |
Definition at line 158 of file AlphaScan.cpp.
References ScanResolution::scanRelativeResolution(), and setAngleResolution().
void AlphaScan::setRelativeWavelengthResolution | ( | const IRangedDistribution & | distr, |
const std::vector< double > & | rel_dev | ||
) |
Sets wavelength resolution values via IRangedDistribution and values of relative deviations (that is, rel_dev equals standard deviation divided by the mean value). rel_dev can be either single-valued or a numpy array. In the latter case the length of the array should coinside with the length of the inclination angle axis.
Definition at line 130 of file AlphaScan.cpp.
References ScanResolution::scanRelativeResolution(), and setWavelengthResolution().
void AlphaScan::setRelativeWavelengthResolution | ( | const IRangedDistribution & | distr, |
double | rel_dev | ||
) |
Definition at line 123 of file AlphaScan.cpp.
References ScanResolution::scanRelativeResolution(), and setWavelengthResolution().
void AlphaScan::setWavelengthResolution | ( | const ScanResolution & | resolution | ) |
Sets wavelength resolution values via ScanResolution object.
Definition at line 118 of file AlphaScan.cpp.
References ScanResolution::clone(), and m_wl_resolution.
Referenced by setAbsoluteWavelengthResolution(), and setRelativeWavelengthResolution().
|
inlinevirtualinherited |
Used for Python overriding of clone (see swig/tweaks.py)
Definition at line 32 of file ICloneable.h.
|
inlineoverridevirtual |
Implements ISpecularScan.
Definition at line 67 of file AlphaScan.h.
References m_wl.
Referenced by createCoordSystem(), and generateElements().
|
inline |
|
protectedinherited |
Bloch vector encoding the beam's polarization.
Definition at line 77 of file ISpecularScan.h.
Referenced by clone(), QzScan::clone(), ISpecularScan::polarized(), ISpecularScan::polMatrices(), and ISpecularScan::setPolarization().
|
private |
Definition at line 117 of file AlphaScan.h.
Referenced by clone(), footprint(), footprintFactor(), and setFootprintFactor().
|
private |
Definition at line 116 of file AlphaScan.h.
Referenced by applyIncResolution(), applyWlResolution(), checkInitialization(), clone(), coordinateAxis(), createIntensities(), generateElements(), and numberOfElements().
|
private |
Definition at line 120 of file AlphaScan.h.
Referenced by angleResolution(), applyIncResolution(), clone(), footprint(), numberOfElements(), and setAngleResolution().
|
protectedinherited |
Definition at line 78 of file ISpecularScan.h.
Referenced by ISpecularScan::analyzer(), clone(), QzScan::clone(), ISpecularScan::polarized(), ISpecularScan::polMatrices(), and ISpecularScan::setAnalyzer().
|
private |
Definition at line 115 of file AlphaScan.h.
Referenced by applyWlResolution(), checkInitialization(), clone(), and wavelength().
|
private |
Definition at line 119 of file AlphaScan.h.
Referenced by applyWlResolution(), clone(), footprint(), numberOfElements(), setWavelengthResolution(), and wavelengthResolution().