diff --git a/Device/Data/Datafield.cpp b/Device/Data/Datafield.cpp index 2c8b5fcb3332a26021e08a3cbdb9b2d409b91561..14dda90a8b380cfbc37bf783f0e290c0612fb509 100644 --- a/Device/Data/Datafield.cpp +++ b/Device/Data/Datafield.cpp @@ -311,3 +311,12 @@ Datafield* Datafield::create_yProjection(int xbinlow, int xbinup) const } return new Datafield({yAxis().clone()}, out); } + +void Datafield::setTitle(const std::string& title) +{ + m_title = title; +} +std::string Datafield::title() +{ + return m_title; +} diff --git a/Device/Data/Datafield.h b/Device/Data/Datafield.h index b47438f97c1415049f3d4178f3c79cff0815cb3e..6c9f37109efdf4e27ff14b66c9468222d8761547 100644 --- a/Device/Data/Datafield.h +++ b/Device/Data/Datafield.h @@ -19,6 +19,7 @@ #include "PyCore/Embed/PyObjectDecl.h" #endif #include <memory> +#include <string> #include <vector> using std::size_t; @@ -113,6 +114,9 @@ public: //! @param xup upper edje on x-axis Datafield* yProjection(double xlow, double xup) const; + void setTitle(const std::string& title); + std::string title(); + #ifndef SWIG double& operator[](size_t i); const double& operator[](size_t i) const; @@ -131,6 +135,7 @@ private: std::unique_ptr<const Frame> m_frame; std::vector<double> m_values; std::vector<double> m_errSigmas; + std::string m_title; //! Creates projection along X. The projections is made by collecting the data in the range //! between [ybinlow, ybinup]. diff --git a/Device/Histo/SimulationResult.cpp b/Device/Histo/SimulationResult.cpp deleted file mode 100644 index 693c49b2be776b960551067865ba7b176c39aae7..0000000000000000000000000000000000000000 --- a/Device/Histo/SimulationResult.cpp +++ /dev/null @@ -1,57 +0,0 @@ -// ************************************************************************************************ -// -// BornAgain: simulate and fit reflection and scattering -// -//! @file Device/Histo/SimulationResult.cpp -//! @brief Implements class SimulationResult. -//! -//! @homepage http://www.bornagainproject.org -//! @license GNU General Public License v3 or higher (see COPYING) -//! @copyright Forschungszentrum Jülich GmbH 2018 -//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS) -// -// ************************************************************************************************ - -#include "Device/Histo/SimulationResult.h" -#include "Base/Axis/Frame.h" -#include "Base/Axis/Scale.h" -#include "Base/Util/Assert.h" - -SimulationResult::SimulationResult(const Datafield& data) - : Datafield(data) -{ -} - -SimulationResult::SimulationResult(const SimulationResult& other) - : Datafield(other.frame().clone(), other.flatVector(), other.errorSigmas()) - , m_title(other.m_title) -{ -} - -SimulationResult::SimulationResult(SimulationResult&& other) noexcept = default; - -SimulationResult::~SimulationResult() = default; - -Datafield SimulationResult::extracted_field() const -{ - return Datafield(frame().clonedAxes(), flatVector()); -} - -std::pair<double, double> SimulationResult::axisMinMax(size_t i) const -{ - return {frame().axis(i).min(), frame().axis(i).max()}; -} - -std::vector<double> SimulationResult::convertedBinCenters(size_t i_axis) const -{ - return frame().axis(i_axis).binCenters(); -} - -void SimulationResult::setTitle(const std::string& title) -{ - m_title = title; -} -std::string SimulationResult::title() -{ - return m_title; -} diff --git a/Device/Histo/SimulationResult.h b/Device/Histo/SimulationResult.h deleted file mode 100644 index 733328a31c48a74c3b7192235b8911143f9ffeef..0000000000000000000000000000000000000000 --- a/Device/Histo/SimulationResult.h +++ /dev/null @@ -1,50 +0,0 @@ -// ************************************************************************************************ -// -// BornAgain: simulate and fit reflection and scattering -// -//! @file Device/Histo/SimulationResult.h -//! @brief Defines class SimulationResult. -//! -//! @homepage http://www.bornagainproject.org -//! @license GNU General Public License v3 or higher (see COPYING) -//! @copyright Forschungszentrum Jülich GmbH 2018 -//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS) -// -// ************************************************************************************************ - -#ifndef BORNAGAIN_DEVICE_HISTO_SIMULATIONRESULT_H -#define BORNAGAIN_DEVICE_HISTO_SIMULATIONRESULT_H - -#include "Device/Data/Datafield.h" -#include <string> - -class Frame; - -//! Wrapper around Datafield that also provides unit conversions. - -class SimulationResult : public Datafield { -public: - SimulationResult(const Datafield& data); - - SimulationResult(const SimulationResult& other); - SimulationResult(SimulationResult&& other) noexcept; - ~SimulationResult() override; - - Datafield extracted_field() const; - - std::pair<double, double> axisMinMax(size_t i) const; - - //! Returns axis coordinates as a numpy array. With no parameters given - //! Returns coordinates of x-axis in default units. - std::vector<double> convertedBinCenters(size_t i_axis) const; - - void setTitle(const std::string& title); - std::string title(); - -#ifndef SWIG -private: - std::string m_title; -#endif // SWIG -}; - -#endif // BORNAGAIN_DEVICE_HISTO_SIMULATIONRESULT_H diff --git a/Device/Histo/DiffUtil.cpp b/Device/IO/DiffUtil.cpp similarity index 94% rename from Device/Histo/DiffUtil.cpp rename to Device/IO/DiffUtil.cpp index a4c254dbf34dae79797938d5b06f55b5efee4127..d64c10edd5eb491ccf30ee84b72cf1237ce3f766 100644 --- a/Device/Histo/DiffUtil.cpp +++ b/Device/IO/DiffUtil.cpp @@ -2,7 +2,7 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file Device/Histo/DiffUtil.cpp +//! @file Device/IO/DiffUtil.cpp //! @brief Implements namespace DataUtil. //! //! @homepage http://www.bornagainproject.org @@ -12,13 +12,12 @@ // // ************************************************************************************************ -#include "Device/Histo/DiffUtil.h" +#include "Device/IO/DiffUtil.h" #include "Base/Axis/Frame.h" #include "Base/Axis/Scale.h" #include "Base/Math/Numeric.h" #include "Base/Util/Assert.h" #include "Device/Data/Datafield.h" -#include "Device/Histo/SimulationResult.h" #include <algorithm> #include <cmath> #include <iostream> @@ -46,7 +45,7 @@ Datafield* DiffUtil::relativeDifferenceField(const Datafield& dat, const Datafie //! Returns sum of relative differences between each pair of elements: //! (a, b) -> 2*abs(a - b)/(|a| + |b|) ( and zero if a=b=0 within epsilon ) -double DiffUtil::meanRelativeDifference(const SimulationResult& dat, const SimulationResult& ref) +double DiffUtil::meanRelativeDifference(const Datafield& dat, const Datafield& ref) { if (dat.size() != ref.size()) throw std::runtime_error("Invalid call to meanRelativeDifference: " diff --git a/Device/Histo/DiffUtil.h b/Device/IO/DiffUtil.h similarity index 82% rename from Device/Histo/DiffUtil.h rename to Device/IO/DiffUtil.h index eda4c13a82a8b4973d82ad87e4354b66c21642c8..5c2c742aa70d8e8adfe33b33c14e4634be68b3fe 100644 --- a/Device/Histo/DiffUtil.h +++ b/Device/IO/DiffUtil.h @@ -2,7 +2,7 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file Device/Histo/DiffUtil.h +//! @file Device/IO/DiffUtil.h //! @brief Defines namespace DataUtil. //! //! @homepage http://www.bornagainproject.org @@ -12,14 +12,14 @@ // // ************************************************************************************************ -#ifndef BORNAGAIN_DEVICE_HISTO_DIFFUTIL_H -#define BORNAGAIN_DEVICE_HISTO_DIFFUTIL_H +#ifndef BORNAGAIN_DEVICE_IO_DIFFUTIL_H +#define BORNAGAIN_DEVICE_IO_DIFFUTIL_H #include <memory> #include <vector> class Datafield; -class SimulationResult; +class Datafield; namespace DiffUtil { @@ -31,11 +31,11 @@ Datafield* relativeDifferenceField(const Datafield& dat, const Datafield& ref); //! Returns sum of relative differences between each pair of elements: //! (a, b) -> 2*abs(a - b)/(a + b) ( and zero if a-b=0 ) -double meanRelativeDifference(const SimulationResult& dat, const SimulationResult& ref); +double meanRelativeDifference(const Datafield& dat, const Datafield& ref); //! Returns true is relative difference is below threshold; prints informative output bool checkRelativeDifference(const std::vector<double>& dat, const std::vector<double>& ref, double threshold); } // namespace DiffUtil -#endif // BORNAGAIN_DEVICE_HISTO_DIFFUTIL_H +#endif // BORNAGAIN_DEVICE_IO_DIFFUTIL_H diff --git a/Device/IO/IOFactory.cpp b/Device/IO/IOFactory.cpp index 12672aa5ec3b4a57add3294ab53268a5308b8ef6..f0efb9e329ec888db2f6286bb41801ca789ecde1 100644 --- a/Device/IO/IOFactory.cpp +++ b/Device/IO/IOFactory.cpp @@ -17,8 +17,7 @@ #include "Base/Util/PathUtil.h" #include "Base/Util/StringUtil.h" #include "Device/Data/Datafield.h" -#include "Device/Histo/DiffUtil.h" -#include "Device/Histo/SimulationResult.h" +#include "Device/IO/DiffUtil.h" #include "Device/IO/ImportSettings.h" #include "Device/IO/ParseUtil.h" #include "Device/IO/ReadReflectometry.h" diff --git a/GUI/Model/Data/DataItemUtil.cpp b/GUI/Model/Data/DataItemUtil.cpp index 32e708f34be64e2c03149e0bb60512af1a4ca325..20db01045ef993e9cd4a68e8de7758cbbf921c12 100644 --- a/GUI/Model/Data/DataItemUtil.cpp +++ b/GUI/Model/Data/DataItemUtil.cpp @@ -17,7 +17,6 @@ #include "Base/Axis/Scale.h" #include "Base/Util/Assert.h" #include "Device/Data/Datafield.h" -#include "Device/Histo/SimulationResult.h" #include "GUI/Model/Data/DataItem.h" void GUI::Model::DataItemUtil::updateAxesTitle(DataItem* intensityItem, const Frame& frame) @@ -52,7 +51,7 @@ void GUI::Model::DataItemUtil::createDefaultDetectorMap(DataItem* dataItem, cons updateAxesTitle(dataItem, frame); } -void GUI::Model::DataItemUtil::setResults(DataItem* dataItem, const SimulationResult& result) +void GUI::Model::DataItemUtil::setResults(DataItem* dataItem, const Datafield& result) { if (dataItem->c_field() == nullptr) { const auto& frame = result.frame(); diff --git a/GUI/Model/Data/DataItemUtil.h b/GUI/Model/Data/DataItemUtil.h index dd857014ac5a8746d8625d86408bb5fa49e7d7e5..a990cbc9d977da40031f0150589718800cbe3d02 100644 --- a/GUI/Model/Data/DataItemUtil.h +++ b/GUI/Model/Data/DataItemUtil.h @@ -20,7 +20,7 @@ class DataItem; class Frame; -class SimulationResult; +class Datafield; //! Contains convenience methods to trasfer data from domain simulation to IntensityDataItem. //! Used to modify Datafield's axes units as requested by IntensityDataItem. @@ -37,7 +37,7 @@ void updateDataAxes(DataItem* dataItem, const Frame& frame); void createDefaultDetectorMap(DataItem* dataItem, const Frame& frame); //! Sets simulation results into the DataItem -void setResults(DataItem* dataItem, const SimulationResult& result); +void setResults(DataItem* dataItem, const Datafield& result); } // namespace GUI::Model::DataItemUtil diff --git a/GUI/Model/Job/JobItem.cpp b/GUI/Model/Job/JobItem.cpp index e6efb5d200ac5d4e96b62ae4bcaafc3a0d7a13db..c8496542cb2741b3f656927d5fe3de6565792a62 100644 --- a/GUI/Model/Job/JobItem.cpp +++ b/GUI/Model/Job/JobItem.cpp @@ -235,7 +235,7 @@ void JobItem::copySimulationOptionsIntoJob(const SimulationOptionsItem& options) m_simulationOptionsItem = std::make_unique<SimulationOptionsItem>(options); } -void JobItem::setResults(const SimulationResult& result) +void JobItem::setResults(const Datafield& result) { GUI::Model::DataItemUtil::setResults(simulatedDataItem(), result); updateDataFileName(); diff --git a/GUI/Model/Job/JobItem.h b/GUI/Model/Job/JobItem.h index f957c850f13ebd365b222f37791bf760ea82ec8e..887be75e637093c17c856d4fba488aefebe31f15 100644 --- a/GUI/Model/Job/JobItem.h +++ b/GUI/Model/Job/JobItem.h @@ -32,7 +32,7 @@ class ParameterContainerItem; class ParameterTreeItems; class RealItem; class SampleItem; -class SimulationResult; +class Datafield; class JobItem : public QObject { Q_OBJECT @@ -104,7 +104,7 @@ public: const SimulationOptionsItem& simulationOptionsItem() const; void copySimulationOptionsIntoJob(const SimulationOptionsItem& options); - void setResults(const SimulationResult& result); + void setResults(const Datafield& result); // fitting diff --git a/GUI/Support/Data/JobWorker.cpp b/GUI/Support/Data/JobWorker.cpp index 3bb200b259443f6e595bbe80f26f52207a61d289..4b8a751cfd34285718b91304f12c44b8fb183a89 100644 --- a/GUI/Support/Data/JobWorker.cpp +++ b/GUI/Support/Data/JobWorker.cpp @@ -14,7 +14,7 @@ #include "GUI/Support/Data/JobWorker.h" #include "Base/Util/Assert.h" -#include "Device/Histo/SimulationResult.h" +#include "Device/Data/Datafield.h" #include "Sim/Simulation/ScatteringSimulation.h" #include <QDateTime> #include <memory> @@ -55,10 +55,10 @@ void JobWorker::start() m_simulation->subscribe([this](size_t percentage_done) { return updateProgress(static_cast<int>(percentage_done)); }); - SimulationResult result = m_simulation->simulate(); + Datafield result = m_simulation->simulate(); if (m_job_status != JobStatus::Canceled) m_job_status = JobStatus::Completed; - m_result = std::make_unique<SimulationResult>(result); + m_result = std::make_unique<Datafield>(result); } catch (const std::exception& ex) { m_job_status = JobStatus::Failed; m_percentage_done = 100; @@ -90,7 +90,7 @@ const QDateTime& JobWorker::simulationEnd() const return m_simulation_end; } -const SimulationResult* JobWorker::result() const +const Datafield* JobWorker::result() const { return m_result.get(); } diff --git a/GUI/Support/Data/JobWorker.h b/GUI/Support/Data/JobWorker.h index fc929fd8cdea23497e6bff343adaa392f7a216fd..c9a809492bdf356975c210bc95c98717fc399c0f 100644 --- a/GUI/Support/Data/JobWorker.h +++ b/GUI/Support/Data/JobWorker.h @@ -21,7 +21,7 @@ #include <memory> class ISimulation; -class SimulationResult; +class Datafield; //! The JobWorker class provides running the domain simulation in a thread. @@ -42,7 +42,7 @@ public: const QDateTime& simulationStart() const; const QDateTime& simulationEnd() const; - const SimulationResult* result() const; + const Datafield* result() const; signals: void started(); @@ -64,7 +64,7 @@ private: QString m_failure_message; QDateTime m_simulation_start; QDateTime m_simulation_end; - std::unique_ptr<const SimulationResult> m_result; + std::unique_ptr<const Datafield> m_result; }; #endif // BORNAGAIN_GUI_SUPPORT_DATA_JOBWORKER_H diff --git a/GUI/View/Fit/GUIFitObserver.cpp b/GUI/View/Fit/GUIFitObserver.cpp index aeb3330fd4d0c829f2ceb207717e6d6ce703df70..dece057a202eac5f9471d17ff24149bf14b56879 100644 --- a/GUI/View/Fit/GUIFitObserver.cpp +++ b/GUI/View/Fit/GUIFitObserver.cpp @@ -13,7 +13,7 @@ // ************************************************************************************************ #include "GUI/View/Fit/GUIFitObserver.h" -#include "Device/Histo/SimulationResult.h" +#include "Device/Data/Datafield.h" #include "Fit/Minimizer/MinimizerResult.h" #include "Sim/Fitting/FitObjective.h" #include "Sim/Fitting/IterationInfo.h" diff --git a/GUI/View/PlotComparison/FitComparisonWidget.cpp b/GUI/View/PlotComparison/FitComparisonWidget.cpp index 4a3767d4f176619d805b3c3e4ad63b1fe13ee565..9b1770a86953c0f28b70bff73ca9a785d655d04b 100644 --- a/GUI/View/PlotComparison/FitComparisonWidget.cpp +++ b/GUI/View/PlotComparison/FitComparisonWidget.cpp @@ -14,7 +14,7 @@ #include "GUI/View/PlotComparison/FitComparisonWidget.h" #include "Base/Util/Assert.h" -#include "Device/Histo/DiffUtil.h" +#include "Device/IO/DiffUtil.h" #include "GUI/Model/Axis/BasicAxisItem.h" #include "GUI/Model/Data/IntensityDataItem.h" #include "GUI/Model/Data/SpecularDataItem.h" diff --git a/GUI/View/PlotComparison/FitComparisonWidget1D.cpp b/GUI/View/PlotComparison/FitComparisonWidget1D.cpp index e9de953ecefb33e3c6aff9d8d0cef582ebff9f9e..f59b3fa5f975f60739b76c773a3f64a662dac842 100644 --- a/GUI/View/PlotComparison/FitComparisonWidget1D.cpp +++ b/GUI/View/PlotComparison/FitComparisonWidget1D.cpp @@ -14,7 +14,7 @@ #include "GUI/View/PlotComparison/FitComparisonWidget1D.h" #include "Base/Util/Assert.h" -#include "Device/Histo/DiffUtil.h" +#include "Device/IO/DiffUtil.h" #include "GUI/Model/Axis/AmplitudeAxisItem.h" #include "GUI/Model/Axis/BasicAxisItem.h" #include "GUI/Model/Data/SpecularDataItem.h" diff --git a/Sim/Fitting/FitObjective.cpp b/Sim/Fitting/FitObjective.cpp index f65ac12fde5b3b53c620b9b413b6d379648f902d..0a66ceeca64f237ee44b73037c094bf2c92b80ca 100644 --- a/Sim/Fitting/FitObjective.cpp +++ b/Sim/Fitting/FitObjective.cpp @@ -15,7 +15,6 @@ #include "Sim/Fitting/FitObjective.h" #include "Base/Util/Assert.h" #include "Device/Data/Datafield.h" -#include "Device/Histo/SimulationResult.h" #include "Fit/Minimizer/MinimizerResult.h" #include "Sim/Fitting/FitStatus.h" #include "Sim/Fitting/ObjectiveMetric.h" @@ -196,34 +195,34 @@ std::vector<double> FitObjective::evaluate_residuals(const mumufit::Parameters& return result; } -//! Returns simulation result in the form of SimulationResult. -SimulationResult FitObjective::simulationResult(size_t i_item) const +//! Returns simulation result in the form of Datafield. +Datafield FitObjective::simulationResult(size_t i_item) const { return dataPair(i_item).simulationResult(); } -//! Returns experimental data in the form of SimulationResult. -SimulationResult FitObjective::experimentalData(size_t i_item) const +//! Returns experimental data in the form of Datafield. +Datafield FitObjective::experimentalData(size_t i_item) const { return dataPair(i_item).experimentalData(); } -//! Returns experimental data uncertainties in the form of SimulationResult. -SimulationResult FitObjective::uncertaintyData(size_t i_item) const +//! Returns experimental data uncertainties in the form of Datafield. +Datafield FitObjective::uncertaintyData(size_t i_item) const { return dataPair(i_item).uncertainties(); } //! Returns relative difference between simulation and experimental data -//! in the form of SimulationResult. -SimulationResult FitObjective::relativeDifference(size_t i_item) const +//! in the form of Datafield. +Datafield FitObjective::relativeDifference(size_t i_item) const { return dataPair(i_item).relativeDifference(); } //! Returns absolute value of difference between simulation and experimental data -//! in the form of SimulationResult. -SimulationResult FitObjective::absoluteDifference(size_t i_item) const +//! in the form of Datafield. +Datafield FitObjective::absoluteDifference(size_t i_item) const { return dataPair(i_item).absoluteDifference(); } diff --git a/Sim/Fitting/FitObjective.h b/Sim/Fitting/FitObjective.h index b0027ee427403df72d88d08bc16db04bd0c3a8b6..74e3197906566ec9c3d87447814afe1ac66239a3 100644 --- a/Sim/Fitting/FitObjective.h +++ b/Sim/Fitting/FitObjective.h @@ -27,7 +27,7 @@ class ObjectiveMetric; class PyBuilderCallback; class PyObserverCallback; class SimDataPair; -class SimulationResult; +class Datafield; namespace mumufit { class MinimizerResult; @@ -73,11 +73,11 @@ public: virtual std::vector<double> evaluate_residuals(const mumufit::Parameters& params); - SimulationResult simulationResult(size_t i_item = 0) const; - SimulationResult experimentalData(size_t i_item = 0) const; - SimulationResult uncertaintyData(size_t i_item = 0) const; - SimulationResult relativeDifference(size_t i_item = 0) const; - SimulationResult absoluteDifference(size_t i_item = 0) const; + Datafield simulationResult(size_t i_item = 0) const; + Datafield experimentalData(size_t i_item = 0) const; + Datafield uncertaintyData(size_t i_item = 0) const; + Datafield relativeDifference(size_t i_item = 0) const; + Datafield absoluteDifference(size_t i_item = 0) const; std::vector<double> experimental_array() const; std::vector<double> simulation_array() const; diff --git a/Sim/Fitting/ObjectiveMetric.cpp b/Sim/Fitting/ObjectiveMetric.cpp index 4e8117eefe1585d39ee1105f4acba0bed2d64878..9262b86c9449aacb844170281a8ec64ececf50d5 100644 --- a/Sim/Fitting/ObjectiveMetric.cpp +++ b/Sim/Fitting/ObjectiveMetric.cpp @@ -15,7 +15,6 @@ #include "Sim/Fitting/ObjectiveMetric.h" #include "Base/Util/Assert.h" #include "Device/Data/Datafield.h" -#include "Device/Histo/SimulationResult.h" #include "Sim/Fitting/ObjectiveMetricUtil.h" #include "Sim/Fitting/SimDataPair.h" #include <cmath> diff --git a/Sim/Fitting/SimDataPair.cpp b/Sim/Fitting/SimDataPair.cpp index 781f82a10f8b81f7c00f554f179583b850d37d76..871fc4e2da6c907922549d3f2ed0ffdba2cfdcf8 100644 --- a/Sim/Fitting/SimDataPair.cpp +++ b/Sim/Fitting/SimDataPair.cpp @@ -20,7 +20,6 @@ #include "Device/Data/Datafield.h" #include "Device/Detector/IDetector.h" #include "Device/Detector/SimulationAreaIterator.h" // roiIndex -#include "Device/Histo/SimulationResult.h" #include "Sim/Simulation/ScatteringSimulation.h" #include <utility> @@ -45,11 +44,11 @@ bool haveSameSizes(const IDetector& detector, const Datafield& data) return true; } -//! Convert user data to SimulationResult object for later drawing in various axes units. +//! Convert user data to Datafield object for later drawing in various axes units. //! User data will be cropped to the ROI defined in the simulation, amplitudes in areas //! corresponding to the masked areas of the detector will be set to zero. -SimulationResult convertData(const ScatteringSimulation& simulation, const Datafield& data) +Datafield convertData(const ScatteringSimulation& simulation, const Datafield& data) { const Frame* coordSystem = simulation.simCoordSystem(); auto roi_data = std::make_unique<Datafield>(coordSystem->clonedAxes()); @@ -69,7 +68,7 @@ SimulationResult convertData(const ScatteringSimulation& simulation, const Dataf throw std::runtime_error( "FitObject::init_dataset: Detector and experimental data have different shape"); - return SimulationResult(*roi_data); + return Datafield(*roi_data); } } // namespace @@ -109,7 +108,7 @@ void SimDataPair::execSimulation(const mumufit::Parameters& params) { std::unique_ptr<ISimulation> simulation = m_simulation_builder(params); ASSERT(simulation); - m_sim_data = std::make_unique<SimulationResult>(simulation->simulate()); + m_sim_data = std::make_unique<Datafield>(simulation->simulate()); ASSERT(!m_sim_data->empty()); if (m_exp_data && !m_exp_data->empty() && m_uncertainties && !m_uncertainties->empty() @@ -118,21 +117,19 @@ void SimDataPair::execSimulation(const mumufit::Parameters& params) auto* const sim2d = dynamic_cast<ScatteringSimulation*>(simulation.get()); if (sim2d) { - m_exp_data = std::make_unique<SimulationResult>(convertData(*sim2d, *m_raw_data)); - m_user_weights = - std::make_unique<SimulationResult>(convertData(*sim2d, *m_raw_user_weights)); + m_exp_data = std::make_unique<Datafield>(convertData(*sim2d, *m_raw_data)); + m_user_weights = std::make_unique<Datafield>(convertData(*sim2d, *m_raw_user_weights)); } else { - m_exp_data = std::make_unique<SimulationResult>(*m_raw_data); - m_user_weights = std::make_unique<SimulationResult>(*m_raw_user_weights); + m_exp_data = std::make_unique<Datafield>(*m_raw_data); + m_user_weights = std::make_unique<Datafield>(*m_raw_user_weights); } if (sim2d && containsUncertainties()) - m_uncertainties = - std::make_unique<SimulationResult>(convertData(*sim2d, *m_raw_uncertainties)); + m_uncertainties = std::make_unique<Datafield>(convertData(*sim2d, *m_raw_uncertainties)); else { const Frame& frame = m_sim_data->frame(); auto dummy_array = std::make_unique<Datafield>(frame.clonedAxes()); - m_uncertainties = std::make_unique<SimulationResult>(*dummy_array); + m_uncertainties = std::make_unique<Datafield>(*dummy_array); } } @@ -141,21 +138,21 @@ bool SimDataPair::containsUncertainties() const return static_cast<bool>(m_raw_uncertainties); } -SimulationResult SimDataPair::simulationResult() const +Datafield SimDataPair::simulationResult() const { ASSERT(m_sim_data); ASSERT(!m_sim_data->empty()); return *m_sim_data; } -SimulationResult SimDataPair::experimentalData() const +Datafield SimDataPair::experimentalData() const { ASSERT(m_exp_data); ASSERT(!m_exp_data->empty()); return *m_exp_data; } -SimulationResult SimDataPair::uncertainties() const +Datafield SimDataPair::uncertainties() const { ASSERT(m_uncertainties); ASSERT(!m_uncertainties->empty()); @@ -163,7 +160,7 @@ SimulationResult SimDataPair::uncertainties() const } //! Returns the user uncertainties cut to the ROI area. -SimulationResult SimDataPair::userWeights() const +Datafield SimDataPair::userWeights() const { ASSERT(m_user_weights); ASSERT(!m_user_weights->empty()); @@ -192,7 +189,7 @@ std::vector<double> SimDataPair::user_weights_array() const //! Returns relative difference between simulation and experimental data. -SimulationResult SimDataPair::relativeDifference() const +Datafield SimDataPair::relativeDifference() const { size_t N = m_sim_data->size(); if (!N) @@ -207,7 +204,7 @@ SimulationResult SimDataPair::relativeDifference() const return {Datafield(m_sim_data->frame().clone(), data)}; } -SimulationResult SimDataPair::absoluteDifference() const +Datafield SimDataPair::absoluteDifference() const { size_t N = m_sim_data->size(); if (!N) diff --git a/Sim/Fitting/SimDataPair.h b/Sim/Fitting/SimDataPair.h index 26afefe108a8dc799737e8334ae4b590c0231510..6399c9f0d40b0a60c16dac67efcff19cda3ec91a 100644 --- a/Sim/Fitting/SimDataPair.h +++ b/Sim/Fitting/SimDataPair.h @@ -21,7 +21,7 @@ #include "Sim/Fitting/FitTypes.h" class Datafield; -class SimulationResult; +class Datafield; //! Holds pair of simulation/experimental data to fit. @@ -42,25 +42,25 @@ public: bool containsUncertainties() const; //! Returns the result of last computed simulation - SimulationResult simulationResult() const; + Datafield simulationResult() const; //! Returns the experimental data cut to the ROI area - SimulationResult experimentalData() const; + Datafield experimentalData() const; //! Returns the data uncertainties cut to the ROI area - //! If no uncertainties present, returns zero-filled SimulationResult. - SimulationResult uncertainties() const; + //! If no uncertainties present, returns zero-filled Datafield. + Datafield uncertainties() const; //! Returns the user uncertainties cut to the ROI area. - SimulationResult userWeights() const; + Datafield userWeights() const; //! Returns the relative difference between simulated //! and experimental data cut to the ROI area - SimulationResult relativeDifference() const; + Datafield relativeDifference() const; //! Returns the absolute difference between simulated //! and experimental data cut to the ROI area - SimulationResult absoluteDifference() const; + Datafield absoluteDifference() const; //! Returns the flattened simulated intensities cut to the ROI area std::vector<double> simulation_array() const; @@ -83,13 +83,13 @@ private: simulation_builder_t m_simulation_builder; //! Current simulation results. Masked areas are nullified. - std::unique_ptr<SimulationResult> m_sim_data; + std::unique_ptr<Datafield> m_sim_data; //! Experimental data cut to the ROI. Masked areas are nullified. - std::unique_ptr<SimulationResult> m_exp_data; + std::unique_ptr<Datafield> m_exp_data; //! Weights from experimental data uncertainties. Masked areas are nullified. - std::unique_ptr<SimulationResult> m_uncertainties; + std::unique_ptr<Datafield> m_uncertainties; //! Manually defined (user) weights. Masked areas are nullified. - std::unique_ptr<SimulationResult> m_user_weights; + std::unique_ptr<Datafield> m_user_weights; //! Raw experimental data as obtained from the user. std::unique_ptr<Datafield> m_raw_data; diff --git a/Sim/Simulation/DepthprobeSimulation.cpp b/Sim/Simulation/DepthprobeSimulation.cpp index 3cc8bcc5479cf22ec2df09565143427ff35c1471..733c6e1cf1fb6a8b54bbea1a59156b1ea3e38ba3 100644 --- a/Sim/Simulation/DepthprobeSimulation.cpp +++ b/Sim/Simulation/DepthprobeSimulation.cpp @@ -20,7 +20,6 @@ #include "Base/Vector/GisasDirection.h" #include "Device/Beam/IFootprint.h" #include "Device/Data/Datafield.h" -#include "Device/Histo/SimulationResult.h" #include "Param/Distrib/DistributionHandler.h" #include "Param/Distrib/Distributions.h" #include "Resample/Element/IElement.h" @@ -173,7 +172,7 @@ size_t DepthprobeSimulation::nOutChannels() const return nElements() * m_z_axis->size(); } -SimulationResult DepthprobeSimulation::packResult() +Datafield DepthprobeSimulation::packResult() { std::vector<const Scale*> axes{m_scan->coordinateAxis()->clone(), m_z_axis->clone()}; auto data = std::make_unique<Datafield>(std::move(axes), m_cache); diff --git a/Sim/Simulation/DepthprobeSimulation.h b/Sim/Simulation/DepthprobeSimulation.h index 3364b610ed5c683831cf723b9698d38fdb05d33c..1dcf73c7ded694c5e6b347717eab15ec38cc31e2 100644 --- a/Sim/Simulation/DepthprobeSimulation.h +++ b/Sim/Simulation/DepthprobeSimulation.h @@ -74,7 +74,7 @@ private: size_t nOutChannels() const override; - SimulationResult packResult() override; + Datafield packResult() override; //... Model components: std::unique_ptr<AlphaScan> m_scan; diff --git a/Sim/Simulation/ISimulation.cpp b/Sim/Simulation/ISimulation.cpp index ca7fb9c1ca8a1c9f4739109622fff35bb637d274..5b152a378fa16af6ffd6124027cc526c1aba3643 100644 --- a/Sim/Simulation/ISimulation.cpp +++ b/Sim/Simulation/ISimulation.cpp @@ -16,7 +16,7 @@ #include "Base/Progress/ProgressHandler.h" #include "Base/Util/Assert.h" #include "Base/Util/StringUtil.h" -#include "Device/Histo/SimulationResult.h" +#include "Device/Data/Datafield.h" #include "Param/Distrib/DistributionHandler.h" #include "Resample/Options/SimulationOptions.h" #include "Resample/Processed/ReSample.h" @@ -115,7 +115,7 @@ const SimulationOptions& ISimulation::options() const //... Executor: //! Runs simulation with possible averaging over parameter distributions; returns result. -SimulationResult ISimulation::simulate() +Datafield ISimulation::simulate() { const std::string errs = m_sample->validate(); if (!errs.empty()) diff --git a/Sim/Simulation/ISimulation.h b/Sim/Simulation/ISimulation.h index 7ec3d2355d6913895111adab7d835041bc185287..edd5002a0ec47238a7f01504a8fc12853290980f 100644 --- a/Sim/Simulation/ISimulation.h +++ b/Sim/Simulation/ISimulation.h @@ -28,7 +28,7 @@ class MultiLayer; class ProgressHandler; class ReSample; class SimulationOptions; -class SimulationResult; +class Datafield; //! Abstract base class, holds the infrastructure to run a simulation. //! @@ -58,7 +58,7 @@ public: SimulationOptions& options(); //... Executor: - SimulationResult simulate(); //!< Runs a simulation, and returns the result. + Datafield simulate(); //!< Runs a simulation, and returns the result. #ifndef SWIG //... Setter: @@ -113,7 +113,7 @@ private: } //! Returns simulation result, based on intensity held in elements vector. - virtual SimulationResult packResult() = 0; + virtual Datafield packResult() = 0; //... Simulation model: std::unique_ptr<const MultiLayer> m_sample; diff --git a/Sim/Simulation/OffspecSimulation.cpp b/Sim/Simulation/OffspecSimulation.cpp index 781d25c2e5f93baaa12d855e0858c47721110b34..f68e4c7a1eb4333a8b547a5bab20c0a3c20f89ee 100644 --- a/Sim/Simulation/OffspecSimulation.cpp +++ b/Sim/Simulation/OffspecSimulation.cpp @@ -21,7 +21,6 @@ #include "Device/Beam/IFootprint.h" #include "Device/Data/Datafield.h" #include "Device/Detector/OffspecDetector.h" -#include "Device/Histo/SimulationResult.h" #include "Param/Distrib/DistributionHandler.h" #include "Param/Distrib/Distributions.h" #include "Resample/Element/DiffuseElement.h" @@ -129,7 +128,7 @@ size_t OffspecSimulation::nElements() const return m_detector->totalSize() * m_scan->coordinateAxis()->size(); } -SimulationResult OffspecSimulation::packResult() +Datafield OffspecSimulation::packResult() { // update intensity map diff --git a/Sim/Simulation/OffspecSimulation.h b/Sim/Simulation/OffspecSimulation.h index 3ae6b4693ee14f00261ebfcd164356d8c649c6d4..3a599ff98e79a0dabbd76ebcaf6775e3a01f7599 100644 --- a/Sim/Simulation/OffspecSimulation.h +++ b/Sim/Simulation/OffspecSimulation.h @@ -63,7 +63,7 @@ private: size_t nElements() const override; - SimulationResult packResult() override; + Datafield packResult() override; //... Model components: std::unique_ptr<IBeamScan> m_scan; diff --git a/Sim/Simulation/ScatteringSimulation.cpp b/Sim/Simulation/ScatteringSimulation.cpp index 28c5d931c32c78cabceecb702edec2aa7d575dd1..1d58378820ee21fe0bf7b720075819d8fcbf2516 100644 --- a/Sim/Simulation/ScatteringSimulation.cpp +++ b/Sim/Simulation/ScatteringSimulation.cpp @@ -22,7 +22,6 @@ #include "Device/Data/Datafield.h" #include "Device/Detector/IDetector.h" #include "Device/Detector/SimulationAreaIterator.h" // beginNonMaskedPoints -#include "Device/Histo/SimulationResult.h" #include "Param/Distrib/DistributionHandler.h" #include "Resample/Element/DiffuseElement.h" #include "Sim/Background/IBackground.h" @@ -121,7 +120,7 @@ size_t ScatteringSimulation::nElements() const return m_active_indices.size(); } -SimulationResult ScatteringSimulation::packResult() +Datafield ScatteringSimulation::packResult() { Datafield detectorMap(m_detector->createDetectorMap()); size_t elementIndex = 0; diff --git a/Sim/Simulation/ScatteringSimulation.h b/Sim/Simulation/ScatteringSimulation.h index 20e526764e8e969011ecbaa444f6748ae142130a..ac2857e534df0e27a0da665d0c22112f33ea320d 100644 --- a/Sim/Simulation/ScatteringSimulation.h +++ b/Sim/Simulation/ScatteringSimulation.h @@ -68,7 +68,7 @@ private: //! Returns the number of elements this simulation needs to calculate size_t nElements() const override; - SimulationResult packResult() override; + Datafield packResult() override; //... Model components: std::shared_ptr<Beam> m_beam; diff --git a/Sim/Simulation/SpecularSimulation.cpp b/Sim/Simulation/SpecularSimulation.cpp index dbab73e1ad520fc70f0f18336758f0d06cd4476d..7066c4cc0742a80df8ba7dff3935c9766ccfc248 100644 --- a/Sim/Simulation/SpecularSimulation.cpp +++ b/Sim/Simulation/SpecularSimulation.cpp @@ -18,7 +18,6 @@ #include "Base/Util/Assert.h" #include "Device/Beam/IFootprint.h" #include "Device/Data/Datafield.h" -#include "Device/Histo/SimulationResult.h" #include "Param/Distrib/Distributions.h" #include "Param/Distrib/ParameterSample.h" #include "Resample/Element/SpecularElement.h" @@ -97,7 +96,7 @@ size_t SpecularSimulation::nElements() const return m_scan->nScan() * m_scan->nDistributionSamples(); } -SimulationResult SpecularSimulation::packResult() +Datafield SpecularSimulation::packResult() { std::vector<double> vec(m_scan->nScan(), 0.0); for (size_t i = 0; i < nElements(); i++) { diff --git a/Sim/Simulation/SpecularSimulation.h b/Sim/Simulation/SpecularSimulation.h index 2c2ab6b3cd9e5b845e8ea99f85b4003deb0894f3..cacdbe9c6dcdc28df23bd182b57bae29edf9eed1 100644 --- a/Sim/Simulation/SpecularSimulation.h +++ b/Sim/Simulation/SpecularSimulation.h @@ -52,7 +52,7 @@ private: //! Returns the number of elements this simulation needs to calculate size_t nElements() const override; - SimulationResult packResult() override; + Datafield packResult() override; //... Model components: std::unique_ptr<const IBeamScan> m_scan; diff --git a/Tests/Functional/Consistence/CompareTwoReferences.cpp b/Tests/Functional/Consistence/CompareTwoReferences.cpp index b2a8632d431c5c6e50510d23bef9bae4538bd1ee..a505d8fa3a79a6dc4c17b9430e4709c56dba912d 100644 --- a/Tests/Functional/Consistence/CompareTwoReferences.cpp +++ b/Tests/Functional/Consistence/CompareTwoReferences.cpp @@ -16,7 +16,7 @@ #include "Base/Util/Assert.h" #include "Base/Util/PathUtil.h" #include "Device/Data/Datafield.h" -#include "Device/Histo/DiffUtil.h" +#include "Device/IO/DiffUtil.h" #include "Device/IO/IOFactory.h" #include <iostream> #include <memory> diff --git a/Tests/Functional/Consistence/ConsistenceTests.cpp b/Tests/Functional/Consistence/ConsistenceTests.cpp index ab011cbf6d2fa612784873de78e72f38acd9819b..5d3605bcc3407b43e01d08e36d61c2c1c2690250 100644 --- a/Tests/Functional/Consistence/ConsistenceTests.cpp +++ b/Tests/Functional/Consistence/ConsistenceTests.cpp @@ -16,7 +16,6 @@ // some other tests, coincide within reasonable numeric error margins. #include "Device/Data/Datafield.h" -#include "Device/Histo/SimulationResult.h" #include "Sample/StandardSamples/CylindersAndPrismsBuilder.h" #include "Sample/StandardSamples/PlainMultiLayerBySLDBuilder.h" #include "Sim/Simulation/ScatteringSimulation.h" @@ -55,7 +54,7 @@ TEST(Consistence, PolarizedScalarSpinFlip) { auto* sample = ExemplarySamples::createPlainMultiLayerBySLD(); auto simulation = test::makeSimulation::BasicYPolarizedSpecular(*sample, "PM", false); - const SimulationResult result = simulation->simulate(); + const Datafield result = simulation->simulate(); for (auto r : result.flatVector()) EXPECT_EQ(r, 0); } @@ -64,7 +63,7 @@ TEST(Consistence, PolarizedScalarSpinFlipParticles) { auto* sample = ExemplarySamples::createCylindersAndPrisms(); auto simulation = test::makeSimulation::MiniZPolarizedGISAS(*sample, "PM"); - const SimulationResult result = simulation->simulate(); + const Datafield result = simulation->simulate(); for (auto r : result.flatVector()) EXPECT_EQ(r, 0); } diff --git a/Tests/Functional/CoreSpecial/CoreIOPathTest.cpp b/Tests/Functional/CoreSpecial/CoreIOPathTest.cpp index dde1d37d22ffe21eac82534f1f5b04947fb9f1ee..2f81fc279ac1b903906e5042354d41adc4ccb697 100644 --- a/Tests/Functional/CoreSpecial/CoreIOPathTest.cpp +++ b/Tests/Functional/CoreSpecial/CoreIOPathTest.cpp @@ -16,7 +16,7 @@ #include "Base/Axis/MakeScale.h" #include "Base/Util/PathUtil.h" #include "Device/Data/Datafield.h" -#include "Device/Histo/DiffUtil.h" +#include "Device/IO/DiffUtil.h" #include "Device/IO/IOFactory.h" #include "Tests/GTestWrapper/google_test.h" #include <filesystem> diff --git a/Tests/Functional/CoreSpecial/FourierTransformationTest.cpp b/Tests/Functional/CoreSpecial/FourierTransformationTest.cpp index 3922a1966e87f82e3837873562524557f929b5c6..5b00aaafc925881908ea089d6f58941e6141482f 100644 --- a/Tests/Functional/CoreSpecial/FourierTransformationTest.cpp +++ b/Tests/Functional/CoreSpecial/FourierTransformationTest.cpp @@ -16,7 +16,7 @@ #include "Base/Util/PathUtil.h" #include "Device/Data/DataUtil.h" #include "Device/Data/Datafield.h" -#include "Device/Histo/DiffUtil.h" +#include "Device/IO/DiffUtil.h" #include "Device/IO/IOFactory.h" #include "Tests/GTestWrapper/google_test.h" #include <iostream> diff --git a/Tests/Functional/Fitting/SimfitTestPlan.cpp b/Tests/Functional/Fitting/SimfitTestPlan.cpp index 8228c906df257c6d1e6b719046d42309af318996..33d2e491a710ed34456821f04a8c528afa45725b 100644 --- a/Tests/Functional/Fitting/SimfitTestPlan.cpp +++ b/Tests/Functional/Fitting/SimfitTestPlan.cpp @@ -14,7 +14,6 @@ #include "Tests/Functional/Fitting/SimfitTestPlan.h" #include "Device/Data/Datafield.h" -#include "Device/Histo/SimulationResult.h" #include "Fit/Kernel/Minimizer.h" #include "Sample/Multilayer/MultiLayer.h" #include "Sim/Fitting/FitObjective.h" @@ -70,5 +69,5 @@ std::unique_ptr<Datafield> SimfitTestPlan::fakeData() const params.setValues(expectedValues()); auto simulation = m_sim_builder(params); auto result = simulation->simulate(); - return std::make_unique<Datafield>(result.extracted_field()); + return std::make_unique<Datafield>(result); } diff --git a/Tests/Py/Functional/PolarizedNoAnalyzer.py b/Tests/Py/Functional/PolarizedNoAnalyzer.py index ac2e0a718bda2a1b6021b652b8be73f0c32f1f35..74aaa7f571003de735afb32b7dbbd881900ee58d 100755 --- a/Tests/Py/Functional/PolarizedNoAnalyzer.py +++ b/Tests/Py/Functional/PolarizedNoAnalyzer.py @@ -46,7 +46,7 @@ def run_simulation(polarizer_dir, analyzer_dir=None): result = simulation.simulate() - return result.convertedBinCenters(0), result.npArray() + return result.axis(0).binCenters(), result.npArray() if __name__ == '__main__': diff --git a/Tests/Suite/GUI/Check.cpp b/Tests/Suite/GUI/Check.cpp index 5c82261359b512d9646f576351aa77fa7a89d076..187f7d238cdbe0f2f5b4426e4cb3f3808ff6625e 100644 --- a/Tests/Suite/GUI/Check.cpp +++ b/Tests/Suite/GUI/Check.cpp @@ -16,8 +16,7 @@ #include "BATesting.h" #include "Base/Util/PathUtil.h" #include "Device/Data/Datafield.h" -#include "Device/Histo/DiffUtil.h" -#include "Device/Histo/SimulationResult.h" +#include "Device/IO/DiffUtil.h" #include "Device/IO/IOFactory.h" #include "GUI/Model/Device/InstrumentModel.h" #include "GUI/Model/FromCore/ItemizeSample.h" @@ -56,8 +55,8 @@ bool checkSimulation(const std::string& name, ISimulation& sim, const double lim std::unique_ptr<ISimulation> sim2(indirectSimulation(sim)); - const SimulationResult data2 = sim2->simulate(); - const SimulationResult ref_data = sim.simulate(); + const Datafield data2 = sim2->simulate(); + const Datafield ref_data = sim.simulate(); bool ok = DiffUtil::checkRelativeDifference(data2.flatVector(), ref_data.flatVector(), limit); @@ -68,8 +67,7 @@ bool checkSimulation(const std::string& name, ISimulation& sim, const double lim const auto dir = fs::path(BATesting::TestOutDir()) / fs::path("Suite") / fs::path("GUI"); Base::Path::createDirectories(dir.string()); - const std::map<const std::string, const SimulationResult&> tosave{{"gui", data2}, - {"std", ref_data}}; + const std::map<const std::string, const Datafield&> tosave{{"gui", data2}, {"std", ref_data}}; for (const auto& [kind, data] : tosave) { const std::string out_fname = (dir / fs::path(name + "." + kind + ".int.gz")).string(); IO::writeDatafield(data, out_fname); diff --git a/Tests/Suite/Persist/Check.cpp b/Tests/Suite/Persist/Check.cpp index 7280932af7847cc8997e76a07efef1309d4db5c3..1d74395af967aed924bc03e013c6023031988e64 100644 --- a/Tests/Suite/Persist/Check.cpp +++ b/Tests/Suite/Persist/Check.cpp @@ -17,8 +17,7 @@ #include "Base/Util/Assert.h" #include "Base/Util/PathUtil.h" #include "Device/Data/Datafield.h" -#include "Device/Histo/DiffUtil.h" -#include "Device/Histo/SimulationResult.h" +#include "Device/IO/DiffUtil.h" #include "Device/IO/IOFactory.h" #include "Sim/Simulation/ISimulation.h" #include <iostream> @@ -28,7 +27,7 @@ bool checkSimulation(const std::string& name, ISimulation& direct_simulation, const double limit) { // Run simulation directly. - const SimulationResult result_data = direct_simulation.simulate(); + const Datafield result_data = direct_simulation.simulate(); std::unique_ptr<Datafield> reference; diff --git a/Tests/Suite/Py/Check.cpp b/Tests/Suite/Py/Check.cpp index 14b80a3ed85f7986625f9b3bc42e6bad81cea183..2a7a94bad6198f9a9ebe6183af5ad958b223e308 100644 --- a/Tests/Suite/Py/Check.cpp +++ b/Tests/Suite/Py/Check.cpp @@ -16,8 +16,7 @@ #include "BATesting.h" #include "Base/Util/PathUtil.h" #include "Device/Data/Datafield.h" -#include "Device/Histo/DiffUtil.h" -#include "Device/Histo/SimulationResult.h" +#include "Device/IO/DiffUtil.h" #include "Device/IO/IOFactory.h" #include "Sim/Export/ExportToPython.h" #include "Sim/Simulation/ISimulation.h" diff --git a/Tests/Unit/GUI/Utils.cpp b/Tests/Unit/GUI/Utils.cpp index bba2462e2ad505c21f9b402b3141e66e0afeeab6..7d34db9481b42dacafd2c86c9598c7916982f5dd 100644 --- a/Tests/Unit/GUI/Utils.cpp +++ b/Tests/Unit/GUI/Utils.cpp @@ -15,7 +15,7 @@ #include "Tests/Unit/GUI/Utils.h" #include "Base/Axis/MakeScale.h" #include "Device/Data/Datafield.h" -#include "Device/Histo/DiffUtil.h" +#include "Device/IO/DiffUtil.h" #include "Device/IO/IOFactory.h" #include "GUI/Model/Data/DataItem.h" #include "GUI/Model/Device/RealItem.h" diff --git a/Tests/Unit/Sim/SimDataPairTest.cpp b/Tests/Unit/Sim/SimDataPairTest.cpp index a1e99ebff06e1c1e4ad4d40de5ab40f47b3f74bd..6d693bbd38b6106276e03ff0e580ecb6adbc892b 100644 --- a/Tests/Unit/Sim/SimDataPairTest.cpp +++ b/Tests/Unit/Sim/SimDataPairTest.cpp @@ -1,5 +1,5 @@ #include "Sim/Fitting/SimDataPair.h" -#include "Device/Histo/SimulationResult.h" +#include "Device/Data/Datafield.h" #include "Tests/GTestWrapper/google_test.h" #include "Tests/Unit/Sim/FittingTestHelper.h" #include <numeric> diff --git a/Wrap/Python/ba_fitmonitor.py b/Wrap/Python/ba_fitmonitor.py index ee101cfbce6dcb8b1d8d7e41e6e564bdf4423d5c..4e7e5cd6106b1e0103a09fdefb542a3e37e66fde 100644 --- a/Wrap/Python/ba_fitmonitor.py +++ b/Wrap/Python/ba_fitmonitor.py @@ -164,17 +164,17 @@ class PlotterSpecular: plt.yscale('log') plt.ylim((0.5*np.min(exp_values), 5*np.max(exp_values))) - plt.plot(exp_data.convertedBinCenters(0), exp_values, 'k--') + plt.plot(exp_data.axis(0).binCenters(), exp_values, 'k--') if unc_values is not None: - plt.plot(exp_data.convertedBinCenters(0), + plt.plot(exp_data.axis(0).binCenters(), exp_values - unc_values, 'xkcd:grey', alpha=0.6) - plt.plot(exp_data.convertedBinCenters(0), + plt.plot(exp_data.axis(0).binCenters(), exp_values + unc_values, 'xkcd:grey', alpha=0.6) - plt.plot(sim_data.convertedBinCenters(0), sim_values, 'b') + plt.plot(sim_data.axis(0).binCenters(), sim_values, 'b') xlabel = bp.get_axes_labels(exp_data)[0] legend = ['Experiment', 'BornAgain'] diff --git a/Wrap/Python/ba_plot.py b/Wrap/Python/ba_plot.py index 27c5756979b051c44077938b72c178aa57cbe865..ba1418f8428518fe3e52388faa6a07468c99d84a 100644 --- a/Wrap/Python/ba_plot.py +++ b/Wrap/Python/ba_plot.py @@ -114,13 +114,15 @@ def parse_commandline(): def get_axes_limits(result): """ Returns axes range as expected by pyplot.imshow. - :param result: SimulationResult object from a Simulation + :param result: Datafield object from a Simulation :return: axes ranges as a flat list """ limits = [] for i in range(result.rank()): - ami, ama = result.axisMinMax(i) - assert ami < ama, f'SimulationResult has invalid axis {i}, extending from {ami} to {ama}' + ax = result.axis(i) + ami = ax.min() + ama = ax.max() + assert ami < ama, f'Datafield has invalid axis {i}, extending from {ami} to {ama}' limits.append(ami) limits.append(ama) @@ -158,7 +160,7 @@ def translate_axis_label(label): def get_axes_labels(result): """ Returns axes range as expected by pyplot.imshow. - :param result: SimulationResult object from a Simulation + :param result: Datafield object from a Simulation :return: axes ranges as a flat list Used internally and in Examples/fit/specular/RealLifeReflectometryFitting.py. """ @@ -192,11 +194,11 @@ def plot_curve(xarray, yarray, **kwargs): def plot_specular_curve(result): """ Plots intensity data for specular simulation result - :param result: SimulationResult from SpecularSimulation + :param result: Datafield from SpecularSimulation Used internally. """ intensity = result.npArray() - x_axis = result.convertedBinCenters(0) + x_axis = result.axis(0).binCenters() xlabel = plotargs.pop('xlabel', get_axes_labels(result)[0]) ylabel = plotargs.pop('ylabel', "Intensity") @@ -316,7 +318,7 @@ def inside_ticks(): def plot_array(array, axes_limits=None, **kwargs): """ Plots numpy array as a heatmap in log scale. - Used internally and in Examples/varia/AccessingSimulationResults.py. + Used internally and in Examples/varia/AccessingDatafields.py. """ assert len(array.shape) == 2 assert array.shape[0] > 0 @@ -397,7 +399,7 @@ def plot_histogram(field, **kwargs): def plot_simres(result, **kwargs): """ Plots intensity data as heat map - :param result: SimulationResult from GISAS/OffspecSimulation + :param result: Datafield from GISAS/OffspecSimulation Used internally and in a few examples. """ @@ -521,7 +523,7 @@ def plot_multicurve(results, xlabel, ylabel): legend = [] for result in results: - x = result.convertedBinCenters(0) + x = result.axis(0).binCenters() y = result.npArray() legend.append(result.title()) plt.plot(x, y) diff --git a/Wrap/Swig/libBornAgainDevice.i b/Wrap/Swig/libBornAgainDevice.i index 602ce32e99b429c760e657f47f017c364aa75e53..45ac17323db9942a4760e70425c226fa271ffbc4 100644 --- a/Wrap/Swig/libBornAgainDevice.i +++ b/Wrap/Swig/libBornAgainDevice.i @@ -26,11 +26,10 @@ #include "Device/Beam/FootprintGauss.h" #include "Device/Beam/FootprintSquare.h" #include "Device/Data/DataUtil.h" -#include "Device/Histo/DiffUtil.h" -#include "Device/Histo/SimulationResult.h" -#include "Device/Detector/RectangularDetector.h" #include "Device/Detector/OffspecDetector.h" +#include "Device/Detector/RectangularDetector.h" #include "Device/Detector/SphericalDetector.h" +#include "Device/IO/DiffUtil.h" #include "Device/IO/IOFactory.h" #include "Device/Mask/DetectorMask.h" #include "Device/Mask/Ellipse.h" @@ -50,29 +49,30 @@ %include "fromBase.i" %include "fromParam.i" +%include "Device/Data/DataUtil.h" %include "Device/Data/Datafield.h" -%include "Device/Histo/DiffUtil.h" %include "Device/Data/DataUtil.h" %include "Device/Beam/Beam.h" %include "Device/Beam/IFootprint.h" %include "Device/Beam/FootprintGauss.h" %include "Device/Beam/FootprintSquare.h" + %include "Device/Mask/IShape2D.h" %include "Device/Mask/Ellipse.h" %include "Device/Mask/Line.h" %include "Device/Mask/Polygon.h" %include "Device/Mask/Rectangle.h" +%include "Device/Mask/DetectorMask.h" + %include "Device/Resolution/IDetectorResolution.h" %include "Device/Resolution/IResolutionFunction2D.h" %include "Device/Resolution/ResolutionFunction2DGaussian.h" -%include "Device/Mask/DetectorMask.h" %include "Device/Detector/IDetector.h" %include "Device/Detector/RectangularDetector.h" %include "Device/Detector/OffspecDetector.h" %include "Device/Detector/SphericalDetector.h" -%include "Device/Data/DataUtil.h" +%include "Device/IO/DiffUtil.h" %include "Device/IO/IOFactory.h" -%include "Device/Histo/SimulationResult.h" diff --git a/Wrap/Swig/libBornAgainSim.i b/Wrap/Swig/libBornAgainSim.i index 18bf3b538e4a6d677d96aff0808cf1ec907b5688..7a8627ad624387223171a41cdedc1cf8a7c911bb 100644 --- a/Wrap/Swig/libBornAgainSim.i +++ b/Wrap/Swig/libBornAgainSim.i @@ -55,7 +55,6 @@ #include "Base/Axis/Frame.h" #include "Device/Data/Datafield.h" -#include "Device/Histo/SimulationResult.h" #include "Fit/Minimizer/MinimizerResult.h" @@ -88,7 +87,6 @@ %import(module="libBornAgainSample") "Sample/Scattering/ISampleNode.h" %import(module="libBornAgainDevice") "Device/Data/Datafield.h" -%import(module="libBornAgainDevice") "Device/Histo/SimulationResult.h" %template(swig_dummy_type_const_inode_vector) std::vector<const INode*>; diff --git a/auto/Examples/fit/scatter2d/fit_along_slices.py b/auto/Examples/fit/scatter2d/fit_along_slices.py index 39498c4b8b5bab70decda7bf9a1ddcafcc902ce9..3036ee1ec66fc79340c8ed9ffc12303b8fe2aa61 100755 --- a/auto/Examples/fit/scatter2d/fit_along_slices.py +++ b/auto/Examples/fit/scatter2d/fit_along_slices.py @@ -121,8 +121,8 @@ class PlotObserver: """ self.fig.clf() - real_data = fit_objective.experimentalData().extracted_field() - simul_data = fit_objective.simulationResult().extracted_field() + real_data = fit_objective.experimentalData() + simul_data = fit_objective.simulationResult() # plot real data plt.subplot(2, 2, 1) diff --git a/auto/Examples/fit/specular/Honeycomb_fit.py b/auto/Examples/fit/specular/Honeycomb_fit.py index f8f9a96073799af461e0c7037003be3cffb0da1a..1f72e860a05b289d28408ee465c5a138c862a5da 100755 --- a/auto/Examples/fit/specular/Honeycomb_fit.py +++ b/auto/Examples/fit/specular/Honeycomb_fit.py @@ -109,7 +109,7 @@ def qr(result): """ Return q and reflectivity arrays from simulation result. """ - q = numpy.array(result.convertedBinCenters(0)) + q = numpy.array(result.axis(0).binCenters()) r = numpy.array(result.array()) return q, r diff --git a/auto/Examples/fit/specular/PolarizedSpinAsymmetry.py b/auto/Examples/fit/specular/PolarizedSpinAsymmetry.py index 01e333315874c14b27efde71b556f2ec51a28da3..312acf759d606e02da6918f0646541b9eb5e39e6 100755 --- a/auto/Examples/fit/specular/PolarizedSpinAsymmetry.py +++ b/auto/Examples/fit/specular/PolarizedSpinAsymmetry.py @@ -101,7 +101,7 @@ def qr(result): Returns two arrays that hold the q-values as well as the reflectivity from a given simulation result """ - q = numpy.array(result.convertedBinCenters(0)) + q = numpy.array(result.axis(0).binCenters()) r = numpy.array(result.npArray()) return q, r diff --git a/auto/Examples/fit/specular/Pt_layer_fit.py b/auto/Examples/fit/specular/Pt_layer_fit.py index 170527753bf1d6f747602d8bd058eb69b21bbe20..456b8761d34156e48450c1d88092c3dcb779169f 100755 --- a/auto/Examples/fit/specular/Pt_layer_fit.py +++ b/auto/Examples/fit/specular/Pt_layer_fit.py @@ -88,7 +88,7 @@ def qr(result): """ Return q and reflectivity arrays from simulation result. """ - q = np.array(result.convertedBinCenters(0)) + q = np.array(result.axis(0).binCenters()) r = np.array(result.array()) return q, r diff --git a/auto/Examples/specular/PolarizedSpinAsymmetry.py b/auto/Examples/specular/PolarizedSpinAsymmetry.py index 01e333315874c14b27efde71b556f2ec51a28da3..312acf759d606e02da6918f0646541b9eb5e39e6 100755 --- a/auto/Examples/specular/PolarizedSpinAsymmetry.py +++ b/auto/Examples/specular/PolarizedSpinAsymmetry.py @@ -101,7 +101,7 @@ def qr(result): Returns two arrays that hold the q-values as well as the reflectivity from a given simulation result """ - q = numpy.array(result.convertedBinCenters(0)) + q = numpy.array(result.axis(0).binCenters()) r = numpy.array(result.npArray()) return q, r diff --git a/auto/Examples/varia/AccessingSimulationResults.py b/auto/Examples/varia/AccessingSimulationResults.py index 9ae6f9b0617929b80eefe2945a68052c84a61de6..1a3d1302b80d11b2a3dbf5771e75a8139a8e553f 100755 --- a/auto/Examples/varia/AccessingSimulationResults.py +++ b/auto/Examples/varia/AccessingSimulationResults.py @@ -113,6 +113,5 @@ if __name__ == '__main__': # Other supported extensions are .tif and .txt. # Besides compression .gz, we support .bz2, and uncompressed. - field = result.extracted_field() - plot(field) + plot(result) bp.show_or_export() diff --git a/auto/MiniExamples/fit/scatter2d/fit_along_slices.py b/auto/MiniExamples/fit/scatter2d/fit_along_slices.py index 39498c4b8b5bab70decda7bf9a1ddcafcc902ce9..3036ee1ec66fc79340c8ed9ffc12303b8fe2aa61 100755 --- a/auto/MiniExamples/fit/scatter2d/fit_along_slices.py +++ b/auto/MiniExamples/fit/scatter2d/fit_along_slices.py @@ -121,8 +121,8 @@ class PlotObserver: """ self.fig.clf() - real_data = fit_objective.experimentalData().extracted_field() - simul_data = fit_objective.simulationResult().extracted_field() + real_data = fit_objective.experimentalData() + simul_data = fit_objective.simulationResult() # plot real data plt.subplot(2, 2, 1) diff --git a/auto/MiniExamples/fit/specular/Honeycomb_fit.py b/auto/MiniExamples/fit/specular/Honeycomb_fit.py index f8f9a96073799af461e0c7037003be3cffb0da1a..1f72e860a05b289d28408ee465c5a138c862a5da 100755 --- a/auto/MiniExamples/fit/specular/Honeycomb_fit.py +++ b/auto/MiniExamples/fit/specular/Honeycomb_fit.py @@ -109,7 +109,7 @@ def qr(result): """ Return q and reflectivity arrays from simulation result. """ - q = numpy.array(result.convertedBinCenters(0)) + q = numpy.array(result.axis(0).binCenters()) r = numpy.array(result.array()) return q, r diff --git a/auto/MiniExamples/fit/specular/PolarizedSpinAsymmetry.py b/auto/MiniExamples/fit/specular/PolarizedSpinAsymmetry.py index 01e333315874c14b27efde71b556f2ec51a28da3..312acf759d606e02da6918f0646541b9eb5e39e6 100755 --- a/auto/MiniExamples/fit/specular/PolarizedSpinAsymmetry.py +++ b/auto/MiniExamples/fit/specular/PolarizedSpinAsymmetry.py @@ -101,7 +101,7 @@ def qr(result): Returns two arrays that hold the q-values as well as the reflectivity from a given simulation result """ - q = numpy.array(result.convertedBinCenters(0)) + q = numpy.array(result.axis(0).binCenters()) r = numpy.array(result.npArray()) return q, r diff --git a/auto/MiniExamples/fit/specular/Pt_layer_fit.py b/auto/MiniExamples/fit/specular/Pt_layer_fit.py index 170527753bf1d6f747602d8bd058eb69b21bbe20..456b8761d34156e48450c1d88092c3dcb779169f 100755 --- a/auto/MiniExamples/fit/specular/Pt_layer_fit.py +++ b/auto/MiniExamples/fit/specular/Pt_layer_fit.py @@ -88,7 +88,7 @@ def qr(result): """ Return q and reflectivity arrays from simulation result. """ - q = np.array(result.convertedBinCenters(0)) + q = np.array(result.axis(0).binCenters()) r = np.array(result.array()) return q, r diff --git a/auto/MiniExamples/specular/PolarizedSpinAsymmetry.py b/auto/MiniExamples/specular/PolarizedSpinAsymmetry.py index 01e333315874c14b27efde71b556f2ec51a28da3..312acf759d606e02da6918f0646541b9eb5e39e6 100755 --- a/auto/MiniExamples/specular/PolarizedSpinAsymmetry.py +++ b/auto/MiniExamples/specular/PolarizedSpinAsymmetry.py @@ -101,7 +101,7 @@ def qr(result): Returns two arrays that hold the q-values as well as the reflectivity from a given simulation result """ - q = numpy.array(result.convertedBinCenters(0)) + q = numpy.array(result.axis(0).binCenters()) r = numpy.array(result.npArray()) return q, r diff --git a/auto/MiniExamples/varia/AccessingSimulationResults.py b/auto/MiniExamples/varia/AccessingSimulationResults.py index de86cad36f3a93b699be5b5a267d6cfa7d230c25..ee5f1af76f681097c96b33a200c18b0d60901345 100755 --- a/auto/MiniExamples/varia/AccessingSimulationResults.py +++ b/auto/MiniExamples/varia/AccessingSimulationResults.py @@ -113,6 +113,5 @@ if __name__ == '__main__': # Other supported extensions are .tif and .txt. # Besides compression .gz, we support .bz2, and uncompressed. - field = result.extracted_field() - plot(field) + plot(result) bp.show_or_export() diff --git a/auto/Wrap/libBornAgainDevice.py b/auto/Wrap/libBornAgainDevice.py index e6a3a0c7d0043602739e62f60019258109dd3027..be379a3644858cb46a5bbb9aa704b4fe22fde33b 100644 --- a/auto/Wrap/libBornAgainDevice.py +++ b/auto/Wrap/libBornAgainDevice.py @@ -2033,6 +2033,29 @@ class vector_R3(object): # Register vector_R3 in _libBornAgainDevice: _libBornAgainDevice.vector_R3_swigregister(vector_R3) import libBornAgainParam + +def invertAxis(axis, original): + r"""invertAxis(int axis, vdouble2d_t original) -> vdouble2d_t""" + return _libBornAgainDevice.invertAxis(axis, original) + +def transpose(original): + r"""transpose(vdouble2d_t original) -> vdouble2d_t""" + return _libBornAgainDevice.transpose(original) + +def create2DArrayfromDatafield(data): + r"""create2DArrayfromDatafield(Datafield data) -> vdouble2d_t""" + return _libBornAgainDevice.create2DArrayfromDatafield(data) + +def importArrayToDatafield(*args): + r""" + importArrayToDatafield(vdouble1d_t vec) -> Datafield + importArrayToDatafield(vdouble2d_t vec) -> Datafield + """ + return _libBornAgainDevice.importArrayToDatafield(*args) + +def FindPeaks(*args): + r"""FindPeaks(Datafield data, double sigma=2, std::string const & option={}, double threshold=0.05) -> vector_pvacuum_double_t""" + return _libBornAgainDevice.FindPeaks(*args) class Datafield(object): r"""Proxy of C++ Datafield class.""" @@ -2132,47 +2155,16 @@ class Datafield(object): """ return _libBornAgainDevice.Datafield_yProjection(self, *args) -# Register Datafield in _libBornAgainDevice: -_libBornAgainDevice.Datafield_swigregister(Datafield) - -def meanRelVecDiff(dat, ref): - r"""meanRelVecDiff(vdouble1d_t dat, vdouble1d_t ref) -> double""" - return _libBornAgainDevice.meanRelVecDiff(dat, ref) - -def relativeDifferenceField(dat, ref): - r"""relativeDifferenceField(Datafield dat, Datafield ref) -> Datafield""" - return _libBornAgainDevice.relativeDifferenceField(dat, ref) - -def meanRelativeDifference(dat, ref): - r"""meanRelativeDifference(SimulationResult dat, SimulationResult ref) -> double""" - return _libBornAgainDevice.meanRelativeDifference(dat, ref) - -def checkRelativeDifference(dat, ref, threshold): - r"""checkRelativeDifference(vdouble1d_t dat, vdouble1d_t ref, double threshold) -> bool""" - return _libBornAgainDevice.checkRelativeDifference(dat, ref, threshold) - -def invertAxis(axis, original): - r"""invertAxis(int axis, vdouble2d_t original) -> vdouble2d_t""" - return _libBornAgainDevice.invertAxis(axis, original) - -def transpose(original): - r"""transpose(vdouble2d_t original) -> vdouble2d_t""" - return _libBornAgainDevice.transpose(original) - -def create2DArrayfromDatafield(data): - r"""create2DArrayfromDatafield(Datafield data) -> vdouble2d_t""" - return _libBornAgainDevice.create2DArrayfromDatafield(data) + def setTitle(self, title): + r"""setTitle(Datafield self, std::string const & title)""" + return _libBornAgainDevice.Datafield_setTitle(self, title) -def importArrayToDatafield(*args): - r""" - importArrayToDatafield(vdouble1d_t vec) -> Datafield - importArrayToDatafield(vdouble2d_t vec) -> Datafield - """ - return _libBornAgainDevice.importArrayToDatafield(*args) + def title(self): + r"""title(Datafield self) -> std::string""" + return _libBornAgainDevice.Datafield_title(self) -def FindPeaks(*args): - r"""FindPeaks(Datafield data, double sigma=2, std::string const & option={}, double threshold=0.05) -> vector_pvacuum_double_t""" - return _libBornAgainDevice.FindPeaks(*args) +# Register Datafield in _libBornAgainDevice: +_libBornAgainDevice.Datafield_swigregister(Datafield) class Beam(libBornAgainParam.INode): r"""Proxy of C++ Beam class.""" @@ -2517,6 +2509,65 @@ class Rectangle(IShape2D): # Register Rectangle in _libBornAgainDevice: _libBornAgainDevice.Rectangle_swigregister(Rectangle) +class MaskPattern(object): + r"""Proxy of C++ MaskPattern class.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, shape_, doMask_): + r"""__init__(MaskPattern self, IShape2D shape_, bool doMask_) -> MaskPattern""" + _libBornAgainDevice.MaskPattern_swiginit(self, _libBornAgainDevice.new_MaskPattern(shape_, doMask_)) + __swig_destroy__ = _libBornAgainDevice.delete_MaskPattern + + def clone(self): + r"""clone(MaskPattern self) -> MaskPattern""" + return _libBornAgainDevice.MaskPattern_clone(self) + shape = property(_libBornAgainDevice.MaskPattern_shape_get, _libBornAgainDevice.MaskPattern_shape_set, doc=r"""shape : p.IShape2D""") + doMask = property(_libBornAgainDevice.MaskPattern_doMask_get, _libBornAgainDevice.MaskPattern_doMask_set, doc=r"""doMask : bool""") + +# Register MaskPattern in _libBornAgainDevice: +_libBornAgainDevice.MaskPattern_swigregister(MaskPattern) +class DetectorMask(object): + r"""Proxy of C++ DetectorMask class.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _libBornAgainDevice.delete_DetectorMask + + def __init__(self, *args): + r""" + __init__(DetectorMask self, Scale xAxis, Scale yAxis) -> DetectorMask + __init__(DetectorMask self, DetectorMask other) -> DetectorMask + """ + _libBornAgainDevice.DetectorMask_swiginit(self, _libBornAgainDevice.new_DetectorMask(*args)) + + def addMask(self, shape, mask_value): + r"""addMask(DetectorMask self, IShape2D shape, bool mask_value)""" + return _libBornAgainDevice.DetectorMask_addMask(self, shape, mask_value) + + def isMasked(self, i_flat): + r"""isMasked(DetectorMask self, size_t i_flat) -> bool""" + return _libBornAgainDevice.DetectorMask_isMasked(self, i_flat) + + def hasMasks(self): + r"""hasMasks(DetectorMask self) -> bool""" + return _libBornAgainDevice.DetectorMask_hasMasks(self) + + def numberOfMaskedChannels(self): + r"""numberOfMaskedChannels(DetectorMask self) -> int""" + return _libBornAgainDevice.DetectorMask_numberOfMaskedChannels(self) + + def numberOfMasks(self): + r"""numberOfMasks(DetectorMask self) -> size_t""" + return _libBornAgainDevice.DetectorMask_numberOfMasks(self) + + def patternAt(self, iMask): + r"""patternAt(DetectorMask self, size_t iMask) -> MaskPattern""" + return _libBornAgainDevice.DetectorMask_patternAt(self, iMask) + +# Register DetectorMask in _libBornAgainDevice: +_libBornAgainDevice.DetectorMask_swigregister(DetectorMask) class IDetectorResolution(libBornAgainBase.ICloneable, libBornAgainParam.INode): r"""Proxy of C++ IDetectorResolution class.""" @@ -2598,65 +2649,6 @@ class ResolutionFunction2DGaussian(IResolutionFunction2D): # Register ResolutionFunction2DGaussian in _libBornAgainDevice: _libBornAgainDevice.ResolutionFunction2DGaussian_swigregister(ResolutionFunction2DGaussian) -class MaskPattern(object): - r"""Proxy of C++ MaskPattern class.""" - - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, shape_, doMask_): - r"""__init__(MaskPattern self, IShape2D shape_, bool doMask_) -> MaskPattern""" - _libBornAgainDevice.MaskPattern_swiginit(self, _libBornAgainDevice.new_MaskPattern(shape_, doMask_)) - __swig_destroy__ = _libBornAgainDevice.delete_MaskPattern - - def clone(self): - r"""clone(MaskPattern self) -> MaskPattern""" - return _libBornAgainDevice.MaskPattern_clone(self) - shape = property(_libBornAgainDevice.MaskPattern_shape_get, _libBornAgainDevice.MaskPattern_shape_set, doc=r"""shape : p.IShape2D""") - doMask = property(_libBornAgainDevice.MaskPattern_doMask_get, _libBornAgainDevice.MaskPattern_doMask_set, doc=r"""doMask : bool""") - -# Register MaskPattern in _libBornAgainDevice: -_libBornAgainDevice.MaskPattern_swigregister(MaskPattern) -class DetectorMask(object): - r"""Proxy of C++ DetectorMask class.""" - - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - __swig_destroy__ = _libBornAgainDevice.delete_DetectorMask - - def __init__(self, *args): - r""" - __init__(DetectorMask self, Scale xAxis, Scale yAxis) -> DetectorMask - __init__(DetectorMask self, DetectorMask other) -> DetectorMask - """ - _libBornAgainDevice.DetectorMask_swiginit(self, _libBornAgainDevice.new_DetectorMask(*args)) - - def addMask(self, shape, mask_value): - r"""addMask(DetectorMask self, IShape2D shape, bool mask_value)""" - return _libBornAgainDevice.DetectorMask_addMask(self, shape, mask_value) - - def isMasked(self, i_flat): - r"""isMasked(DetectorMask self, size_t i_flat) -> bool""" - return _libBornAgainDevice.DetectorMask_isMasked(self, i_flat) - - def hasMasks(self): - r"""hasMasks(DetectorMask self) -> bool""" - return _libBornAgainDevice.DetectorMask_hasMasks(self) - - def numberOfMaskedChannels(self): - r"""numberOfMaskedChannels(DetectorMask self) -> int""" - return _libBornAgainDevice.DetectorMask_numberOfMaskedChannels(self) - - def numberOfMasks(self): - r"""numberOfMasks(DetectorMask self) -> size_t""" - return _libBornAgainDevice.DetectorMask_numberOfMasks(self) - - def patternAt(self, iMask): - r"""patternAt(DetectorMask self, size_t iMask) -> MaskPattern""" - return _libBornAgainDevice.DetectorMask_patternAt(self, iMask) - -# Register DetectorMask in _libBornAgainDevice: -_libBornAgainDevice.DetectorMask_swigregister(DetectorMask) class IDetector(libBornAgainBase.ICloneable, libBornAgainParam.INode): r"""Proxy of C++ IDetector class.""" @@ -2990,6 +2982,22 @@ class SphericalDetector(IDetector): # Register SphericalDetector in _libBornAgainDevice: _libBornAgainDevice.SphericalDetector_swigregister(SphericalDetector) + +def meanRelVecDiff(dat, ref): + r"""meanRelVecDiff(vdouble1d_t dat, vdouble1d_t ref) -> double""" + return _libBornAgainDevice.meanRelVecDiff(dat, ref) + +def relativeDifferenceField(dat, ref): + r"""relativeDifferenceField(Datafield dat, Datafield ref) -> Datafield""" + return _libBornAgainDevice.relativeDifferenceField(dat, ref) + +def meanRelativeDifference(dat, ref): + r"""meanRelativeDifference(Datafield dat, Datafield ref) -> double""" + return _libBornAgainDevice.meanRelativeDifference(dat, ref) + +def checkRelativeDifference(dat, ref, threshold): + r"""checkRelativeDifference(vdouble1d_t dat, vdouble1d_t ref, double threshold) -> bool""" + return _libBornAgainDevice.checkRelativeDifference(dat, ref, threshold) unknown1D = _libBornAgainDevice.unknown1D csv1D = _libBornAgainDevice.csv1D @@ -3034,40 +3042,3 @@ def writeDatafield(data, file_name): def dataMatchesFile(data, refFileName, tol): r"""dataMatchesFile(Datafield data, std::string const & refFileName, double tol) -> bool""" return _libBornAgainDevice.dataMatchesFile(data, refFileName, tol) -class SimulationResult(Datafield): - r"""Proxy of C++ SimulationResult class.""" - - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - - def __init__(self, *args): - r""" - __init__(SimulationResult self, Datafield data) -> SimulationResult - __init__(SimulationResult self, SimulationResult other) -> SimulationResult - __init__(SimulationResult self, SimulationResult other) -> SimulationResult - """ - _libBornAgainDevice.SimulationResult_swiginit(self, _libBornAgainDevice.new_SimulationResult(*args)) - __swig_destroy__ = _libBornAgainDevice.delete_SimulationResult - - def extracted_field(self): - r"""extracted_field(SimulationResult self) -> Datafield""" - return _libBornAgainDevice.SimulationResult_extracted_field(self) - - def axisMinMax(self, i): - r"""axisMinMax(SimulationResult self, size_t i) -> pvacuum_double_t""" - return _libBornAgainDevice.SimulationResult_axisMinMax(self, i) - - def convertedBinCenters(self, i_axis): - r"""convertedBinCenters(SimulationResult self, size_t i_axis) -> vdouble1d_t""" - return _libBornAgainDevice.SimulationResult_convertedBinCenters(self, i_axis) - - def setTitle(self, title): - r"""setTitle(SimulationResult self, std::string const & title)""" - return _libBornAgainDevice.SimulationResult_setTitle(self, title) - - def title(self): - r"""title(SimulationResult self) -> std::string""" - return _libBornAgainDevice.SimulationResult_title(self) - -# Register SimulationResult in _libBornAgainDevice: -_libBornAgainDevice.SimulationResult_swigregister(SimulationResult) diff --git a/auto/Wrap/libBornAgainDevice_wrap.cpp b/auto/Wrap/libBornAgainDevice_wrap.cpp index e7bf89bfdcaec0e9e7aa3baf7285ebfcd72a8aef..32c3cd46f6d8363a589c059c11ef1093b85ed818 100644 --- a/auto/Wrap/libBornAgainDevice_wrap.cpp +++ b/auto/Wrap/libBornAgainDevice_wrap.cpp @@ -3417,67 +3417,66 @@ namespace Swig { #define SWIGTYPE_p_ResolutionFunction2DGaussian swig_types[28] #define SWIGTYPE_p_Rotation3DT_double_t swig_types[29] #define SWIGTYPE_p_Scale swig_types[30] -#define SWIGTYPE_p_SimulationResult swig_types[31] -#define SWIGTYPE_p_SphericalDetector swig_types[32] -#define SWIGTYPE_p_Vec3T_double_t swig_types[33] -#define SWIGTYPE_p_Vec3T_int_t swig_types[34] -#define SWIGTYPE_p_Vec3T_std__complexT_double_t_t swig_types[35] -#define SWIGTYPE_p_VerticalLine swig_types[36] -#define SWIGTYPE_p_allocator_type swig_types[37] -#define SWIGTYPE_p_char swig_types[38] -#define SWIGTYPE_p_const_iterator swig_types[39] -#define SWIGTYPE_p_corr_matrix_t swig_types[40] -#define SWIGTYPE_p_difference_type swig_types[41] -#define SWIGTYPE_p_first_type swig_types[42] -#define SWIGTYPE_p_int swig_types[43] -#define SWIGTYPE_p_iterator swig_types[44] -#define SWIGTYPE_p_key_type swig_types[45] -#define SWIGTYPE_p_long_long swig_types[46] -#define SWIGTYPE_p_mapped_type swig_types[47] -#define SWIGTYPE_p_p_PyObject swig_types[48] -#define SWIGTYPE_p_parameters_t swig_types[49] -#define SWIGTYPE_p_second_type swig_types[50] -#define SWIGTYPE_p_short swig_types[51] -#define SWIGTYPE_p_signed_char swig_types[52] -#define SWIGTYPE_p_size_type swig_types[53] -#define SWIGTYPE_p_std__allocatorT_Vec3T_double_t_t swig_types[54] -#define SWIGTYPE_p_std__allocatorT_double_t swig_types[55] -#define SWIGTYPE_p_std__allocatorT_int_t swig_types[56] -#define SWIGTYPE_p_std__allocatorT_std__complexT_double_t_t swig_types[57] -#define SWIGTYPE_p_std__allocatorT_std__pairT_double_double_t_t swig_types[58] -#define SWIGTYPE_p_std__allocatorT_std__pairT_std__string_const_double_t_t swig_types[59] -#define SWIGTYPE_p_std__allocatorT_std__string_t swig_types[60] -#define SWIGTYPE_p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t swig_types[61] -#define SWIGTYPE_p_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t swig_types[62] -#define SWIGTYPE_p_std__allocatorT_unsigned_long_t swig_types[63] -#define SWIGTYPE_p_std__arrayT_std__shared_ptrT_Scale_t_2_t swig_types[64] -#define SWIGTYPE_p_std__complexT_double_t swig_types[65] -#define SWIGTYPE_p_std__functionT_void_fSimulationAreaIterator_const_RF_t swig_types[66] -#define SWIGTYPE_p_std__invalid_argument swig_types[67] -#define SWIGTYPE_p_std__lessT_std__string_t swig_types[68] -#define SWIGTYPE_p_std__mapT_std__string_double_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_double_t_t_t swig_types[69] -#define SWIGTYPE_p_std__pairT_double_double_t swig_types[70] -#define SWIGTYPE_p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t swig_types[71] -#define SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t swig_types[72] -#define SWIGTYPE_p_std__vectorT_Scale_const_p_std__allocatorT_Scale_const_p_t_t swig_types[73] -#define SWIGTYPE_p_std__vectorT_Vec3T_double_t_std__allocatorT_Vec3T_double_t_t_t swig_types[74] -#define SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t swig_types[75] -#define SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t swig_types[76] -#define SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t swig_types[77] -#define SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t swig_types[78] -#define SWIGTYPE_p_std__vectorT_std__pairT_double_double_t_std__allocatorT_std__pairT_double_double_t_t_t swig_types[79] -#define SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t swig_types[80] -#define SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t swig_types[81] -#define SWIGTYPE_p_std__vectorT_std__vectorT_int_std__allocatorT_int_t_t_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t_t swig_types[82] -#define SWIGTYPE_p_std__vectorT_unsigned_long_std__allocatorT_unsigned_long_t_t swig_types[83] -#define SWIGTYPE_p_swig__SwigPyIterator swig_types[84] -#define SWIGTYPE_p_unsigned_char swig_types[85] -#define SWIGTYPE_p_unsigned_int swig_types[86] -#define SWIGTYPE_p_unsigned_long_long swig_types[87] -#define SWIGTYPE_p_unsigned_short swig_types[88] -#define SWIGTYPE_p_value_type swig_types[89] -static swig_type_info *swig_types[91]; -static swig_module_info swig_module = {swig_types, 90, 0, 0, 0, 0}; +#define SWIGTYPE_p_SphericalDetector swig_types[31] +#define SWIGTYPE_p_Vec3T_double_t swig_types[32] +#define SWIGTYPE_p_Vec3T_int_t swig_types[33] +#define SWIGTYPE_p_Vec3T_std__complexT_double_t_t swig_types[34] +#define SWIGTYPE_p_VerticalLine swig_types[35] +#define SWIGTYPE_p_allocator_type swig_types[36] +#define SWIGTYPE_p_char swig_types[37] +#define SWIGTYPE_p_const_iterator swig_types[38] +#define SWIGTYPE_p_corr_matrix_t swig_types[39] +#define SWIGTYPE_p_difference_type swig_types[40] +#define SWIGTYPE_p_first_type swig_types[41] +#define SWIGTYPE_p_int swig_types[42] +#define SWIGTYPE_p_iterator swig_types[43] +#define SWIGTYPE_p_key_type swig_types[44] +#define SWIGTYPE_p_long_long swig_types[45] +#define SWIGTYPE_p_mapped_type swig_types[46] +#define SWIGTYPE_p_p_PyObject swig_types[47] +#define SWIGTYPE_p_parameters_t swig_types[48] +#define SWIGTYPE_p_second_type swig_types[49] +#define SWIGTYPE_p_short swig_types[50] +#define SWIGTYPE_p_signed_char swig_types[51] +#define SWIGTYPE_p_size_type swig_types[52] +#define SWIGTYPE_p_std__allocatorT_Vec3T_double_t_t swig_types[53] +#define SWIGTYPE_p_std__allocatorT_double_t swig_types[54] +#define SWIGTYPE_p_std__allocatorT_int_t swig_types[55] +#define SWIGTYPE_p_std__allocatorT_std__complexT_double_t_t swig_types[56] +#define SWIGTYPE_p_std__allocatorT_std__pairT_double_double_t_t swig_types[57] +#define SWIGTYPE_p_std__allocatorT_std__pairT_std__string_const_double_t_t swig_types[58] +#define SWIGTYPE_p_std__allocatorT_std__string_t swig_types[59] +#define SWIGTYPE_p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t swig_types[60] +#define SWIGTYPE_p_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t swig_types[61] +#define SWIGTYPE_p_std__allocatorT_unsigned_long_t swig_types[62] +#define SWIGTYPE_p_std__arrayT_std__shared_ptrT_Scale_t_2_t swig_types[63] +#define SWIGTYPE_p_std__complexT_double_t swig_types[64] +#define SWIGTYPE_p_std__functionT_void_fSimulationAreaIterator_const_RF_t swig_types[65] +#define SWIGTYPE_p_std__invalid_argument swig_types[66] +#define SWIGTYPE_p_std__lessT_std__string_t swig_types[67] +#define SWIGTYPE_p_std__mapT_std__string_double_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_double_t_t_t swig_types[68] +#define SWIGTYPE_p_std__pairT_double_double_t swig_types[69] +#define SWIGTYPE_p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t swig_types[70] +#define SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t swig_types[71] +#define SWIGTYPE_p_std__vectorT_Scale_const_p_std__allocatorT_Scale_const_p_t_t swig_types[72] +#define SWIGTYPE_p_std__vectorT_Vec3T_double_t_std__allocatorT_Vec3T_double_t_t_t swig_types[73] +#define SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t swig_types[74] +#define SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t swig_types[75] +#define SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t swig_types[76] +#define SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t swig_types[77] +#define SWIGTYPE_p_std__vectorT_std__pairT_double_double_t_std__allocatorT_std__pairT_double_double_t_t_t swig_types[78] +#define SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t swig_types[79] +#define SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t swig_types[80] +#define SWIGTYPE_p_std__vectorT_std__vectorT_int_std__allocatorT_int_t_t_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t_t swig_types[81] +#define SWIGTYPE_p_std__vectorT_unsigned_long_std__allocatorT_unsigned_long_t_t swig_types[82] +#define SWIGTYPE_p_swig__SwigPyIterator swig_types[83] +#define SWIGTYPE_p_unsigned_char swig_types[84] +#define SWIGTYPE_p_unsigned_int swig_types[85] +#define SWIGTYPE_p_unsigned_long_long swig_types[86] +#define SWIGTYPE_p_unsigned_short swig_types[87] +#define SWIGTYPE_p_value_type swig_types[88] +static swig_type_info *swig_types[90]; +static swig_module_info swig_module = {swig_types, 89, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -7024,11 +7023,10 @@ SWIGINTERN void std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg__insert__SWIG_ #include "Device/Beam/FootprintGauss.h" #include "Device/Beam/FootprintSquare.h" #include "Device/Data/DataUtil.h" -#include "Device/Histo/DiffUtil.h" -#include "Device/Histo/SimulationResult.h" -#include "Device/Detector/RectangularDetector.h" #include "Device/Detector/OffspecDetector.h" +#include "Device/Detector/RectangularDetector.h" #include "Device/Detector/SphericalDetector.h" +#include "Device/IO/DiffUtil.h" #include "Device/IO/IOFactory.h" #include "Device/Mask/DetectorMask.h" #include "Device/Mask/Ellipse.h" @@ -27360,6 +27358,431 @@ SWIGINTERN PyObject *vector_R3_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject return SWIG_Python_InitShadowInstance(args); } +SWIGINTERN PyObject *_wrap_invertAxis(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + int arg1 ; + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *arg2 = 0 ; + int val1 ; + int ecode1 = 0 ; + int res2 = SWIG_OLDOBJ ; + PyObject *swig_obj[2] ; + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > result; + + if (!SWIG_Python_UnpackTuple(args, "invertAxis", 2, 2, swig_obj)) SWIG_fail; + ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "invertAxis" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + { + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *ptr = (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *)0; + res2 = swig::asptr(swig_obj[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "invertAxis" "', argument " "2"" of type '" "std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "invertAxis" "', argument " "2"" of type '" "std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &""'"); + } + arg2 = ptr; + } + result = DataUtil::Data::invertAxis(arg1,(std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &)*arg2); + resultobj = swig::from(static_cast< std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > >(result)); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_transpose(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + PyObject *swig_obj[1] ; + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *ptr = (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *)0; + res1 = swig::asptr(swig_obj[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "transpose" "', argument " "1"" of type '" "std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "transpose" "', argument " "1"" of type '" "std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &""'"); + } + arg1 = ptr; + } + result = DataUtil::Data::transpose((std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &)*arg1); + resultobj = swig::from(static_cast< std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > >(result)); + if (SWIG_IsNewObj(res1)) delete arg1; + return resultobj; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_create2DArrayfromDatafield(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Datafield *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Datafield, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "create2DArrayfromDatafield" "', argument " "1"" of type '" "Datafield const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "create2DArrayfromDatafield" "', argument " "1"" of type '" "Datafield const &""'"); + } + arg1 = reinterpret_cast< Datafield * >(argp1); + result = DataUtil::Data::create2DArrayfromDatafield((Datafield const &)*arg1); + resultobj = swig::from(static_cast< std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_importArrayToDatafield__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< double,std::allocator< double > > *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + Datafield *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + { + std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; + res1 = swig::asptr(swig_obj[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "importArrayToDatafield" "', argument " "1"" of type '" "std::vector< double,std::allocator< double > > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "importArrayToDatafield" "', argument " "1"" of type '" "std::vector< double,std::allocator< double > > const &""'"); + } + arg1 = ptr; + } + result = (Datafield *)DataUtil::Data::importArrayToDatafield((std::vector< double,std::allocator< double > > const &)*arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Datafield, 0 | 0 ); + if (SWIG_IsNewObj(res1)) delete arg1; + return resultobj; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_importArrayToDatafield__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + Datafield *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + { + std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *ptr = (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *)0; + res1 = swig::asptr(swig_obj[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "importArrayToDatafield" "', argument " "1"" of type '" "std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "importArrayToDatafield" "', argument " "1"" of type '" "std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &""'"); + } + arg1 = ptr; + } + result = (Datafield *)DataUtil::Data::importArrayToDatafield((std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &)*arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Datafield, 0 | 0 ); + if (SWIG_IsNewObj(res1)) delete arg1; + return resultobj; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_importArrayToDatafield(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[2] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "importArrayToDatafield", 0, 1, argv))) SWIG_fail; + --argc; + if (argc == 1) { + int _v = 0; + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_importArrayToDatafield__SWIG_0(self, argc, argv); + } + } + if (argc == 1) { + int _v = 0; + int res = swig::asptr(argv[0], (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_importArrayToDatafield__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'importArrayToDatafield'.\n" + " Possible C/C++ prototypes are:\n" + " DataUtil::Data::importArrayToDatafield(std::vector< double,std::allocator< double > > const &)\n" + " DataUtil::Data::importArrayToDatafield(std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_FindPeaks__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Datafield *arg1 = 0 ; + double arg2 ; + std::string *arg3 = 0 ; + double arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + int res3 = SWIG_OLDOBJ ; + double val4 ; + int ecode4 = 0 ; + std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > result; + + if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Datafield, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FindPeaks" "', argument " "1"" of type '" "Datafield const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FindPeaks" "', argument " "1"" of type '" "Datafield const &""'"); + } + arg1 = reinterpret_cast< Datafield * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FindPeaks" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string(swig_obj[2], &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FindPeaks" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FindPeaks" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FindPeaks" "', argument " "4"" of type '" "double""'"); + } + arg4 = static_cast< double >(val4); + result = DataUtil::Data::FindPeaks((Datafield const &)*arg1,arg2,(std::string const &)*arg3,arg4); + resultobj = swig::from(static_cast< std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > >(result)); + if (SWIG_IsNewObj(res3)) delete arg3; + return resultobj; +fail: + if (SWIG_IsNewObj(res3)) delete arg3; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FindPeaks__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Datafield *arg1 = 0 ; + double arg2 ; + std::string *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + int res3 = SWIG_OLDOBJ ; + std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > result; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Datafield, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FindPeaks" "', argument " "1"" of type '" "Datafield const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FindPeaks" "', argument " "1"" of type '" "Datafield const &""'"); + } + arg1 = reinterpret_cast< Datafield * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FindPeaks" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + std::string *ptr = (std::string *)0; + res3 = SWIG_AsPtr_std_string(swig_obj[2], &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FindPeaks" "', argument " "3"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FindPeaks" "', argument " "3"" of type '" "std::string const &""'"); + } + arg3 = ptr; + } + result = DataUtil::Data::FindPeaks((Datafield const &)*arg1,arg2,(std::string const &)*arg3); + resultobj = swig::from(static_cast< std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > >(result)); + if (SWIG_IsNewObj(res3)) delete arg3; + return resultobj; +fail: + if (SWIG_IsNewObj(res3)) delete arg3; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FindPeaks__SWIG_2(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Datafield *arg1 = 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Datafield, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FindPeaks" "', argument " "1"" of type '" "Datafield const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FindPeaks" "', argument " "1"" of type '" "Datafield const &""'"); + } + arg1 = reinterpret_cast< Datafield * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FindPeaks" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + result = DataUtil::Data::FindPeaks((Datafield const &)*arg1,arg2); + resultobj = swig::from(static_cast< std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FindPeaks__SWIG_3(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Datafield *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > result; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Datafield, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FindPeaks" "', argument " "1"" of type '" "Datafield const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FindPeaks" "', argument " "1"" of type '" "Datafield const &""'"); + } + arg1 = reinterpret_cast< Datafield * >(argp1); + result = DataUtil::Data::FindPeaks((Datafield const &)*arg1); + resultobj = swig::from(static_cast< std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FindPeaks(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[5] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "FindPeaks", 0, 4, argv))) SWIG_fail; + --argc; + if (argc == 1) { + int _v = 0; + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Datafield, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_FindPeaks__SWIG_3(self, argc, argv); + } + } + if (argc == 2) { + int _v = 0; + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Datafield, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_FindPeaks__SWIG_2(self, argc, argv); + } + } + } + if (argc == 3) { + int _v = 0; + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Datafield, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_FindPeaks__SWIG_1(self, argc, argv); + } + } + } + } + if (argc == 4) { + int _v = 0; + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Datafield, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_double(argv[3], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_FindPeaks__SWIG_0(self, argc, argv); + } + } + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'FindPeaks'.\n" + " Possible C/C++ prototypes are:\n" + " DataUtil::Data::FindPeaks(Datafield const &,double,std::string const &,double)\n" + " DataUtil::Data::FindPeaks(Datafield const &,double,std::string const &)\n" + " DataUtil::Data::FindPeaks(Datafield const &,double)\n" + " DataUtil::Data::FindPeaks(Datafield const &)\n"); + return 0; +} + + SWIGINTERN PyObject *_wrap_new_Datafield__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Frame *arg1 = (Frame *) 0 ; @@ -28641,214 +29064,34 @@ fail: } -SWIGINTERN PyObject *Datafield_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_Datafield, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *Datafield_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_meanRelVecDiff(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_Datafield_setTitle(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - std::vector< double,std::allocator< double > > *arg1 = 0 ; - std::vector< double,std::allocator< double > > *arg2 = 0 ; - int res1 = SWIG_OLDOBJ ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - double result; - - if (!SWIG_Python_UnpackTuple(args, "meanRelVecDiff", 2, 2, swig_obj)) SWIG_fail; - { - std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "meanRelVecDiff" "', argument " "1"" of type '" "std::vector< double,std::allocator< double > > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "meanRelVecDiff" "', argument " "1"" of type '" "std::vector< double,std::allocator< double > > const &""'"); - } - arg1 = ptr; - } - { - std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "meanRelVecDiff" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "meanRelVecDiff" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > > const &""'"); - } - arg2 = ptr; - } - result = (double)DiffUtil::meanRelVecDiff((std::vector< double,std::allocator< double > > const &)*arg1,(std::vector< double,std::allocator< double > > const &)*arg2); - resultobj = SWIG_From_double(static_cast< double >(result)); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_relativeDifferenceField(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Datafield *arg1 = 0 ; - Datafield *arg2 = 0 ; + Datafield *arg1 = (Datafield *) 0 ; + std::string *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; + int res2 = SWIG_OLDOBJ ; PyObject *swig_obj[2] ; - Datafield *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "relativeDifferenceField", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Datafield, 0 | 0); + if (!SWIG_Python_UnpackTuple(args, "Datafield_setTitle", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Datafield, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "relativeDifferenceField" "', argument " "1"" of type '" "Datafield const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "relativeDifferenceField" "', argument " "1"" of type '" "Datafield const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Datafield_setTitle" "', argument " "1"" of type '" "Datafield *""'"); } arg1 = reinterpret_cast< Datafield * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Datafield, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "relativeDifferenceField" "', argument " "2"" of type '" "Datafield const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "relativeDifferenceField" "', argument " "2"" of type '" "Datafield const &""'"); - } - arg2 = reinterpret_cast< Datafield * >(argp2); - result = (Datafield *)DiffUtil::relativeDifferenceField((Datafield const &)*arg1,(Datafield const &)*arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Datafield, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_meanRelativeDifference(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - SimulationResult *arg1 = 0 ; - SimulationResult *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - double result; - - if (!SWIG_Python_UnpackTuple(args, "meanRelativeDifference", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_SimulationResult, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "meanRelativeDifference" "', argument " "1"" of type '" "SimulationResult const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "meanRelativeDifference" "', argument " "1"" of type '" "SimulationResult const &""'"); - } - arg1 = reinterpret_cast< SimulationResult * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_SimulationResult, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "meanRelativeDifference" "', argument " "2"" of type '" "SimulationResult const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "meanRelativeDifference" "', argument " "2"" of type '" "SimulationResult const &""'"); - } - arg2 = reinterpret_cast< SimulationResult * >(argp2); - result = (double)DiffUtil::meanRelativeDifference((SimulationResult const &)*arg1,(SimulationResult const &)*arg2); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_checkRelativeDifference(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - std::vector< double,std::allocator< double > > *arg1 = 0 ; - std::vector< double,std::allocator< double > > *arg2 = 0 ; - double arg3 ; - int res1 = SWIG_OLDOBJ ; - int res2 = SWIG_OLDOBJ ; - double val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - bool result; - - if (!SWIG_Python_UnpackTuple(args, "checkRelativeDifference", 3, 3, swig_obj)) SWIG_fail; - { - std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "checkRelativeDifference" "', argument " "1"" of type '" "std::vector< double,std::allocator< double > > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "checkRelativeDifference" "', argument " "1"" of type '" "std::vector< double,std::allocator< double > > const &""'"); - } - arg1 = ptr; - } - { - std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "checkRelativeDifference" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "checkRelativeDifference" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > > const &""'"); - } - arg2 = ptr; - } - ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "checkRelativeDifference" "', argument " "3"" of type '" "double""'"); - } - arg3 = static_cast< double >(val3); - result = (bool)DiffUtil::checkRelativeDifference((std::vector< double,std::allocator< double > > const &)*arg1,(std::vector< double,std::allocator< double > > const &)*arg2,arg3); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_invertAxis(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - int arg1 ; - std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *arg2 = 0 ; - int val1 ; - int ecode1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > result; - - if (!SWIG_Python_UnpackTuple(args, "invertAxis", 2, 2, swig_obj)) SWIG_fail; - ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "invertAxis" "', argument " "1"" of type '" "int""'"); - } - arg1 = static_cast< int >(val1); { - std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *ptr = (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *)0; - res2 = swig::asptr(swig_obj[1], &ptr); + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "invertAxis" "', argument " "2"" of type '" "std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Datafield_setTitle" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "invertAxis" "', argument " "2"" of type '" "std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Datafield_setTitle" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } - result = DataUtil::Data::invertAxis(arg1,(std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &)*arg2); - resultobj = swig::from(static_cast< std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > >(result)); + (arg1)->setTitle((std::string const &)*arg2); + resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; fail: @@ -28857,394 +29100,40 @@ fail: } -SWIGINTERN PyObject *_wrap_transpose(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_Datafield_title(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - PyObject *swig_obj[1] ; - std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *ptr = (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "transpose" "', argument " "1"" of type '" "std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "transpose" "', argument " "1"" of type '" "std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &""'"); - } - arg1 = ptr; - } - result = DataUtil::Data::transpose((std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &)*arg1); - resultobj = swig::from(static_cast< std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > >(result)); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_create2DArrayfromDatafield(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Datafield *arg1 = 0 ; + Datafield *arg1 = (Datafield *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; - std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > result; + std::string result; if (!args) SWIG_fail; swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Datafield, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "create2DArrayfromDatafield" "', argument " "1"" of type '" "Datafield const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "create2DArrayfromDatafield" "', argument " "1"" of type '" "Datafield const &""'"); - } - arg1 = reinterpret_cast< Datafield * >(argp1); - result = DataUtil::Data::create2DArrayfromDatafield((Datafield const &)*arg1); - resultobj = swig::from(static_cast< std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_importArrayToDatafield__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< double,std::allocator< double > > *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - Datafield *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "importArrayToDatafield" "', argument " "1"" of type '" "std::vector< double,std::allocator< double > > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "importArrayToDatafield" "', argument " "1"" of type '" "std::vector< double,std::allocator< double > > const &""'"); - } - arg1 = ptr; - } - result = (Datafield *)DataUtil::Data::importArrayToDatafield((std::vector< double,std::allocator< double > > const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Datafield, 0 | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_importArrayToDatafield__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - Datafield *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *ptr = (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "importArrayToDatafield" "', argument " "1"" of type '" "std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "importArrayToDatafield" "', argument " "1"" of type '" "std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &""'"); - } - arg1 = ptr; - } - result = (Datafield *)DataUtil::Data::importArrayToDatafield((std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Datafield, 0 | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_importArrayToDatafield(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[2] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "importArrayToDatafield", 0, 1, argv))) SWIG_fail; - --argc; - if (argc == 1) { - int _v = 0; - int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_importArrayToDatafield__SWIG_0(self, argc, argv); - } - } - if (argc == 1) { - int _v = 0; - int res = swig::asptr(argv[0], (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_importArrayToDatafield__SWIG_1(self, argc, argv); - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'importArrayToDatafield'.\n" - " Possible C/C++ prototypes are:\n" - " DataUtil::Data::importArrayToDatafield(std::vector< double,std::allocator< double > > const &)\n" - " DataUtil::Data::importArrayToDatafield(std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FindPeaks__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - Datafield *arg1 = 0 ; - double arg2 ; - std::string *arg3 = 0 ; - double arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - int res3 = SWIG_OLDOBJ ; - double val4 ; - int ecode4 = 0 ; - std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > result; - - if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Datafield, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FindPeaks" "', argument " "1"" of type '" "Datafield const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FindPeaks" "', argument " "1"" of type '" "Datafield const &""'"); - } - arg1 = reinterpret_cast< Datafield * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FindPeaks" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - std::string *ptr = (std::string *)0; - res3 = SWIG_AsPtr_std_string(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FindPeaks" "', argument " "3"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FindPeaks" "', argument " "3"" of type '" "std::string const &""'"); - } - arg3 = ptr; - } - ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FindPeaks" "', argument " "4"" of type '" "double""'"); - } - arg4 = static_cast< double >(val4); - result = DataUtil::Data::FindPeaks((Datafield const &)*arg1,arg2,(std::string const &)*arg3,arg4); - resultobj = swig::from(static_cast< std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > >(result)); - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FindPeaks__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - Datafield *arg1 = 0 ; - double arg2 ; - std::string *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - int res3 = SWIG_OLDOBJ ; - std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > result; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Datafield, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FindPeaks" "', argument " "1"" of type '" "Datafield const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FindPeaks" "', argument " "1"" of type '" "Datafield const &""'"); - } - arg1 = reinterpret_cast< Datafield * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FindPeaks" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - std::string *ptr = (std::string *)0; - res3 = SWIG_AsPtr_std_string(swig_obj[2], &ptr); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FindPeaks" "', argument " "3"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FindPeaks" "', argument " "3"" of type '" "std::string const &""'"); - } - arg3 = ptr; - } - result = DataUtil::Data::FindPeaks((Datafield const &)*arg1,arg2,(std::string const &)*arg3); - resultobj = swig::from(static_cast< std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > >(result)); - if (SWIG_IsNewObj(res3)) delete arg3; - return resultobj; -fail: - if (SWIG_IsNewObj(res3)) delete arg3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FindPeaks__SWIG_2(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - Datafield *arg1 = 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Datafield, 0 | 0); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Datafield, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FindPeaks" "', argument " "1"" of type '" "Datafield const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FindPeaks" "', argument " "1"" of type '" "Datafield const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Datafield_title" "', argument " "1"" of type '" "Datafield *""'"); } arg1 = reinterpret_cast< Datafield * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FindPeaks" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - result = DataUtil::Data::FindPeaks((Datafield const &)*arg1,arg2); - resultobj = swig::from(static_cast< std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > >(result)); + result = (arg1)->title(); + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_FindPeaks__SWIG_3(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - Datafield *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > result; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Datafield, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FindPeaks" "', argument " "1"" of type '" "Datafield const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FindPeaks" "', argument " "1"" of type '" "Datafield const &""'"); - } - arg1 = reinterpret_cast< Datafield * >(argp1); - result = DataUtil::Data::FindPeaks((Datafield const &)*arg1); - resultobj = swig::from(static_cast< std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > >(result)); - return resultobj; -fail: - return NULL; +SWIGINTERN PyObject *Datafield_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Datafield, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); } - -SWIGINTERN PyObject *_wrap_FindPeaks(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "FindPeaks", 0, 4, argv))) SWIG_fail; - --argc; - if (argc == 1) { - int _v = 0; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Datafield, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FindPeaks__SWIG_3(self, argc, argv); - } - } - if (argc == 2) { - int _v = 0; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Datafield, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FindPeaks__SWIG_2(self, argc, argv); - } - } - } - if (argc == 3) { - int _v = 0; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Datafield, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FindPeaks__SWIG_1(self, argc, argv); - } - } - } - } - if (argc == 4) { - int _v = 0; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Datafield, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FindPeaks__SWIG_0(self, argc, argv); - } - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'FindPeaks'.\n" - " Possible C/C++ prototypes are:\n" - " DataUtil::Data::FindPeaks(Datafield const &,double,std::string const &,double)\n" - " DataUtil::Data::FindPeaks(Datafield const &,double,std::string const &)\n" - " DataUtil::Data::FindPeaks(Datafield const &,double)\n" - " DataUtil::Data::FindPeaks(Datafield const &)\n"); - return 0; +SWIGINTERN PyObject *Datafield_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); } - SWIGINTERN PyObject *_wrap_new_Beam__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; double arg1 ; @@ -32387,24 +32276,54 @@ SWIGINTERN PyObject *Rectangle_swigregister(PyObject *SWIGUNUSEDPARM(self), PyOb return SWIG_Py_Void(); } -SWIGINTERN PyObject *Rectangle_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} +SWIGINTERN PyObject *Rectangle_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_MaskPattern(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + IShape2D *arg1 = (IShape2D *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + MaskPattern *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args, "new_MaskPattern", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IShape2D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MaskPattern" "', argument " "1"" of type '" "IShape2D *""'"); + } + arg1 = reinterpret_cast< IShape2D * >(argp1); + ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_MaskPattern" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + result = (MaskPattern *)new MaskPattern(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MaskPattern, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + -SWIGINTERN PyObject *_wrap_delete_IDetectorResolution(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_delete_MaskPattern(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - IDetectorResolution *arg1 = (IDetectorResolution *) 0 ; + MaskPattern *arg1 = (MaskPattern *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; if (!args) SWIG_fail; swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IDetectorResolution, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_MaskPattern, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IDetectorResolution" "', argument " "1"" of type '" "IDetectorResolution *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MaskPattern" "', argument " "1"" of type '" "MaskPattern *""'"); } - arg1 = reinterpret_cast< IDetectorResolution * >(argp1); + arg1 = reinterpret_cast< MaskPattern * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; @@ -32413,51 +32332,51 @@ fail: } -SWIGINTERN PyObject *_wrap_IDetectorResolution_clone(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_MaskPattern_clone(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - IDetectorResolution *arg1 = (IDetectorResolution *) 0 ; + MaskPattern *arg1 = (MaskPattern *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; - IDetectorResolution *result = 0 ; + MaskPattern *result = 0 ; if (!args) SWIG_fail; swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IDetectorResolution, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_MaskPattern, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetectorResolution_clone" "', argument " "1"" of type '" "IDetectorResolution const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MaskPattern_clone" "', argument " "1"" of type '" "MaskPattern const *""'"); } - arg1 = reinterpret_cast< IDetectorResolution * >(argp1); - result = (IDetectorResolution *)((IDetectorResolution const *)arg1)->clone(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IDetectorResolution, 0 | 0 ); + arg1 = reinterpret_cast< MaskPattern * >(argp1); + result = (MaskPattern *)((MaskPattern const *)arg1)->clone(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MaskPattern, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_IDetectorResolution_applyDetectorResolution(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_MaskPattern_shape_set(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - IDetectorResolution *arg1 = (IDetectorResolution *) 0 ; - Datafield *arg2 = (Datafield *) 0 ; + MaskPattern *arg1 = (MaskPattern *) 0 ; + IShape2D *arg2 = (IShape2D *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject *swig_obj[2] ; - if (!SWIG_Python_UnpackTuple(args, "IDetectorResolution_applyDetectorResolution", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IDetectorResolution, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "MaskPattern_shape_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_MaskPattern, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetectorResolution_applyDetectorResolution" "', argument " "1"" of type '" "IDetectorResolution const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MaskPattern_shape_set" "', argument " "1"" of type '" "MaskPattern *""'"); } - arg1 = reinterpret_cast< IDetectorResolution * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_Datafield, 0 | 0 ); + arg1 = reinterpret_cast< MaskPattern * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_IShape2D, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDetectorResolution_applyDetectorResolution" "', argument " "2"" of type '" "Datafield *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MaskPattern_shape_set" "', argument " "2"" of type '" "IShape2D *""'"); } - arg2 = reinterpret_cast< Datafield * >(argp2); - ((IDetectorResolution const *)arg1)->applyDetectorResolution(arg2); + arg2 = reinterpret_cast< IShape2D * >(argp2); + if (arg1) (arg1)->shape = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -32465,386 +32384,405 @@ fail: } -SWIGINTERN PyObject *IDetectorResolution_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_IDetectorResolution, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_delete_IResolutionFunction2D(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_MaskPattern_shape_get(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - IResolutionFunction2D *arg1 = (IResolutionFunction2D *) 0 ; + MaskPattern *arg1 = (MaskPattern *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; + IShape2D *result = 0 ; if (!args) SWIG_fail; swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IResolutionFunction2D, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_MaskPattern, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IResolutionFunction2D" "', argument " "1"" of type '" "IResolutionFunction2D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MaskPattern_shape_get" "', argument " "1"" of type '" "MaskPattern *""'"); } - arg1 = reinterpret_cast< IResolutionFunction2D * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); + arg1 = reinterpret_cast< MaskPattern * >(argp1); + result = (IShape2D *) ((arg1)->shape); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IShape2D, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_IResolutionFunction2D_evaluateCDF(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_MaskPattern_doMask_set(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - IResolutionFunction2D *arg1 = (IResolutionFunction2D *) 0 ; - double arg2 ; - double arg3 ; + MaskPattern *arg1 = (MaskPattern *) 0 ; + bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; - double val2 ; + bool val2 ; int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - double result; + PyObject *swig_obj[2] ; - if (!SWIG_Python_UnpackTuple(args, "IResolutionFunction2D_evaluateCDF", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IResolutionFunction2D, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "MaskPattern_doMask_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_MaskPattern, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IResolutionFunction2D_evaluateCDF" "', argument " "1"" of type '" "IResolutionFunction2D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MaskPattern_doMask_set" "', argument " "1"" of type '" "MaskPattern *""'"); } - arg1 = reinterpret_cast< IResolutionFunction2D * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + arg1 = reinterpret_cast< MaskPattern * >(argp1); + ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IResolutionFunction2D_evaluateCDF" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IResolutionFunction2D_evaluateCDF" "', argument " "3"" of type '" "double""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MaskPattern_doMask_set" "', argument " "2"" of type '" "bool""'"); } - arg3 = static_cast< double >(val3); - result = (double)((IResolutionFunction2D const *)arg1)->evaluateCDF(arg2,arg3); - resultobj = SWIG_From_double(static_cast< double >(result)); + arg2 = static_cast< bool >(val2); + if (arg1) (arg1)->doMask = arg2; + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_IResolutionFunction2D_clone(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_MaskPattern_doMask_get(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - IResolutionFunction2D *arg1 = (IResolutionFunction2D *) 0 ; + MaskPattern *arg1 = (MaskPattern *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; - IResolutionFunction2D *result = 0 ; + bool result; if (!args) SWIG_fail; swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IResolutionFunction2D, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_MaskPattern, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IResolutionFunction2D_clone" "', argument " "1"" of type '" "IResolutionFunction2D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MaskPattern_doMask_get" "', argument " "1"" of type '" "MaskPattern *""'"); } - arg1 = reinterpret_cast< IResolutionFunction2D * >(argp1); - result = (IResolutionFunction2D *)((IResolutionFunction2D const *)arg1)->clone(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IResolutionFunction2D, 0 | 0 ); + arg1 = reinterpret_cast< MaskPattern * >(argp1); + result = (bool) ((arg1)->doMask); + resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *IResolutionFunction2D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *MaskPattern_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_IResolutionFunction2D, SWIG_NewClientData(obj)); + SWIG_TypeNewClientData(SWIGTYPE_p_MaskPattern, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } -SWIGINTERN PyObject *_wrap_new_ResolutionFunction2DGaussian(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - double arg1 ; - double arg2 ; - double val1 ; - int ecode1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - ResolutionFunction2DGaussian *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "new_ResolutionFunction2DGaussian", 2, 2, swig_obj)) SWIG_fail; - ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ResolutionFunction2DGaussian" "', argument " "1"" of type '" "double""'"); - } - arg1 = static_cast< double >(val1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ResolutionFunction2DGaussian" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - result = (ResolutionFunction2DGaussian *)new ResolutionFunction2DGaussian(arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ResolutionFunction2DGaussian, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; +SWIGINTERN PyObject *MaskPattern_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); } - -SWIGINTERN PyObject *_wrap_ResolutionFunction2DGaussian_clone(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_new_DetectorMask__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; - ResolutionFunction2DGaussian *arg1 = (ResolutionFunction2DGaussian *) 0 ; + Scale *arg1 = 0 ; + Scale *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - ResolutionFunction2DGaussian *result = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + DetectorMask *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ResolutionFunction2DGaussian, 0 | 0 ); + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Scale, 0 | 0); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ResolutionFunction2DGaussian_clone" "', argument " "1"" of type '" "ResolutionFunction2DGaussian const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DetectorMask" "', argument " "1"" of type '" "Scale const &""'"); } - arg1 = reinterpret_cast< ResolutionFunction2DGaussian * >(argp1); - result = (ResolutionFunction2DGaussian *)((ResolutionFunction2DGaussian const *)arg1)->clone(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ResolutionFunction2DGaussian, 0 | 0 ); + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DetectorMask" "', argument " "1"" of type '" "Scale const &""'"); + } + arg1 = reinterpret_cast< Scale * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Scale, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DetectorMask" "', argument " "2"" of type '" "Scale const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DetectorMask" "', argument " "2"" of type '" "Scale const &""'"); + } + arg2 = reinterpret_cast< Scale * >(argp2); + result = (DetectorMask *)new DetectorMask((Scale const &)*arg1,(Scale const &)*arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DetectorMask, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ResolutionFunction2DGaussian_className(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_delete_DetectorMask(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - ResolutionFunction2DGaussian *arg1 = (ResolutionFunction2DGaussian *) 0 ; + DetectorMask *arg1 = (DetectorMask *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; - std::string result; if (!args) SWIG_fail; swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ResolutionFunction2DGaussian, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DetectorMask, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ResolutionFunction2DGaussian_className" "', argument " "1"" of type '" "ResolutionFunction2DGaussian const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DetectorMask" "', argument " "1"" of type '" "DetectorMask *""'"); } - arg1 = reinterpret_cast< ResolutionFunction2DGaussian * >(argp1); - result = ((ResolutionFunction2DGaussian const *)arg1)->className(); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + arg1 = reinterpret_cast< DetectorMask * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ResolutionFunction2DGaussian_parDefs(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_new_DetectorMask__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; - ResolutionFunction2DGaussian *arg1 = (ResolutionFunction2DGaussian *) 0 ; + DetectorMask *arg1 = 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - SwigValueWrapper< std::vector< ParaMeta,std::allocator< ParaMeta > > > result; + DetectorMask *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ResolutionFunction2DGaussian, 0 | 0 ); + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_DetectorMask, 0 | 0); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ResolutionFunction2DGaussian_parDefs" "', argument " "1"" of type '" "ResolutionFunction2DGaussian const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DetectorMask" "', argument " "1"" of type '" "DetectorMask const &""'"); } - arg1 = reinterpret_cast< ResolutionFunction2DGaussian * >(argp1); - result = ((ResolutionFunction2DGaussian const *)arg1)->parDefs(); - resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DetectorMask" "', argument " "1"" of type '" "DetectorMask const &""'"); + } + arg1 = reinterpret_cast< DetectorMask * >(argp1); + result = (DetectorMask *)new DetectorMask((DetectorMask const &)*arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DetectorMask, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ResolutionFunction2DGaussian_evaluateCDF(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_new_DetectorMask(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "new_DetectorMask", 0, 2, argv))) SWIG_fail; + --argc; + if (argc == 1) { + int _v = 0; + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_DetectorMask, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_DetectorMask__SWIG_1(self, argc, argv); + } + } + if (argc == 2) { + int _v = 0; + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Scale, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Scale, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_DetectorMask__SWIG_0(self, argc, argv); + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_DetectorMask'.\n" + " Possible C/C++ prototypes are:\n" + " DetectorMask::DetectorMask(Scale const &,Scale const &)\n" + " DetectorMask::DetectorMask(DetectorMask const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_DetectorMask_addMask(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - ResolutionFunction2DGaussian *arg1 = (ResolutionFunction2DGaussian *) 0 ; - double arg2 ; - double arg3 ; + DetectorMask *arg1 = (DetectorMask *) 0 ; + IShape2D *arg2 = 0 ; + bool arg3 ; void *argp1 = 0 ; int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; + void *argp2 = 0 ; + int res2 = 0 ; + bool val3 ; int ecode3 = 0 ; PyObject *swig_obj[3] ; - double result; - if (!SWIG_Python_UnpackTuple(args, "ResolutionFunction2DGaussian_evaluateCDF", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ResolutionFunction2DGaussian, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "DetectorMask_addMask", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DetectorMask, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ResolutionFunction2DGaussian_evaluateCDF" "', argument " "1"" of type '" "ResolutionFunction2DGaussian const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DetectorMask_addMask" "', argument " "1"" of type '" "DetectorMask *""'"); } - arg1 = reinterpret_cast< ResolutionFunction2DGaussian * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ResolutionFunction2DGaussian_evaluateCDF" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + arg1 = reinterpret_cast< DetectorMask * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_IShape2D, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DetectorMask_addMask" "', argument " "2"" of type '" "IShape2D const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DetectorMask_addMask" "', argument " "2"" of type '" "IShape2D const &""'"); + } + arg2 = reinterpret_cast< IShape2D * >(argp2); + ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ResolutionFunction2DGaussian_evaluateCDF" "', argument " "3"" of type '" "double""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DetectorMask_addMask" "', argument " "3"" of type '" "bool""'"); } - arg3 = static_cast< double >(val3); - result = (double)((ResolutionFunction2DGaussian const *)arg1)->evaluateCDF(arg2,arg3); - resultobj = SWIG_From_double(static_cast< double >(result)); + arg3 = static_cast< bool >(val3); + (arg1)->addMask((IShape2D const &)*arg2,arg3); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ResolutionFunction2DGaussian_sigmaX(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_DetectorMask_isMasked(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - ResolutionFunction2DGaussian *arg1 = (ResolutionFunction2DGaussian *) 0 ; + DetectorMask *arg1 = (DetectorMask *) 0 ; + size_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; + size_t val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + bool result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ResolutionFunction2DGaussian, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "DetectorMask_isMasked", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DetectorMask, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ResolutionFunction2DGaussian_sigmaX" "', argument " "1"" of type '" "ResolutionFunction2DGaussian const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DetectorMask_isMasked" "', argument " "1"" of type '" "DetectorMask const *""'"); } - arg1 = reinterpret_cast< ResolutionFunction2DGaussian * >(argp1); - result = (double)((ResolutionFunction2DGaussian const *)arg1)->sigmaX(); - resultobj = SWIG_From_double(static_cast< double >(result)); + arg1 = reinterpret_cast< DetectorMask * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DetectorMask_isMasked" "', argument " "2"" of type '" "size_t""'"); + } + arg2 = static_cast< size_t >(val2); + result = (bool)((DetectorMask const *)arg1)->isMasked(arg2); + resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ResolutionFunction2DGaussian_sigmaY(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_DetectorMask_hasMasks(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - ResolutionFunction2DGaussian *arg1 = (ResolutionFunction2DGaussian *) 0 ; + DetectorMask *arg1 = (DetectorMask *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; - double result; + bool result; if (!args) SWIG_fail; swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ResolutionFunction2DGaussian, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DetectorMask, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ResolutionFunction2DGaussian_sigmaY" "', argument " "1"" of type '" "ResolutionFunction2DGaussian const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DetectorMask_hasMasks" "', argument " "1"" of type '" "DetectorMask const *""'"); } - arg1 = reinterpret_cast< ResolutionFunction2DGaussian * >(argp1); - result = (double)((ResolutionFunction2DGaussian const *)arg1)->sigmaY(); - resultobj = SWIG_From_double(static_cast< double >(result)); + arg1 = reinterpret_cast< DetectorMask * >(argp1); + result = (bool)((DetectorMask const *)arg1)->hasMasks(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ResolutionFunction2DGaussian_validate(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_DetectorMask_numberOfMaskedChannels(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - ResolutionFunction2DGaussian *arg1 = (ResolutionFunction2DGaussian *) 0 ; + DetectorMask *arg1 = (DetectorMask *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; - std::string result; + int result; if (!args) SWIG_fail; swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ResolutionFunction2DGaussian, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DetectorMask, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ResolutionFunction2DGaussian_validate" "', argument " "1"" of type '" "ResolutionFunction2DGaussian const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DetectorMask_numberOfMaskedChannels" "', argument " "1"" of type '" "DetectorMask const *""'"); } - arg1 = reinterpret_cast< ResolutionFunction2DGaussian * >(argp1); - result = ((ResolutionFunction2DGaussian const *)arg1)->validate(); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + arg1 = reinterpret_cast< DetectorMask * >(argp1); + result = (int)((DetectorMask const *)arg1)->numberOfMaskedChannels(); + resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_delete_ResolutionFunction2DGaussian(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_DetectorMask_numberOfMasks(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - ResolutionFunction2DGaussian *arg1 = (ResolutionFunction2DGaussian *) 0 ; + DetectorMask *arg1 = (DetectorMask *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; + size_t result; if (!args) SWIG_fail; swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ResolutionFunction2DGaussian, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DetectorMask, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ResolutionFunction2DGaussian" "', argument " "1"" of type '" "ResolutionFunction2DGaussian *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DetectorMask_numberOfMasks" "', argument " "1"" of type '" "DetectorMask const *""'"); } - arg1 = reinterpret_cast< ResolutionFunction2DGaussian * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); + arg1 = reinterpret_cast< DetectorMask * >(argp1); + result = ((DetectorMask const *)arg1)->numberOfMasks(); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *ResolutionFunction2DGaussian_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_ResolutionFunction2DGaussian, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *ResolutionFunction2DGaussian_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_MaskPattern(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_DetectorMask_patternAt(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - IShape2D *arg1 = (IShape2D *) 0 ; - bool arg2 ; + DetectorMask *arg1 = (DetectorMask *) 0 ; + size_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; - bool val2 ; + size_t val2 ; int ecode2 = 0 ; PyObject *swig_obj[2] ; MaskPattern *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "new_MaskPattern", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IShape2D, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "DetectorMask_patternAt", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DetectorMask, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MaskPattern" "', argument " "1"" of type '" "IShape2D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DetectorMask_patternAt" "', argument " "1"" of type '" "DetectorMask const *""'"); } - arg1 = reinterpret_cast< IShape2D * >(argp1); - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); + arg1 = reinterpret_cast< DetectorMask * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_MaskPattern" "', argument " "2"" of type '" "bool""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DetectorMask_patternAt" "', argument " "2"" of type '" "size_t""'"); } - arg2 = static_cast< bool >(val2); - result = (MaskPattern *)new MaskPattern(arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MaskPattern, SWIG_POINTER_NEW | 0 ); + arg2 = static_cast< size_t >(val2); + result = (MaskPattern *)((DetectorMask const *)arg1)->patternAt(arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MaskPattern, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_delete_MaskPattern(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *DetectorMask_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_DetectorMask, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *DetectorMask_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_delete_IDetectorResolution(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - MaskPattern *arg1 = (MaskPattern *) 0 ; + IDetectorResolution *arg1 = (IDetectorResolution *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; if (!args) SWIG_fail; swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_MaskPattern, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IDetectorResolution, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MaskPattern" "', argument " "1"" of type '" "MaskPattern *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IDetectorResolution" "', argument " "1"" of type '" "IDetectorResolution *""'"); } - arg1 = reinterpret_cast< MaskPattern * >(argp1); + arg1 = reinterpret_cast< IDetectorResolution * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; @@ -32853,51 +32791,51 @@ fail: } -SWIGINTERN PyObject *_wrap_MaskPattern_clone(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_IDetectorResolution_clone(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - MaskPattern *arg1 = (MaskPattern *) 0 ; + IDetectorResolution *arg1 = (IDetectorResolution *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; - MaskPattern *result = 0 ; + IDetectorResolution *result = 0 ; if (!args) SWIG_fail; swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_MaskPattern, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IDetectorResolution, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MaskPattern_clone" "', argument " "1"" of type '" "MaskPattern const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetectorResolution_clone" "', argument " "1"" of type '" "IDetectorResolution const *""'"); } - arg1 = reinterpret_cast< MaskPattern * >(argp1); - result = (MaskPattern *)((MaskPattern const *)arg1)->clone(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MaskPattern, 0 | 0 ); + arg1 = reinterpret_cast< IDetectorResolution * >(argp1); + result = (IDetectorResolution *)((IDetectorResolution const *)arg1)->clone(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IDetectorResolution, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_MaskPattern_shape_set(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_IDetectorResolution_applyDetectorResolution(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - MaskPattern *arg1 = (MaskPattern *) 0 ; - IShape2D *arg2 = (IShape2D *) 0 ; + IDetectorResolution *arg1 = (IDetectorResolution *) 0 ; + Datafield *arg2 = (Datafield *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject *swig_obj[2] ; - if (!SWIG_Python_UnpackTuple(args, "MaskPattern_shape_set", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_MaskPattern, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "IDetectorResolution_applyDetectorResolution", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IDetectorResolution, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MaskPattern_shape_set" "', argument " "1"" of type '" "MaskPattern *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetectorResolution_applyDetectorResolution" "', argument " "1"" of type '" "IDetectorResolution const *""'"); } - arg1 = reinterpret_cast< MaskPattern * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_IShape2D, SWIG_POINTER_DISOWN | 0 ); + arg1 = reinterpret_cast< IDetectorResolution * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_Datafield, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MaskPattern_shape_set" "', argument " "2"" of type '" "IShape2D *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDetectorResolution_applyDetectorResolution" "', argument " "2"" of type '" "Datafield *""'"); } - arg2 = reinterpret_cast< IShape2D * >(argp2); - if (arg1) (arg1)->shape = arg2; + arg2 = reinterpret_cast< Datafield * >(argp2); + ((IDetectorResolution const *)arg1)->applyDetectorResolution(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -32905,388 +32843,339 @@ fail: } -SWIGINTERN PyObject *_wrap_MaskPattern_shape_get(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *IDetectorResolution_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_IDetectorResolution, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_delete_IResolutionFunction2D(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - MaskPattern *arg1 = (MaskPattern *) 0 ; + IResolutionFunction2D *arg1 = (IResolutionFunction2D *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; - IShape2D *result = 0 ; if (!args) SWIG_fail; swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_MaskPattern, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IResolutionFunction2D, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MaskPattern_shape_get" "', argument " "1"" of type '" "MaskPattern *""'"); - } - arg1 = reinterpret_cast< MaskPattern * >(argp1); - result = (IShape2D *) ((arg1)->shape); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IShape2D, 0 | 0 ); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IResolutionFunction2D" "', argument " "1"" of type '" "IResolutionFunction2D *""'"); + } + arg1 = reinterpret_cast< IResolutionFunction2D * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_MaskPattern_doMask_set(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_IResolutionFunction2D_evaluateCDF(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - MaskPattern *arg1 = (MaskPattern *) 0 ; - bool arg2 ; + IResolutionFunction2D *arg1 = (IResolutionFunction2D *) 0 ; + double arg2 ; + double arg3 ; void *argp1 = 0 ; int res1 = 0 ; - bool val2 ; + double val2 ; int ecode2 = 0 ; - PyObject *swig_obj[2] ; + double val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[3] ; + double result; - if (!SWIG_Python_UnpackTuple(args, "MaskPattern_doMask_set", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_MaskPattern, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "IResolutionFunction2D_evaluateCDF", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IResolutionFunction2D, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MaskPattern_doMask_set" "', argument " "1"" of type '" "MaskPattern *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IResolutionFunction2D_evaluateCDF" "', argument " "1"" of type '" "IResolutionFunction2D const *""'"); } - arg1 = reinterpret_cast< MaskPattern * >(argp1); - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); + arg1 = reinterpret_cast< IResolutionFunction2D * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MaskPattern_doMask_set" "', argument " "2"" of type '" "bool""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IResolutionFunction2D_evaluateCDF" "', argument " "2"" of type '" "double""'"); } - arg2 = static_cast< bool >(val2); - if (arg1) (arg1)->doMask = arg2; - resultobj = SWIG_Py_Void(); + arg2 = static_cast< double >(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IResolutionFunction2D_evaluateCDF" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + result = (double)((IResolutionFunction2D const *)arg1)->evaluateCDF(arg2,arg3); + resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_MaskPattern_doMask_get(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_IResolutionFunction2D_clone(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - MaskPattern *arg1 = (MaskPattern *) 0 ; + IResolutionFunction2D *arg1 = (IResolutionFunction2D *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; - bool result; + IResolutionFunction2D *result = 0 ; if (!args) SWIG_fail; swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_MaskPattern, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IResolutionFunction2D, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MaskPattern_doMask_get" "', argument " "1"" of type '" "MaskPattern *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IResolutionFunction2D_clone" "', argument " "1"" of type '" "IResolutionFunction2D const *""'"); } - arg1 = reinterpret_cast< MaskPattern * >(argp1); - result = (bool) ((arg1)->doMask); - resultobj = SWIG_From_bool(static_cast< bool >(result)); + arg1 = reinterpret_cast< IResolutionFunction2D * >(argp1); + result = (IResolutionFunction2D *)((IResolutionFunction2D const *)arg1)->clone(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IResolutionFunction2D, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *MaskPattern_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *IResolutionFunction2D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_MaskPattern, SWIG_NewClientData(obj)); + SWIG_TypeNewClientData(SWIGTYPE_p_IResolutionFunction2D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } -SWIGINTERN PyObject *MaskPattern_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_DetectorMask__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { +SWIGINTERN PyObject *_wrap_new_ResolutionFunction2DGaussian(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - Scale *arg1 = 0 ; - Scale *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - DetectorMask *result = 0 ; + double arg1 ; + double arg2 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + ResolutionFunction2DGaussian *result = 0 ; - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Scale, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DetectorMask" "', argument " "1"" of type '" "Scale const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DetectorMask" "', argument " "1"" of type '" "Scale const &""'"); - } - arg1 = reinterpret_cast< Scale * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Scale, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DetectorMask" "', argument " "2"" of type '" "Scale const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DetectorMask" "', argument " "2"" of type '" "Scale const &""'"); - } - arg2 = reinterpret_cast< Scale * >(argp2); - result = (DetectorMask *)new DetectorMask((Scale const &)*arg1,(Scale const &)*arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DetectorMask, SWIG_POINTER_NEW | 0 ); + if (!SWIG_Python_UnpackTuple(args, "new_ResolutionFunction2DGaussian", 2, 2, swig_obj)) SWIG_fail; + ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ResolutionFunction2DGaussian" "', argument " "1"" of type '" "double""'"); + } + arg1 = static_cast< double >(val1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ResolutionFunction2DGaussian" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + result = (ResolutionFunction2DGaussian *)new ResolutionFunction2DGaussian(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ResolutionFunction2DGaussian, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_delete_DetectorMask(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ResolutionFunction2DGaussian_clone(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - DetectorMask *arg1 = (DetectorMask *) 0 ; + ResolutionFunction2DGaussian *arg1 = (ResolutionFunction2DGaussian *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; + ResolutionFunction2DGaussian *result = 0 ; if (!args) SWIG_fail; swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DetectorMask, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ResolutionFunction2DGaussian, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DetectorMask" "', argument " "1"" of type '" "DetectorMask *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ResolutionFunction2DGaussian_clone" "', argument " "1"" of type '" "ResolutionFunction2DGaussian const *""'"); } - arg1 = reinterpret_cast< DetectorMask * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); + arg1 = reinterpret_cast< ResolutionFunction2DGaussian * >(argp1); + result = (ResolutionFunction2DGaussian *)((ResolutionFunction2DGaussian const *)arg1)->clone(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ResolutionFunction2DGaussian, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_new_DetectorMask__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { +SWIGINTERN PyObject *_wrap_ResolutionFunction2DGaussian_className(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - DetectorMask *arg1 = 0 ; + ResolutionFunction2DGaussian *arg1 = (ResolutionFunction2DGaussian *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - DetectorMask *result = 0 ; + PyObject *swig_obj[1] ; + std::string result; - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_DetectorMask, 0 | 0); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ResolutionFunction2DGaussian, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DetectorMask" "', argument " "1"" of type '" "DetectorMask const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DetectorMask" "', argument " "1"" of type '" "DetectorMask const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ResolutionFunction2DGaussian_className" "', argument " "1"" of type '" "ResolutionFunction2DGaussian const *""'"); } - arg1 = reinterpret_cast< DetectorMask * >(argp1); - result = (DetectorMask *)new DetectorMask((DetectorMask const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DetectorMask, SWIG_POINTER_NEW | 0 ); + arg1 = reinterpret_cast< ResolutionFunction2DGaussian * >(argp1); + result = ((ResolutionFunction2DGaussian const *)arg1)->className(); + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_new_DetectorMask(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "new_DetectorMask", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 1) { - int _v = 0; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_DetectorMask, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_DetectorMask__SWIG_1(self, argc, argv); - } - } - if (argc == 2) { - int _v = 0; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Scale, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Scale, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_DetectorMask__SWIG_0(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_DetectorMask'.\n" - " Possible C/C++ prototypes are:\n" - " DetectorMask::DetectorMask(Scale const &,Scale const &)\n" - " DetectorMask::DetectorMask(DetectorMask const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_DetectorMask_addMask(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ResolutionFunction2DGaussian_parDefs(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - DetectorMask *arg1 = (DetectorMask *) 0 ; - IShape2D *arg2 = 0 ; - bool arg3 ; + ResolutionFunction2DGaussian *arg1 = (ResolutionFunction2DGaussian *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; + PyObject *swig_obj[1] ; + SwigValueWrapper< std::vector< ParaMeta,std::allocator< ParaMeta > > > result; - if (!SWIG_Python_UnpackTuple(args, "DetectorMask_addMask", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DetectorMask, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ResolutionFunction2DGaussian, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DetectorMask_addMask" "', argument " "1"" of type '" "DetectorMask *""'"); - } - arg1 = reinterpret_cast< DetectorMask * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_IShape2D, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DetectorMask_addMask" "', argument " "2"" of type '" "IShape2D const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DetectorMask_addMask" "', argument " "2"" of type '" "IShape2D const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ResolutionFunction2DGaussian_parDefs" "', argument " "1"" of type '" "ResolutionFunction2DGaussian const *""'"); } - arg2 = reinterpret_cast< IShape2D * >(argp2); - ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DetectorMask_addMask" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - (arg1)->addMask((IShape2D const &)*arg2,arg3); - resultobj = SWIG_Py_Void(); + arg1 = reinterpret_cast< ResolutionFunction2DGaussian * >(argp1); + result = ((ResolutionFunction2DGaussian const *)arg1)->parDefs(); + resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_DetectorMask_isMasked(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ResolutionFunction2DGaussian_evaluateCDF(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - DetectorMask *arg1 = (DetectorMask *) 0 ; - size_t arg2 ; + ResolutionFunction2DGaussian *arg1 = (ResolutionFunction2DGaussian *) 0 ; + double arg2 ; + double arg3 ; void *argp1 = 0 ; int res1 = 0 ; - size_t val2 ; + double val2 ; int ecode2 = 0 ; - PyObject *swig_obj[2] ; - bool result; + double val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[3] ; + double result; - if (!SWIG_Python_UnpackTuple(args, "DetectorMask_isMasked", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DetectorMask, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "ResolutionFunction2DGaussian_evaluateCDF", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ResolutionFunction2DGaussian, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DetectorMask_isMasked" "', argument " "1"" of type '" "DetectorMask const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ResolutionFunction2DGaussian_evaluateCDF" "', argument " "1"" of type '" "ResolutionFunction2DGaussian const *""'"); } - arg1 = reinterpret_cast< DetectorMask * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + arg1 = reinterpret_cast< ResolutionFunction2DGaussian * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DetectorMask_isMasked" "', argument " "2"" of type '" "size_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ResolutionFunction2DGaussian_evaluateCDF" "', argument " "2"" of type '" "double""'"); } - arg2 = static_cast< size_t >(val2); - result = (bool)((DetectorMask const *)arg1)->isMasked(arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); + arg2 = static_cast< double >(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ResolutionFunction2DGaussian_evaluateCDF" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + result = (double)((ResolutionFunction2DGaussian const *)arg1)->evaluateCDF(arg2,arg3); + resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_DetectorMask_hasMasks(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ResolutionFunction2DGaussian_sigmaX(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - DetectorMask *arg1 = (DetectorMask *) 0 ; + ResolutionFunction2DGaussian *arg1 = (ResolutionFunction2DGaussian *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; - bool result; + double result; if (!args) SWIG_fail; swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DetectorMask, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ResolutionFunction2DGaussian, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DetectorMask_hasMasks" "', argument " "1"" of type '" "DetectorMask const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ResolutionFunction2DGaussian_sigmaX" "', argument " "1"" of type '" "ResolutionFunction2DGaussian const *""'"); } - arg1 = reinterpret_cast< DetectorMask * >(argp1); - result = (bool)((DetectorMask const *)arg1)->hasMasks(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); + arg1 = reinterpret_cast< ResolutionFunction2DGaussian * >(argp1); + result = (double)((ResolutionFunction2DGaussian const *)arg1)->sigmaX(); + resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_DetectorMask_numberOfMaskedChannels(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ResolutionFunction2DGaussian_sigmaY(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - DetectorMask *arg1 = (DetectorMask *) 0 ; + ResolutionFunction2DGaussian *arg1 = (ResolutionFunction2DGaussian *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; - int result; + double result; if (!args) SWIG_fail; swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DetectorMask, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ResolutionFunction2DGaussian, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DetectorMask_numberOfMaskedChannels" "', argument " "1"" of type '" "DetectorMask const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ResolutionFunction2DGaussian_sigmaY" "', argument " "1"" of type '" "ResolutionFunction2DGaussian const *""'"); } - arg1 = reinterpret_cast< DetectorMask * >(argp1); - result = (int)((DetectorMask const *)arg1)->numberOfMaskedChannels(); - resultobj = SWIG_From_int(static_cast< int >(result)); + arg1 = reinterpret_cast< ResolutionFunction2DGaussian * >(argp1); + result = (double)((ResolutionFunction2DGaussian const *)arg1)->sigmaY(); + resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_DetectorMask_numberOfMasks(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ResolutionFunction2DGaussian_validate(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - DetectorMask *arg1 = (DetectorMask *) 0 ; + ResolutionFunction2DGaussian *arg1 = (ResolutionFunction2DGaussian *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; - size_t result; + std::string result; if (!args) SWIG_fail; swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DetectorMask, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ResolutionFunction2DGaussian, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DetectorMask_numberOfMasks" "', argument " "1"" of type '" "DetectorMask const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ResolutionFunction2DGaussian_validate" "', argument " "1"" of type '" "ResolutionFunction2DGaussian const *""'"); } - arg1 = reinterpret_cast< DetectorMask * >(argp1); - result = ((DetectorMask const *)arg1)->numberOfMasks(); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + arg1 = reinterpret_cast< ResolutionFunction2DGaussian * >(argp1); + result = ((ResolutionFunction2DGaussian const *)arg1)->validate(); + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_DetectorMask_patternAt(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_delete_ResolutionFunction2DGaussian(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - DetectorMask *arg1 = (DetectorMask *) 0 ; - size_t arg2 ; + ResolutionFunction2DGaussian *arg1 = (ResolutionFunction2DGaussian *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - MaskPattern *result = 0 ; + PyObject *swig_obj[1] ; - if (!SWIG_Python_UnpackTuple(args, "DetectorMask_patternAt", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DetectorMask, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ResolutionFunction2DGaussian, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DetectorMask_patternAt" "', argument " "1"" of type '" "DetectorMask const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ResolutionFunction2DGaussian" "', argument " "1"" of type '" "ResolutionFunction2DGaussian *""'"); } - arg1 = reinterpret_cast< DetectorMask * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DetectorMask_patternAt" "', argument " "2"" of type '" "size_t""'"); - } - arg2 = static_cast< size_t >(val2); - result = (MaskPattern *)((DetectorMask const *)arg1)->patternAt(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MaskPattern, 0 | 0 ); + arg1 = reinterpret_cast< ResolutionFunction2DGaussian * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *DetectorMask_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *ResolutionFunction2DGaussian_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_DetectorMask, SWIG_NewClientData(obj)); + SWIG_TypeNewClientData(SWIGTYPE_p_ResolutionFunction2DGaussian, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } -SWIGINTERN PyObject *DetectorMask_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *ResolutionFunction2DGaussian_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { return SWIG_Python_InitShadowInstance(args); } @@ -36571,6 +36460,174 @@ SWIGINTERN PyObject *SphericalDetector_swiginit(PyObject *SWIGUNUSEDPARM(self), return SWIG_Python_InitShadowInstance(args); } +SWIGINTERN PyObject *_wrap_meanRelVecDiff(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< double,std::allocator< double > > *arg1 = 0 ; + std::vector< double,std::allocator< double > > *arg2 = 0 ; + int res1 = SWIG_OLDOBJ ; + int res2 = SWIG_OLDOBJ ; + PyObject *swig_obj[2] ; + double result; + + if (!SWIG_Python_UnpackTuple(args, "meanRelVecDiff", 2, 2, swig_obj)) SWIG_fail; + { + std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; + res1 = swig::asptr(swig_obj[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "meanRelVecDiff" "', argument " "1"" of type '" "std::vector< double,std::allocator< double > > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "meanRelVecDiff" "', argument " "1"" of type '" "std::vector< double,std::allocator< double > > const &""'"); + } + arg1 = ptr; + } + { + std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; + res2 = swig::asptr(swig_obj[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "meanRelVecDiff" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "meanRelVecDiff" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > > const &""'"); + } + arg2 = ptr; + } + result = (double)DiffUtil::meanRelVecDiff((std::vector< double,std::allocator< double > > const &)*arg1,(std::vector< double,std::allocator< double > > const &)*arg2); + resultobj = SWIG_From_double(static_cast< double >(result)); + if (SWIG_IsNewObj(res1)) delete arg1; + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_relativeDifferenceField(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Datafield *arg1 = 0 ; + Datafield *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + Datafield *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args, "relativeDifferenceField", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Datafield, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "relativeDifferenceField" "', argument " "1"" of type '" "Datafield const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "relativeDifferenceField" "', argument " "1"" of type '" "Datafield const &""'"); + } + arg1 = reinterpret_cast< Datafield * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Datafield, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "relativeDifferenceField" "', argument " "2"" of type '" "Datafield const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "relativeDifferenceField" "', argument " "2"" of type '" "Datafield const &""'"); + } + arg2 = reinterpret_cast< Datafield * >(argp2); + result = (Datafield *)DiffUtil::relativeDifferenceField((Datafield const &)*arg1,(Datafield const &)*arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Datafield, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_meanRelativeDifference(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Datafield *arg1 = 0 ; + Datafield *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + double result; + + if (!SWIG_Python_UnpackTuple(args, "meanRelativeDifference", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Datafield, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "meanRelativeDifference" "', argument " "1"" of type '" "Datafield const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "meanRelativeDifference" "', argument " "1"" of type '" "Datafield const &""'"); + } + arg1 = reinterpret_cast< Datafield * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Datafield, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "meanRelativeDifference" "', argument " "2"" of type '" "Datafield const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "meanRelativeDifference" "', argument " "2"" of type '" "Datafield const &""'"); + } + arg2 = reinterpret_cast< Datafield * >(argp2); + result = (double)DiffUtil::meanRelativeDifference((Datafield const &)*arg1,(Datafield const &)*arg2); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_checkRelativeDifference(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< double,std::allocator< double > > *arg1 = 0 ; + std::vector< double,std::allocator< double > > *arg2 = 0 ; + double arg3 ; + int res1 = SWIG_OLDOBJ ; + int res2 = SWIG_OLDOBJ ; + double val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[3] ; + bool result; + + if (!SWIG_Python_UnpackTuple(args, "checkRelativeDifference", 3, 3, swig_obj)) SWIG_fail; + { + std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; + res1 = swig::asptr(swig_obj[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "checkRelativeDifference" "', argument " "1"" of type '" "std::vector< double,std::allocator< double > > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "checkRelativeDifference" "', argument " "1"" of type '" "std::vector< double,std::allocator< double > > const &""'"); + } + arg1 = ptr; + } + { + std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; + res2 = swig::asptr(swig_obj[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "checkRelativeDifference" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "checkRelativeDifference" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > > const &""'"); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "checkRelativeDifference" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + result = (bool)DiffUtil::checkRelativeDifference((std::vector< double,std::allocator< double > > const &)*arg1,(std::vector< double,std::allocator< double > > const &)*arg2,arg3); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + if (SWIG_IsNewObj(res1)) delete arg1; + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + SWIGINTERN PyObject *_wrap_readData1D__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::string *arg1 = 0 ; @@ -36930,303 +36987,6 @@ fail: } -SWIGINTERN PyObject *_wrap_new_SimulationResult__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - Datafield *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - SimulationResult *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Datafield, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SimulationResult" "', argument " "1"" of type '" "Datafield const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SimulationResult" "', argument " "1"" of type '" "Datafield const &""'"); - } - arg1 = reinterpret_cast< Datafield * >(argp1); - result = (SimulationResult *)new SimulationResult((Datafield const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SimulationResult, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_SimulationResult__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - SimulationResult *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - SimulationResult *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_SimulationResult, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SimulationResult" "', argument " "1"" of type '" "SimulationResult const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SimulationResult" "', argument " "1"" of type '" "SimulationResult const &""'"); - } - arg1 = reinterpret_cast< SimulationResult * >(argp1); - result = (SimulationResult *)new SimulationResult((SimulationResult const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SimulationResult, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_SimulationResult__SWIG_2(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - SimulationResult *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::unique_ptr< SimulationResult > rvrdeleter1 ; - SimulationResult *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_SimulationResult, SWIG_POINTER_RELEASE | 0 ); - if (!SWIG_IsOK(res1)) { - if (res1 == SWIG_ERROR_RELEASE_NOT_OWNED) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SimulationResult" "', cannot release ownership as memory is not owned for argument " "1"" of type '" "SimulationResult &&""'"); - } else { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SimulationResult" "', argument " "1"" of type '" "SimulationResult &&""'"); - } - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SimulationResult" "', argument " "1"" of type '" "SimulationResult &&""'"); - } - arg1 = reinterpret_cast< SimulationResult * >(argp1); - rvrdeleter1.reset(arg1); - result = (SimulationResult *)new SimulationResult((SimulationResult &&)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SimulationResult, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_SimulationResult(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[2] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "new_SimulationResult", 0, 1, argv))) SWIG_fail; - --argc; - if (argc == 1) { - int _v = 0; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_SimulationResult, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_SimulationResult__SWIG_1(self, argc, argv); - } - } - if (argc == 1) { - int _v = 0; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_SimulationResult, SWIG_POINTER_NO_NULL); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_SimulationResult__SWIG_2(self, argc, argv); - } - } - if (argc == 1) { - int _v = 0; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Datafield, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_SimulationResult__SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_SimulationResult'.\n" - " Possible C/C++ prototypes are:\n" - " SimulationResult::SimulationResult(Datafield const &)\n" - " SimulationResult::SimulationResult(SimulationResult const &)\n" - " SimulationResult::SimulationResult(SimulationResult &&)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_delete_SimulationResult(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - SimulationResult *arg1 = (SimulationResult *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SimulationResult, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SimulationResult" "', argument " "1"" of type '" "SimulationResult *""'"); - } - arg1 = reinterpret_cast< SimulationResult * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SimulationResult_extracted_field(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - SimulationResult *arg1 = (SimulationResult *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - SwigValueWrapper< Datafield > result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SimulationResult, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulationResult_extracted_field" "', argument " "1"" of type '" "SimulationResult const *""'"); - } - arg1 = reinterpret_cast< SimulationResult * >(argp1); - result = ((SimulationResult const *)arg1)->extracted_field(); - resultobj = SWIG_NewPointerObj((new Datafield(result)), SWIGTYPE_p_Datafield, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SimulationResult_axisMinMax(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - SimulationResult *arg1 = (SimulationResult *) 0 ; - size_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - std::pair< double,double > result; - - if (!SWIG_Python_UnpackTuple(args, "SimulationResult_axisMinMax", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SimulationResult, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulationResult_axisMinMax" "', argument " "1"" of type '" "SimulationResult const *""'"); - } - arg1 = reinterpret_cast< SimulationResult * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimulationResult_axisMinMax" "', argument " "2"" of type '" "size_t""'"); - } - arg2 = static_cast< size_t >(val2); - result = ((SimulationResult const *)arg1)->axisMinMax(arg2); - resultobj = swig::from(static_cast< std::pair< double,double > >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SimulationResult_convertedBinCenters(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - SimulationResult *arg1 = (SimulationResult *) 0 ; - size_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - std::vector< double,std::allocator< double > > result; - - if (!SWIG_Python_UnpackTuple(args, "SimulationResult_convertedBinCenters", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SimulationResult, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulationResult_convertedBinCenters" "', argument " "1"" of type '" "SimulationResult const *""'"); - } - arg1 = reinterpret_cast< SimulationResult * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimulationResult_convertedBinCenters" "', argument " "2"" of type '" "size_t""'"); - } - arg2 = static_cast< size_t >(val2); - result = ((SimulationResult const *)arg1)->convertedBinCenters(arg2); - resultobj = swig::from(static_cast< std::vector< double,std::allocator< double > > >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SimulationResult_setTitle(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - SimulationResult *arg1 = (SimulationResult *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "SimulationResult_setTitle", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SimulationResult, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulationResult_setTitle" "', argument " "1"" of type '" "SimulationResult *""'"); - } - arg1 = reinterpret_cast< SimulationResult * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SimulationResult_setTitle" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SimulationResult_setTitle" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - (arg1)->setTitle((std::string const &)*arg2); - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SimulationResult_title(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - SimulationResult *arg1 = (SimulationResult *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SimulationResult, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulationResult_title" "', argument " "1"" of type '" "SimulationResult *""'"); - } - arg1 = reinterpret_cast< SimulationResult * >(argp1); - result = (arg1)->title(); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *SimulationResult_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_SimulationResult, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *SimulationResult_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - static PyMethodDef SwigMethods[] = { { "delete_SwigPyIterator", _wrap_delete_SwigPyIterator, METH_O, "delete_SwigPyIterator(SwigPyIterator self)"}, { "SwigPyIterator_value", _wrap_SwigPyIterator_value, METH_O, "SwigPyIterator_value(SwigPyIterator self) -> PyObject *"}, @@ -37919,6 +37679,14 @@ static PyMethodDef SwigMethods[] = { { "delete_vector_R3", _wrap_delete_vector_R3, METH_O, "delete_vector_R3(vector_R3 self)"}, { "vector_R3_swigregister", vector_R3_swigregister, METH_O, NULL}, { "vector_R3_swiginit", vector_R3_swiginit, METH_VARARGS, NULL}, + { "invertAxis", _wrap_invertAxis, METH_VARARGS, "invertAxis(int axis, vdouble2d_t original) -> vdouble2d_t"}, + { "transpose", _wrap_transpose, METH_O, "transpose(vdouble2d_t original) -> vdouble2d_t"}, + { "create2DArrayfromDatafield", _wrap_create2DArrayfromDatafield, METH_O, "create2DArrayfromDatafield(Datafield data) -> vdouble2d_t"}, + { "importArrayToDatafield", _wrap_importArrayToDatafield, METH_VARARGS, "\n" + "importArrayToDatafield(vdouble1d_t vec) -> Datafield\n" + "importArrayToDatafield(vdouble2d_t vec) -> Datafield\n" + ""}, + { "FindPeaks", _wrap_FindPeaks, METH_VARARGS, "FindPeaks(Datafield data, double sigma=2, std::string const & option={}, double threshold=0.05) -> vector_pvacuum_double_t"}, { "new_Datafield", _wrap_new_Datafield, METH_VARARGS, "\n" "Datafield(Frame frame, vdouble1d_t values={}, vdouble1d_t errSigmas={})\n" "Datafield(std::vector< Scale const *,std::allocator< Scale const * > > && axes, vdouble1d_t values={}, vdouble1d_t errSigmas={})\n" @@ -37955,20 +37723,10 @@ static PyMethodDef SwigMethods[] = { "Datafield_yProjection(Datafield self, double xvalue) -> Datafield\n" "Datafield_yProjection(Datafield self, double xlow, double xup) -> Datafield\n" ""}, + { "Datafield_setTitle", _wrap_Datafield_setTitle, METH_VARARGS, "Datafield_setTitle(Datafield self, std::string const & title)"}, + { "Datafield_title", _wrap_Datafield_title, METH_O, "Datafield_title(Datafield self) -> std::string"}, { "Datafield_swigregister", Datafield_swigregister, METH_O, NULL}, { "Datafield_swiginit", Datafield_swiginit, METH_VARARGS, NULL}, - { "meanRelVecDiff", _wrap_meanRelVecDiff, METH_VARARGS, "meanRelVecDiff(vdouble1d_t dat, vdouble1d_t ref) -> double"}, - { "relativeDifferenceField", _wrap_relativeDifferenceField, METH_VARARGS, "relativeDifferenceField(Datafield dat, Datafield ref) -> Datafield"}, - { "meanRelativeDifference", _wrap_meanRelativeDifference, METH_VARARGS, "meanRelativeDifference(SimulationResult dat, SimulationResult ref) -> double"}, - { "checkRelativeDifference", _wrap_checkRelativeDifference, METH_VARARGS, "checkRelativeDifference(vdouble1d_t dat, vdouble1d_t ref, double threshold) -> bool"}, - { "invertAxis", _wrap_invertAxis, METH_VARARGS, "invertAxis(int axis, vdouble2d_t original) -> vdouble2d_t"}, - { "transpose", _wrap_transpose, METH_O, "transpose(vdouble2d_t original) -> vdouble2d_t"}, - { "create2DArrayfromDatafield", _wrap_create2DArrayfromDatafield, METH_O, "create2DArrayfromDatafield(Datafield data) -> vdouble2d_t"}, - { "importArrayToDatafield", _wrap_importArrayToDatafield, METH_VARARGS, "\n" - "importArrayToDatafield(vdouble1d_t vec) -> Datafield\n" - "importArrayToDatafield(vdouble2d_t vec) -> Datafield\n" - ""}, - { "FindPeaks", _wrap_FindPeaks, METH_VARARGS, "FindPeaks(Datafield data, double sigma=2, std::string const & option={}, double threshold=0.05) -> vector_pvacuum_double_t"}, { "new_Beam", _wrap_new_Beam, METH_VARARGS, "Beam(double intensity, double wavelength, double alpha, double phi=0)"}, { "delete_Beam", _wrap_delete_Beam, METH_O, "delete_Beam(Beam self)"}, { "Beam_className", _wrap_Beam_className, METH_O, "Beam_className(Beam self) -> std::string"}, @@ -38083,25 +37841,6 @@ static PyMethodDef SwigMethods[] = { { "delete_Rectangle", _wrap_delete_Rectangle, METH_O, "delete_Rectangle(Rectangle self)"}, { "Rectangle_swigregister", Rectangle_swigregister, METH_O, NULL}, { "Rectangle_swiginit", Rectangle_swiginit, METH_VARARGS, NULL}, - { "delete_IDetectorResolution", _wrap_delete_IDetectorResolution, METH_O, "delete_IDetectorResolution(IDetectorResolution self)"}, - { "IDetectorResolution_clone", _wrap_IDetectorResolution_clone, METH_O, "IDetectorResolution_clone(IDetectorResolution self) -> IDetectorResolution"}, - { "IDetectorResolution_applyDetectorResolution", _wrap_IDetectorResolution_applyDetectorResolution, METH_VARARGS, "IDetectorResolution_applyDetectorResolution(IDetectorResolution self, Datafield p_intensity_map)"}, - { "IDetectorResolution_swigregister", IDetectorResolution_swigregister, METH_O, NULL}, - { "delete_IResolutionFunction2D", _wrap_delete_IResolutionFunction2D, METH_O, "delete_IResolutionFunction2D(IResolutionFunction2D self)"}, - { "IResolutionFunction2D_evaluateCDF", _wrap_IResolutionFunction2D_evaluateCDF, METH_VARARGS, "IResolutionFunction2D_evaluateCDF(IResolutionFunction2D self, double x, double y) -> double"}, - { "IResolutionFunction2D_clone", _wrap_IResolutionFunction2D_clone, METH_O, "IResolutionFunction2D_clone(IResolutionFunction2D self) -> IResolutionFunction2D"}, - { "IResolutionFunction2D_swigregister", IResolutionFunction2D_swigregister, METH_O, NULL}, - { "new_ResolutionFunction2DGaussian", _wrap_new_ResolutionFunction2DGaussian, METH_VARARGS, "new_ResolutionFunction2DGaussian(double sigma_x, double sigma_y) -> ResolutionFunction2DGaussian"}, - { "ResolutionFunction2DGaussian_clone", _wrap_ResolutionFunction2DGaussian_clone, METH_O, "ResolutionFunction2DGaussian_clone(ResolutionFunction2DGaussian self) -> ResolutionFunction2DGaussian"}, - { "ResolutionFunction2DGaussian_className", _wrap_ResolutionFunction2DGaussian_className, METH_O, "ResolutionFunction2DGaussian_className(ResolutionFunction2DGaussian self) -> std::string"}, - { "ResolutionFunction2DGaussian_parDefs", _wrap_ResolutionFunction2DGaussian_parDefs, METH_O, "ResolutionFunction2DGaussian_parDefs(ResolutionFunction2DGaussian self) -> std::vector< ParaMeta,std::allocator< ParaMeta > >"}, - { "ResolutionFunction2DGaussian_evaluateCDF", _wrap_ResolutionFunction2DGaussian_evaluateCDF, METH_VARARGS, "ResolutionFunction2DGaussian_evaluateCDF(ResolutionFunction2DGaussian self, double x, double y) -> double"}, - { "ResolutionFunction2DGaussian_sigmaX", _wrap_ResolutionFunction2DGaussian_sigmaX, METH_O, "ResolutionFunction2DGaussian_sigmaX(ResolutionFunction2DGaussian self) -> double"}, - { "ResolutionFunction2DGaussian_sigmaY", _wrap_ResolutionFunction2DGaussian_sigmaY, METH_O, "ResolutionFunction2DGaussian_sigmaY(ResolutionFunction2DGaussian self) -> double"}, - { "ResolutionFunction2DGaussian_validate", _wrap_ResolutionFunction2DGaussian_validate, METH_O, "ResolutionFunction2DGaussian_validate(ResolutionFunction2DGaussian self) -> std::string"}, - { "delete_ResolutionFunction2DGaussian", _wrap_delete_ResolutionFunction2DGaussian, METH_O, "delete_ResolutionFunction2DGaussian(ResolutionFunction2DGaussian self)"}, - { "ResolutionFunction2DGaussian_swigregister", ResolutionFunction2DGaussian_swigregister, METH_O, NULL}, - { "ResolutionFunction2DGaussian_swiginit", ResolutionFunction2DGaussian_swiginit, METH_VARARGS, NULL}, { "new_MaskPattern", _wrap_new_MaskPattern, METH_VARARGS, "new_MaskPattern(IShape2D shape_, bool doMask_) -> MaskPattern"}, { "delete_MaskPattern", _wrap_delete_MaskPattern, METH_O, "delete_MaskPattern(MaskPattern self)"}, { "MaskPattern_clone", _wrap_MaskPattern_clone, METH_O, "MaskPattern_clone(MaskPattern self) -> MaskPattern"}, @@ -38124,6 +37863,25 @@ static PyMethodDef SwigMethods[] = { { "DetectorMask_patternAt", _wrap_DetectorMask_patternAt, METH_VARARGS, "DetectorMask_patternAt(DetectorMask self, size_t iMask) -> MaskPattern"}, { "DetectorMask_swigregister", DetectorMask_swigregister, METH_O, NULL}, { "DetectorMask_swiginit", DetectorMask_swiginit, METH_VARARGS, NULL}, + { "delete_IDetectorResolution", _wrap_delete_IDetectorResolution, METH_O, "delete_IDetectorResolution(IDetectorResolution self)"}, + { "IDetectorResolution_clone", _wrap_IDetectorResolution_clone, METH_O, "IDetectorResolution_clone(IDetectorResolution self) -> IDetectorResolution"}, + { "IDetectorResolution_applyDetectorResolution", _wrap_IDetectorResolution_applyDetectorResolution, METH_VARARGS, "IDetectorResolution_applyDetectorResolution(IDetectorResolution self, Datafield p_intensity_map)"}, + { "IDetectorResolution_swigregister", IDetectorResolution_swigregister, METH_O, NULL}, + { "delete_IResolutionFunction2D", _wrap_delete_IResolutionFunction2D, METH_O, "delete_IResolutionFunction2D(IResolutionFunction2D self)"}, + { "IResolutionFunction2D_evaluateCDF", _wrap_IResolutionFunction2D_evaluateCDF, METH_VARARGS, "IResolutionFunction2D_evaluateCDF(IResolutionFunction2D self, double x, double y) -> double"}, + { "IResolutionFunction2D_clone", _wrap_IResolutionFunction2D_clone, METH_O, "IResolutionFunction2D_clone(IResolutionFunction2D self) -> IResolutionFunction2D"}, + { "IResolutionFunction2D_swigregister", IResolutionFunction2D_swigregister, METH_O, NULL}, + { "new_ResolutionFunction2DGaussian", _wrap_new_ResolutionFunction2DGaussian, METH_VARARGS, "new_ResolutionFunction2DGaussian(double sigma_x, double sigma_y) -> ResolutionFunction2DGaussian"}, + { "ResolutionFunction2DGaussian_clone", _wrap_ResolutionFunction2DGaussian_clone, METH_O, "ResolutionFunction2DGaussian_clone(ResolutionFunction2DGaussian self) -> ResolutionFunction2DGaussian"}, + { "ResolutionFunction2DGaussian_className", _wrap_ResolutionFunction2DGaussian_className, METH_O, "ResolutionFunction2DGaussian_className(ResolutionFunction2DGaussian self) -> std::string"}, + { "ResolutionFunction2DGaussian_parDefs", _wrap_ResolutionFunction2DGaussian_parDefs, METH_O, "ResolutionFunction2DGaussian_parDefs(ResolutionFunction2DGaussian self) -> std::vector< ParaMeta,std::allocator< ParaMeta > >"}, + { "ResolutionFunction2DGaussian_evaluateCDF", _wrap_ResolutionFunction2DGaussian_evaluateCDF, METH_VARARGS, "ResolutionFunction2DGaussian_evaluateCDF(ResolutionFunction2DGaussian self, double x, double y) -> double"}, + { "ResolutionFunction2DGaussian_sigmaX", _wrap_ResolutionFunction2DGaussian_sigmaX, METH_O, "ResolutionFunction2DGaussian_sigmaX(ResolutionFunction2DGaussian self) -> double"}, + { "ResolutionFunction2DGaussian_sigmaY", _wrap_ResolutionFunction2DGaussian_sigmaY, METH_O, "ResolutionFunction2DGaussian_sigmaY(ResolutionFunction2DGaussian self) -> double"}, + { "ResolutionFunction2DGaussian_validate", _wrap_ResolutionFunction2DGaussian_validate, METH_O, "ResolutionFunction2DGaussian_validate(ResolutionFunction2DGaussian self) -> std::string"}, + { "delete_ResolutionFunction2DGaussian", _wrap_delete_ResolutionFunction2DGaussian, METH_O, "delete_ResolutionFunction2DGaussian(ResolutionFunction2DGaussian self)"}, + { "ResolutionFunction2DGaussian_swigregister", ResolutionFunction2DGaussian_swigregister, METH_O, NULL}, + { "ResolutionFunction2DGaussian_swiginit", ResolutionFunction2DGaussian_swiginit, METH_VARARGS, NULL}, { "IDetector_clone", _wrap_IDetector_clone, METH_O, "IDetector_clone(IDetector self) -> IDetector"}, { "delete_IDetector", _wrap_delete_IDetector, METH_O, "delete_IDetector(IDetector self)"}, { "IDetector_setDetectorNormal", _wrap_IDetector_setDetectorNormal, METH_VARARGS, "IDetector_setDetectorNormal(IDetector self, R3 arg2)"}, @@ -38220,32 +37978,20 @@ static PyMethodDef SwigMethods[] = { { "SphericalDetector_indexOfSpecular", _wrap_SphericalDetector_indexOfSpecular, METH_VARARGS, "SphericalDetector_indexOfSpecular(SphericalDetector self, Beam beam) -> size_t"}, { "SphericalDetector_swigregister", SphericalDetector_swigregister, METH_O, NULL}, { "SphericalDetector_swiginit", SphericalDetector_swiginit, METH_VARARGS, NULL}, + { "meanRelVecDiff", _wrap_meanRelVecDiff, METH_VARARGS, "meanRelVecDiff(vdouble1d_t dat, vdouble1d_t ref) -> double"}, + { "relativeDifferenceField", _wrap_relativeDifferenceField, METH_VARARGS, "relativeDifferenceField(Datafield dat, Datafield ref) -> Datafield"}, + { "meanRelativeDifference", _wrap_meanRelativeDifference, METH_VARARGS, "meanRelativeDifference(Datafield dat, Datafield ref) -> double"}, + { "checkRelativeDifference", _wrap_checkRelativeDifference, METH_VARARGS, "checkRelativeDifference(vdouble1d_t dat, vdouble1d_t ref, double threshold) -> bool"}, { "readData1D", _wrap_readData1D, METH_VARARGS, "readData1D(std::string const & file_name, IO::Filetype1D ftype=unknown1D, ImportSettings1D const * importSettings=None) -> Datafield"}, { "readData2D", _wrap_readData2D, METH_VARARGS, "readData2D(std::string const & file_name, IO::Filetype2D ftype=unknown2D) -> Datafield"}, { "writeDatafield", _wrap_writeDatafield, METH_VARARGS, "writeDatafield(Datafield data, std::string const & file_name)"}, { "dataMatchesFile", _wrap_dataMatchesFile, METH_VARARGS, "dataMatchesFile(Datafield data, std::string const & refFileName, double tol) -> bool"}, - { "new_SimulationResult", _wrap_new_SimulationResult, METH_VARARGS, "\n" - "SimulationResult(Datafield data)\n" - "SimulationResult(SimulationResult other)\n" - "new_SimulationResult(SimulationResult other) -> SimulationResult\n" - ""}, - { "delete_SimulationResult", _wrap_delete_SimulationResult, METH_O, "delete_SimulationResult(SimulationResult self)"}, - { "SimulationResult_extracted_field", _wrap_SimulationResult_extracted_field, METH_O, "SimulationResult_extracted_field(SimulationResult self) -> Datafield"}, - { "SimulationResult_axisMinMax", _wrap_SimulationResult_axisMinMax, METH_VARARGS, "SimulationResult_axisMinMax(SimulationResult self, size_t i) -> pvacuum_double_t"}, - { "SimulationResult_convertedBinCenters", _wrap_SimulationResult_convertedBinCenters, METH_VARARGS, "SimulationResult_convertedBinCenters(SimulationResult self, size_t i_axis) -> vdouble1d_t"}, - { "SimulationResult_setTitle", _wrap_SimulationResult_setTitle, METH_VARARGS, "SimulationResult_setTitle(SimulationResult self, std::string const & title)"}, - { "SimulationResult_title", _wrap_SimulationResult_title, METH_O, "SimulationResult_title(SimulationResult self) -> std::string"}, - { "SimulationResult_swigregister", SimulationResult_swigregister, METH_O, NULL}, - { "SimulationResult_swiginit", SimulationResult_swiginit, METH_VARARGS, NULL}, { NULL, NULL, 0, NULL } }; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ -static void *_p_SimulationResultTo_p_Datafield(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((Datafield *) ((SimulationResult *) x)); -} static void *_p_EllipseTo_p_ICloneable(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((ICloneable *) (IShape2D *) ((Ellipse *) x)); } @@ -38394,7 +38140,6 @@ static swig_type_info _swigt__p_RectangularPixel = {"_p_RectangularPixel", "Rect static swig_type_info _swigt__p_ResolutionFunction2DGaussian = {"_p_ResolutionFunction2DGaussian", "ResolutionFunction2DGaussian *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Rotation3DT_double_t = {"_p_Rotation3DT_double_t", "RotMatrix *|Rotation3D< double > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Scale = {"_p_Scale", "Scale *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_SimulationResult = {"_p_SimulationResult", "SimulationResult *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_SphericalDetector = {"_p_SphericalDetector", "SphericalDetector *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Vec3T_double_t = {"_p_Vec3T_double_t", "R3 *|std::vector< Vec3< double > >::value_type *|Vec3< double > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Vec3T_int_t = {"_p_Vec3T_int_t", "I3 *|Vec3< int > *", 0, 0, (void*)0, 0}; @@ -38486,7 +38231,6 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_ResolutionFunction2DGaussian, &_swigt__p_Rotation3DT_double_t, &_swigt__p_Scale, - &_swigt__p_SimulationResult, &_swigt__p_SphericalDetector, &_swigt__p_Vec3T_double_t, &_swigt__p_Vec3T_int_t, @@ -38550,7 +38294,7 @@ static swig_type_info *swig_type_initial[] = { static swig_cast_info _swigc__p_Beam[] = { {&_swigt__p_Beam, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Bin1D[] = { {&_swigt__p_Bin1D, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Coords[] = { {&_swigt__p_Coords, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Datafield[] = { {&_swigt__p_Datafield, 0, 0, 0}, {&_swigt__p_SimulationResult, _p_SimulationResultTo_p_Datafield, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Datafield[] = { {&_swigt__p_Datafield, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_DetectorMask[] = { {&_swigt__p_DetectorMask, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Ellipse[] = { {&_swigt__p_Ellipse, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_FootprintGauss[] = { {&_swigt__p_FootprintGauss, 0, 0, 0},{0, 0, 0, 0}}; @@ -38578,7 +38322,6 @@ static swig_cast_info _swigc__p_RectangularPixel[] = { {&_swigt__p_RectangularP static swig_cast_info _swigc__p_ResolutionFunction2DGaussian[] = { {&_swigt__p_ResolutionFunction2DGaussian, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Rotation3DT_double_t[] = { {&_swigt__p_Rotation3DT_double_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Scale[] = { {&_swigt__p_Scale, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_SimulationResult[] = { {&_swigt__p_SimulationResult, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_SphericalDetector[] = { {&_swigt__p_SphericalDetector, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Vec3T_double_t[] = { {&_swigt__p_Vec3T_double_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Vec3T_int_t[] = { {&_swigt__p_Vec3T_int_t, 0, 0, 0},{0, 0, 0, 0}}; @@ -38670,7 +38413,6 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_ResolutionFunction2DGaussian, _swigc__p_Rotation3DT_double_t, _swigc__p_Scale, - _swigc__p_SimulationResult, _swigc__p_SphericalDetector, _swigc__p_Vec3T_double_t, _swigc__p_Vec3T_int_t, diff --git a/auto/Wrap/libBornAgainSim.py b/auto/Wrap/libBornAgainSim.py index f26346adaa4c4a4c3cc263af011e14c3e26499e8..8623d76312249b89008b9e9654bbe62dd488a44e 100644 --- a/auto/Wrap/libBornAgainSim.py +++ b/auto/Wrap/libBornAgainSim.py @@ -2353,23 +2353,23 @@ class FitObjective(object): return _libBornAgainSim.FitObjective_evaluate_residuals_cpp(self, params) def simulationResult(self, i_item=0): - r"""simulationResult(FitObjective self, size_t i_item=0) -> SimulationResult""" + r"""simulationResult(FitObjective self, size_t i_item=0) -> Datafield""" return _libBornAgainSim.FitObjective_simulationResult(self, i_item) def experimentalData(self, i_item=0): - r"""experimentalData(FitObjective self, size_t i_item=0) -> SimulationResult""" + r"""experimentalData(FitObjective self, size_t i_item=0) -> Datafield""" return _libBornAgainSim.FitObjective_experimentalData(self, i_item) def uncertaintyData_cpp(self, i_item=0): - r"""uncertaintyData_cpp(FitObjective self, size_t i_item=0) -> SimulationResult""" + r"""uncertaintyData_cpp(FitObjective self, size_t i_item=0) -> Datafield""" return _libBornAgainSim.FitObjective_uncertaintyData_cpp(self, i_item) def relativeDifference(self, i_item=0): - r"""relativeDifference(FitObjective self, size_t i_item=0) -> SimulationResult""" + r"""relativeDifference(FitObjective self, size_t i_item=0) -> Datafield""" return _libBornAgainSim.FitObjective_relativeDifference(self, i_item) def absoluteDifference(self, i_item=0): - r"""absoluteDifference(FitObjective self, size_t i_item=0) -> SimulationResult""" + r"""absoluteDifference(FitObjective self, size_t i_item=0) -> Datafield""" return _libBornAgainSim.FitObjective_absoluteDifference(self, i_item) def experimental_array(self): @@ -2709,7 +2709,7 @@ class ISimulation(libBornAgainParam.INode): return _libBornAgainSim.ISimulation_options(self) def simulate(self): - r"""simulate(ISimulation self) -> SimulationResult""" + r"""simulate(ISimulation self) -> Datafield""" return _libBornAgainSim.ISimulation_simulate(self) # Register ISimulation in _libBornAgainSim: diff --git a/auto/Wrap/libBornAgainSim_wrap.cpp b/auto/Wrap/libBornAgainSim_wrap.cpp index 15f8ea99be2125a7c08078a1b0b7c8a6d0be3b4f..57b1286ff178ab3ab4c6f6e610f19110664cca3e 100644 --- a/auto/Wrap/libBornAgainSim_wrap.cpp +++ b/auto/Wrap/libBornAgainSim_wrap.cpp @@ -3390,37 +3390,37 @@ namespace Swig { #define SWIGTYPE_p_Beam swig_types[1] #define SWIGTYPE_p_ChiSquaredModule swig_types[2] #define SWIGTYPE_p_ConstantBackground swig_types[3] -#define SWIGTYPE_p_DepthprobeSimulation swig_types[4] -#define SWIGTYPE_p_FitObjective swig_types[5] -#define SWIGTYPE_p_Frame swig_types[6] -#define SWIGTYPE_p_IBackground swig_types[7] -#define SWIGTYPE_p_IBeamScan swig_types[8] -#define SWIGTYPE_p_IChiSquaredModule swig_types[9] -#define SWIGTYPE_p_ICloneable swig_types[10] -#define SWIGTYPE_p_IDetector swig_types[11] -#define SWIGTYPE_p_IDistribution1D swig_types[12] -#define SWIGTYPE_p_IFootprint swig_types[13] -#define SWIGTYPE_p_IIntensityFunction swig_types[14] -#define SWIGTYPE_p_INode swig_types[15] -#define SWIGTYPE_p_ISampleNode swig_types[16] -#define SWIGTYPE_p_ISimulation swig_types[17] -#define SWIGTYPE_p_IVarianceFunction swig_types[18] -#define SWIGTYPE_p_IntensityFunctionLog swig_types[19] -#define SWIGTYPE_p_IntensityFunctionSqrt swig_types[20] -#define SWIGTYPE_p_IterationInfo swig_types[21] -#define SWIGTYPE_p_LambdaScan swig_types[22] -#define SWIGTYPE_p_MultiLayer swig_types[23] -#define SWIGTYPE_p_OffspecDetector swig_types[24] -#define SWIGTYPE_p_OffspecSimulation swig_types[25] -#define SWIGTYPE_p_PoissonBackground swig_types[26] -#define SWIGTYPE_p_PyBuilderCallback swig_types[27] -#define SWIGTYPE_p_PyObserverCallback swig_types[28] -#define SWIGTYPE_p_QzScan swig_types[29] -#define SWIGTYPE_p_Rotation3DT_double_t swig_types[30] -#define SWIGTYPE_p_Scale swig_types[31] -#define SWIGTYPE_p_ScatteringSimulation swig_types[32] -#define SWIGTYPE_p_SimulationOptions swig_types[33] -#define SWIGTYPE_p_SimulationResult swig_types[34] +#define SWIGTYPE_p_Datafield swig_types[4] +#define SWIGTYPE_p_DepthprobeSimulation swig_types[5] +#define SWIGTYPE_p_FitObjective swig_types[6] +#define SWIGTYPE_p_Frame swig_types[7] +#define SWIGTYPE_p_IBackground swig_types[8] +#define SWIGTYPE_p_IBeamScan swig_types[9] +#define SWIGTYPE_p_IChiSquaredModule swig_types[10] +#define SWIGTYPE_p_ICloneable swig_types[11] +#define SWIGTYPE_p_IDetector swig_types[12] +#define SWIGTYPE_p_IDistribution1D swig_types[13] +#define SWIGTYPE_p_IFootprint swig_types[14] +#define SWIGTYPE_p_IIntensityFunction swig_types[15] +#define SWIGTYPE_p_INode swig_types[16] +#define SWIGTYPE_p_ISampleNode swig_types[17] +#define SWIGTYPE_p_ISimulation swig_types[18] +#define SWIGTYPE_p_IVarianceFunction swig_types[19] +#define SWIGTYPE_p_IntensityFunctionLog swig_types[20] +#define SWIGTYPE_p_IntensityFunctionSqrt swig_types[21] +#define SWIGTYPE_p_IterationInfo swig_types[22] +#define SWIGTYPE_p_LambdaScan swig_types[23] +#define SWIGTYPE_p_MultiLayer swig_types[24] +#define SWIGTYPE_p_OffspecDetector swig_types[25] +#define SWIGTYPE_p_OffspecSimulation swig_types[26] +#define SWIGTYPE_p_PoissonBackground swig_types[27] +#define SWIGTYPE_p_PyBuilderCallback swig_types[28] +#define SWIGTYPE_p_PyObserverCallback swig_types[29] +#define SWIGTYPE_p_QzScan swig_types[30] +#define SWIGTYPE_p_Rotation3DT_double_t swig_types[31] +#define SWIGTYPE_p_Scale swig_types[32] +#define SWIGTYPE_p_ScatteringSimulation swig_types[33] +#define SWIGTYPE_p_SimulationOptions swig_types[34] #define SWIGTYPE_p_SpecularSimulation swig_types[35] #define SWIGTYPE_p_VarianceConstantFunction swig_types[36] #define SWIGTYPE_p_VarianceSimFunction swig_types[37] @@ -7022,7 +7022,6 @@ SWIGINTERN void std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg__insert__SWIG_ #include "Base/Axis/Frame.h" #include "Device/Data/Datafield.h" -#include "Device/Histo/SimulationResult.h" #include "Fit/Minimizer/MinimizerResult.h" @@ -30895,7 +30894,7 @@ SWIGINTERN PyObject *_wrap_FitObjective_simulationResult__SWIG_0(PyObject *self, int res1 = 0 ; size_t val2 ; int ecode2 = 0 ; - SwigValueWrapper< SimulationResult > result; + SwigValueWrapper< Datafield > result; if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_FitObjective, 0 | 0 ); @@ -30909,7 +30908,7 @@ SWIGINTERN PyObject *_wrap_FitObjective_simulationResult__SWIG_0(PyObject *self, } arg2 = static_cast< size_t >(val2); result = ((FitObjective const *)arg1)->simulationResult(arg2); - resultobj = SWIG_NewPointerObj((new SimulationResult(result)), SWIGTYPE_p_SimulationResult, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Datafield(result)), SWIGTYPE_p_Datafield, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -30921,7 +30920,7 @@ SWIGINTERN PyObject *_wrap_FitObjective_simulationResult__SWIG_1(PyObject *self, FitObjective *arg1 = (FitObjective *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - SwigValueWrapper< SimulationResult > result; + SwigValueWrapper< Datafield > result; if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_FitObjective, 0 | 0 ); @@ -30930,7 +30929,7 @@ SWIGINTERN PyObject *_wrap_FitObjective_simulationResult__SWIG_1(PyObject *self, } arg1 = reinterpret_cast< FitObjective * >(argp1); result = ((FitObjective const *)arg1)->simulationResult(); - resultobj = SWIG_NewPointerObj((new SimulationResult(result)), SWIGTYPE_p_SimulationResult, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Datafield(result)), SWIGTYPE_p_Datafield, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -30987,7 +30986,7 @@ SWIGINTERN PyObject *_wrap_FitObjective_experimentalData__SWIG_0(PyObject *self, int res1 = 0 ; size_t val2 ; int ecode2 = 0 ; - SwigValueWrapper< SimulationResult > result; + SwigValueWrapper< Datafield > result; if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_FitObjective, 0 | 0 ); @@ -31001,7 +31000,7 @@ SWIGINTERN PyObject *_wrap_FitObjective_experimentalData__SWIG_0(PyObject *self, } arg2 = static_cast< size_t >(val2); result = ((FitObjective const *)arg1)->experimentalData(arg2); - resultobj = SWIG_NewPointerObj((new SimulationResult(result)), SWIGTYPE_p_SimulationResult, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Datafield(result)), SWIGTYPE_p_Datafield, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -31013,7 +31012,7 @@ SWIGINTERN PyObject *_wrap_FitObjective_experimentalData__SWIG_1(PyObject *self, FitObjective *arg1 = (FitObjective *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - SwigValueWrapper< SimulationResult > result; + SwigValueWrapper< Datafield > result; if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_FitObjective, 0 | 0 ); @@ -31022,7 +31021,7 @@ SWIGINTERN PyObject *_wrap_FitObjective_experimentalData__SWIG_1(PyObject *self, } arg1 = reinterpret_cast< FitObjective * >(argp1); result = ((FitObjective const *)arg1)->experimentalData(); - resultobj = SWIG_NewPointerObj((new SimulationResult(result)), SWIGTYPE_p_SimulationResult, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Datafield(result)), SWIGTYPE_p_Datafield, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -31079,7 +31078,7 @@ SWIGINTERN PyObject *_wrap_FitObjective_uncertaintyData_cpp__SWIG_0(PyObject *se int res1 = 0 ; size_t val2 ; int ecode2 = 0 ; - SwigValueWrapper< SimulationResult > result; + SwigValueWrapper< Datafield > result; if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_FitObjective, 0 | 0 ); @@ -31093,7 +31092,7 @@ SWIGINTERN PyObject *_wrap_FitObjective_uncertaintyData_cpp__SWIG_0(PyObject *se } arg2 = static_cast< size_t >(val2); result = ((FitObjective const *)arg1)->uncertaintyData(arg2); - resultobj = SWIG_NewPointerObj((new SimulationResult(result)), SWIGTYPE_p_SimulationResult, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Datafield(result)), SWIGTYPE_p_Datafield, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -31105,7 +31104,7 @@ SWIGINTERN PyObject *_wrap_FitObjective_uncertaintyData_cpp__SWIG_1(PyObject *se FitObjective *arg1 = (FitObjective *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - SwigValueWrapper< SimulationResult > result; + SwigValueWrapper< Datafield > result; if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_FitObjective, 0 | 0 ); @@ -31114,7 +31113,7 @@ SWIGINTERN PyObject *_wrap_FitObjective_uncertaintyData_cpp__SWIG_1(PyObject *se } arg1 = reinterpret_cast< FitObjective * >(argp1); result = ((FitObjective const *)arg1)->uncertaintyData(); - resultobj = SWIG_NewPointerObj((new SimulationResult(result)), SWIGTYPE_p_SimulationResult, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Datafield(result)), SWIGTYPE_p_Datafield, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -31171,7 +31170,7 @@ SWIGINTERN PyObject *_wrap_FitObjective_relativeDifference__SWIG_0(PyObject *sel int res1 = 0 ; size_t val2 ; int ecode2 = 0 ; - SwigValueWrapper< SimulationResult > result; + SwigValueWrapper< Datafield > result; if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_FitObjective, 0 | 0 ); @@ -31185,7 +31184,7 @@ SWIGINTERN PyObject *_wrap_FitObjective_relativeDifference__SWIG_0(PyObject *sel } arg2 = static_cast< size_t >(val2); result = ((FitObjective const *)arg1)->relativeDifference(arg2); - resultobj = SWIG_NewPointerObj((new SimulationResult(result)), SWIGTYPE_p_SimulationResult, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Datafield(result)), SWIGTYPE_p_Datafield, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -31197,7 +31196,7 @@ SWIGINTERN PyObject *_wrap_FitObjective_relativeDifference__SWIG_1(PyObject *sel FitObjective *arg1 = (FitObjective *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - SwigValueWrapper< SimulationResult > result; + SwigValueWrapper< Datafield > result; if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_FitObjective, 0 | 0 ); @@ -31206,7 +31205,7 @@ SWIGINTERN PyObject *_wrap_FitObjective_relativeDifference__SWIG_1(PyObject *sel } arg1 = reinterpret_cast< FitObjective * >(argp1); result = ((FitObjective const *)arg1)->relativeDifference(); - resultobj = SWIG_NewPointerObj((new SimulationResult(result)), SWIGTYPE_p_SimulationResult, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Datafield(result)), SWIGTYPE_p_Datafield, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -31263,7 +31262,7 @@ SWIGINTERN PyObject *_wrap_FitObjective_absoluteDifference__SWIG_0(PyObject *sel int res1 = 0 ; size_t val2 ; int ecode2 = 0 ; - SwigValueWrapper< SimulationResult > result; + SwigValueWrapper< Datafield > result; if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_FitObjective, 0 | 0 ); @@ -31277,7 +31276,7 @@ SWIGINTERN PyObject *_wrap_FitObjective_absoluteDifference__SWIG_0(PyObject *sel } arg2 = static_cast< size_t >(val2); result = ((FitObjective const *)arg1)->absoluteDifference(arg2); - resultobj = SWIG_NewPointerObj((new SimulationResult(result)), SWIGTYPE_p_SimulationResult, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Datafield(result)), SWIGTYPE_p_Datafield, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -31289,7 +31288,7 @@ SWIGINTERN PyObject *_wrap_FitObjective_absoluteDifference__SWIG_1(PyObject *sel FitObjective *arg1 = (FitObjective *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - SwigValueWrapper< SimulationResult > result; + SwigValueWrapper< Datafield > result; if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_FitObjective, 0 | 0 ); @@ -31298,7 +31297,7 @@ SWIGINTERN PyObject *_wrap_FitObjective_absoluteDifference__SWIG_1(PyObject *sel } arg1 = reinterpret_cast< FitObjective * >(argp1); result = ((FitObjective const *)arg1)->absoluteDifference(); - resultobj = SWIG_NewPointerObj((new SimulationResult(result)), SWIGTYPE_p_SimulationResult, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Datafield(result)), SWIGTYPE_p_Datafield, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -33495,7 +33494,7 @@ SWIGINTERN PyObject *_wrap_ISimulation_simulate(PyObject *self, PyObject *args) void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; - SwigValueWrapper< SimulationResult > result; + SwigValueWrapper< Datafield > result; if (!args) SWIG_fail; swig_obj[0] = args; @@ -33505,7 +33504,7 @@ SWIGINTERN PyObject *_wrap_ISimulation_simulate(PyObject *self, PyObject *args) } arg1 = reinterpret_cast< ISimulation * >(argp1); result = (arg1)->simulate(); - resultobj = SWIG_NewPointerObj((new SimulationResult(result)), SWIGTYPE_p_SimulationResult, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Datafield(result)), SWIGTYPE_p_Datafield, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -36518,11 +36517,11 @@ static PyMethodDef SwigMethods[] = { ""}, { "FitObjective_evaluate_cpp", _wrap_FitObjective_evaluate_cpp, METH_VARARGS, "FitObjective_evaluate_cpp(FitObjective self, mumufit::Parameters const & params) -> double"}, { "FitObjective_evaluate_residuals_cpp", _wrap_FitObjective_evaluate_residuals_cpp, METH_VARARGS, "FitObjective_evaluate_residuals_cpp(FitObjective self, mumufit::Parameters const & params) -> vdouble1d_t"}, - { "FitObjective_simulationResult", _wrap_FitObjective_simulationResult, METH_VARARGS, "FitObjective_simulationResult(FitObjective self, size_t i_item=0) -> SimulationResult"}, - { "FitObjective_experimentalData", _wrap_FitObjective_experimentalData, METH_VARARGS, "FitObjective_experimentalData(FitObjective self, size_t i_item=0) -> SimulationResult"}, - { "FitObjective_uncertaintyData_cpp", _wrap_FitObjective_uncertaintyData_cpp, METH_VARARGS, "FitObjective_uncertaintyData_cpp(FitObjective self, size_t i_item=0) -> SimulationResult"}, - { "FitObjective_relativeDifference", _wrap_FitObjective_relativeDifference, METH_VARARGS, "FitObjective_relativeDifference(FitObjective self, size_t i_item=0) -> SimulationResult"}, - { "FitObjective_absoluteDifference", _wrap_FitObjective_absoluteDifference, METH_VARARGS, "FitObjective_absoluteDifference(FitObjective self, size_t i_item=0) -> SimulationResult"}, + { "FitObjective_simulationResult", _wrap_FitObjective_simulationResult, METH_VARARGS, "FitObjective_simulationResult(FitObjective self, size_t i_item=0) -> Datafield"}, + { "FitObjective_experimentalData", _wrap_FitObjective_experimentalData, METH_VARARGS, "FitObjective_experimentalData(FitObjective self, size_t i_item=0) -> Datafield"}, + { "FitObjective_uncertaintyData_cpp", _wrap_FitObjective_uncertaintyData_cpp, METH_VARARGS, "FitObjective_uncertaintyData_cpp(FitObjective self, size_t i_item=0) -> Datafield"}, + { "FitObjective_relativeDifference", _wrap_FitObjective_relativeDifference, METH_VARARGS, "FitObjective_relativeDifference(FitObjective self, size_t i_item=0) -> Datafield"}, + { "FitObjective_absoluteDifference", _wrap_FitObjective_absoluteDifference, METH_VARARGS, "FitObjective_absoluteDifference(FitObjective self, size_t i_item=0) -> Datafield"}, { "FitObjective_experimental_array", _wrap_FitObjective_experimental_array, METH_O, "FitObjective_experimental_array(FitObjective self) -> vdouble1d_t"}, { "FitObjective_simulation_array", _wrap_FitObjective_simulation_array, METH_O, "FitObjective_simulation_array(FitObjective self) -> vdouble1d_t"}, { "FitObjective_uncertainties_cpp", _wrap_FitObjective_uncertainties_cpp, METH_O, "FitObjective_uncertainties_cpp(FitObjective self) -> vdouble1d_t"}, @@ -36601,7 +36600,7 @@ static PyMethodDef SwigMethods[] = { { "ISimulation_addParameterDistribution", _wrap_ISimulation_addParameterDistribution, METH_VARARGS, "ISimulation_addParameterDistribution(ISimulation self, ParameterDistribution::WhichParameter whichParameter, IDistribution1D const & distribution)"}, { "ISimulation_setTerminalProgressMonitor", _wrap_ISimulation_setTerminalProgressMonitor, METH_O, "ISimulation_setTerminalProgressMonitor(ISimulation self)"}, { "ISimulation_options", _wrap_ISimulation_options, METH_O, "ISimulation_options(ISimulation self) -> SimulationOptions &"}, - { "ISimulation_simulate", _wrap_ISimulation_simulate, METH_O, "ISimulation_simulate(ISimulation self) -> SimulationResult"}, + { "ISimulation_simulate", _wrap_ISimulation_simulate, METH_O, "ISimulation_simulate(ISimulation self) -> Datafield"}, { "ISimulation_swigregister", ISimulation_swigregister, METH_O, NULL}, { "new_ScatteringSimulation", _wrap_new_ScatteringSimulation, METH_VARARGS, "new_ScatteringSimulation(Beam const & beam, MultiLayer const & sample, IDetector const & detector) -> ScatteringSimulation"}, { "delete_ScatteringSimulation", _wrap_delete_ScatteringSimulation, METH_O, "delete_ScatteringSimulation(ScatteringSimulation self)"}, @@ -36825,6 +36824,7 @@ static swig_type_info _swigt__p_AlphaScan = {"_p_AlphaScan", "AlphaScan *", 0, 0 static swig_type_info _swigt__p_Beam = {"_p_Beam", "Beam *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ChiSquaredModule = {"_p_ChiSquaredModule", "ChiSquaredModule *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ConstantBackground = {"_p_ConstantBackground", "ConstantBackground *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Datafield = {"_p_Datafield", "Datafield *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_DepthprobeSimulation = {"_p_DepthprobeSimulation", "DepthprobeSimulation *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_FitObjective = {"_p_FitObjective", "FitObjective *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_IBackground = {"_p_IBackground", "IBackground *", 0, 0, (void*)0, 0}; @@ -36855,7 +36855,6 @@ static swig_type_info _swigt__p_Rotation3DT_double_t = {"_p_Rotation3DT_double_t static swig_type_info _swigt__p_Scale = {"_p_Scale", "Scale *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ScatteringSimulation = {"_p_ScatteringSimulation", "ScatteringSimulation *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_SimulationOptions = {"_p_SimulationOptions", "SimulationOptions *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_SimulationResult = {"_p_SimulationResult", "SimulationResult *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_SpecularSimulation = {"_p_SpecularSimulation", "SpecularSimulation *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_VarianceConstantFunction = {"_p_VarianceConstantFunction", "VarianceConstantFunction *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_VarianceSimFunction = {"_p_VarianceSimFunction", "VarianceSimFunction *", 0, 0, (void*)0, 0}; @@ -36916,6 +36915,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_Beam, &_swigt__p_ChiSquaredModule, &_swigt__p_ConstantBackground, + &_swigt__p_Datafield, &_swigt__p_DepthprobeSimulation, &_swigt__p_FitObjective, &_swigt__p_Frame, @@ -36946,7 +36946,6 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_Scale, &_swigt__p_ScatteringSimulation, &_swigt__p_SimulationOptions, - &_swigt__p_SimulationResult, &_swigt__p_SpecularSimulation, &_swigt__p_VarianceConstantFunction, &_swigt__p_VarianceSimFunction, @@ -37007,6 +37006,7 @@ static swig_cast_info _swigc__p_AlphaScan[] = { {&_swigt__p_AlphaScan, 0, 0, 0} static swig_cast_info _swigc__p_Beam[] = { {&_swigt__p_Beam, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ChiSquaredModule[] = { {&_swigt__p_ChiSquaredModule, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ConstantBackground[] = { {&_swigt__p_ConstantBackground, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Datafield[] = { {&_swigt__p_Datafield, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_DepthprobeSimulation[] = { {&_swigt__p_DepthprobeSimulation, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_FitObjective[] = { {&_swigt__p_FitObjective, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_IBackground[] = { {&_swigt__p_IBackground, 0, 0, 0}, {&_swigt__p_ConstantBackground, _p_ConstantBackgroundTo_p_IBackground, 0, 0}, {&_swigt__p_PoissonBackground, _p_PoissonBackgroundTo_p_IBackground, 0, 0},{0, 0, 0, 0}}; @@ -37037,7 +37037,6 @@ static swig_cast_info _swigc__p_Rotation3DT_double_t[] = { {&_swigt__p_Rotation static swig_cast_info _swigc__p_Scale[] = { {&_swigt__p_Scale, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ScatteringSimulation[] = { {&_swigt__p_ScatteringSimulation, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_SimulationOptions[] = { {&_swigt__p_SimulationOptions, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_SimulationResult[] = { {&_swigt__p_SimulationResult, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_SpecularSimulation[] = { {&_swigt__p_SpecularSimulation, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_VarianceConstantFunction[] = { {&_swigt__p_VarianceConstantFunction, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_VarianceSimFunction[] = { {&_swigt__p_VarianceSimFunction, 0, 0, 0},{0, 0, 0, 0}}; @@ -37098,6 +37097,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_Beam, _swigc__p_ChiSquaredModule, _swigc__p_ConstantBackground, + _swigc__p_Datafield, _swigc__p_DepthprobeSimulation, _swigc__p_FitObjective, _swigc__p_Frame, @@ -37128,7 +37128,6 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_Scale, _swigc__p_ScatteringSimulation, _swigc__p_SimulationOptions, - _swigc__p_SimulationResult, _swigc__p_SpecularSimulation, _swigc__p_VarianceConstantFunction, _swigc__p_VarianceSimFunction, diff --git a/rawEx/fit/scatter2d/fit_along_slices.py b/rawEx/fit/scatter2d/fit_along_slices.py index 39498c4b8b5bab70decda7bf9a1ddcafcc902ce9..3036ee1ec66fc79340c8ed9ffc12303b8fe2aa61 100755 --- a/rawEx/fit/scatter2d/fit_along_slices.py +++ b/rawEx/fit/scatter2d/fit_along_slices.py @@ -121,8 +121,8 @@ class PlotObserver: """ self.fig.clf() - real_data = fit_objective.experimentalData().extracted_field() - simul_data = fit_objective.simulationResult().extracted_field() + real_data = fit_objective.experimentalData() + simul_data = fit_objective.simulationResult() # plot real data plt.subplot(2, 2, 1) diff --git a/rawEx/fit/specular/Honeycomb_fit.py b/rawEx/fit/specular/Honeycomb_fit.py index f8f9a96073799af461e0c7037003be3cffb0da1a..1f72e860a05b289d28408ee465c5a138c862a5da 100755 --- a/rawEx/fit/specular/Honeycomb_fit.py +++ b/rawEx/fit/specular/Honeycomb_fit.py @@ -109,7 +109,7 @@ def qr(result): """ Return q and reflectivity arrays from simulation result. """ - q = numpy.array(result.convertedBinCenters(0)) + q = numpy.array(result.axis(0).binCenters()) r = numpy.array(result.array()) return q, r diff --git a/rawEx/fit/specular/Pt_layer_fit.py b/rawEx/fit/specular/Pt_layer_fit.py index 170527753bf1d6f747602d8bd058eb69b21bbe20..456b8761d34156e48450c1d88092c3dcb779169f 100755 --- a/rawEx/fit/specular/Pt_layer_fit.py +++ b/rawEx/fit/specular/Pt_layer_fit.py @@ -88,7 +88,7 @@ def qr(result): """ Return q and reflectivity arrays from simulation result. """ - q = np.array(result.convertedBinCenters(0)) + q = np.array(result.axis(0).binCenters()) r = np.array(result.array()) return q, r diff --git a/rawEx/specular/PolarizedSpinAsymmetry.py b/rawEx/specular/PolarizedSpinAsymmetry.py index 01e333315874c14b27efde71b556f2ec51a28da3..312acf759d606e02da6918f0646541b9eb5e39e6 100755 --- a/rawEx/specular/PolarizedSpinAsymmetry.py +++ b/rawEx/specular/PolarizedSpinAsymmetry.py @@ -101,7 +101,7 @@ def qr(result): Returns two arrays that hold the q-values as well as the reflectivity from a given simulation result """ - q = numpy.array(result.convertedBinCenters(0)) + q = numpy.array(result.axis(0).binCenters()) r = numpy.array(result.npArray()) return q, r diff --git a/rawEx/varia/AccessingSimulationResults.py b/rawEx/varia/AccessingSimulationResults.py index a9be85156686e8b08f301db4ab1453499b1c365a..b5e5a0622f030a2698dae148076c2e95a9636837 100755 --- a/rawEx/varia/AccessingSimulationResults.py +++ b/rawEx/varia/AccessingSimulationResults.py @@ -113,6 +113,5 @@ if __name__ == '__main__': # Other supported extensions are .tif and .txt. # Besides compression .gz, we support .bz2, and uncompressed. - field = result.extracted_field() - plot(field) + plot(result) bp.show_or_export()