diff --git a/Base/Pixel/SimulationElement.h b/Base/Pixel/SimulationElement.h index 102b7553a51e3fb212fa3faa72a57b002e1f2af8..7b52531e32ebd837514343cf357232f18b2e3f1d 100644 --- a/Base/Pixel/SimulationElement.h +++ b/Base/Pixel/SimulationElement.h @@ -46,14 +46,14 @@ public: //! Returns assigned PolarizationHandler const PolarizationHandler& polarizationHandler() const { return m_polarization; } - double getWavelength() const { return m_wavelength; } + double wavelength() const { return m_wavelength; } double getAlphaI() const { return m_alpha_i; } double getPhiI() const { return m_phi_i; } double getAlphaMean() const { return getAlpha(0.5, 0.5); } double getPhiMean() const { return getPhi(0.5, 0.5); } void setIntensity(double intensity) { m_intensity = intensity; } void addIntensity(double intensity) { m_intensity += intensity; } - double getIntensity() const { return m_intensity; } + double intensity() const { return m_intensity; } kvector_t getKi() const; kvector_t getMeanKf() const; kvector_t meanQ() const; diff --git a/Core/Computation/RoughMultiLayerComputation.cpp b/Core/Computation/RoughMultiLayerComputation.cpp index c37dc9c8491dc397d888c90deb3dea4d9ef2c478..b0642be36dc52be7a2ef737183e95cc8339ab8ef 100644 --- a/Core/Computation/RoughMultiLayerComputation.cpp +++ b/Core/Computation/RoughMultiLayerComputation.cpp @@ -45,7 +45,7 @@ void RoughMultiLayerComputation::compute(SimulationElement& elem) const { return; auto n_slices = m_sample->numberOfSlices(); kvector_t q = elem.meanQ(); - double wavelength = elem.getWavelength(); + double wavelength = elem.wavelength(); double autocorr(0.0); complex_t crosscorr(0.0, 0.0); diff --git a/Core/Element/DepthProbeElement.h b/Core/Element/DepthProbeElement.h index d7062e911e917ccea7d64e7686ab7a818566d3ed..7f34864b2f5ef0a767b9b40ae4e208cd787d8bd0 100644 --- a/Core/Element/DepthProbeElement.h +++ b/Core/Element/DepthProbeElement.h @@ -31,7 +31,7 @@ public: DepthProbeElement& operator=(const DepthProbeElement& other); - double getWavelength() const { return m_wavelength; } + double wavelength() const { return m_wavelength; } double getAlphaI() const { return m_alpha_i; } kvector_t getKi() const; diff --git a/Core/Element/SpecularSimulationElement.h b/Core/Element/SpecularSimulationElement.h index 46ee9c9c80429a256d162cceb98f149413c157be..83184dbb851d680102d4e739efb0c25cd558407a 100644 --- a/Core/Element/SpecularSimulationElement.h +++ b/Core/Element/SpecularSimulationElement.h @@ -43,7 +43,7 @@ public: //! Returns assigned PolarizationHandler. const PolarizationHandler& polarizationHandler() const { return m_polarization; } - double getIntensity() const { return m_intensity; } + double intensity() const { return m_intensity; } void setIntensity(double intensity) { m_intensity = intensity; } //! Returns calculation flag (if it's false, zero intensity is assigned to the element) diff --git a/Core/Export/SimulationToPython.cpp b/Core/Export/SimulationToPython.cpp index c61065febab963abb4f2228223cd4bceb823b728..747dc280e5e98370beaec6cb68985ac8f06803eb 100644 --- a/Core/Export/SimulationToPython.cpp +++ b/Core/Export/SimulationToPython.cpp @@ -256,7 +256,7 @@ std::string defineBeamPolarization(const Beam& beam) { std::string defineBeamIntensity(const Beam& beam) { std::ostringstream result; - double beam_intensity = beam.getIntensity(); + double beam_intensity = beam.intensity(); if (beam_intensity > 0.0) result << indent() << "simulation.setBeamIntensity(" << pyfmt::printScientificDouble(beam_intensity) << ")\n"; @@ -267,7 +267,7 @@ std::string defineGISASBeam(const GISASSimulation& simulation) { std::ostringstream result; const Beam& beam = simulation.instrument().beam(); - result << indent() << "simulation.setBeamParameters(" << pyfmt::printNm(beam.getWavelength()) + result << indent() << "simulation.setBeamParameters(" << pyfmt::printNm(beam.wavelength()) << ", " << pyfmt::printDegrees(beam.direction().alpha()) << ", " << pyfmt::printDegrees(beam.direction().phi()) << ")\n"; @@ -284,7 +284,7 @@ std::string defineOffSpecBeam(const OffSpecSimulation& simulation) { const std::string axidef = indent() + "alpha_i_axis = "; result << axidef << pyfmt2::printAxis(simulation.beamAxis(), "rad") << "\n"; - result << indent() << "simulation.setBeamParameters(" << pyfmt::printNm(beam.getWavelength()) + result << indent() << "simulation.setBeamParameters(" << pyfmt::printNm(beam.wavelength()) << ", " << "alpha_i_axis, " << pyfmt::printDegrees(beam.direction().phi()) << ")\n"; diff --git a/Core/Scan/AngularSpecScan.cpp b/Core/Scan/AngularSpecScan.cpp index 2cc9cac4423f102c7e9481164108505a0e818502..976beaac016e419b4ce3659665903c5bb12e273f 100644 --- a/Core/Scan/AngularSpecScan.cpp +++ b/Core/Scan/AngularSpecScan.cpp @@ -224,7 +224,7 @@ std::vector<double> AngularSpecScan::createIntensities( for (size_t k = 0, size_incs = inc_weights[i].size(); k < size_incs; ++k) { const double inc_weight = inc_weights[i][k]; for (size_t j = 0, size_wls = wl_weights[i].size(); j < size_wls; ++j) { - current += sim_elements[elem_pos].getIntensity() * inc_weight * wl_weights[i][j]; + current += sim_elements[elem_pos].intensity() * inc_weight * wl_weights[i][j]; ++elem_pos; } } diff --git a/Core/Scan/QSpecScan.cpp b/Core/Scan/QSpecScan.cpp index 8e464ec1333b9191859f95d361239a095188b4f1..ffb4c3487c77aa8924f27dd072ed37bcfe37ede2 100644 --- a/Core/Scan/QSpecScan.cpp +++ b/Core/Scan/QSpecScan.cpp @@ -79,7 +79,7 @@ QSpecScan::createIntensities(const std::vector<SpecularSimulationElement>& sim_e for (size_t i = 0; i < axis_size; ++i) { double& current = result[i]; for (size_t j = 0, size = samples[i].size(); j < size; ++j) { - current += sim_elements[elem_pos].getIntensity() * samples[i][j].weight; + current += sim_elements[elem_pos].intensity() * samples[i][j].weight; ++elem_pos; } } diff --git a/Core/Scan/UnitConverter1D.cpp b/Core/Scan/UnitConverter1D.cpp index 0e78b827dfc19eed0e25cb65cc006df3310938f3..a649a527fd5c7bf6587eafefef31bac8deecb3bc 100644 --- a/Core/Scan/UnitConverter1D.cpp +++ b/Core/Scan/UnitConverter1D.cpp @@ -96,7 +96,7 @@ UnitConverter1D::createConvertedData(const OutputData<double>& data, Axes::Units UnitConverterConvSpec::UnitConverterConvSpec(const Beam& beam, const IAxis& axis, Axes::Units axis_units) - : m_wavelength(beam.getWavelength()) { + : m_wavelength(beam.wavelength()) { m_axis = createTranslatedAxis(axis, getTraslatorFrom(axis_units), axisName(0, axis_units)); if (m_axis->lowerBound() < 0 || m_axis->upperBound() > M_PI_2) throw std::runtime_error("Error in UnitConverter1D: input axis range is out of bounds"); diff --git a/Core/Simulation/DepthProbeSimulation.cpp b/Core/Simulation/DepthProbeSimulation.cpp index 091a0509257d55642845bd9931abfbb0a91b804a..2ad80fa688a6a57d2508860aea23409f13a02dee 100644 --- a/Core/Simulation/DepthProbeSimulation.cpp +++ b/Core/Simulation/DepthProbeSimulation.cpp @@ -144,7 +144,7 @@ void DepthProbeSimulation::initSimulationElementVector() { std::vector<DepthProbeElement> DepthProbeSimulation::generateSimulationElements(const Beam& beam) { std::vector<DepthProbeElement> result; - const double wavelength = beam.getWavelength(); + const double wavelength = beam.wavelength(); const double angle_shift = beam.direction().alpha(); const size_t axis_size = getAlphaAxis()->size(); @@ -209,7 +209,7 @@ void DepthProbeSimulation::initialize() { } void DepthProbeSimulation::normalize(size_t start_ind, size_t n_elements) { - const double beam_intensity = beam().getIntensity(); + const double beam_intensity = beam().intensity(); for (size_t i = start_ind, stop_point = start_ind + n_elements; i < stop_point; ++i) { auto& element = m_sim_elements[i]; const double alpha_i = -element.getAlphaI(); diff --git a/Core/Simulation/ISimulation2D.cpp b/Core/Simulation/ISimulation2D.cpp index cca63cd84e5a64bb2653d5bbf292d1fc41a0b4af..e116ff5123d5ff3ece2f1403266f26736ae0feb3 100644 --- a/Core/Simulation/ISimulation2D.cpp +++ b/Core/Simulation/ISimulation2D.cpp @@ -73,7 +73,7 @@ std::unique_ptr<IComputation> ISimulation2D::generateSingleThreadedComputation(s } std::vector<SimulationElement> ISimulation2D::generateSimulationElements(const Beam& beam) { - const double wavelength = beam.getWavelength(); + const double wavelength = beam.wavelength(); const double alpha_i = -beam.direction().alpha(); // Defined to be always positive in Beam const double phi_i = beam.direction().phi(); const Eigen::Matrix2cd beam_polarization = beam.getPolarization(); @@ -97,7 +97,7 @@ std::vector<SimulationElement> ISimulation2D::generateSimulationElements(const B } void ISimulation2D::normalize(size_t start_ind, size_t n_elements) { - const double beam_intensity = beam().getIntensity(); + const double beam_intensity = beam().intensity(); for (size_t i = start_ind, stop_point = start_ind + n_elements; i < stop_point; ++i) { SimulationElement& element = m_sim_elements[i]; double sin_alpha_i = std::abs(std::sin(element.getAlphaI())); @@ -106,7 +106,7 @@ void ISimulation2D::normalize(size_t start_ind, size_t n_elements) { continue; } const double solid_angle = element.solidAngle(); - element.setIntensity(element.getIntensity() * beam_intensity * solid_angle / sin_alpha_i); + element.setIntensity(element.intensity() * beam_intensity * solid_angle / sin_alpha_i); } } @@ -115,7 +115,7 @@ void ISimulation2D::addBackgroundIntensity(size_t start_ind, size_t n_elements) return; for (size_t i = start_ind, stop_point = start_ind + n_elements; i < stop_point; ++i) { SimulationElement& element = m_sim_elements[i]; - element.setIntensity(background()->addBackground(element.getIntensity())); + element.setIntensity(background()->addBackground(element.intensity())); } } @@ -124,7 +124,7 @@ void ISimulation2D::addDataToCache(double weight) { throw std::runtime_error("Error in ISimulation2D::addDataToCache(double): cache size" " not the same as element size"); for (unsigned i = 0; i < m_sim_elements.size(); i++) - m_cache[i] += m_sim_elements[i].getIntensity() * weight; + m_cache[i] += m_sim_elements[i].intensity() * weight; } void ISimulation2D::moveDataFromCache() { @@ -140,7 +140,7 @@ std::vector<double> ISimulation2D::rawResults() const { std::vector<double> result; result.resize(m_sim_elements.size()); for (unsigned i = 0; i < m_sim_elements.size(); ++i) - result[i] = m_sim_elements[i].getIntensity(); + result[i] = m_sim_elements[i].intensity(); return result; } diff --git a/Core/Simulation/OffSpecSimulation.cpp b/Core/Simulation/OffSpecSimulation.cpp index 60293c4192c8e69e95910b2b7758b049a7eeedea..ceba029ef78a13f5f1b915f9a1d09a62bc285518 100644 --- a/Core/Simulation/OffSpecSimulation.cpp +++ b/Core/Simulation/OffSpecSimulation.cpp @@ -134,7 +134,7 @@ void OffSpecSimulation::transferDetectorImage(size_t index) { detector_image.addAxis(detector().axis(dim)); size_t detector_size = detector_image.getAllocatedSize(); for (size_t i = 0; i < detector_size; ++i) - detector_image[i] = m_sim_elements[index * detector_size + i].getIntensity(); + detector_image[i] = m_sim_elements[index * detector_size + i].intensity(); detector().applyDetectorResolution(&detector_image); size_t y_axis_size = detector().axis(1).size(); for (size_t i = 0; i < detector_size; ++i) diff --git a/Core/Simulation/SpecularSimulation.cpp b/Core/Simulation/SpecularSimulation.cpp index 6ee98e98414e7a7823c4e50f07bc24503bae8874..02af3b78ceb9a2bed4001628a0db6494226fd939 100644 --- a/Core/Simulation/SpecularSimulation.cpp +++ b/Core/Simulation/SpecularSimulation.cpp @@ -30,7 +30,7 @@ namespace { // TODO: remove when pointwise resolution is implemented std::unique_ptr<AngularSpecScan> mangledScan(const AngularSpecScan& scan, const Beam& beam) { - const double wl = beam.getWavelength(); + const double wl = beam.wavelength(); const double angle_shift = beam.direction().alpha(); std::vector<double> angles = scan.coordinateAxis()->binCenters(); for (auto& val : angles) @@ -181,7 +181,7 @@ void SpecularSimulation::initialize() { } void SpecularSimulation::normalize(size_t start_ind, size_t n_elements) { - const double beam_intensity = beam().getIntensity(); + const double beam_intensity = beam().intensity(); std::vector<double> footprints; // TODO: use just m_scan when pointwise resolution is implemented @@ -192,7 +192,7 @@ void SpecularSimulation::normalize(size_t start_ind, size_t n_elements) { for (size_t i = start_ind, k = 0; i < start_ind + n_elements; ++i, ++k) { auto& element = m_sim_elements[i]; - element.setIntensity(element.getIntensity() * beam_intensity * footprints[k]); + element.setIntensity(element.intensity() * beam_intensity * footprints[k]); } } @@ -201,14 +201,14 @@ void SpecularSimulation::addBackgroundIntensity(size_t start_ind, size_t n_eleme return; for (size_t i = start_ind, stop_point = start_ind + n_elements; i < stop_point; ++i) { auto& element = m_sim_elements[i]; - element.setIntensity(background()->addBackground(element.getIntensity())); + element.setIntensity(background()->addBackground(element.intensity())); } } void SpecularSimulation::addDataToCache(double weight) { checkCache(); for (size_t i = 0, size = m_sim_elements.size(); i < size; ++i) - m_cache[i] += m_sim_elements[i].getIntensity() * weight; + m_cache[i] += m_sim_elements[i].intensity() * weight; } void SpecularSimulation::moveDataFromCache() { @@ -223,7 +223,7 @@ std::vector<double> SpecularSimulation::rawResults() const { std::vector<double> result; result.resize(m_sim_elements.size()); for (unsigned i = 0; i < m_sim_elements.size(); ++i) - result[i] = m_sim_elements[i].getIntensity(); + result[i] = m_sim_elements[i].intensity(); return result; } diff --git a/Device/Beam/Beam.h b/Device/Beam/Beam.h index 005ee7ac88a833594fe7b1eb9b5dcdace8ca0091..91dbfa452d0bd09254985640a9a477e0edd7a43a 100644 --- a/Device/Beam/Beam.h +++ b/Device/Beam/Beam.h @@ -35,45 +35,37 @@ public: static Beam horizontalBeam(); + void accept(INodeVisitor* visitor) const override { visitor->visit(this); } + std::vector<const INode*> getChildren() const override; + + //! Returns the beam intensity in neutrons/sec + double intensity() const { return m_intensity; } + double wavelength() const { return m_wavelength; } + // Direction& direction() { return m_direction; } + Direction direction() const { return {m_alpha, m_phi}; } // TODO -> const .. & //! Returns the wavevector kvector_t getCentralK() const; + kvector_t getBlochVector() const; + //! Returns footprint factor. + const IFootprintFactor* footprintFactor() const; +#ifndef SWIG + //! Returns the polarization density matrix (in spin basis along z-axis) + Eigen::Matrix2cd getPolarization() const; +#endif + void setWavelength(double wavelength); void setDirection(const Direction& direction); void setInclination(const double alpha); - - //! Returns the beam intensity in neutrons/sec - double getIntensity() const { return m_intensity; } - //! Sets the beam intensity in neutrons/sec void setIntensity(double intensity) { m_intensity = intensity; } - - //! Returns footprint factor. - const IFootprintFactor* footprintFactor() const; - //! Sets footprint factor to the beam. void setFootprintFactor(const IFootprintFactor& shape_factor); - //! Sets beam to sample width ratio in footprint factor. void setWidthRatio(double width_ratio); - //! Sets the polarization density matrix according to the given Bloch vector void setPolarization(const kvector_t bloch_vector); - kvector_t getBlochVector() const; - -#ifndef SWIG - //! Returns the polarization density matrix (in spin basis along z-axis) - Eigen::Matrix2cd getPolarization() const; -#endif - - double getWavelength() const { return m_wavelength; } - // Direction& direction() { return m_direction; } - Direction direction() const { return {m_alpha, m_phi}; } // TODO -> const .. & - - void accept(INodeVisitor* visitor) const override { visitor->visit(this); } - std::vector<const INode*> getChildren() const override; - private: double m_intensity; //!< beam intensity (neutrons/sec) double m_wavelength; diff --git a/Device/Detector/IDetector.cpp b/Device/Detector/IDetector.cpp index 853ca6f5586aa1fc0266d6f8ad3aab676f6a9959..8b473278b521f05abd87e623ec79306e50796675 100644 --- a/Device/Detector/IDetector.cpp +++ b/Device/Detector/IDetector.cpp @@ -165,7 +165,7 @@ void IDetector::setDataToDetectorMap(OutputData<double>& detectorMap, if (elements.empty()) return; iterate([&](const_iterator it) { - detectorMap[it.roiIndex()] = elements[it.elementIndex()].getIntensity(); + detectorMap[it.roiIndex()] = elements[it.elementIndex()].intensity(); }); } diff --git a/Device/Detector/RectangularDetector.cpp b/Device/Detector/RectangularDetector.cpp index 7df3939e4925222e7b63a80c91b92164c363d68c..16f32aa9922de730fd0a2813fd55a46fa19418c7 100644 --- a/Device/Detector/RectangularDetector.cpp +++ b/Device/Detector/RectangularDetector.cpp @@ -199,7 +199,7 @@ size_t RectangularDetector::indexOfSpecular(const Beam& beam) const { return totalSize(); const double alpha = beam.direction().alpha(); const double phi = beam.direction().phi(); - const kvector_t k_spec = vecOfLambdaAlphaPhi(beam.getWavelength(), alpha, phi); + const kvector_t k_spec = vecOfLambdaAlphaPhi(beam.wavelength(), alpha, phi); const kvector_t normal_unit = m_normal_to_detector.unit(); const double kd = k_spec.dot(normal_unit); if (kd <= 0.0) diff --git a/Device/Detector/SimpleUnitConverters.cpp b/Device/Detector/SimpleUnitConverters.cpp index e13cd829b3b6af86f60f0a3d374018030ebeb98e..17bfce06064e588b57d8b890e8aac977b82c1894 100644 --- a/Device/Detector/SimpleUnitConverters.cpp +++ b/Device/Detector/SimpleUnitConverters.cpp @@ -36,7 +36,7 @@ double getQ(double wavelength, double angle) { // ************************************************************************************************ UnitConverterSimple::UnitConverterSimple(const Beam& beam) - : m_wavelength(beam.getWavelength()) + : m_wavelength(beam.wavelength()) , m_alpha_i(-beam.direction().alpha()) , m_phi_i(beam.direction().phi()) {} diff --git a/GUI/coregui/Models/BeamItems.cpp b/GUI/coregui/Models/BeamItems.cpp index f648c5ec149c1eb97e143855f6273d52590d5522..8c700d55ee3502893aa49950973c8cc6ccdf7ca2 100644 --- a/GUI/coregui/Models/BeamItems.cpp +++ b/GUI/coregui/Models/BeamItems.cpp @@ -56,7 +56,7 @@ BeamItem::BeamItem(const QString& beam_model) : SessionItem(beam_model) { BeamItem::~BeamItem() = default; -double BeamItem::getIntensity() const { +double BeamItem::intensity() const { return getItemValue(P_INTENSITY).toDouble(); } @@ -64,7 +64,7 @@ void BeamItem::setIntensity(double value) { setItemValue(P_INTENSITY, value); } -double BeamItem::getWavelength() const { +double BeamItem::wavelength() const { BeamWavelengthItem* beamWavelength = dynamic_cast<BeamWavelengthItem*>(getItem(P_WAVELENGTH)); return beamWavelength->wavelength(); } @@ -94,11 +94,11 @@ void BeamItem::setAzimuthalAngle(double value) { } std::unique_ptr<Beam> BeamItem::createBeam() const { - double lambda = getWavelength(); + double lambda = wavelength(); double inclination_angle = Units::deg2rad(getInclinationAngle()); double azimuthal_angle = Units::deg2rad(getAzimuthalAngle()); - auto result = std::make_unique<Beam>(getIntensity(), lambda, + auto result = std::make_unique<Beam>(intensity(), lambda, Direction(inclination_angle, azimuthal_angle)); result->setPolarization(GetVectorItem(*this, P_POLARIZATION)); diff --git a/GUI/coregui/Models/BeamItems.h b/GUI/coregui/Models/BeamItems.h index 67e5374ed0ab7d081578657832832498f927ddf7..f1e955039515e1a5d8dc8f1cf2afb2c99d3a8223 100644 --- a/GUI/coregui/Models/BeamItems.h +++ b/GUI/coregui/Models/BeamItems.h @@ -33,10 +33,10 @@ public: ~BeamItem() override; - double getIntensity() const; + double intensity() const; void setIntensity(double value); - double getWavelength() const; + double wavelength() const; void setWavelength(double value); virtual double getInclinationAngle() const = 0; diff --git a/GUI/coregui/Models/DepthProbeInstrumentItem.cpp b/GUI/coregui/Models/DepthProbeInstrumentItem.cpp index d856299084dc733165c1d3eedc9bee4303abec9e..3d566ef9cd2bd13c981a0ff43e889742c0164331 100644 --- a/GUI/coregui/Models/DepthProbeInstrumentItem.cpp +++ b/GUI/coregui/Models/DepthProbeInstrumentItem.cpp @@ -68,7 +68,7 @@ std::unique_ptr<DepthProbeSimulation> DepthProbeInstrumentItem::createSimulation auto axis = axis_item->createAxis(Units::deg); - simulation->setBeamParameters(beamItem()->getWavelength(), static_cast<int>(axis->size()), + simulation->setBeamParameters(beamItem()->wavelength(), static_cast<int>(axis->size()), axis->lowerBound(), axis->upperBound()); auto depthAxisItem = dynamic_cast<BasicAxisItem*>(getItem(P_Z_AXIS)); diff --git a/GUI/coregui/Models/DomainSimulationBuilder.cpp b/GUI/coregui/Models/DomainSimulationBuilder.cpp index 253542281c4489a865198ef21127a3aa1db718e4..b544247e94ba4e0ff503150b63ecb4ab01625c64 100644 --- a/GUI/coregui/Models/DomainSimulationBuilder.cpp +++ b/GUI/coregui/Models/DomainSimulationBuilder.cpp @@ -119,7 +119,7 @@ createOffSpecSimulation(std::unique_ptr<MultiLayer> P_multilayer, auto beamItem = instrument->beamItem(); auto axisItem = dynamic_cast<BasicAxisItem*>(instrument->getItem(OffSpecInstrumentItem::P_ALPHA_AXIS)); - ret->setBeamParameters(beamItem->getWavelength(), *axisItem->createAxis(Units::deg), + ret->setBeamParameters(beamItem->wavelength(), *axisItem->createAxis(Units::deg), beamItem->getAzimuthalAngle()); // TODO Take care about distributions @@ -146,12 +146,12 @@ createSpecularSimulation(std::unique_ptr<MultiLayer> P_multilayer, const auto axis_item = beam_item->currentInclinationAxisItem(); const auto footprint = beam_item->currentFootprintItem(); - AngularSpecScan scan(beam_item->getWavelength(), *axis_item->createAxis(Units::deg)); + AngularSpecScan scan(beam_item->wavelength(), *axis_item->createAxis(Units::deg)); scan.setFootprintFactor(footprint->createFootprint().get()); TransformToDomain::addBeamDivergencesToScan(*beam_item, scan); - ret->setBeamIntensity(beam_item->getIntensity()); + ret->setBeamIntensity(beam_item->intensity()); ret->setScan(scan); // ISimulation options diff --git a/GUI/coregui/Models/TransformFromDomain.cpp b/GUI/coregui/Models/TransformFromDomain.cpp index 2746533c71576cc269fac8afe053e970f2ab0f5d..c0d4d35552fc31a7ed79594dc335f8f4aa47a6a0 100644 --- a/GUI/coregui/Models/TransformFromDomain.cpp +++ b/GUI/coregui/Models/TransformFromDomain.cpp @@ -230,8 +230,8 @@ void TransformFromDomain::setGISASBeamItem(BeamItem* beam_item, const GISASSimul ASSERT(beam_item); Beam beam = simulation.instrument().beam(); - beam_item->setIntensity(beam.getIntensity()); - beam_item->setWavelength(beam.getWavelength()); + beam_item->setIntensity(beam.intensity()); + beam_item->setWavelength(beam.wavelength()); beam_item->setInclinationAngle(Units::rad2deg(beam.direction().alpha())); beam_item->setAzimuthalAngle(Units::rad2deg(beam.direction().phi())); @@ -255,8 +255,8 @@ void TransformFromDomain::setOffSpecBeamItem(BeamItem* beam_item, const OffSpecSimulation& simulation) { Beam beam = simulation.instrument().beam(); - beam_item->setIntensity(beam.getIntensity()); - beam_item->setWavelength(beam.getWavelength()); + beam_item->setIntensity(beam.intensity()); + beam_item->setWavelength(beam.wavelength()); beam_item->setInclinationAngle(Units::rad2deg(beam.direction().alpha())); beam_item->setAzimuthalAngle(Units::rad2deg(beam.direction().phi())); // TODO implement beam divergence @@ -266,8 +266,8 @@ void TransformFromDomain::setSpecularBeamItem(SpecularBeamItem* beam_item, const SpecularSimulation& simulation) { const Beam& beam = simulation.instrument().beam(); - beam_item->setIntensity(beam.getIntensity()); - beam_item->setWavelength(beam.getWavelength()); + beam_item->setIntensity(beam.intensity()); + beam_item->setWavelength(beam.wavelength()); beam_item->setInclinationAngle(0.0); // inclination angle is hardcoded beam_item->setAzimuthalAngle(0.0); // azimuthal angle is hardcoded diff --git a/Sample/FFCompute/ComputeDWBA.cpp b/Sample/FFCompute/ComputeDWBA.cpp index d7c6630535c2ed326a84ff8cb5dae206807aae4c..09446cfa93855251bc347b56db3624d7b360b0e0 100644 --- a/Sample/FFCompute/ComputeDWBA.cpp +++ b/Sample/FFCompute/ComputeDWBA.cpp @@ -45,7 +45,7 @@ complex_t ComputeDWBA::evaluate(const WavevectorInfo& wavevectors) const { k_f_R.setZ(-k_f_T.z()); // Construct the four different scattering contributions wavevector infos - double wavelength = wavevectors.getWavelength(); + double wavelength = wavevectors.wavelength(); WavevectorInfo k_TT(k_i_T, k_f_T, wavelength); WavevectorInfo k_RT(k_i_R, k_f_T, wavelength); WavevectorInfo k_TR(k_i_T, k_f_R, wavelength); diff --git a/Sample/FFCompute/ComputeDWBAPol.cpp b/Sample/FFCompute/ComputeDWBAPol.cpp index 7ba4e8ed7cbd18571c77f1e68aa930141156a096..befc74c84a8f241da5e2b5b29dff37f8e4a0f346 100644 --- a/Sample/FFCompute/ComputeDWBAPol.cpp +++ b/Sample/FFCompute/ComputeDWBAPol.cpp @@ -71,7 +71,7 @@ Eigen::Matrix2cd ComputeDWBAPol::evaluatePol(const WavevectorInfo& wavevectors) // since both eigenvalues are identical, this does not influence the result. Eigen::Matrix2cd ff_BA; - double wavelength = wavevectors.getWavelength(); + double wavelength = wavevectors.wavelength(); // The following matrices each contain the four polarization conditions // (p->p, p->m, m->p, m->m) diff --git a/Sample/Fresnel/FormFactorCoherentPart.cpp b/Sample/Fresnel/FormFactorCoherentPart.cpp index 0bf2b7d823e5600caeb6e0067298137e90f956d9..952d1636e29da7dcf4e08d868e2bf92e1ced180b 100644 --- a/Sample/Fresnel/FormFactorCoherentPart.cpp +++ b/Sample/Fresnel/FormFactorCoherentPart.cpp @@ -41,7 +41,7 @@ FormFactorCoherentPart::~FormFactorCoherentPart() = default; complex_t FormFactorCoherentPart::evaluate(const SimulationElement& sim_element) const { WavevectorInfo wavevectors(sim_element.getKi(), sim_element.getMeanKf(), - sim_element.getWavelength()); + sim_element.wavelength()); auto in_coeffs = m_fresnel_map->getInCoefficients(sim_element, m_layer_index); auto out_coeffs = m_fresnel_map->getOutCoefficients(sim_element, m_layer_index); @@ -51,7 +51,7 @@ complex_t FormFactorCoherentPart::evaluate(const SimulationElement& sim_element) Eigen::Matrix2cd FormFactorCoherentPart::evaluatePol(const SimulationElement& sim_element) const { WavevectorInfo wavevectors(sim_element.getKi(), sim_element.getMeanKf(), - sim_element.getWavelength()); + sim_element.wavelength()); auto in_coeffs = m_fresnel_map->getInCoefficients(sim_element, m_layer_index); auto out_coeffs = m_fresnel_map->getOutCoefficients(sim_element, m_layer_index); diff --git a/Sample/Material/MaterialBySLDImpl.cpp b/Sample/Material/MaterialBySLDImpl.cpp index 2424dca9bb8b6e859bc32983d4ad061224517ef9..7565c2738f7d6a5443ae89ccda73e49dd9c2fb54 100644 --- a/Sample/Material/MaterialBySLDImpl.cpp +++ b/Sample/Material/MaterialBySLDImpl.cpp @@ -49,7 +49,7 @@ complex_t MaterialBySLDImpl::materialData() const { } complex_t MaterialBySLDImpl::scalarSubtrSLD(const WavevectorInfo& wavevectors) const { - double wavelength = wavevectors.getWavelength(); + double wavelength = wavevectors.wavelength(); return 1.0 / getWlPrefactor(wavelength) - sld(); } diff --git a/Sample/Material/RefractiveMaterialImpl.cpp b/Sample/Material/RefractiveMaterialImpl.cpp index 63eacacf2a1cc178226e311ce36214e2ec2cf68f..66dbe51a3a0342b0cde07a20e717ec4ef824ee46 100644 --- a/Sample/Material/RefractiveMaterialImpl.cpp +++ b/Sample/Material/RefractiveMaterialImpl.cpp @@ -41,7 +41,7 @@ complex_t RefractiveMaterialImpl::materialData() const { } complex_t RefractiveMaterialImpl::scalarSubtrSLD(const WavevectorInfo& wavevectors) const { - double wavelength = wavevectors.getWavelength(); + double wavelength = wavevectors.wavelength(); return M_PI / wavelength / wavelength * refractiveIndex2(wavelength); } diff --git a/Sample/Material/WavevectorInfo.h b/Sample/Material/WavevectorInfo.h index fa4eff86bd0e429f175b62e3d5e8635fd425a8e3..96ee081d28ced3bebc408a461252348f2804bf37 100644 --- a/Sample/Material/WavevectorInfo.h +++ b/Sample/Material/WavevectorInfo.h @@ -34,7 +34,7 @@ public: cvector_t getKi() const { return m_ki; } cvector_t getKf() const { return m_kf; } cvector_t getQ() const { return m_ki - m_kf; } - double getWavelength() const { return m_vacuum_wavelength; } + double wavelength() const { return m_vacuum_wavelength; } private: WavevectorInfo(); diff --git a/Sample/Particle/FormFactorCrystal.cpp b/Sample/Particle/FormFactorCrystal.cpp index b0d9edc0a1bd8bdc240c5b6cdc40faff8cfa4c99..05a0926c6e86006da205904dda2ed2d0ed470e47 100644 --- a/Sample/Particle/FormFactorCrystal.cpp +++ b/Sample/Particle/FormFactorCrystal.cpp @@ -50,10 +50,10 @@ complex_t FormFactorCrystal::evaluate(const WavevectorInfo& wavevectors) const { complex_t result(0.0, 0.0); for (const auto& rec : rec_vectors) { auto dw_factor = debyeWallerFactor(rec); - WavevectorInfo basis_wavevectors(kvector_t(), -rec, wavevectors.getWavelength()); + WavevectorInfo basis_wavevectors(kvector_t(), -rec, wavevectors.wavelength()); complex_t basis_factor = m_basis_form_factor->evaluate(basis_wavevectors); WavevectorInfo meso_wavevectors(cvector_t(), rec.complex() - q, - wavevectors.getWavelength()); + wavevectors.wavelength()); complex_t meso_factor = m_meso_form_factor->evaluate(meso_wavevectors); result += dw_factor * basis_factor * meso_factor; } @@ -73,10 +73,10 @@ Eigen::Matrix2cd FormFactorCrystal::evaluatePol(const WavevectorInfo& wavevector Eigen::Matrix2cd result = Eigen::Matrix2cd::Zero(); for (const auto& rec : rec_vectors) { auto dw_factor = debyeWallerFactor(rec); - WavevectorInfo basis_wavevectors(kvector_t(), -rec, wavevectors.getWavelength()); + WavevectorInfo basis_wavevectors(kvector_t(), -rec, wavevectors.wavelength()); Eigen::Matrix2cd basis_factor = m_basis_form_factor->evaluatePol(basis_wavevectors); WavevectorInfo meso_wavevectors(cvector_t(), rec.complex() - q, - wavevectors.getWavelength()); + wavevectors.wavelength()); complex_t meso_factor = m_meso_form_factor->evaluate(meso_wavevectors); result += dw_factor * basis_factor * meso_factor; } diff --git a/Tests/Functional/Python/PyPersistence/PyPersistence.py.in b/Tests/Functional/Python/PyPersistence/PyPersistence.py.in index 6ae8cb8e2021850c535777ec594f3a47ac7e24fd..a7b84ee9811e508a64b5af79ccf06fa7434c6929 100644 --- a/Tests/Functional/Python/PyPersistence/PyPersistence.py.in +++ b/Tests/Functional/Python/PyPersistence/PyPersistence.py.in @@ -34,8 +34,8 @@ def get_simulation_DepthProbe(): Returns custom simulation in the case of depth probe. """ simulation = example.get_simulation() - beam = simulation.instrument().beam() - wavelength = beam.getWavelength() + beam = simulation.beam() + wavelength = beam.wavelength() incl_axis = simulation.getAlphaAxis() z_axis = simulation.getZAxis() footprint = beam.footprintFactor() diff --git a/Tests/UnitTests/Core/Axes/UnitConverter1DTest.cpp b/Tests/UnitTests/Core/Axes/UnitConverter1DTest.cpp index 1059ec1aeb39d6dfb4b232021e18e84800fea65a..68740f59027e9f6bd2dffa40e3d67efe62c67871 100644 --- a/Tests/UnitTests/Core/Axes/UnitConverter1DTest.cpp +++ b/Tests/UnitTests/Core/Axes/UnitConverter1DTest.cpp @@ -12,7 +12,7 @@ class UnitConverter1DTest : public ::testing::Test { public: UnitConverter1DTest(); - double getQ(double angle) { return 4.0 * M_PI * std::sin(angle) / m_beam.getWavelength(); } + double getQ(double angle) { return 4.0 * M_PI * std::sin(angle) / m_beam.wavelength(); } protected: void checkConventionalConverter(const UnitConverter1D& test_object); diff --git a/Tests/UnitTests/Core/Detector/RectangularConverterTest.cpp b/Tests/UnitTests/Core/Detector/RectangularConverterTest.cpp index b58128fe747e33d90d01830470c0a648f577bee9..2f077de53181c1024c6ecb1583f8cbfa6ff477a0 100644 --- a/Tests/UnitTests/Core/Detector/RectangularConverterTest.cpp +++ b/Tests/UnitTests/Core/Detector/RectangularConverterTest.cpp @@ -32,7 +32,7 @@ RectangularConverterTest::RectangularConverterTest() m_alpha = std::atan2(det_height, det_distance / std::cos(m_phi)); auto k_i = m_beam.getCentralK(); m_kiz = k_i.z(); - double K = 2.0 * M_PI / m_beam.getWavelength(); + double K = 2.0 * M_PI / m_beam.wavelength(); m_kfy = K * std::sin(m_phi); m_kfz = K * std::sin(m_alpha); } diff --git a/Tests/UnitTests/Core/Detector/SphericalConverterTest.cpp b/Tests/UnitTests/Core/Detector/SphericalConverterTest.cpp index 4a32637785cdf503c71932b03fa4961a64aee807..f46b4a91a1282beddb03bcd802188f9325076eda 100644 --- a/Tests/UnitTests/Core/Detector/SphericalConverterTest.cpp +++ b/Tests/UnitTests/Core/Detector/SphericalConverterTest.cpp @@ -19,7 +19,7 @@ SphericalConverterTest::SphericalConverterTest() , m_beam(1.0, 1.0, {1 * Units::deg, 0}) { const auto k_i = m_beam.getCentralK(); m_kiz = k_i.z(); - const double K = 2.0 * M_PI / m_beam.getWavelength(); + const double K = 2.0 * M_PI / m_beam.wavelength(); m_kfy = K * std::sin(5.0 * Units::deg); m_kfz1 = K * std::sin(-2.0 * Units::deg); m_kfz2 = K * std::sin(1.5); diff --git a/Tests/UnitTests/Core/Fresnel/DepthProbeSimulationTest.cpp b/Tests/UnitTests/Core/Fresnel/DepthProbeSimulationTest.cpp index 35dd169b3c54793c4e0e578cd0f6325190c02de1..d647752596219e792f2cd20e55bebb67f0b5f9d5 100644 --- a/Tests/UnitTests/Core/Fresnel/DepthProbeSimulationTest.cpp +++ b/Tests/UnitTests/Core/Fresnel/DepthProbeSimulationTest.cpp @@ -97,15 +97,15 @@ TEST_F(DepthProbeSimulationTest, SetBeamParameters) { EXPECT_EQ(10u, sim.getAlphaAxis()->size()); EXPECT_EQ(1.0 * Units::deg, sim.getAlphaAxis()->lowerBound()); EXPECT_EQ(10.0 * Units::deg, sim.getAlphaAxis()->upperBound()); - EXPECT_EQ(1.0, beam.getIntensity()); - EXPECT_EQ(1.0, beam.getWavelength()); + EXPECT_EQ(1.0, beam.intensity()); + EXPECT_EQ(1.0, beam.wavelength()); EXPECT_EQ(0.0, beam.direction().alpha()); EXPECT_EQ(0.0, beam.direction().phi()); checkBeamState(sim); sim.setBeamIntensity(2.0); - EXPECT_EQ(2.0, beam.getIntensity()); + EXPECT_EQ(2.0, beam.intensity()); EXPECT_THROW(sim.setBeamParameters(1.0, 10, -2.0, 3.0), std::runtime_error); EXPECT_THROW(sim.setBeamParameters(1.0, 10, 2.0, 1.0), std::runtime_error); @@ -115,8 +115,8 @@ TEST_F(DepthProbeSimulationTest, SetBeamParameters) { EXPECT_EQ(10u, sim.getAlphaAxis()->size()); EXPECT_EQ(1.0 * Units::deg, sim.getAlphaAxis()->lowerBound()); EXPECT_EQ(10.0 * Units::deg, sim.getAlphaAxis()->upperBound()); - EXPECT_EQ(2.0, beam.getIntensity()); - EXPECT_EQ(1.0, beam.getWavelength()); + EXPECT_EQ(2.0, beam.intensity()); + EXPECT_EQ(1.0, beam.wavelength()); EXPECT_EQ(0.0, beam.direction().alpha()); EXPECT_EQ(0.0, beam.direction().phi()); diff --git a/Tests/UnitTests/Core/Fresnel/SpecularSimulationTest.cpp b/Tests/UnitTests/Core/Fresnel/SpecularSimulationTest.cpp index 2ed25ba8eb8fc7956011326064653f3ffff50b12..0956f0c5146b8c0c701448eb07fb5365bf51798d 100644 --- a/Tests/UnitTests/Core/Fresnel/SpecularSimulationTest.cpp +++ b/Tests/UnitTests/Core/Fresnel/SpecularSimulationTest.cpp @@ -84,23 +84,23 @@ TEST_F(SpecularSimulationTest, SetAngularScan) { EXPECT_EQ(2u, sim.coordinateAxis()->size()); EXPECT_EQ(1.0 * Units::deg, sim.coordinateAxis()->lowerBound()); EXPECT_EQ(3.0 * Units::deg, sim.coordinateAxis()->upperBound()); - EXPECT_EQ(1.0, beam.getIntensity()); - EXPECT_EQ(1.0, beam.getWavelength()); + EXPECT_EQ(1.0, beam.intensity()); + EXPECT_EQ(1.0, beam.wavelength()); EXPECT_EQ(0.0, beam.direction().alpha()); EXPECT_EQ(0.0, beam.direction().phi()); checkBeamState(sim); sim.setBeamIntensity(2.0); - EXPECT_EQ(2.0, beam.getIntensity()); + EXPECT_EQ(2.0, beam.intensity()); AngularSpecScan scan2(1.0, 10, 1.0 * Units::deg, 10.0 * Units::deg); sim.setScan(scan2); EXPECT_EQ(10u, sim.coordinateAxis()->size()); EXPECT_EQ(1.0 * Units::deg, sim.coordinateAxis()->lowerBound()); EXPECT_EQ(10.0 * Units::deg, sim.coordinateAxis()->upperBound()); - EXPECT_EQ(2.0, beam.getIntensity()); - EXPECT_EQ(1.0, beam.getWavelength()); + EXPECT_EQ(2.0, beam.intensity()); + EXPECT_EQ(1.0, beam.wavelength()); EXPECT_EQ(0.0, beam.direction().alpha()); EXPECT_EQ(0.0, beam.direction().phi()); checkBeamState(sim); @@ -111,8 +111,8 @@ TEST_F(SpecularSimulationTest, SetAngularScan) { EXPECT_EQ(10u, sim.coordinateAxis()->size()); EXPECT_EQ(1.0 * Units::deg, sim.coordinateAxis()->lowerBound()); EXPECT_EQ(10.0 * Units::deg, sim.coordinateAxis()->upperBound()); - EXPECT_EQ(2.0, beam.getIntensity()); - EXPECT_EQ(1.0, beam.getWavelength()); + EXPECT_EQ(2.0, beam.intensity()); + EXPECT_EQ(1.0, beam.wavelength()); EXPECT_EQ(0.0, beam.direction().alpha()); EXPECT_EQ(0.0, beam.direction().phi()); checkBeamState(sim); @@ -132,23 +132,23 @@ TEST_F(SpecularSimulationTest, SetQScan) { EXPECT_EQ(2u, sim.coordinateAxis()->size()); EXPECT_EQ(1.0, sim.coordinateAxis()->lowerBound()); EXPECT_EQ(3.0, sim.coordinateAxis()->upperBound()); - EXPECT_EQ(1.0, beam.getIntensity()); - EXPECT_EQ(1.0, beam.getWavelength()); + EXPECT_EQ(1.0, beam.intensity()); + EXPECT_EQ(1.0, beam.wavelength()); EXPECT_EQ(0.0, beam.direction().alpha()); EXPECT_EQ(0.0, beam.direction().phi()); checkBeamState(sim); sim.setBeamIntensity(2.0); - EXPECT_EQ(2.0, beam.getIntensity()); + EXPECT_EQ(2.0, beam.intensity()); QSpecScan scan2(10, 1.0, 10.0); sim.setScan(scan2); EXPECT_EQ(10u, sim.coordinateAxis()->size()); EXPECT_EQ(1.0, sim.coordinateAxis()->lowerBound()); EXPECT_EQ(10.0, sim.coordinateAxis()->upperBound()); - EXPECT_EQ(2.0, beam.getIntensity()); - EXPECT_EQ(1.0, beam.getWavelength()); + EXPECT_EQ(2.0, beam.intensity()); + EXPECT_EQ(1.0, beam.wavelength()); EXPECT_EQ(0.0, beam.direction().alpha()); EXPECT_EQ(0.0, beam.direction().phi()); checkBeamState(sim); diff --git a/Tests/UnitTests/Core/Other/BeamTest.cpp b/Tests/UnitTests/Core/Other/BeamTest.cpp index dc9b3aeeb4a8f6517923df678db3e769f4cf72eb..28cdc25668ec3c4b02ac7ed91a8a65b4edd4e89b 100644 --- a/Tests/UnitTests/Core/Other/BeamTest.cpp +++ b/Tests/UnitTests/Core/Other/BeamTest.cpp @@ -15,7 +15,7 @@ TEST_F(BeamTest, BeamInitialState) { EXPECT_DOUBLE_EQ(M_TWOPI, beam.getCentralK()[0]); EXPECT_EQ(0.0, beam.getCentralK()[1]); EXPECT_EQ(0.0, beam.getCentralK()[2]); - EXPECT_EQ(1.0, beam.getIntensity()); + EXPECT_EQ(1.0, beam.intensity()); // EXPECT_EQ(size_t(4), beam.parameterPool()->size()); // EXPECT_EQ(1.0, beam.parameterPool()->parameter("Intensity")->value()); // EXPECT_EQ(1.0, beam.parameterPool()->parameter("Wavelength")->value()); @@ -35,7 +35,7 @@ TEST_F(BeamTest, BeamAssignment) { EXPECT_NEAR(1.83423, beam_copy.getCentralK()[0], 0.00001); EXPECT_NEAR(-2.85664, beam_copy.getCentralK()[1], 0.00001); EXPECT_NEAR(-5.28712, beam_copy.getCentralK()[2], 0.00001); - EXPECT_EQ(double(2.0), beam_copy.getIntensity()); + EXPECT_EQ(double(2.0), beam_copy.intensity()); /* TEMPORARILY DISABLED getParameterPool() EXPECT_EQ(size_t(4), beam_copy.getParameterPool()->size()); EXPECT_EQ(double(2.0), diff --git a/Tests/UnitTests/Core/SimulationElement/DepthProbeElementTest.cpp b/Tests/UnitTests/Core/SimulationElement/DepthProbeElementTest.cpp index 76d9a431d32ec0760dc15c4273b8b5d80cb7e712..cba586ab2735b002800b546fc25bd25963568fd4 100644 --- a/Tests/UnitTests/Core/SimulationElement/DepthProbeElementTest.cpp +++ b/Tests/UnitTests/Core/SimulationElement/DepthProbeElementTest.cpp @@ -24,7 +24,7 @@ DepthProbeElement DepthProbeElementTest::createDefaultElement() { void DepthProbeElementTest::compareEqualElements(const DepthProbeElement& lhs, const DepthProbeElement& rhs) { - EXPECT_EQ(lhs.getWavelength(), rhs.getWavelength()); + EXPECT_EQ(lhs.wavelength(), rhs.wavelength()); EXPECT_EQ(lhs.getAlphaI(), rhs.getAlphaI()); bool intensity_comparison_result = (lhs.getIntensities() == rhs.getIntensities()).min(); EXPECT_TRUE(intensity_comparison_result); @@ -39,7 +39,7 @@ TEST_F(DepthProbeElementTest, InitialState) { const kvector_t k_i = vecOfLambdaAlphaPhi(wavelength, angle, phi); const DepthProbeElement& element = createDefaultElement(); - EXPECT_EQ(wavelength, element.getWavelength()); + EXPECT_EQ(wavelength, element.wavelength()); EXPECT_EQ(angle, element.getAlphaI()); bool intensity_comparison_result = (element.getIntensities() == 0.0).min(); EXPECT_TRUE(intensity_comparison_result); diff --git a/Tests/UnitTests/Core/SimulationElement/SimulationElementTest.cpp b/Tests/UnitTests/Core/SimulationElement/SimulationElementTest.cpp index 5abefde4903044c742025b5a65a8c3b0d12e3e20..18331b095fdf6778c1f227313322f9b060d15aab 100644 --- a/Tests/UnitTests/Core/SimulationElement/SimulationElementTest.cpp +++ b/Tests/UnitTests/Core/SimulationElement/SimulationElementTest.cpp @@ -28,10 +28,10 @@ public: TEST_F(SimulationElementTest, basicConstructor) { SimulationElement element(wavelength, alpha_i, phi_i, createPixel(), {}, {}, false); - EXPECT_EQ(element.getWavelength(), wavelength); + EXPECT_EQ(element.wavelength(), wavelength); EXPECT_EQ(element.getAlphaI(), alpha_i); EXPECT_EQ(element.getPhiI(), phi_i); - EXPECT_EQ(element.getIntensity(), 0.0); + EXPECT_EQ(element.intensity(), 0.0); EXPECT_NEAR(element.getAlphaMean(), 0.5 * Units::deg, 1e-14); EXPECT_NEAR(element.getPhiMean(), 0.0 * Units::deg, 1e-14); EXPECT_EQ(element.getKi(), vecOfLambdaAlphaPhi(wavelength, alpha_i, phi_i)); @@ -41,22 +41,22 @@ TEST_F(SimulationElementTest, basicConstructor) { TEST_F(SimulationElementTest, setIntensity) { auto element = createElement(); - EXPECT_EQ(element->getIntensity(), 0.0); + EXPECT_EQ(element->intensity(), 0.0); element->addIntensity(1.0); - EXPECT_EQ(element->getIntensity(), 1.0); + EXPECT_EQ(element->intensity(), 1.0); element->setIntensity(42.0); - EXPECT_EQ(element->getIntensity(), 42.0); + EXPECT_EQ(element->intensity(), 42.0); } TEST_F(SimulationElementTest, copyConstructor) { auto orig = createElement(); SimulationElement element(*orig); - EXPECT_EQ(orig->getWavelength(), element.getWavelength()); + EXPECT_EQ(orig->wavelength(), element.wavelength()); EXPECT_EQ(orig->getAlphaI(), element.getAlphaI()); EXPECT_EQ(orig->getPhiI(), element.getPhiI()); EXPECT_EQ(orig->getAlphaMean(), element.getAlphaMean()); EXPECT_EQ(orig->getPhiMean(), element.getPhiMean()); - EXPECT_EQ(orig->getIntensity(), element.getIntensity()); + EXPECT_EQ(orig->intensity(), element.intensity()); EXPECT_EQ(orig->getKi(), element.getKi()); EXPECT_EQ(orig->getMeanKf(), element.getMeanKf()); EXPECT_EQ(orig->getQ(0.5, 0.5), element.getQ(0.5, 0.5)); @@ -72,12 +72,12 @@ TEST_F(SimulationElementTest, moveConstruction) { SimulationElement orig(1.0, 2.0, 3.0, createPixel(), {}, {}, false); SimulationElement element(std::move(for_move)); - EXPECT_EQ(orig.getWavelength(), element.getWavelength()); + EXPECT_EQ(orig.wavelength(), element.wavelength()); EXPECT_EQ(orig.getAlphaI(), element.getAlphaI()); EXPECT_EQ(orig.getPhiI(), element.getPhiI()); EXPECT_EQ(orig.getAlphaMean(), element.getAlphaMean()); EXPECT_EQ(orig.getPhiMean(), element.getPhiMean()); - EXPECT_EQ(orig.getIntensity(), element.getIntensity()); + EXPECT_EQ(orig.intensity(), element.intensity()); EXPECT_EQ(orig.getKi(), element.getKi()); EXPECT_EQ(orig.getMeanKf(), element.getMeanKf()); EXPECT_EQ(orig.getQ(0.5, 0.5), element.getQ(0.5, 0.5)); diff --git a/auto/Wrap/doxygenBase.i b/auto/Wrap/doxygenBase.i index 076768cf54de998f00cd72927fee5447ba7e728c..a28a5913a953f0be27a10e9cce37c1cd665433e3 100644 --- a/auto/Wrap/doxygenBase.i +++ b/auto/Wrap/doxygenBase.i @@ -934,7 +934,7 @@ Returns copy of this SimulationElement with k_f given by in-pixel coordinate x, Returns assigned PolarizationHandler. "; -%feature("docstring") SimulationElement::getWavelength "double SimulationElement::getWavelength() const +%feature("docstring") SimulationElement::wavelength "double SimulationElement::wavelength() const "; %feature("docstring") SimulationElement::getAlphaI "double SimulationElement::getAlphaI() const @@ -955,7 +955,7 @@ Returns assigned PolarizationHandler. %feature("docstring") SimulationElement::addIntensity "void SimulationElement::addIntensity(double intensity) "; -%feature("docstring") SimulationElement::getIntensity "double SimulationElement::getIntensity() const +%feature("docstring") SimulationElement::intensity "double SimulationElement::intensity() const "; %feature("docstring") SimulationElement::getKi "kvector_t SimulationElement::getKi() const diff --git a/auto/Wrap/doxygenCore.i b/auto/Wrap/doxygenCore.i index 6a22776315c5a3c26b7f209aba9dfcba2c48aab9..832016732b4fad6c4a811d1c668fef3aee364419 100644 --- a/auto/Wrap/doxygenCore.i +++ b/auto/Wrap/doxygenCore.i @@ -298,7 +298,7 @@ C++ includes: DepthProbeComputation.h %feature("docstring") DepthProbeElement::~DepthProbeElement "DepthProbeElement::~DepthProbeElement() "; -%feature("docstring") DepthProbeElement::getWavelength "double DepthProbeElement::getWavelength() const +%feature("docstring") DepthProbeElement::wavelength "double DepthProbeElement::wavelength() const "; %feature("docstring") DepthProbeElement::getAlphaI "double DepthProbeElement::getAlphaI() const @@ -2166,7 +2166,7 @@ C++ includes: SpecularSimulationElement.h Returns assigned PolarizationHandler. "; -%feature("docstring") SpecularSimulationElement::getIntensity "double SpecularSimulationElement::getIntensity() const +%feature("docstring") SpecularSimulationElement::intensity "double SpecularSimulationElement::intensity() const "; %feature("docstring") SpecularSimulationElement::setIntensity "void SpecularSimulationElement::setIntensity(double intensity) diff --git a/auto/Wrap/doxygenDevice.i b/auto/Wrap/doxygenDevice.i index afacf749fd34e97a123c882ca1aa699c4b345650..6217f62a4b2e21095eaba7dcf878283b5c3dd29b 100644 --- a/auto/Wrap/doxygenDevice.i +++ b/auto/Wrap/doxygenDevice.i @@ -45,28 +45,29 @@ C++ includes: Beam.h %feature("docstring") Beam::~Beam "Beam::~Beam() "; -%feature("docstring") Beam::getCentralK "kvector_t Beam::getCentralK() const +%feature("docstring") Beam::accept "void Beam::accept(INodeVisitor *visitor) const override +"; -Returns the wavevector. +%feature("docstring") Beam::getChildren "std::vector< const INode * > Beam::getChildren() const override "; -%feature("docstring") Beam::setWavelength "void Beam::setWavelength(double wavelength) +%feature("docstring") Beam::intensity "double Beam::intensity() const + +Returns the beam intensity in neutrons/sec. "; -%feature("docstring") Beam::setDirection "void Beam::setDirection(const Direction &direction) +%feature("docstring") Beam::wavelength "double Beam::wavelength() const "; -%feature("docstring") Beam::setInclination "void Beam::setInclination(const double alpha) +%feature("docstring") Beam::direction "Direction Beam::direction() const "; -%feature("docstring") Beam::getIntensity "double Beam::getIntensity() const +%feature("docstring") Beam::getCentralK "kvector_t Beam::getCentralK() const -Returns the beam intensity in neutrons/sec. +Returns the wavevector. "; -%feature("docstring") Beam::setIntensity "void Beam::setIntensity(double intensity) - -Sets the beam intensity in neutrons/sec. +%feature("docstring") Beam::getBlochVector "kvector_t Beam::getBlochVector() const "; %feature("docstring") Beam::footprintFactor "const IFootprintFactor * Beam::footprintFactor() const @@ -74,39 +75,38 @@ Sets the beam intensity in neutrons/sec. Returns footprint factor. "; -%feature("docstring") Beam::setFootprintFactor "void Beam::setFootprintFactor(const IFootprintFactor &shape_factor) +%feature("docstring") Beam::getPolarization "Eigen::Matrix2cd Beam::getPolarization() const -Sets footprint factor to the beam. +Returns the polarization density matrix (in spin basis along z-axis) "; -%feature("docstring") Beam::setWidthRatio "void Beam::setWidthRatio(double width_ratio) - -Sets beam to sample width ratio in footprint factor. +%feature("docstring") Beam::setWavelength "void Beam::setWavelength(double wavelength) "; -%feature("docstring") Beam::setPolarization "void Beam::setPolarization(const kvector_t bloch_vector) - -Sets the polarization density matrix according to the given Bloch vector. +%feature("docstring") Beam::setDirection "void Beam::setDirection(const Direction &direction) "; -%feature("docstring") Beam::getBlochVector "kvector_t Beam::getBlochVector() const +%feature("docstring") Beam::setInclination "void Beam::setInclination(const double alpha) "; -%feature("docstring") Beam::getPolarization "Eigen::Matrix2cd Beam::getPolarization() const +%feature("docstring") Beam::setIntensity "void Beam::setIntensity(double intensity) -Returns the polarization density matrix (in spin basis along z-axis) +Sets the beam intensity in neutrons/sec. "; -%feature("docstring") Beam::getWavelength "double Beam::getWavelength() const -"; +%feature("docstring") Beam::setFootprintFactor "void Beam::setFootprintFactor(const IFootprintFactor &shape_factor) -%feature("docstring") Beam::direction "Direction Beam::direction() const +Sets footprint factor to the beam. "; -%feature("docstring") Beam::accept "void Beam::accept(INodeVisitor *visitor) const override +%feature("docstring") Beam::setWidthRatio "void Beam::setWidthRatio(double width_ratio) + +Sets beam to sample width ratio in footprint factor. "; -%feature("docstring") Beam::getChildren "std::vector< const INode * > Beam::getChildren() const override +%feature("docstring") Beam::setPolarization "void Beam::setPolarization(const kvector_t bloch_vector) + +Sets the polarization density matrix according to the given Bloch vector. "; diff --git a/auto/Wrap/doxygenSample.i b/auto/Wrap/doxygenSample.i index 0ad73a54aa74f9d5c7553716658c64c2401b22b5..f113d09dbfbcf1f3d95c3c9548bf7fa225ed5a67 100644 --- a/auto/Wrap/doxygenSample.i +++ b/auto/Wrap/doxygenSample.i @@ -7434,7 +7434,7 @@ C++ includes: WavevectorInfo.h %feature("docstring") WavevectorInfo::getQ "cvector_t WavevectorInfo::getQ() const "; -%feature("docstring") WavevectorInfo::getWavelength "double WavevectorInfo::getWavelength() const +%feature("docstring") WavevectorInfo::wavelength "double WavevectorInfo::wavelength() const "; diff --git a/auto/Wrap/libBornAgainDevice.py b/auto/Wrap/libBornAgainDevice.py index 900da33be5efb67a729627fdac929dd079c8d0a5..c9a36dca232407c42ba9f5e9f24203cd4442837d 100644 --- a/auto/Wrap/libBornAgainDevice.py +++ b/auto/Wrap/libBornAgainDevice.py @@ -2644,6 +2644,48 @@ class Beam(libBornAgainParam.INode): r"""horizontalBeam() -> Beam""" return _libBornAgainDevice.Beam_horizontalBeam() + def accept(self, visitor): + r""" + accept(Beam self, INodeVisitor * visitor) + void Beam::accept(INodeVisitor *visitor) const override + + """ + return _libBornAgainDevice.Beam_accept(self, visitor) + + def getChildren(self): + r""" + getChildren(Beam self) -> std::vector< INode const *,std::allocator< INode const * > > + std::vector< const INode * > Beam::getChildren() const override + + """ + return _libBornAgainDevice.Beam_getChildren(self) + + def intensity(self): + r""" + intensity(Beam self) -> double + double Beam::intensity() const + + Returns the beam intensity in neutrons/sec. + + """ + return _libBornAgainDevice.Beam_intensity(self) + + def wavelength(self): + r""" + wavelength(Beam self) -> double + double Beam::wavelength() const + + """ + return _libBornAgainDevice.Beam_wavelength(self) + + def direction(self): + r""" + direction(Beam self) -> Direction + Direction Beam::direction() const + + """ + return _libBornAgainDevice.Beam_direction(self) + def getCentralK(self): r""" getCentralK(Beam self) -> kvector_t @@ -2654,6 +2696,24 @@ class Beam(libBornAgainParam.INode): """ return _libBornAgainDevice.Beam_getCentralK(self) + def getBlochVector(self): + r""" + getBlochVector(Beam self) -> kvector_t + kvector_t Beam::getBlochVector() const + + """ + return _libBornAgainDevice.Beam_getBlochVector(self) + + def footprintFactor(self): + r""" + footprintFactor(Beam self) -> IFootprintFactor + const IFootprintFactor * Beam::footprintFactor() const + + Returns footprint factor. + + """ + return _libBornAgainDevice.Beam_footprintFactor(self) + def setWavelength(self, wavelength): r""" setWavelength(Beam self, double wavelength) @@ -2678,16 +2738,6 @@ class Beam(libBornAgainParam.INode): """ return _libBornAgainDevice.Beam_setInclination(self, alpha) - def getIntensity(self): - r""" - getIntensity(Beam self) -> double - double Beam::getIntensity() const - - Returns the beam intensity in neutrons/sec. - - """ - return _libBornAgainDevice.Beam_getIntensity(self) - def setIntensity(self, intensity): r""" setIntensity(Beam self, double intensity) @@ -2698,16 +2748,6 @@ class Beam(libBornAgainParam.INode): """ return _libBornAgainDevice.Beam_setIntensity(self, intensity) - def footprintFactor(self): - r""" - footprintFactor(Beam self) -> IFootprintFactor - const IFootprintFactor * Beam::footprintFactor() const - - Returns footprint factor. - - """ - return _libBornAgainDevice.Beam_footprintFactor(self) - def setFootprintFactor(self, shape_factor): r""" setFootprintFactor(Beam self, IFootprintFactor shape_factor) @@ -2738,46 +2778,6 @@ class Beam(libBornAgainParam.INode): """ return _libBornAgainDevice.Beam_setPolarization(self, bloch_vector) - def getBlochVector(self): - r""" - getBlochVector(Beam self) -> kvector_t - kvector_t Beam::getBlochVector() const - - """ - return _libBornAgainDevice.Beam_getBlochVector(self) - - def getWavelength(self): - r""" - getWavelength(Beam self) -> double - double Beam::getWavelength() const - - """ - return _libBornAgainDevice.Beam_getWavelength(self) - - def direction(self): - r""" - direction(Beam self) -> Direction - Direction Beam::direction() const - - """ - return _libBornAgainDevice.Beam_direction(self) - - def accept(self, visitor): - r""" - accept(Beam self, INodeVisitor * visitor) - void Beam::accept(INodeVisitor *visitor) const override - - """ - return _libBornAgainDevice.Beam_accept(self, visitor) - - def getChildren(self): - r""" - getChildren(Beam self) -> std::vector< INode const *,std::allocator< INode const * > > - std::vector< const INode * > Beam::getChildren() const override - - """ - return _libBornAgainDevice.Beam_getChildren(self) - # Register Beam in _libBornAgainDevice: _libBornAgainDevice.Beam_swigregister(Beam) diff --git a/auto/Wrap/libBornAgainDevice_wrap.cpp b/auto/Wrap/libBornAgainDevice_wrap.cpp index 4792bc2c427f5831a7d6be521257529eb293327e..fc45e830e2ee219e848007d94c37d0044eca8bfe 100644 --- a/auto/Wrap/libBornAgainDevice_wrap.cpp +++ b/auto/Wrap/libBornAgainDevice_wrap.cpp @@ -30717,227 +30717,197 @@ fail: } -SWIGINTERN PyObject *_wrap_Beam_getCentralK(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Beam_accept(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Beam *arg1 = (Beam *) 0 ; + INodeVisitor *arg2 = (INodeVisitor *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - kvector_t result; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; - if (!args) SWIG_fail; - swig_obj[0] = args; + if (!SWIG_Python_UnpackTuple(args, "Beam_accept", 2, 2, swig_obj)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Beam, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Beam_getCentralK" "', argument " "1"" of type '" "Beam const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Beam_accept" "', argument " "1"" of type '" "Beam const *""'"); } arg1 = reinterpret_cast< Beam * >(argp1); - result = ((Beam const *)arg1)->getCentralK(); - resultobj = SWIG_NewPointerObj((new kvector_t(static_cast< const kvector_t& >(result))), SWIGTYPE_p_BasicVector3DT_double_t, SWIG_POINTER_OWN | 0 ); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_INodeVisitor, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Beam_accept" "', argument " "2"" of type '" "INodeVisitor *""'"); + } + arg2 = reinterpret_cast< INodeVisitor * >(argp2); + ((Beam const *)arg1)->accept(arg2); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_Beam_setWavelength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Beam_getChildren(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Beam *arg1 = (Beam *) 0 ; - double arg2 ; void *argp1 = 0 ; int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; + PyObject *swig_obj[1] ; + SwigValueWrapper< std::vector< INode const *,std::allocator< INode const * > > > result; - if (!SWIG_Python_UnpackTuple(args, "Beam_setWavelength", 2, 2, swig_obj)) SWIG_fail; + if (!args) SWIG_fail; + swig_obj[0] = args; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Beam, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Beam_setWavelength" "', argument " "1"" of type '" "Beam *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Beam_getChildren" "', argument " "1"" of type '" "Beam const *""'"); } arg1 = reinterpret_cast< Beam * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Beam_setWavelength" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - (arg1)->setWavelength(arg2); - resultobj = SWIG_Py_Void(); + result = ((Beam const *)arg1)->getChildren(); + resultobj = SWIG_NewPointerObj((new std::vector< INode const *,std::allocator< INode const * > >(static_cast< const std::vector< INode const *,std::allocator< INode const * > >& >(result))), SWIGTYPE_p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_Beam_setDirection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Beam_intensity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Beam *arg1 = (Beam *) 0 ; - Direction *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; + PyObject *swig_obj[1] ; + double result; - if (!SWIG_Python_UnpackTuple(args, "Beam_setDirection", 2, 2, swig_obj)) SWIG_fail; + if (!args) SWIG_fail; + swig_obj[0] = args; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Beam, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Beam_setDirection" "', argument " "1"" of type '" "Beam *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Beam_intensity" "', argument " "1"" of type '" "Beam const *""'"); } arg1 = reinterpret_cast< Beam * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Direction, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Beam_setDirection" "', argument " "2"" of type '" "Direction const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Beam_setDirection" "', argument " "2"" of type '" "Direction const &""'"); - } - arg2 = reinterpret_cast< Direction * >(argp2); - (arg1)->setDirection((Direction const &)*arg2); - resultobj = SWIG_Py_Void(); + result = (double)((Beam const *)arg1)->intensity(); + resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_Beam_setInclination(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Beam_wavelength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Beam *arg1 = (Beam *) 0 ; - double arg2 ; void *argp1 = 0 ; int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; + PyObject *swig_obj[1] ; + double result; - if (!SWIG_Python_UnpackTuple(args, "Beam_setInclination", 2, 2, swig_obj)) SWIG_fail; + if (!args) SWIG_fail; + swig_obj[0] = args; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Beam, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Beam_setInclination" "', argument " "1"" of type '" "Beam *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Beam_wavelength" "', argument " "1"" of type '" "Beam const *""'"); } arg1 = reinterpret_cast< Beam * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Beam_setInclination" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - (arg1)->setInclination(arg2); - resultobj = SWIG_Py_Void(); + result = (double)((Beam const *)arg1)->wavelength(); + resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_Beam_getIntensity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Beam_direction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Beam *arg1 = (Beam *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; - double result; + Direction result; if (!args) SWIG_fail; swig_obj[0] = args; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Beam, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Beam_getIntensity" "', argument " "1"" of type '" "Beam const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Beam_direction" "', argument " "1"" of type '" "Beam const *""'"); } arg1 = reinterpret_cast< Beam * >(argp1); - result = (double)((Beam const *)arg1)->getIntensity(); - resultobj = SWIG_From_double(static_cast< double >(result)); + result = ((Beam const *)arg1)->direction(); + resultobj = SWIG_NewPointerObj((new Direction(static_cast< const Direction& >(result))), SWIGTYPE_p_Direction, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_Beam_setIntensity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Beam_getCentralK(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Beam *arg1 = (Beam *) 0 ; - double arg2 ; void *argp1 = 0 ; int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; + PyObject *swig_obj[1] ; + kvector_t result; - if (!SWIG_Python_UnpackTuple(args, "Beam_setIntensity", 2, 2, swig_obj)) SWIG_fail; + if (!args) SWIG_fail; + swig_obj[0] = args; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Beam, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Beam_setIntensity" "', argument " "1"" of type '" "Beam *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Beam_getCentralK" "', argument " "1"" of type '" "Beam const *""'"); } arg1 = reinterpret_cast< Beam * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Beam_setIntensity" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - (arg1)->setIntensity(arg2); - resultobj = SWIG_Py_Void(); + result = ((Beam const *)arg1)->getCentralK(); + resultobj = SWIG_NewPointerObj((new kvector_t(static_cast< const kvector_t& >(result))), SWIGTYPE_p_BasicVector3DT_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_Beam_footprintFactor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Beam_getBlochVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Beam *arg1 = (Beam *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; - IFootprintFactor *result = 0 ; + kvector_t result; if (!args) SWIG_fail; swig_obj[0] = args; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Beam, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Beam_footprintFactor" "', argument " "1"" of type '" "Beam const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Beam_getBlochVector" "', argument " "1"" of type '" "Beam const *""'"); } arg1 = reinterpret_cast< Beam * >(argp1); - result = (IFootprintFactor *)((Beam const *)arg1)->footprintFactor(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IFootprintFactor, 0 | 0 ); + result = ((Beam const *)arg1)->getBlochVector(); + resultobj = SWIG_NewPointerObj((new kvector_t(static_cast< const kvector_t& >(result))), SWIGTYPE_p_BasicVector3DT_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_Beam_setFootprintFactor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Beam_footprintFactor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Beam *arg1 = (Beam *) 0 ; - IFootprintFactor *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; + PyObject *swig_obj[1] ; + IFootprintFactor *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "Beam_setFootprintFactor", 2, 2, swig_obj)) SWIG_fail; + if (!args) SWIG_fail; + swig_obj[0] = args; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Beam, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Beam_setFootprintFactor" "', argument " "1"" of type '" "Beam *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Beam_footprintFactor" "', argument " "1"" of type '" "Beam const *""'"); } arg1 = reinterpret_cast< Beam * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_IFootprintFactor, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Beam_setFootprintFactor" "', argument " "2"" of type '" "IFootprintFactor const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Beam_setFootprintFactor" "', argument " "2"" of type '" "IFootprintFactor const &""'"); - } - arg2 = reinterpret_cast< IFootprintFactor * >(argp2); - (arg1)->setFootprintFactor((IFootprintFactor const &)*arg2); - resultobj = SWIG_Py_Void(); + result = (IFootprintFactor *)((Beam const *)arg1)->footprintFactor(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IFootprintFactor, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_Beam_setWidthRatio(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Beam_setWavelength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Beam *arg1 = (Beam *) 0 ; double arg2 ; @@ -30947,18 +30917,18 @@ SWIGINTERN PyObject *_wrap_Beam_setWidthRatio(PyObject *SWIGUNUSEDPARM(self), Py int ecode2 = 0 ; PyObject *swig_obj[2] ; - if (!SWIG_Python_UnpackTuple(args, "Beam_setWidthRatio", 2, 2, swig_obj)) SWIG_fail; + if (!SWIG_Python_UnpackTuple(args, "Beam_setWavelength", 2, 2, swig_obj)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Beam, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Beam_setWidthRatio" "', argument " "1"" of type '" "Beam *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Beam_setWavelength" "', argument " "1"" of type '" "Beam *""'"); } arg1 = reinterpret_cast< Beam * >(argp1); ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Beam_setWidthRatio" "', argument " "2"" of type '" "double""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Beam_setWavelength" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - (arg1)->setWidthRatio(arg2); + (arg1)->setWavelength(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -30966,36 +30936,31 @@ fail: } -SWIGINTERN PyObject *_wrap_Beam_setPolarization(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Beam_setDirection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Beam *arg1 = (Beam *) 0 ; - kvector_t arg2 ; + Direction *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 ; + void *argp2 = 0 ; int res2 = 0 ; PyObject *swig_obj[2] ; - if (!SWIG_Python_UnpackTuple(args, "Beam_setPolarization", 2, 2, swig_obj)) SWIG_fail; + if (!SWIG_Python_UnpackTuple(args, "Beam_setDirection", 2, 2, swig_obj)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Beam, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Beam_setPolarization" "', argument " "1"" of type '" "Beam *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Beam_setDirection" "', argument " "1"" of type '" "Beam *""'"); } arg1 = reinterpret_cast< Beam * >(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 '" "Beam_setPolarization" "', argument " "2"" of type '" "kvector_t const""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Beam_setPolarization" "', argument " "2"" of type '" "kvector_t const""'"); - } else { - kvector_t * temp = reinterpret_cast< kvector_t * >(argp2); - arg2 = *temp; - if (SWIG_IsNewObj(res2)) delete temp; - } + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Direction, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Beam_setDirection" "', argument " "2"" of type '" "Direction const &""'"); } - (arg1)->setPolarization(arg2); + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Beam_setDirection" "', argument " "2"" of type '" "Direction const &""'"); + } + arg2 = reinterpret_cast< Direction * >(argp2); + (arg1)->setDirection((Direction const &)*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -31003,97 +30968,118 @@ fail: } -SWIGINTERN PyObject *_wrap_Beam_getBlochVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Beam_setInclination(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Beam *arg1 = (Beam *) 0 ; + double arg2 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - kvector_t result; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; - if (!args) SWIG_fail; - swig_obj[0] = args; + if (!SWIG_Python_UnpackTuple(args, "Beam_setInclination", 2, 2, swig_obj)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Beam, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Beam_getBlochVector" "', argument " "1"" of type '" "Beam const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Beam_setInclination" "', argument " "1"" of type '" "Beam *""'"); } arg1 = reinterpret_cast< Beam * >(argp1); - result = ((Beam const *)arg1)->getBlochVector(); - resultobj = SWIG_NewPointerObj((new kvector_t(static_cast< const kvector_t& >(result))), SWIGTYPE_p_BasicVector3DT_double_t, SWIG_POINTER_OWN | 0 ); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Beam_setInclination" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + (arg1)->setInclination(arg2); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_Beam_getWavelength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Beam_setIntensity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Beam *arg1 = (Beam *) 0 ; + double arg2 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; - if (!args) SWIG_fail; - swig_obj[0] = args; + if (!SWIG_Python_UnpackTuple(args, "Beam_setIntensity", 2, 2, swig_obj)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Beam, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Beam_getWavelength" "', argument " "1"" of type '" "Beam const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Beam_setIntensity" "', argument " "1"" of type '" "Beam *""'"); } arg1 = reinterpret_cast< Beam * >(argp1); - result = (double)((Beam const *)arg1)->getWavelength(); - resultobj = SWIG_From_double(static_cast< double >(result)); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Beam_setIntensity" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + (arg1)->setIntensity(arg2); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_Beam_direction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Beam_setFootprintFactor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Beam *arg1 = (Beam *) 0 ; + IFootprintFactor *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - Direction result; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; - if (!args) SWIG_fail; - swig_obj[0] = args; + if (!SWIG_Python_UnpackTuple(args, "Beam_setFootprintFactor", 2, 2, swig_obj)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Beam, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Beam_direction" "', argument " "1"" of type '" "Beam const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Beam_setFootprintFactor" "', argument " "1"" of type '" "Beam *""'"); } arg1 = reinterpret_cast< Beam * >(argp1); - result = ((Beam const *)arg1)->direction(); - resultobj = SWIG_NewPointerObj((new Direction(static_cast< const Direction& >(result))), SWIGTYPE_p_Direction, SWIG_POINTER_OWN | 0 ); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_IFootprintFactor, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Beam_setFootprintFactor" "', argument " "2"" of type '" "IFootprintFactor const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Beam_setFootprintFactor" "', argument " "2"" of type '" "IFootprintFactor const &""'"); + } + arg2 = reinterpret_cast< IFootprintFactor * >(argp2); + (arg1)->setFootprintFactor((IFootprintFactor const &)*arg2); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_Beam_accept(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Beam_setWidthRatio(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Beam *arg1 = (Beam *) 0 ; - INodeVisitor *arg2 = (INodeVisitor *) 0 ; + double arg2 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; + double val2 ; + int ecode2 = 0 ; PyObject *swig_obj[2] ; - if (!SWIG_Python_UnpackTuple(args, "Beam_accept", 2, 2, swig_obj)) SWIG_fail; + if (!SWIG_Python_UnpackTuple(args, "Beam_setWidthRatio", 2, 2, swig_obj)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Beam, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Beam_accept" "', argument " "1"" of type '" "Beam const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Beam_setWidthRatio" "', argument " "1"" of type '" "Beam *""'"); } arg1 = reinterpret_cast< Beam * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_INodeVisitor, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Beam_accept" "', argument " "2"" of type '" "INodeVisitor *""'"); - } - arg2 = reinterpret_cast< INodeVisitor * >(argp2); - ((Beam const *)arg1)->accept(arg2); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Beam_setWidthRatio" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + (arg1)->setWidthRatio(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -31101,23 +31087,37 @@ fail: } -SWIGINTERN PyObject *_wrap_Beam_getChildren(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Beam_setPolarization(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Beam *arg1 = (Beam *) 0 ; + kvector_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - SwigValueWrapper< std::vector< INode const *,std::allocator< INode const * > > > result; + void *argp2 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; - if (!args) SWIG_fail; - swig_obj[0] = args; + if (!SWIG_Python_UnpackTuple(args, "Beam_setPolarization", 2, 2, swig_obj)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Beam, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Beam_getChildren" "', argument " "1"" of type '" "Beam const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Beam_setPolarization" "', argument " "1"" of type '" "Beam *""'"); } arg1 = reinterpret_cast< Beam * >(argp1); - result = ((Beam const *)arg1)->getChildren(); - resultobj = SWIG_NewPointerObj((new std::vector< INode const *,std::allocator< INode const * > >(static_cast< const std::vector< INode const *,std::allocator< INode const * > >& >(result))), SWIGTYPE_p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t, SWIG_POINTER_OWN | 0 ); + { + 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 '" "Beam_setPolarization" "', argument " "2"" of type '" "kvector_t const""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Beam_setPolarization" "', argument " "2"" of type '" "kvector_t const""'"); + } else { + kvector_t * temp = reinterpret_cast< kvector_t * >(argp2); + arg2 = *temp; + if (SWIG_IsNewObj(res2)) delete temp; + } + } + (arg1)->setPolarization(arg2); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; @@ -46482,6 +46482,33 @@ static PyMethodDef SwigMethods[] = { "\n" ""}, { "Beam_horizontalBeam", _wrap_Beam_horizontalBeam, METH_NOARGS, "Beam_horizontalBeam() -> Beam"}, + { "Beam_accept", _wrap_Beam_accept, METH_VARARGS, "\n" + "Beam_accept(Beam self, INodeVisitor * visitor)\n" + "void Beam::accept(INodeVisitor *visitor) const override\n" + "\n" + ""}, + { "Beam_getChildren", _wrap_Beam_getChildren, METH_O, "\n" + "Beam_getChildren(Beam self) -> std::vector< INode const *,std::allocator< INode const * > >\n" + "std::vector< const INode * > Beam::getChildren() const override\n" + "\n" + ""}, + { "Beam_intensity", _wrap_Beam_intensity, METH_O, "\n" + "Beam_intensity(Beam self) -> double\n" + "double Beam::intensity() const\n" + "\n" + "Returns the beam intensity in neutrons/sec. \n" + "\n" + ""}, + { "Beam_wavelength", _wrap_Beam_wavelength, METH_O, "\n" + "Beam_wavelength(Beam self) -> double\n" + "double Beam::wavelength() const\n" + "\n" + ""}, + { "Beam_direction", _wrap_Beam_direction, METH_O, "\n" + "Beam_direction(Beam self) -> Direction\n" + "Direction Beam::direction() const\n" + "\n" + ""}, { "Beam_getCentralK", _wrap_Beam_getCentralK, METH_O, "\n" "Beam_getCentralK(Beam self) -> kvector_t\n" "kvector_t Beam::getCentralK() const\n" @@ -46489,6 +46516,18 @@ static PyMethodDef SwigMethods[] = { "Returns the wavevector. \n" "\n" ""}, + { "Beam_getBlochVector", _wrap_Beam_getBlochVector, METH_O, "\n" + "Beam_getBlochVector(Beam self) -> kvector_t\n" + "kvector_t Beam::getBlochVector() const\n" + "\n" + ""}, + { "Beam_footprintFactor", _wrap_Beam_footprintFactor, METH_O, "\n" + "Beam_footprintFactor(Beam self) -> IFootprintFactor\n" + "const IFootprintFactor * Beam::footprintFactor() const\n" + "\n" + "Returns footprint factor. \n" + "\n" + ""}, { "Beam_setWavelength", _wrap_Beam_setWavelength, METH_VARARGS, "\n" "Beam_setWavelength(Beam self, double wavelength)\n" "void Beam::setWavelength(double wavelength)\n" @@ -46504,13 +46543,6 @@ static PyMethodDef SwigMethods[] = { "void Beam::setInclination(const double alpha)\n" "\n" ""}, - { "Beam_getIntensity", _wrap_Beam_getIntensity, METH_O, "\n" - "Beam_getIntensity(Beam self) -> double\n" - "double Beam::getIntensity() const\n" - "\n" - "Returns the beam intensity in neutrons/sec. \n" - "\n" - ""}, { "Beam_setIntensity", _wrap_Beam_setIntensity, METH_VARARGS, "\n" "Beam_setIntensity(Beam self, double intensity)\n" "void Beam::setIntensity(double intensity)\n" @@ -46518,13 +46550,6 @@ static PyMethodDef SwigMethods[] = { "Sets the beam intensity in neutrons/sec. \n" "\n" ""}, - { "Beam_footprintFactor", _wrap_Beam_footprintFactor, METH_O, "\n" - "Beam_footprintFactor(Beam self) -> IFootprintFactor\n" - "const IFootprintFactor * Beam::footprintFactor() const\n" - "\n" - "Returns footprint factor. \n" - "\n" - ""}, { "Beam_setFootprintFactor", _wrap_Beam_setFootprintFactor, METH_VARARGS, "\n" "Beam_setFootprintFactor(Beam self, IFootprintFactor shape_factor)\n" "void Beam::setFootprintFactor(const IFootprintFactor &shape_factor)\n" @@ -46546,31 +46571,6 @@ static PyMethodDef SwigMethods[] = { "Sets the polarization density matrix according to the given Bloch vector. \n" "\n" ""}, - { "Beam_getBlochVector", _wrap_Beam_getBlochVector, METH_O, "\n" - "Beam_getBlochVector(Beam self) -> kvector_t\n" - "kvector_t Beam::getBlochVector() const\n" - "\n" - ""}, - { "Beam_getWavelength", _wrap_Beam_getWavelength, METH_O, "\n" - "Beam_getWavelength(Beam self) -> double\n" - "double Beam::getWavelength() const\n" - "\n" - ""}, - { "Beam_direction", _wrap_Beam_direction, METH_O, "\n" - "Beam_direction(Beam self) -> Direction\n" - "Direction Beam::direction() const\n" - "\n" - ""}, - { "Beam_accept", _wrap_Beam_accept, METH_VARARGS, "\n" - "Beam_accept(Beam self, INodeVisitor * visitor)\n" - "void Beam::accept(INodeVisitor *visitor) const override\n" - "\n" - ""}, - { "Beam_getChildren", _wrap_Beam_getChildren, METH_O, "\n" - "Beam_getChildren(Beam self) -> std::vector< INode const *,std::allocator< INode const * > >\n" - "std::vector< const INode * > Beam::getChildren() const override\n" - "\n" - ""}, { "Beam_swigregister", Beam_swigregister, METH_O, NULL}, { "Beam_swiginit", Beam_swiginit, METH_VARARGS, NULL}, { "delete_IFootprintFactor", _wrap_delete_IFootprintFactor, METH_O, "\n" diff --git a/auto/Wrap/libBornAgainSample.py b/auto/Wrap/libBornAgainSample.py index 4f0714d42cf1f153385660f94d853b5d784efab7..fdbdd51b1e11202bd84c6e045e438a5eef0b6eb2 100644 --- a/auto/Wrap/libBornAgainSample.py +++ b/auto/Wrap/libBornAgainSample.py @@ -2985,13 +2985,13 @@ class WavevectorInfo(object): """ return _libBornAgainSample.WavevectorInfo_getQ(self) - def getWavelength(self): + def wavelength(self): r""" - getWavelength(WavevectorInfo self) -> double - double WavevectorInfo::getWavelength() const + wavelength(WavevectorInfo self) -> double + double WavevectorInfo::wavelength() const """ - return _libBornAgainSample.WavevectorInfo_getWavelength(self) + return _libBornAgainSample.WavevectorInfo_wavelength(self) __swig_destroy__ = _libBornAgainSample.delete_WavevectorInfo # Register WavevectorInfo in _libBornAgainSample: diff --git a/auto/Wrap/libBornAgainSample_wrap.cpp b/auto/Wrap/libBornAgainSample_wrap.cpp index ac52181900573aa4b57b8de8b732d742e78ea35c..53071a0b3fb570f28157af990b8903e60825cd04 100644 --- a/auto/Wrap/libBornAgainSample_wrap.cpp +++ b/auto/Wrap/libBornAgainSample_wrap.cpp @@ -37784,7 +37784,7 @@ fail: } -SWIGINTERN PyObject *_wrap_WavevectorInfo_getWavelength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_WavevectorInfo_wavelength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; WavevectorInfo *arg1 = (WavevectorInfo *) 0 ; void *argp1 = 0 ; @@ -37796,10 +37796,10 @@ SWIGINTERN PyObject *_wrap_WavevectorInfo_getWavelength(PyObject *SWIGUNUSEDPARM swig_obj[0] = args; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_WavevectorInfo, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WavevectorInfo_getWavelength" "', argument " "1"" of type '" "WavevectorInfo const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WavevectorInfo_wavelength" "', argument " "1"" of type '" "WavevectorInfo const *""'"); } arg1 = reinterpret_cast< WavevectorInfo * >(argp1); - result = (double)((WavevectorInfo const *)arg1)->getWavelength(); + result = (double)((WavevectorInfo const *)arg1)->wavelength(); resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -70399,9 +70399,9 @@ static PyMethodDef SwigMethods[] = { "cvector_t WavevectorInfo::getQ() const\n" "\n" ""}, - { "WavevectorInfo_getWavelength", _wrap_WavevectorInfo_getWavelength, METH_O, "\n" - "WavevectorInfo_getWavelength(WavevectorInfo self) -> double\n" - "double WavevectorInfo::getWavelength() const\n" + { "WavevectorInfo_wavelength", _wrap_WavevectorInfo_wavelength, METH_O, "\n" + "WavevectorInfo_wavelength(WavevectorInfo self) -> double\n" + "double WavevectorInfo::wavelength() const\n" "\n" ""}, { "delete_WavevectorInfo", _wrap_delete_WavevectorInfo, METH_O, "delete_WavevectorInfo(WavevectorInfo self)"},