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 z-components of scattering vector as coordinate values. Wavelength and incident angles are not accessible separately.
Public Member Functions | |
QzScan (const IAxis &qs_nm) | |
QzScan (int nbins, double qz_min, double qz_max) | |
Sets q-defined specular scan. Accepts either numpy array of q-values sorted in ascending order or an IAxis object with q-values. Alternatively an axis can be defined in-place, then the first passed parameter is the number of bins, second - minimum on-axis q-value, third - maximum on-axis q_value. More... | |
QzScan (std::vector< double > qs_nm) | |
Accepts qz-value vector (in inverse nm) More... | |
~QzScan () override | |
const PolFilter * | analyzer () const |
QzScan * | 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 i, 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... | |
double | offset () const |
bool | polarized () const |
PolMatrices | polMatrices () const |
const ScanResolution * | resolution () const |
void | setAbsoluteQResolution (const IRangedDistribution &distr, const std::vector< double > &std_dev) |
Sets qz 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 qz-axis. More... | |
void | setAbsoluteQResolution (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 | setOffset (double offset) |
void | setPolarization (R3 bloch_vector) |
Sets the polarization density matrix according to the given Bloch vector. More... | |
void | setQResolution (const ScanResolution &resolution) |
Sets q resolution values via ScanResolution object. More... | |
void | setRelativeQResolution (const IRangedDistribution &distr, const std::vector< double > &rel_dev) |
Sets qz 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 qz-axis. More... | |
void | setRelativeQResolution (const IRangedDistribution &distr, double rel_dev) |
virtual void | transferToCPP () |
Used for Python overriding of clone (see swig/tweaks.py) More... | |
double | wavelength () const override |
Protected Attributes | |
std::unique_ptr< R3 > | m_beamPolarization |
Bloch vector encoding the beam's polarization. More... | |
std::unique_ptr< PolFilter > | m_polAnalyzer |
Private Member Functions | |
QzScan (IAxis *qs_nm) | |
std::vector< std::vector< ParameterSample > > | applyQResolution () const |
std::vector< double > | generateQzVector () const |
Private Attributes | |
double | m_offset = 0. |
const std::unique_ptr< IAxis > | m_qs |
std::unique_ptr< ScanResolution > | m_resolution |
QzScan::QzScan | ( | std::vector< double > | qs_nm | ) |
Accepts qz-value vector (in inverse nm)
Definition at line 39 of file QzScan.cpp.
Referenced by clone().
QzScan::QzScan | ( | const IAxis & | qs_nm | ) |
Definition at line 44 of file QzScan.cpp.
QzScan::QzScan | ( | int | nbins, |
double | qz_min, | ||
double | qz_max | ||
) |
Sets q-defined specular scan. Accepts either numpy array of q-values sorted in ascending order or an IAxis object with q-values. Alternatively an axis can be defined in-place, then the first passed parameter is the number of bins, second - minimum on-axis q-value, third - maximum on-axis q_value.
Definition at line 49 of file QzScan.cpp.
|
overridedefault |
|
private |
Definition at line 25 of file QzScan.cpp.
References m_qs.
|
inlineinherited |
Definition at line 45 of file ISpecularScan.h.
References ISpecularScan::m_polAnalyzer.
|
private |
Definition at line 167 of file QzScan.cpp.
References m_qs, and m_resolution.
Referenced by createIntensities(), and generateQzVector().
|
overridevirtual |
Implements ISpecularScan.
Definition at line 56 of file QzScan.cpp.
References QzScan(), ISpecularScan::m_beamPolarization, m_offset, ISpecularScan::m_polAnalyzer, m_qs, and m_resolution.
Referenced by createCoordSystem().
|
inlineoverridevirtual |
Returns coordinate axis assigned to the data holder.
Implements ISpecularScan.
Definition at line 51 of file QzScan.h.
References m_qs.
Referenced by createCoordSystem().
|
overridevirtual |
Implements ISpecularScan.
Definition at line 97 of file QzScan.cpp.
References clone(), and coordinateAxis().
|
overridevirtual |
Returns intensity vector corresponding to convolution of given simulation elements.
Implements ISpecularScan.
Definition at line 102 of file QzScan.cpp.
References applyQResolution(), and m_qs.
|
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 83 of file QzScan.cpp.
References numberOfElements().
|
inlineoverridevirtual |
Returns IFootprintFactor object pointer.
Implements ISpecularScan.
|
overridevirtual |
Generates simulation elements for specular simulations.
Implements ISpecularScan.
Definition at line 70 of file QzScan.cpp.
References SpecularElement::FromQzScan(), generateQzVector(), m_offset, and ISpecularScan::polMatrices().
|
private |
Definition at line 155 of file QzScan.cpp.
References applyQResolution(), and numberOfElements().
Referenced by generateElements().
|
overridevirtual |
Returns the number of simulation elements.
Implements ISpecularScan.
Definition at line 92 of file QzScan.cpp.
References m_qs, and m_resolution.
Referenced by footprint(), and generateQzVector().
|
inline |
|
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 AlphaScan::generateElements(), and generateElements().
|
inline |
Definition at line 42 of file QzScan.h.
References m_resolution.
Referenced by setAbsoluteQResolution(), setQResolution(), and setRelativeQResolution().
void QzScan::setAbsoluteQResolution | ( | const IRangedDistribution & | distr, |
const std::vector< double > & | std_dev | ||
) |
Sets qz 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 qz-axis.
Definition at line 147 of file QzScan.cpp.
References resolution(), ScanResolution::scanAbsoluteResolution(), and setQResolution().
void QzScan::setAbsoluteQResolution | ( | const IRangedDistribution & | distr, |
double | std_dev | ||
) |
Definition at line 140 of file QzScan.cpp.
References resolution(), ScanResolution::scanAbsoluteResolution(), and setQResolution().
|
inherited |
Sets the polarization analyzer characteristics of the detector.
Definition at line 26 of file ISpecularScan.cpp.
References ISpecularScan::m_polAnalyzer.
|
inline |
|
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 QzScan::setQResolution | ( | const ScanResolution & | resolution | ) |
Sets q resolution values via ScanResolution object.
Definition at line 120 of file QzScan.cpp.
References ScanResolution::clone(), m_resolution, and resolution().
Referenced by setAbsoluteQResolution(), and setRelativeQResolution().
void QzScan::setRelativeQResolution | ( | const IRangedDistribution & | distr, |
const std::vector< double > & | rel_dev | ||
) |
Sets qz 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 qz-axis.
Definition at line 132 of file QzScan.cpp.
References resolution(), ScanResolution::scanRelativeResolution(), and setQResolution().
void QzScan::setRelativeQResolution | ( | const IRangedDistribution & | distr, |
double | rel_dev | ||
) |
Definition at line 125 of file QzScan.cpp.
References resolution(), ScanResolution::scanRelativeResolution(), and setQResolution().
|
inlinevirtualinherited |
Used for Python overriding of clone (see swig/tweaks.py)
Definition at line 32 of file ICloneable.h.
|
inlineoverridevirtual |
Implements ISpecularScan.
|
protectedinherited |
Bloch vector encoding the beam's polarization.
Definition at line 77 of file ISpecularScan.h.
Referenced by AlphaScan::clone(), clone(), ISpecularScan::polarized(), ISpecularScan::polMatrices(), and ISpecularScan::setPolarization().
|
private |
Definition at line 100 of file QzScan.h.
Referenced by clone(), generateElements(), offset(), and setOffset().
|
protectedinherited |
Definition at line 78 of file ISpecularScan.h.
Referenced by ISpecularScan::analyzer(), AlphaScan::clone(), clone(), ISpecularScan::polarized(), ISpecularScan::polMatrices(), and ISpecularScan::setAnalyzer().
|
private |
Definition at line 97 of file QzScan.h.
Referenced by QzScan(), applyQResolution(), clone(), coordinateAxis(), createIntensities(), and numberOfElements().
|
private |
Definition at line 98 of file QzScan.h.
Referenced by applyQResolution(), clone(), numberOfElements(), resolution(), and setQResolution().