diff --git a/Base/Element/DepthProbeElement.cpp b/Base/Element/DepthProbeElement.cpp index ec3e318b074587401fcc8529a945c8fe10db5449..47b80b728b417bb19ff7bbfb33b0879f8b4b0210 100644 --- a/Base/Element/DepthProbeElement.cpp +++ b/Base/Element/DepthProbeElement.cpp @@ -19,7 +19,7 @@ const double phi_i_0 = 0.0; DepthProbeElement::DepthProbeElement(double wavelength, double alpha_i, const IAxis* z_positions) - : IElement(PolarizerPair()) + : IElement(PolMatrices()) , m_wavelength(wavelength) , m_alpha_i(alpha_i) , m_z_positions(z_positions) @@ -32,7 +32,7 @@ DepthProbeElement::DepthProbeElement(double wavelength, double alpha_i, const IA } DepthProbeElement::DepthProbeElement(DepthProbeElement&& other) noexcept - : IElement(PolarizerPair()) + : IElement(PolMatrices()) , m_wavelength(other.m_wavelength) , m_alpha_i(other.m_alpha_i) , m_intensities(std::move(other.m_intensities)) diff --git a/Base/Element/IElement.h b/Base/Element/IElement.h index 2883faccf1f6c3e6db8109b78613b04009c385c9..57dadbb80f4685ad61953427cf82700729bff0d1 100644 --- a/Base/Element/IElement.h +++ b/Base/Element/IElement.h @@ -20,7 +20,7 @@ #ifndef BORNAGAIN_BASE_ELEMENT_IELEMENT_H #define BORNAGAIN_BASE_ELEMENT_IELEMENT_H -#include "Base/Element/PolarizerPair.h" +#include "Base/Element/PolMatrices.h" //#include "Base/Vector/Vectors3D.h" #include <memory> @@ -28,10 +28,10 @@ class IElement { public: - IElement(const PolarizerPair& polpair) : m_polpair(polpair) {} + IElement(const PolMatrices& polpair) : m_polpair(polpair) {} protected: - const PolarizerPair m_polpair; + const PolMatrices m_polpair; }; #endif // BORNAGAIN_BASE_ELEMENT_IELEMENT_H diff --git a/Base/Element/PolarizerPair.cpp b/Base/Element/PolMatrices.cpp similarity index 54% rename from Base/Element/PolarizerPair.cpp rename to Base/Element/PolMatrices.cpp index 2c079eb40ad305427799bcf4bd9fda7da884ee9d..c443011f0626a84a92a443a0bac8a06165b4372e 100644 --- a/Base/Element/PolarizerPair.cpp +++ b/Base/Element/PolMatrices.cpp @@ -2,7 +2,7 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file Base/Element/PolarizerPair.cpp +//! @file Base/Element/PolMatrices.cpp //! @brief Implements class PolarizerPair. //! //! @homepage http://www.bornagainproject.org @@ -12,22 +12,16 @@ // // ************************************************************************************************ -#include "Base/Element/PolarizerPair.h" +#include "Base/Element/PolMatrices.h" // corresponds to completely unpolarized beam and the absence of spin selection in the analyzer -PolarizerPair::PolarizerPair() - : m_polpair(Eigen::Matrix2cd::Identity() / 2.0) - , m_analyzer_operator(Eigen::Matrix2cd::Identity()) +PolMatrices::PolMatrices() + : m_polarizer_matrix(Eigen::Matrix2cd::Identity() / 2.0) + , m_analyzer_matrix(Eigen::Matrix2cd::Identity()) { } -PolarizerPair::PolarizerPair(const Eigen::Matrix2cd& polarization, const Eigen::Matrix2cd& analyzer) - : m_polpair(polarization), m_analyzer_operator(analyzer) +PolMatrices::PolMatrices(const Eigen::Matrix2cd& polarization, const Eigen::Matrix2cd& analyzer) + : m_polarizer_matrix(polarization), m_analyzer_matrix(analyzer) { } - -void PolarizerPair::swapContent(PolarizerPair& other) -{ - std::swap(m_polpair, other.m_polpair); - std::swap(m_analyzer_operator, other.m_analyzer_operator); -} diff --git a/Base/Element/PolarizerPair.h b/Base/Element/PolMatrices.h similarity index 57% rename from Base/Element/PolarizerPair.h rename to Base/Element/PolMatrices.h index 5e0f7b72c4197366b3bc42f2e52dace5323a0d2c..19abeb99d1602eade35098af4aeb0dab0a2362ee 100644 --- a/Base/Element/PolarizerPair.h +++ b/Base/Element/PolMatrices.h @@ -2,7 +2,7 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file Base/Element/PolarizerPair.h +//! @file Base/Element/PolMatrices.h //! @brief Defines class PolarizerPair. //! //! @homepage http://www.bornagainproject.org @@ -17,37 +17,35 @@ #endif #ifndef USER_API -#ifndef BORNAGAIN_BASE_ELEMENT_POLARIZERPAIR_H -#define BORNAGAIN_BASE_ELEMENT_POLARIZERPAIR_H +#ifndef BORNAGAIN_BASE_ELEMENT_POLMATRICES_H +#define BORNAGAIN_BASE_ELEMENT_POLMATRICES_H #include "Base/Vector/EigenCore.h" //! Convenience class for handling polarization density matrix and polarization analyzer operator //! @ingroup simulation -class PolarizerPair { +class PolMatrices { public: - PolarizerPair(); - PolarizerPair(const Eigen::Matrix2cd& polarization, const Eigen::Matrix2cd& analyzer); + PolMatrices(); + PolMatrices(const Eigen::Matrix2cd& polarization, const Eigen::Matrix2cd& analyzer); //! Sets the polarization density matrix (in spin basis along z-axis) - void setPolarization(const Eigen::Matrix2cd& polarization) { m_polpair = polarization; } + void setPolarizerMatrix(const Eigen::Matrix2cd& polarization) { m_polarizer_matrix = polarization; } //! Gets the polarization density matrix (in spin basis along z-axis) - Eigen::Matrix2cd getPolarization() const { return m_polpair; } + Eigen::Matrix2cd polarizerMatrix() const { return m_polarizer_matrix; } //! Sets the polarization analyzer operator (in spin basis along z-axis) - void setAnalyzerOperator(const Eigen::Matrix2cd& analyzer) { m_analyzer_operator = analyzer; } + void setAnalyzerMatrix(const Eigen::Matrix2cd& analyzer) { m_analyzer_matrix = analyzer; } //! Gets the polarization analyzer operator (in spin basis along z-axis) - Eigen::Matrix2cd getAnalyzerOperator() const { return m_analyzer_operator; } - - void swapContent(PolarizerPair& other); + Eigen::Matrix2cd analyzerMatrix() const { return m_analyzer_matrix; } private: - Eigen::Matrix2cd m_polpair; //!< polarization density matrix - Eigen::Matrix2cd m_analyzer_operator; //!< polarization analyzer operator + Eigen::Matrix2cd m_polarizer_matrix; //!< polarization density matrix + Eigen::Matrix2cd m_analyzer_matrix; //!< polarization analyzer operator }; -#endif // BORNAGAIN_BASE_ELEMENT_POLARIZERPAIR_H +#endif // BORNAGAIN_BASE_ELEMENT_POLMATRICES_H #endif // USER_API diff --git a/Core/Computation/SpecularComputation.cpp b/Core/Computation/SpecularComputation.cpp index a5364803acf56fb3734d03cdbfcc9453ad221f27..a774a44c8d19679634c3a9fdab3839558a9211d4 100644 --- a/Core/Computation/SpecularComputation.cpp +++ b/Core/Computation/SpecularComputation.cpp @@ -43,8 +43,8 @@ void SpecularComputation::runProtected() if (m_re_sample.polarizing()) { const Eigen::Matrix2cd R = Compute::SpecularMagnetic::topLayerR(slices, kz_stack, true); - const auto& polarization = ele.polarizationHandler().getPolarization(); - const auto& analyzer = ele.polarizationHandler().getAnalyzerOperator(); + const auto& polarization = ele.polarizationHandler().polarizerMatrix(); + const auto& analyzer = ele.polarizationHandler().analyzerMatrix(); const complex_t trace = (polarization * R.adjoint() * analyzer * R).trace(); diff --git a/Core/Scan/AlphaScan.cpp b/Core/Scan/AlphaScan.cpp index f10d37c9c07fe80a4540b7ad7606697c76210df2..11d80c1784858d70dea8f4e484131de62d8651ed 100644 --- a/Core/Scan/AlphaScan.cpp +++ b/Core/Scan/AlphaScan.cpp @@ -80,7 +80,7 @@ AlphaScan* AlphaScan::clone() const AlphaScan::~AlphaScan() = default; -std::vector<SpecularElement> AlphaScan::generateElements(const PolarizerPair& polpair) const +std::vector<SpecularElement> AlphaScan::generateElements(const PolMatrices& polpair) const { const auto wls = extractValues(applyWlResolution(), [](const ParameterSample& sample) { return sample.value; }); diff --git a/Core/Scan/AlphaScan.h b/Core/Scan/AlphaScan.h index 1428119359fb9f1612556b076f68dc8f0c6fa630..f770e90b6ea67104a33bda0ec6d71b8d5e163757 100644 --- a/Core/Scan/AlphaScan.h +++ b/Core/Scan/AlphaScan.h @@ -39,7 +39,7 @@ public: #ifndef SWIG //! Generates simulation elements for specular simulations - std::vector<SpecularElement> generateElements(const PolarizerPair& polpair) const override; + std::vector<SpecularElement> generateElements(const PolMatrices& polpair) const override; //! Returns coordinate axis assigned to the data holder virtual const IAxis* coordinateAxis() const override { return m_inc_angle.get(); } diff --git a/Core/Scan/ISpecularScan.h b/Core/Scan/ISpecularScan.h index 13c7b1b9ef3788391eefef1cf5eb5d07d7ed756a..90605d90ffc5a61bc9f9cb277fee10123a0201e5 100644 --- a/Core/Scan/ISpecularScan.h +++ b/Core/Scan/ISpecularScan.h @@ -22,7 +22,7 @@ class CoordSystem1D; class IAxis; class IFootprintFactor; -class PolarizerPair; +class PolMatrices; class SpecularElement; //! Abstract base class for all types of specular scans. @@ -33,7 +33,7 @@ public: #ifndef SWIG //! Generates simulation elements for specular simulations - virtual std::vector<SpecularElement> generateElements(const PolarizerPair& polpair) const = 0; + virtual std::vector<SpecularElement> generateElements(const PolMatrices& polpair) const = 0; //! Returns coordinate axis assigned to the data holder virtual const IAxis* coordinateAxis() const = 0; diff --git a/Core/Scan/QzScan.cpp b/Core/Scan/QzScan.cpp index a4df7a61d0b3c9eeba448affc8fe8b8f30869ef0..e2f19b27dbd44b5f490e0c82ffbf8634e4b16f3b 100644 --- a/Core/Scan/QzScan.cpp +++ b/Core/Scan/QzScan.cpp @@ -51,7 +51,7 @@ QzScan* QzScan::clone() const } //! Generates simulation elements for specular simulations -std::vector<SpecularElement> QzScan::generateElements(const PolarizerPair& polpair) const +std::vector<SpecularElement> QzScan::generateElements(const PolMatrices& polpair) const { const std::vector<double> qz = generateQzVector(); diff --git a/Core/Scan/QzScan.h b/Core/Scan/QzScan.h index f93566d97f34fe99a72aabac6d7a0087b1f0c173..1ff292e5397e8aef1950856d577b9e21accb3cb0 100644 --- a/Core/Scan/QzScan.h +++ b/Core/Scan/QzScan.h @@ -43,7 +43,7 @@ public: #ifndef SWIG //! Generates simulation elements for specular simulations - std::vector<SpecularElement> generateElements(const PolarizerPair& polpair) const override; + std::vector<SpecularElement> generateElements(const PolMatrices& polpair) const override; //! Returns coordinate axis assigned to the data holder virtual const IAxis* coordinateAxis() const override { return m_qs.get(); } diff --git a/Device/Instrument/Instrument.cpp b/Device/Instrument/Instrument.cpp index 7b0308aedc97f8e502b8b2eb8c5ba6ae09c432f1..924a95786e0af8e139e4692aadf1d7a4e0c6c5ff 100644 --- a/Device/Instrument/Instrument.cpp +++ b/Device/Instrument/Instrument.cpp @@ -13,7 +13,7 @@ // ************************************************************************************************ #include "Device/Instrument/Instrument.h" -#include "Base/Element/PolarizerPair.h" +#include "Base/Element/PolMatrices.h" #include "Base/Pixel/RectangularPixel.h" #include "Device/Beam/Beam.h" #include "Device/Coord/CoordSystem2D.h" @@ -114,7 +114,7 @@ IDetector& Instrument::detector() return *m_detector; } -PolarizerPair Instrument::polarizerPair() const +PolMatrices Instrument::polarizerPair() const { return {m_beam->getPolarization(), m_detector->analyzer().matrix()}; } diff --git a/Device/Instrument/Instrument.h b/Device/Instrument/Instrument.h index 3210fdda5dd48a9391df028dacde3dfb3a99bd88..d243ab5a8b6c27b107981f4bc5d647cb12504eec 100644 --- a/Device/Instrument/Instrument.h +++ b/Device/Instrument/Instrument.h @@ -23,7 +23,7 @@ class Beam; class CoordSystem2D; class IDetector; -class PolarizerPair; +class PolMatrices; //! Assembles beam, detector and their relative positions with respect to the sample. @@ -58,7 +58,7 @@ public: void setPolFilters(const kvector_t& polarizer_dir, const kvector_t& analyzer_dir, double analyzer_efficiency, double analyzer_transmission); - PolarizerPair polarizerPair() const; + PolMatrices polarizerPair() const; std::vector<const INode*> getChildren() const override; diff --git a/Resample/Element/DiffuseElement.cpp b/Resample/Element/DiffuseElement.cpp index 962e1f3c9630605fa8aaa52b823c91d6f2461830..f10a89c5e422176766d3230ee02c077daa15d76f 100644 --- a/Resample/Element/DiffuseElement.cpp +++ b/Resample/Element/DiffuseElement.cpp @@ -75,8 +75,8 @@ DiffuseElement DiffuseElement::pointElement(double x, double y) const m_alpha_i, m_phi_i, std::unique_ptr<IPixel>(m_pixel->createZeroSizePixel(x, y)), // TODO simplify - m_polpair.getPolarization(), - m_polpair.getAnalyzerOperator(), + m_polpair.polarizerMatrix(), + m_polpair.analyzerMatrix(), m_is_specular, m_fluxes_in, m_fluxes_out}; diff --git a/Resample/Element/DiffuseElement.h b/Resample/Element/DiffuseElement.h index b961d4086493b9012e646b4f9ab3b4b9a23e8876..c40ac072c884e2101551e314ff6d6c413cdc29d0 100644 --- a/Resample/Element/DiffuseElement.h +++ b/Resample/Element/DiffuseElement.h @@ -51,7 +51,7 @@ public: DiffuseElement pointElement(double x, double y) const; //! Returns assigned PolarizerPair - const PolarizerPair& polarizationHandler() const { return m_polpair; } + const PolMatrices& polarizationHandler() const { return m_polpair; } double wavelength() const { return m_wavelength; } double getAlphaI() const { return m_alpha_i; } diff --git a/Resample/Element/SpecularElement.cpp b/Resample/Element/SpecularElement.cpp index fdcd13defa8a5da53ec692f9c8fa91e9edaf0b96..9d2fc832352daa8f6a184acb9039c25629f5bb5a 100644 --- a/Resample/Element/SpecularElement.cpp +++ b/Resample/Element/SpecularElement.cpp @@ -16,7 +16,7 @@ #include "Base/Vector/Direction.h" #include "Resample/Slice/KzComputation.h" -SpecularElement::SpecularElement(double kz, const PolarizerPair& polpair, bool computable) +SpecularElement::SpecularElement(double kz, const PolMatrices& polpair, bool computable) : IElement(polpair) , m_intensity(0.0) , m_computable(computable) @@ -25,7 +25,7 @@ SpecularElement::SpecularElement(double kz, const PolarizerPair& polpair, bool c { } -SpecularElement::SpecularElement(double wavelength, double alpha, const PolarizerPair& polpair, +SpecularElement::SpecularElement(double wavelength, double alpha, const PolMatrices& polpair, bool computable) : IElement(polpair) , m_intensity(0.0) diff --git a/Resample/Element/SpecularElement.h b/Resample/Element/SpecularElement.h index 8ed9651d43171fed0d3c9f967a13015b73979246..66d090d503f31b651e01a170fe7ed825a81dd2ae 100644 --- a/Resample/Element/SpecularElement.h +++ b/Resample/Element/SpecularElement.h @@ -32,8 +32,8 @@ class SliceStack; class SpecularElement : public IElement { public: - SpecularElement(double kz, const PolarizerPair& polpair, bool computable); - SpecularElement(double wavelength, double alpha, const PolarizerPair& polpair, bool computable); + SpecularElement(double kz, const PolMatrices& polpair, bool computable); + SpecularElement(double wavelength, double alpha, const PolMatrices& polpair, bool computable); SpecularElement(const SpecularElement& other) = delete; SpecularElement(SpecularElement&& other); @@ -41,7 +41,7 @@ public: ~SpecularElement(); //! Returns assigned PolarizerPair. - const PolarizerPair& polarizationHandler() const { return m_polpair; } + const PolMatrices& polarizationHandler() const { return m_polpair; } double intensity() const { return m_intensity; } void setIntensity(double intensity) { m_intensity = intensity; } diff --git a/Resample/Interparticle/DecouplingApproximationStrategy.cpp b/Resample/Interparticle/DecouplingApproximationStrategy.cpp index 9dbc3c8428a6b24fa764d357052a21d0c81e57df..96ca362375a8bdb62e8c181f70a8a4679ba96f01 100644 --- a/Resample/Interparticle/DecouplingApproximationStrategy.cpp +++ b/Resample/Interparticle/DecouplingApproximationStrategy.cpp @@ -62,13 +62,13 @@ double DecouplingApproximationStrategy::polarizedCalculation(const DiffuseElemen "numerical error in coherent sum (polarized, DA): amplitude is NaN"); const double fraction = ffw->relativeAbundance(); mean_amplitude += fraction * ff; - mean_intensity += fraction * (ff * polarization_handler.getPolarization() * ff.adjoint()); + mean_intensity += fraction * (ff * polarization_handler.polarizerMatrix() * ff.adjoint()); } const Eigen::Matrix2cd amplitude_matrix = - polarization_handler.getAnalyzerOperator() * mean_amplitude - * polarization_handler.getPolarization() * mean_amplitude.adjoint(); + polarization_handler.analyzerMatrix() * mean_amplitude + * polarization_handler.polarizerMatrix() * mean_amplitude.adjoint(); const Eigen::Matrix2cd intensity_matrix = - polarization_handler.getAnalyzerOperator() * mean_intensity; + polarization_handler.analyzerMatrix() * mean_intensity; const double amplitude_trace = std::abs(amplitude_matrix.trace()); const double intensity_trace = std::abs(intensity_matrix.trace()); const double coherence_factor = m_iff->evaluate(ele.meanQ()); diff --git a/Resample/Interparticle/SSCAStrategy.cpp b/Resample/Interparticle/SSCAStrategy.cpp index 268b9c23534563cfbb24b3dc85e2f5eeabd2b2ee..ec9a31e86fcbf61eba0af11993cd43c3ddeca986 100644 --- a/Resample/Interparticle/SSCAStrategy.cpp +++ b/Resample/Interparticle/SSCAStrategy.cpp @@ -78,7 +78,7 @@ double SSCAStrategy::polarizedCalculation(const DiffuseElement& ele) const for (const auto& ffw : m_weighted_formfactors) { const Eigen::Matrix2cd ff = ffw->summedPolFF(ele); const double fraction = ffw->relativeAbundance(); - diffuse_matrix += fraction * (ff * polarization_handler.getPolarization() * ff.adjoint()); + diffuse_matrix += fraction * (ff * polarization_handler.polarizerMatrix() * ff.adjoint()); const double radial_extension = ffw->radialExtension(); const complex_t prefac = ffw->relativeAbundance() * calculatePositionOffsetPhase(qp, radial_extension); @@ -88,10 +88,10 @@ double SSCAStrategy::polarizedCalculation(const DiffuseElement& ele) const const complex_t p2kappa = getCharacteristicSizeCoupling(qp, m_weighted_formfactors); const complex_t omega = m_iff->FTPDF(qp); const Eigen::Matrix2cd interference_matrix = - (2.0 * omega / (1.0 - p2kappa * omega)) * polarization_handler.getAnalyzerOperator() - * ff_orig * polarization_handler.getPolarization() * ff_conj; + (2.0 * omega / (1.0 - p2kappa * omega)) * polarization_handler.analyzerMatrix() + * ff_orig * polarization_handler.polarizerMatrix() * ff_conj; const Eigen::Matrix2cd diffuse_matrix2 = - polarization_handler.getAnalyzerOperator() * diffuse_matrix; + polarization_handler.analyzerMatrix() * diffuse_matrix; const double interference_trace = std::abs(interference_matrix.trace()); const double diffuse_trace = std::abs(diffuse_matrix2.trace()); const double dw_factor = m_iff->DWfactor(ele.meanQ()); diff --git a/Wrap/Swig/libBornAgainDevice.i b/Wrap/Swig/libBornAgainDevice.i index 9464a669c970dca445fb5b68eeda138d541f3835..f648a3d1ec5d2c62664dc1353c7e4543ee140de2 100644 --- a/Wrap/Swig/libBornAgainDevice.i +++ b/Wrap/Swig/libBornAgainDevice.i @@ -34,7 +34,7 @@ }; %{ -#include "Base/Element/PolarizerPair.h" +#include "Base/Element/PolMatrices.h" #include "Param/Distrib/ParameterDistribution.h" #include "Device/Beam/Beam.h" #include "Device/Beam/FootprintGauss.h" diff --git a/auto/Wrap/doxygenBase.i b/auto/Wrap/doxygenBase.i index 1bcd64eb99d0dffff84105b7985ffdf76f71e038..a191df24154ec0abe9243916b40fb294eef80454 100644 --- a/auto/Wrap/doxygenBase.i +++ b/auto/Wrap/doxygenBase.i @@ -717,7 +717,7 @@ Used for Python overriding of clone (see swig/tweaks.py) // File: classIElement.xml %feature("docstring") IElement ""; -%feature("docstring") IElement::IElement "IElement::IElement(const PolarizerPair &polpair) +%feature("docstring") IElement::IElement "IElement::IElement(const PolMatrices &polpair) "; @@ -871,43 +871,40 @@ Clips this axis to the given values. "; -// File: classPolarizerPair.xml -%feature("docstring") PolarizerPair " +// File: classPolMatrices.xml +%feature("docstring") PolMatrices " Convenience class for handling polarization density matrix and polarization analyzer operator C++ includes: PolarizerPair.h "; -%feature("docstring") PolarizerPair::PolarizerPair "PolarizerPair::PolarizerPair() +%feature("docstring") PolMatrices::PolMatrices "PolMatrices::PolMatrices() "; -%feature("docstring") PolarizerPair::PolarizerPair "PolarizerPair::PolarizerPair(const Eigen::Matrix2cd &polarization, const Eigen::Matrix2cd &analyzer) +%feature("docstring") PolMatrices::PolMatrices "PolMatrices::PolMatrices(const Eigen::Matrix2cd &polarization, const Eigen::Matrix2cd &analyzer) "; -%feature("docstring") PolarizerPair::setPolarization "void PolarizerPair::setPolarization(const Eigen::Matrix2cd &polarization) +%feature("docstring") PolMatrices::setPolarizerMatrix "void PolMatrices::setPolarizerMatrix(const Eigen::Matrix2cd &polarization) Sets the polarization density matrix (in spin basis along z-axis) "; -%feature("docstring") PolarizerPair::getPolarization "Eigen::Matrix2cd PolarizerPair::getPolarization() const +%feature("docstring") PolMatrices::polarizerMatrix "Eigen::Matrix2cd PolMatrices::polarizerMatrix() const Gets the polarization density matrix (in spin basis along z-axis) "; -%feature("docstring") PolarizerPair::setAnalyzerOperator "void PolarizerPair::setAnalyzerOperator(const Eigen::Matrix2cd &analyzer) +%feature("docstring") PolMatrices::setAnalyzerMatrix "void PolMatrices::setAnalyzerMatrix(const Eigen::Matrix2cd &analyzer) Sets the polarization analyzer operator (in spin basis along z-axis) "; -%feature("docstring") PolarizerPair::getAnalyzerOperator "Eigen::Matrix2cd PolarizerPair::getAnalyzerOperator() const +%feature("docstring") PolMatrices::analyzerMatrix "Eigen::Matrix2cd PolMatrices::analyzerMatrix() const Gets the polarization analyzer operator (in spin basis along z-axis) "; -%feature("docstring") PolarizerPair::swapContent "void PolarizerPair::swapContent(PolarizerPair &other) -"; - // File: classProgressHandler.xml %feature("docstring") ProgressHandler " diff --git a/auto/Wrap/doxygenCore.i b/auto/Wrap/doxygenCore.i index 4b5a7b2f1305c538495209e834e7a07b242da3ff..1b0279059af4eff932154f57d3720ff59d4c2728 100644 --- a/auto/Wrap/doxygenCore.i +++ b/auto/Wrap/doxygenCore.i @@ -26,7 +26,7 @@ Sets angle-defined specular scan. The first parameter is always a wavelength in %feature("docstring") AlphaScan::clone "AlphaScan * AlphaScan::clone() const override "; -%feature("docstring") AlphaScan::generateElements "std::vector< SpecularElement > AlphaScan::generateElements(const PolarizerPair &polpair) const override +%feature("docstring") AlphaScan::generateElements "std::vector< SpecularElement > AlphaScan::generateElements(const PolMatrices &polpair) const override Generates simulation elements for specular simulations. "; @@ -1084,7 +1084,7 @@ C++ includes: ISpecularScan.h %feature("docstring") ISpecularScan::clone "ISpecularScan* ISpecularScan::clone() const override=0 "; -%feature("docstring") ISpecularScan::generateElements "virtual std::vector<SpecularElement> ISpecularScan::generateElements(const PolarizerPair &polpair) const =0 +%feature("docstring") ISpecularScan::generateElements "virtual std::vector<SpecularElement> ISpecularScan::generateElements(const PolMatrices &polpair) const =0 Generates simulation elements for specular simulations. "; @@ -1559,7 +1559,7 @@ Sets q-defined specular scan. Accepts either numpy array of q-values sorted in a %feature("docstring") QzScan::resolution "const ScanResolution* QzScan::resolution() const "; -%feature("docstring") QzScan::generateElements "std::vector< SpecularElement > QzScan::generateElements(const PolarizerPair &polpair) const override +%feature("docstring") QzScan::generateElements "std::vector< SpecularElement > QzScan::generateElements(const PolMatrices &polpair) const override Generates simulation elements for specular simulations. "; diff --git a/auto/Wrap/doxygenDevice.i b/auto/Wrap/doxygenDevice.i index 3b114c0761fab6c340104ab3e42e029dc4cd3ac0..1d5081d71b05df2591153687cc4cc0a442c987fa 100644 --- a/auto/Wrap/doxygenDevice.i +++ b/auto/Wrap/doxygenDevice.i @@ -1573,10 +1573,10 @@ Sets the detector (axes can be overwritten later) init detector with beam settings "; -%feature("docstring") Instrument::setPolFilter "void Instrument::setPolFilter(const kvector_t &polarizer_dir, const kvector_t &analyzer_dir, double analyzer_efficiency, double analyzer_transmission) +%feature("docstring") Instrument::setPolFilters "void Instrument::setPolFilters(const kvector_t &polarizer_dir, const kvector_t &analyzer_dir, double analyzer_efficiency, double analyzer_transmission) "; -%feature("docstring") Instrument::polarizerPair "PolarizerPair Instrument::polarizerPair() const +%feature("docstring") Instrument::polarizerPair "PolMatrices Instrument::polarizerPair() const "; %feature("docstring") Instrument::getChildren "std::vector< const INode * > Instrument::getChildren() const override diff --git a/auto/Wrap/doxygenResample.i b/auto/Wrap/doxygenResample.i index 0636ab8e166777b445323beb432ffa19076a5446..5212a995982317bd2238620b5258b5594d6ae80c 100644 --- a/auto/Wrap/doxygenResample.i +++ b/auto/Wrap/doxygenResample.i @@ -71,7 +71,7 @@ C++ includes: DiffuseElement.h Returns copy of this DiffuseElement with k_f given by in-pixel coordinate x,y. "; -%feature("docstring") DiffuseElement::polarizationHandler "const PolarizerPair& DiffuseElement::polarizationHandler() const +%feature("docstring") DiffuseElement::polarizationHandler "const PolMatrices& DiffuseElement::polarizationHandler() const Returns assigned PolarizerPair. "; @@ -702,10 +702,10 @@ Data stucture containing both input and output of a single image pixel for specu C++ includes: SpecularElement.h "; -%feature("docstring") SpecularElement::SpecularElement "SpecularElement::SpecularElement(double kz, const PolarizerPair &polpair, bool computable) +%feature("docstring") SpecularElement::SpecularElement "SpecularElement::SpecularElement(double kz, const PolMatrices &polpair, bool computable) "; -%feature("docstring") SpecularElement::SpecularElement "SpecularElement::SpecularElement(double wavelength, double alpha, const PolarizerPair &polpair, bool computable) +%feature("docstring") SpecularElement::SpecularElement "SpecularElement::SpecularElement(double wavelength, double alpha, const PolMatrices &polpair, bool computable) "; %feature("docstring") SpecularElement::SpecularElement "SpecularElement::SpecularElement(const SpecularElement &other)=delete @@ -717,7 +717,7 @@ C++ includes: SpecularElement.h %feature("docstring") SpecularElement::~SpecularElement "SpecularElement::~SpecularElement() "; -%feature("docstring") SpecularElement::polarizationHandler "const PolarizerPair& SpecularElement::polarizationHandler() const +%feature("docstring") SpecularElement::polarizationHandler "const PolMatrices& SpecularElement::polarizationHandler() const Returns assigned PolarizerPair. "; diff --git a/auto/Wrap/libBornAgainDevice.py b/auto/Wrap/libBornAgainDevice.py index 7f1b7e993065318b8f90227ef890664267be9a39..ce538af4b0b128158e7323255d5f1fa084f5f4bb 100644 --- a/auto/Wrap/libBornAgainDevice.py +++ b/auto/Wrap/libBornAgainDevice.py @@ -4726,18 +4726,18 @@ class Instrument(libBornAgainParam.INode): """ return _libBornAgainDevice.Instrument_initDetector(self) - def setPolFilter(self, polarizer_dir, analyzer_dir, analyzer_efficiency, analyzer_transmission): + def setPolFilters(self, polarizer_dir, analyzer_dir, analyzer_efficiency, analyzer_transmission): r""" - setPolFilter(Instrument self, kvector_t polarizer_dir, kvector_t analyzer_dir, double analyzer_efficiency, double analyzer_transmission) - void Instrument::setPolFilter(const kvector_t &polarizer_dir, const kvector_t &analyzer_dir, double analyzer_efficiency, double analyzer_transmission) + setPolFilters(Instrument self, kvector_t polarizer_dir, kvector_t analyzer_dir, double analyzer_efficiency, double analyzer_transmission) + void Instrument::setPolFilters(const kvector_t &polarizer_dir, const kvector_t &analyzer_dir, double analyzer_efficiency, double analyzer_transmission) """ - return _libBornAgainDevice.Instrument_setPolFilter(self, polarizer_dir, analyzer_dir, analyzer_efficiency, analyzer_transmission) + return _libBornAgainDevice.Instrument_setPolFilters(self, polarizer_dir, analyzer_dir, analyzer_efficiency, analyzer_transmission) def polarizerPair(self): r""" - polarizerPair(Instrument self) -> PolarizerPair - PolarizerPair Instrument::polarizerPair() const + polarizerPair(Instrument self) -> PolMatrices + PolMatrices Instrument::polarizerPair() const """ return _libBornAgainDevice.Instrument_polarizerPair(self) diff --git a/auto/Wrap/libBornAgainDevice_wrap.cpp b/auto/Wrap/libBornAgainDevice_wrap.cpp index 35cc186e17427874b88bc69c0ba6cdc4ad033049..6d21f9740f1505882e2d0513856a1aab1119b493 100644 --- a/auto/Wrap/libBornAgainDevice_wrap.cpp +++ b/auto/Wrap/libBornAgainDevice_wrap.cpp @@ -3140,7 +3140,7 @@ namespace Swig { #define SWIGTYPE_p_OutputDataT_double_t swig_types[40] #define SWIGTYPE_p_ParameterDistribution swig_types[41] #define SWIGTYPE_p_PolFilter swig_types[42] -#define SWIGTYPE_p_PolarizerPair swig_types[43] +#define SWIGTYPE_p_PolMatrices swig_types[43] #define SWIGTYPE_p_Polygon swig_types[44] #define SWIGTYPE_p_PolygonPrivate swig_types[45] #define SWIGTYPE_p_RealLimits swig_types[46] @@ -39137,7 +39137,7 @@ fail: } -SWIGINTERN PyObject *_wrap_Instrument_setPolFilter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Instrument_setPolFilters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Instrument *arg1 = (Instrument *) 0 ; kvector_t *arg2 = 0 ; @@ -39156,39 +39156,39 @@ SWIGINTERN PyObject *_wrap_Instrument_setPolFilter(PyObject *SWIGUNUSEDPARM(self int ecode5 = 0 ; PyObject *swig_obj[5] ; - if (!SWIG_Python_UnpackTuple(args, "Instrument_setPolFilter", 5, 5, swig_obj)) SWIG_fail; + if (!SWIG_Python_UnpackTuple(args, "Instrument_setPolFilters", 5, 5, swig_obj)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Instrument, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Instrument_setPolFilter" "', argument " "1"" of type '" "Instrument *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Instrument_setPolFilters" "', argument " "1"" of type '" "Instrument *""'"); } arg1 = reinterpret_cast< Instrument * >(argp1); res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_BasicVector3DT_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Instrument_setPolFilter" "', argument " "2"" of type '" "kvector_t const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Instrument_setPolFilters" "', argument " "2"" of type '" "kvector_t const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Instrument_setPolFilter" "', argument " "2"" of type '" "kvector_t const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Instrument_setPolFilters" "', argument " "2"" of type '" "kvector_t const &""'"); } arg2 = reinterpret_cast< kvector_t * >(argp2); res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_BasicVector3DT_double_t, 0 | 0); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Instrument_setPolFilter" "', argument " "3"" of type '" "kvector_t const &""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Instrument_setPolFilters" "', argument " "3"" of type '" "kvector_t const &""'"); } if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Instrument_setPolFilter" "', argument " "3"" of type '" "kvector_t const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Instrument_setPolFilters" "', argument " "3"" of type '" "kvector_t const &""'"); } arg3 = reinterpret_cast< kvector_t * >(argp3); ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Instrument_setPolFilter" "', argument " "4"" of type '" "double""'"); + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Instrument_setPolFilters" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); ecode5 = SWIG_AsVal_double(swig_obj[4], &val5); if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Instrument_setPolFilter" "', argument " "5"" of type '" "double""'"); + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Instrument_setPolFilters" "', argument " "5"" of type '" "double""'"); } arg5 = static_cast< double >(val5); - (arg1)->setPolFilter((kvector_t const &)*arg2,(kvector_t const &)*arg3,arg4,arg5); + (arg1)->setPolFilters((kvector_t const &)*arg2,(kvector_t const &)*arg3,arg4,arg5); resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -39202,7 +39202,7 @@ SWIGINTERN PyObject *_wrap_Instrument_polarizerPair(PyObject *SWIGUNUSEDPARM(sel void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; - PolarizerPair result; + PolMatrices result; if (!args) SWIG_fail; swig_obj[0] = args; @@ -39212,7 +39212,7 @@ SWIGINTERN PyObject *_wrap_Instrument_polarizerPair(PyObject *SWIGUNUSEDPARM(sel } arg1 = reinterpret_cast< Instrument * >(argp1); result = ((Instrument const *)arg1)->polarizerPair(); - resultobj = SWIG_NewPointerObj((new PolarizerPair(static_cast< const PolarizerPair& >(result))), SWIGTYPE_p_PolarizerPair, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new PolMatrices(static_cast< const PolMatrices& >(result))), SWIGTYPE_p_PolMatrices, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -46791,14 +46791,14 @@ static PyMethodDef SwigMethods[] = { "init detector with beam settings \n" "\n" ""}, - { "Instrument_setPolFilter", _wrap_Instrument_setPolFilter, METH_VARARGS, "\n" - "Instrument_setPolFilter(Instrument self, kvector_t polarizer_dir, kvector_t analyzer_dir, double analyzer_efficiency, double analyzer_transmission)\n" - "void Instrument::setPolFilter(const kvector_t &polarizer_dir, const kvector_t &analyzer_dir, double analyzer_efficiency, double analyzer_transmission)\n" + { "Instrument_setPolFilters", _wrap_Instrument_setPolFilters, METH_VARARGS, "\n" + "Instrument_setPolFilters(Instrument self, kvector_t polarizer_dir, kvector_t analyzer_dir, double analyzer_efficiency, double analyzer_transmission)\n" + "void Instrument::setPolFilters(const kvector_t &polarizer_dir, const kvector_t &analyzer_dir, double analyzer_efficiency, double analyzer_transmission)\n" "\n" ""}, { "Instrument_polarizerPair", _wrap_Instrument_polarizerPair, METH_O, "\n" - "Instrument_polarizerPair(Instrument self) -> PolarizerPair\n" - "PolarizerPair Instrument::polarizerPair() const\n" + "Instrument_polarizerPair(Instrument self) -> PolMatrices\n" + "PolMatrices Instrument::polarizerPair() const\n" "\n" ""}, { "Instrument_getChildren", _wrap_Instrument_getChildren, METH_O, "\n" @@ -47651,7 +47651,7 @@ static swig_type_info _swigt__p_OutputDataT_CumulativeValue_t = {"_p_OutputDataT static swig_type_info _swigt__p_OutputDataT_bool_t = {"_p_OutputDataT_bool_t", "OutputData< bool > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_OutputDataT_double_t = {"_p_OutputDataT_double_t", "OutputData< double > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_PolFilter = {"_p_PolFilter", "PolFilter *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_PolarizerPair = {"_p_PolarizerPair", "PolarizerPair *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_PolMatrices = {"_p_PolMatrices", "PolMatrices *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Polygon = {"_p_Polygon", "Polygon *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_PolygonPrivate = {"_p_PolygonPrivate", "PolygonPrivate *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_RealLimits = {"_p_RealLimits", "RealLimits *", 0, 0, (void*)0, 0}; @@ -47766,7 +47766,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_OutputDataT_double_t, &_swigt__p_ParameterDistribution, &_swigt__p_PolFilter, - &_swigt__p_PolarizerPair, + &_swigt__p_PolMatrices, &_swigt__p_Polygon, &_swigt__p_PolygonPrivate, &_swigt__p_RealLimits, @@ -47881,7 +47881,7 @@ static swig_cast_info _swigc__p_OutputDataT_CumulativeValue_t[] = { {&_swigt__p static swig_cast_info _swigc__p_OutputDataT_bool_t[] = { {&_swigt__p_OutputDataT_bool_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_OutputDataT_double_t[] = { {&_swigt__p_OutputDataT_double_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_PolFilter[] = { {&_swigt__p_PolFilter, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_PolarizerPair[] = { {&_swigt__p_PolarizerPair, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_PolMatrices[] = { {&_swigt__p_PolMatrices, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Polygon[] = { {&_swigt__p_Polygon, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_PolygonPrivate[] = { {&_swigt__p_PolygonPrivate, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_RealLimits[] = { {&_swigt__p_RealLimits, 0, 0, 0},{0, 0, 0, 0}}; @@ -47996,7 +47996,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_OutputDataT_double_t, _swigc__p_ParameterDistribution, _swigc__p_PolFilter, - _swigc__p_PolarizerPair, + _swigc__p_PolMatrices, _swigc__p_Polygon, _swigc__p_PolygonPrivate, _swigc__p_RealLimits,