diff --git a/Base/Axis/ConstKBinAxis.cpp b/Base/Axis/ConstKBinAxis.cpp index 021cf83a071d50ec286fccddb68450d27e144fdf..f414d58af4f399c818f6fd11522325f8b6280fe0 100644 --- a/Base/Axis/ConstKBinAxis.cpp +++ b/Base/Axis/ConstKBinAxis.cpp @@ -15,8 +15,8 @@ #include "Base/Axis/ConstKBinAxis.h" #include "Base/Axis/Bin.h" #include "Base/Util/Algorithms.h" -#include <iomanip> #include <cmath> +#include <iomanip> ConstKBinAxis::ConstKBinAxis(const std::string& name, size_t nbins) : VariableBinAxis(name, nbins) diff --git a/Base/Axis/IAxis.h b/Base/Axis/IAxis.h index 1b5a51a27013ed53973ece97a695c221de26fa7e..fc658d2a9e53389b9eeaefe4887cdc41e4298792 100644 --- a/Base/Axis/IAxis.h +++ b/Base/Axis/IAxis.h @@ -16,9 +16,9 @@ #ifndef BORNAGAIN_BASE_AXIS_IAXIS_H #define BORNAGAIN_BASE_AXIS_IAXIS_H +#include <string> #include <utility> #include <vector> -#include <string> class Bin1D; diff --git a/Base/Py/PyUtils.cpp b/Base/Py/PyUtils.cpp index 3acccf123a1f0ce4060456c308b31cec50c473f7..387af49f5ec4279a3a8c5868db2ab53813ba03a9 100644 --- a/Base/Py/PyUtils.cpp +++ b/Base/Py/PyUtils.cpp @@ -186,7 +186,7 @@ PyObject* BaseUtils::Python::createNumpyArray(const std::vector<double>& data) PyObject* pyarray = PyArray_SimpleNew(ndim_numpy, ndimsizes_numpy, NPY_DOUBLE); delete[] ndimsizes_numpy; if (pyarray == nullptr) - throw std::runtime_error("ExportOutputData() -> Panic in PyArray_SimpleNew"); + throw std::runtime_error("ExportPowerfield() -> Panic in PyArray_SimpleNew"); // getting pointer to data buffer of numpy array double* array_buffer = (double*)PyArray_DATA((PyArrayObject*)pyarray); diff --git a/Base/Types/OwningVector.h b/Base/Types/OwningVector.h index 4b812acf87f30e8db7770e838204df770df864a8..6edc54602961589f831d66be33e532b53bbea187 100644 --- a/Base/Types/OwningVector.h +++ b/Base/Types/OwningVector.h @@ -20,9 +20,9 @@ #ifndef BORNAGAIN_BASE_TYPES_OWNINGVECTOR_H #define BORNAGAIN_BASE_TYPES_OWNINGVECTOR_H -#include <vector> #include <cstddef> #include <utility> +#include <vector> //! A vector of unique pointers to objects that are cloneable. //! diff --git a/Device/Coord/CoordSystem1D.cpp b/Device/Coord/CoordSystem1D.cpp index 88d5936fda01b70c0c6e192f167b474363bd360f..e783f632a968280adc18117567dad6507c867280 100644 --- a/Device/Coord/CoordSystem1D.cpp +++ b/Device/Coord/CoordSystem1D.cpp @@ -18,7 +18,7 @@ #include "Base/Math/Constants.h" #include "Base/Util/Assert.h" #include "Device/Coord/AxisNames.h" -#include "Device/Data/OutputData.h" +#include "Device/Data/Powerfield.h" #include <cmath> namespace { @@ -127,12 +127,12 @@ std::unique_ptr<const IAxis> CoordSystem1D::createConvertedAxis(size_t i_axis, return createTranslatedAxis(*coordinateAxis(), getTraslatorTo(units), axisName(0, units)); } -std::unique_ptr<OutputData<double>> -CoordSystem1D::createConvertedData(const OutputData<double>& data, Axes::Coords units) const +std::unique_ptr<Powerfield<double>> +CoordSystem1D::createConvertedData(const Powerfield<double>& data, Axes::Coords units) const { ASSERT(data.rank() == 1); - std::unique_ptr<OutputData<double>> result(new OutputData<double>); + std::unique_ptr<Powerfield<double>> result(new Powerfield<double>); auto q_axis = createConvertedAxis(0, units); result->addAxis(*q_axis); diff --git a/Device/Coord/CoordSystem1D.h b/Device/Coord/CoordSystem1D.h index 2a5820b789f7bebfae349ebc2bb79b1d30ecea11..7c5723c30b356afaed6b941a513cececb695cd60 100644 --- a/Device/Coord/CoordSystem1D.h +++ b/Device/Coord/CoordSystem1D.h @@ -53,8 +53,8 @@ public: std::unique_ptr<const IAxis> createConvertedAxis(size_t i_axis, Axes::Coords units) const override; - //! Creates OutputData array in converter units. - std::unique_ptr<OutputData<double>> createConvertedData(const OutputData<double>& data, + //! Creates Powerfield array in converter units. + std::unique_ptr<Powerfield<double>> createConvertedData(const Powerfield<double>& data, Axes::Coords units) const override; protected: diff --git a/Device/Coord/CoordSystem2D.h b/Device/Coord/CoordSystem2D.h index ccd0c9a7c03c0ba23fe21a0e52dd26d63e829fa4..910421c31721e72450febe4763a21b368d126eb5 100644 --- a/Device/Coord/CoordSystem2D.h +++ b/Device/Coord/CoordSystem2D.h @@ -80,8 +80,7 @@ private: class SphericalCoords : public CoordSystem2D { public: - SphericalCoords(const OwningVector<IAxis>& axes, const Direction& direction, - double wavelength); + SphericalCoords(const OwningVector<IAxis>& axes, const Direction& direction, double wavelength); ~SphericalCoords() override; SphericalCoords* clone() const override; diff --git a/Device/Coord/ICoordSystem.cpp b/Device/Coord/ICoordSystem.cpp index df1b09bcdb96e8b2e711b16d96f6739c11e6ed8f..25f3f27c33ef7d28b91db16f4d7805f0f8b220d6 100644 --- a/Device/Coord/ICoordSystem.cpp +++ b/Device/Coord/ICoordSystem.cpp @@ -14,13 +14,13 @@ #include "Device/Coord/ICoordSystem.h" #include "Device/Coord/AxisNames.h" -#include "Device/Data/OutputData.h" +#include "Device/Data/Powerfield.h" ICoordSystem::~ICoordSystem() = default; -std::unique_ptr<OutputData<double>> ICoordSystem::createOutputData(Axes::Coords units) const +std::unique_ptr<Powerfield<double>> ICoordSystem::createPowerfield(Axes::Coords units) const { - std::unique_ptr<OutputData<double>> result = std::make_unique<OutputData<double>>(); + std::unique_ptr<Powerfield<double>> result = std::make_unique<Powerfield<double>>(); for (size_t i = 0; i < dimension(); ++i) result->addAxis(*createConvertedAxis(i, units)); result->setAllTo(0.0); @@ -37,10 +37,10 @@ std::string ICoordSystem::axisName(size_t i_axis, const Axes::Coords units) cons return it->second; } -std::unique_ptr<OutputData<double>> -ICoordSystem::createConvertedData(const OutputData<double>& data, Axes::Coords units) const +std::unique_ptr<Powerfield<double>> +ICoordSystem::createConvertedData(const Powerfield<double>& data, Axes::Coords units) const { - std::unique_ptr<OutputData<double>> result(new OutputData<double>); + std::unique_ptr<Powerfield<double>> result(new Powerfield<double>); for (size_t i = 0; i < data.rank(); ++i) result->addAxis(*createConvertedAxis(i, units)); result->setRawDataVector(data.getRawDataVector()); diff --git a/Device/Coord/ICoordSystem.h b/Device/Coord/ICoordSystem.h index c315bbaf2f19cc145d69b6f22d69a879e4ce374c..95e6fa9e7873055450d3c38675b72a51462ef66a 100644 --- a/Device/Coord/ICoordSystem.h +++ b/Device/Coord/ICoordSystem.h @@ -29,7 +29,7 @@ class IAxis; template <class T> -class OutputData; +class Powerfield; //! Interface to provide axis translations to different units for simulation output @@ -45,7 +45,7 @@ public: ICoordSystem* clone() const override = 0; //! Returns zero-valued output data array in specified units - std::unique_ptr<OutputData<double>> createOutputData(Axes::Coords units) const; + std::unique_ptr<Powerfield<double>> createPowerfield(Axes::Coords units) const; virtual size_t dimension() const = 0; @@ -61,8 +61,8 @@ public: virtual std::unique_ptr<const IAxis> createConvertedAxis(size_t i_axis, Axes::Coords units) const = 0; - //! Creates OutputData array in converter units. - virtual std::unique_ptr<OutputData<double>> createConvertedData(const OutputData<double>& data, + //! Creates Powerfield array in converter units. + virtual std::unique_ptr<Powerfield<double>> createConvertedData(const Powerfield<double>& data, Axes::Coords units) const; protected: diff --git a/Device/Data/ArrayUtils.cpp b/Device/Data/ArrayUtils.cpp index 323934c3bc41c056b7415e845a3cba31b723e5e7..5ef6cfd64f9ebcad79a2575629b9cc9fa2204bf9 100644 --- a/Device/Data/ArrayUtils.cpp +++ b/Device/Data/ArrayUtils.cpp @@ -26,19 +26,19 @@ std::pair<size_t, size_t> DataUtils::Array::getShape(const std::vector<std::vect return std::make_pair(nrows, ncols); } -std::unique_ptr<OutputData<double>> DataUtils::Array::createData(const std::vector<double>& vec) +std::unique_ptr<Powerfield<double>> DataUtils::Array::createData(const std::vector<double>& vec) { - auto result = std::make_unique<OutputData<double>>(); + auto result = std::make_unique<Powerfield<double>>(); const size_t length = vec.size(); result->addAxis(FixedBinAxis("axis0", length, 0.0, static_cast<double>(length))); result->setRawDataVector(vec); return result; } -std::unique_ptr<OutputData<double>> +std::unique_ptr<Powerfield<double>> DataUtils::Array::createData(const std::vector<std::vector<double>>& vec) { - auto result = std::make_unique<OutputData<double>>(); + auto result = std::make_unique<Powerfield<double>>(); auto shape = DataUtils::Array::getShape(vec); const size_t nrows = shape.first; @@ -62,7 +62,7 @@ DataUtils::Array::createData(const std::vector<std::vector<double>>& vec) return result; } -std::vector<double> DataUtils::Array::createVector1D(const OutputData<double>& data) +std::vector<double> DataUtils::Array::createVector1D(const Powerfield<double>& data) { if (data.rank() != 1) throw std::runtime_error("DataUtils::Array::createVector1D() -> Error. Not 1D data."); @@ -71,7 +71,7 @@ std::vector<double> DataUtils::Array::createVector1D(const OutputData<double>& d return result; } -std::vector<std::vector<double>> DataUtils::Array::createVector2D(const OutputData<double>& data) +std::vector<std::vector<double>> DataUtils::Array::createVector2D(const Powerfield<double>& data) { std::vector<std::vector<double>> result; diff --git a/Device/Data/ArrayUtils.h b/Device/Data/ArrayUtils.h index 029c4a1db80b258facc1004978237f04e5a65c0f..87e9aade1ca617b81f50c4e3724e4db71a6e10db 100644 --- a/Device/Data/ArrayUtils.h +++ b/Device/Data/ArrayUtils.h @@ -20,7 +20,7 @@ #ifndef BORNAGAIN_DEVICE_DATA_ARRAYUTILS_H #define BORNAGAIN_DEVICE_DATA_ARRAYUTILS_H -#include "Device/Data/OutputData.h" +#include "Device/Data/Powerfield.h" #include <memory> #include <vector> @@ -31,15 +31,15 @@ namespace DataUtils::Array { //! Returns shape nrows, ncols of 2D array. std::pair<size_t, size_t> getShape(const std::vector<std::vector<double>>& data); -std::unique_ptr<OutputData<double>> createData(const std::vector<double>& vec); +std::unique_ptr<Powerfield<double>> createData(const std::vector<double>& vec); -std::unique_ptr<OutputData<double>> createData(const std::vector<std::vector<double>>& vec); +std::unique_ptr<Powerfield<double>> createData(const std::vector<std::vector<double>>& vec); -//! Creates 1D vector from OutputData. -std::vector<double> createVector1D(const OutputData<double>& data); +//! Creates 1D vector from Powerfield. +std::vector<double> createVector1D(const Powerfield<double>& data); -//! Creates 2D vector from OutputData. -std::vector<std::vector<double>> createVector2D(const OutputData<double>& data); +//! Creates 2D vector from Powerfield. +std::vector<std::vector<double>> createVector2D(const Powerfield<double>& data); } // namespace DataUtils::Array diff --git a/Device/Data/DataUtils.cpp b/Device/Data/DataUtils.cpp index 66f1067e8d33daa9108ba0336ffe2e20318a1af1..4a0080b05f96be89311950e58827cac4ffa1609f 100644 --- a/Device/Data/DataUtils.cpp +++ b/Device/Data/DataUtils.cpp @@ -33,11 +33,11 @@ std::vector<std::vector<double>> FT2DArray(const std::vector<std::vector<double> } // namespace //! Returns relative difference between two data sets sum(dat[i] - ref[i])/ref[i]). -double DataUtils::Data::relativeDataDifference(const OutputData<double>& dat, - const OutputData<double>& ref) +double DataUtils::Data::relativeDataDifference(const Powerfield<double>& dat, + const Powerfield<double>& ref) { if (!dat.hasSameDimensions(ref)) - throw std::runtime_error("OutputData dimension differs from reference"); + throw std::runtime_error("Powerfield dimension differs from reference"); double diff = 0.0; for (size_t i = 0; i < dat.getAllocatedSize(); ++i) @@ -48,29 +48,29 @@ double DataUtils::Data::relativeDataDifference(const OutputData<double>& dat, return diff; } -std::unique_ptr<OutputData<double>> -DataUtils::Data::createRelativeDifferenceData(const OutputData<double>& data, - const OutputData<double>& reference) +std::unique_ptr<Powerfield<double>> +DataUtils::Data::createRelativeDifferenceData(const Powerfield<double>& data, + const Powerfield<double>& reference) { if (!data.hasSameDimensions(reference)) throw std::runtime_error("DataUtils::Data::createRelativeDifferenceData() -> " "Error. Different dimensions of data and reference."); - std::unique_ptr<OutputData<double>> result(reference.clone()); + std::unique_ptr<Powerfield<double>> result(reference.clone()); for (size_t i = 0; i < result->getAllocatedSize(); ++i) (*result)[i] = Numeric::GetRelativeDifference(data[i], reference[i]); return result; } -std::unique_ptr<OutputData<double>> -DataUtils::Data::createRearrangedDataSet(const OutputData<double>& data, int n) +std::unique_ptr<Powerfield<double>> +DataUtils::Data::createRearrangedDataSet(const Powerfield<double>& data, int n) { if (data.rank() != 2) throw std::runtime_error("DataUtils::Data::rotateDataByN90Deg()" " -> Error! Works only on two-dimensional data"); n = (4 + n % 4) % 4; if (n == 0) - return std::unique_ptr<OutputData<double>>(data.clone()); - std::unique_ptr<OutputData<double>> output(new OutputData<double>()); + return std::unique_ptr<Powerfield<double>>(data.clone()); + std::unique_ptr<Powerfield<double>> output(new Powerfield<double>()); // swapping axes if necessary const IAxis& x_axis = data.axis(0); @@ -107,15 +107,15 @@ DataUtils::Data::createRearrangedDataSet(const OutputData<double>& data, int n) return output; } -std::unique_ptr<OutputData<double>> -DataUtils::Data::createClippedDataSet(const OutputData<double>& origin, double x1, double y1, +std::unique_ptr<Powerfield<double>> +DataUtils::Data::createClippedDataSet(const Powerfield<double>& origin, double x1, double y1, double x2, double y2) { if (origin.rank() != 2) throw std::runtime_error("DataUtils::Data::createClippedData()" " -> Error! Works only on two-dimensional data"); - std::unique_ptr<OutputData<double>> result(new OutputData<double>); + std::unique_ptr<Powerfield<double>> result(new Powerfield<double>); for (size_t i_axis = 0; i_axis < origin.rank(); i_axis++) { std::unique_ptr<IAxis> new_axis{origin.axis(i_axis).clone()}; if (i_axis == 0) @@ -126,8 +126,8 @@ DataUtils::Data::createClippedDataSet(const OutputData<double>& origin, double x } result->setAllTo(0.0); - OutputData<double>::const_iterator it_origin = origin.begin(); - OutputData<double>::iterator it_result = result->begin(); + Powerfield<double>::const_iterator it_origin = origin.begin(); + Powerfield<double>::iterator it_result = result->begin(); while (it_origin != origin.end()) { double x = origin.getAxisValue(it_origin.getIndex(), 0); double y = origin.getAxisValue(it_origin.getIndex(), 1); @@ -174,23 +174,23 @@ double DataUtils::Data::coordinateFromBinf(double value, const IAxis& axis) return result; } -void DataUtils::Data::coordinateToBinf(double& x, double& y, const OutputData<double>& data) +void DataUtils::Data::coordinateToBinf(double& x, double& y, const Powerfield<double>& data) { x = coordinateToBinf(x, data.axis(0)); y = coordinateToBinf(y, data.axis(1)); } -void DataUtils::Data::coordinateFromBinf(double& x, double& y, const OutputData<double>& data) +void DataUtils::Data::coordinateFromBinf(double& x, double& y, const Powerfield<double>& data) { x = coordinateFromBinf(x, data.axis(0)); y = coordinateFromBinf(y, data.axis(1)); } std::vector<std::vector<double>> -DataUtils::Data::create2DArrayfromOutputData(const OutputData<double>& data) +DataUtils::Data::create2DArrayfromPowerfield(const Powerfield<double>& data) { if (data.rank() != 2) - throw std::runtime_error("DataUtils::Data::create2DArrayfromOutputData() -> " + throw std::runtime_error("DataUtils::Data::create2DArrayfromPowerfield() -> " "Error! Works only on two-dimensional data"); std::vector<std::vector<double>> array_2d; @@ -212,10 +212,10 @@ DataUtils::Data::create2DArrayfromOutputData(const OutputData<double>& data) return array_2d; } -std::unique_ptr<OutputData<double>> -DataUtils::Data::createOutputDatafrom2DArray(const std::vector<std::vector<double>>& array_2d) +std::unique_ptr<Powerfield<double>> +DataUtils::Data::createPowerfieldfrom2DArray(const std::vector<std::vector<double>>& array_2d) { - std::unique_ptr<OutputData<double>> result(new OutputData<double>); + std::unique_ptr<Powerfield<double>> result(new Powerfield<double>); size_t nrows = array_2d.size(); size_t ncols = array_2d[0].size(); @@ -234,20 +234,20 @@ DataUtils::Data::createOutputDatafrom2DArray(const std::vector<std::vector<doubl return result; } -std::unique_ptr<OutputData<double>> DataUtils::Data::createFFT(const OutputData<double>& data) +std::unique_ptr<Powerfield<double>> DataUtils::Data::createFFT(const Powerfield<double>& data) { - auto array_2d = DataUtils::Data::create2DArrayfromOutputData(data); + auto array_2d = DataUtils::Data::create2DArrayfromPowerfield(data); auto fft_array_2d = FT2DArray(array_2d); - return DataUtils::Data::createOutputDatafrom2DArray(fft_array_2d); + return DataUtils::Data::createPowerfieldfrom2DArray(fft_array_2d); } -OutputData<double>* DataUtils::Data::importArrayToOutputData(const std::vector<double>& vec) +Powerfield<double>* DataUtils::Data::importArrayToPowerfield(const std::vector<double>& vec) { return DataUtils::Array::createData(vec).release(); } -OutputData<double>* -DataUtils::Data::importArrayToOutputData(const std::vector<std::vector<double>>& vec) +Powerfield<double>* +DataUtils::Data::importArrayToPowerfield(const std::vector<std::vector<double>>& vec) { return DataUtils::Array::createData(vec).release(); } diff --git a/Device/Data/DataUtils.h b/Device/Data/DataUtils.h index 0f19301306b569025f2a74c3720137ce9b58e480..2960e8ccf77c2ca7d4dec0191e5d92c070664741 100644 --- a/Device/Data/DataUtils.h +++ b/Device/Data/DataUtils.h @@ -15,13 +15,13 @@ #ifndef BORNAGAIN_DEVICE_DATA_DATAUTILS_H #define BORNAGAIN_DEVICE_DATA_DATAUTILS_H -#include "Device/Data/OutputData.h" +#include "Device/Data/Powerfield.h" #include <memory> namespace DataUtils::Data { //! Returns relative difference between two data sets sum(dat[i] - ref[i])/ref[i]). -double relativeDataDifference(const OutputData<double>& dat, const OutputData<double>& ref); +double relativeDataDifference(const Powerfield<double>& dat, const Powerfield<double>& ref); //! Transforms coordinate on axis into the bin-fraction-coordinate. double coordinateToBinf(double coordinate, const IAxis& axis); @@ -29,41 +29,41 @@ double coordinateToBinf(double coordinate, const IAxis& axis); //! Transforms bin-fraction-coordinate into axis coordinate. double coordinateFromBinf(double value, const IAxis& axis); -//! Transforms x,y coordinate from OutputData axes coordinates to bin-fraction-coordinates. -void coordinateToBinf(double& x, double& y, const OutputData<double>& data); +//! Transforms x,y coordinate from Powerfield axes coordinates to bin-fraction-coordinates. +void coordinateToBinf(double& x, double& y, const Powerfield<double>& data); -//! Transforms x,y coordinate from bin-fraction-coordinates to OutputData's axes coordinates. -void coordinateFromBinf(double& x, double& y, const OutputData<double>& data); +//! Transforms x,y coordinate from bin-fraction-coordinates to Powerfield's axes coordinates. +void coordinateFromBinf(double& x, double& y, const Powerfield<double>& data); -//! Creates a vector of vectors of double (2D Array) from OutputData. -std::vector<std::vector<double>> create2DArrayfromOutputData(const OutputData<double>& data); +//! Creates a vector of vectors of double (2D Array) from Powerfield. +std::vector<std::vector<double>> create2DArrayfromPowerfield(const Powerfield<double>& data); //! Reads 1D array of doubles to Python, for use in persistence test -OutputData<double>* importArrayToOutputData(const std::vector<double>& vec); +Powerfield<double>* importArrayToPowerfield(const std::vector<double>& vec); //! Reads 2D array of doubles to Python, for use in persistence test -OutputData<double>* importArrayToOutputData(const std::vector<std::vector<double>>& vec); +Powerfield<double>* importArrayToPowerfield(const std::vector<std::vector<double>>& vec); #ifndef SWIG -std::unique_ptr<OutputData<double>> -createRelativeDifferenceData(const OutputData<double>& data, const OutputData<double>& reference); +std::unique_ptr<Powerfield<double>> +createRelativeDifferenceData(const Powerfield<double>& data, const Powerfield<double>& reference); //! Returns new object with input data rotated by //! n*90 deg counterclockwise (n > 0) or clockwise (n < 0) //! Axes are swapped if the data is effectively rotated by 90 or 270 degrees //! Applicable to 2D arrays only -std::unique_ptr<OutputData<double>> createRearrangedDataSet(const OutputData<double>& data, int n); +std::unique_ptr<Powerfield<double>> createRearrangedDataSet(const Powerfield<double>& data, int n); //! Returns new IntensityData objects which axes clipped to represent the specified rectangle. -std::unique_ptr<OutputData<double>> -createClippedDataSet(const OutputData<double>& origin, double x1, double y1, double x2, double y2); +std::unique_ptr<Powerfield<double>> +createClippedDataSet(const Powerfield<double>& origin, double x1, double y1, double x2, double y2); -//! Creates OutputData from a 2D Array. -std::unique_ptr<OutputData<double>> -createOutputDatafrom2DArray(const std::vector<std::vector<double>>& array_2d); +//! Creates Powerfield from a 2D Array. +std::unique_ptr<Powerfield<double>> +createPowerfieldfrom2DArray(const std::vector<std::vector<double>>& array_2d); -//! Creates Fourier Transform (OutputData format) of intensity map (OutputData format). -std::unique_ptr<OutputData<double>> createFFT(const OutputData<double>& data); +//! Creates Fourier Transform (Powerfield format) of intensity map (Powerfield format). +std::unique_ptr<Powerfield<double>> createFFT(const Powerfield<double>& data); #endif // SWIG diff --git a/Device/Data/OutputData.cpp b/Device/Data/Powerfield.cpp similarity index 85% rename from Device/Data/OutputData.cpp rename to Device/Data/Powerfield.cpp index 7b75e42b2eca4d91b328e25dc60962007752445c..798184a8630534ea027fd678723586f659db7fe0 100644 --- a/Device/Data/OutputData.cpp +++ b/Device/Data/Powerfield.cpp @@ -2,8 +2,8 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file Device/Data/OutputData.cpp -//! @brief Implements template specializations of class OutputData.cpp. +//! @file Device/Data/Powerfield.cpp +//! @brief Implements template specializations of class Powerfield.cpp. //! //! @homepage http://www.bornagainproject.org //! @license GNU General Public License v3 or higher (see COPYING) @@ -12,7 +12,7 @@ // // ************************************************************************************************ -#include "Device/Data/OutputData.h" +#include "Device/Data/Powerfield.h" #include "Device/Data/CumulativeValue.h" #ifdef BORNAGAIN_PYTHON @@ -20,7 +20,7 @@ #include "Base/Py/PyCore.h" template <> -PyObject* OutputData<double>::getArray() const +PyObject* Powerfield<double>::getArray() const { std::vector<size_t> dimensions; for (size_t i = 0; i < rank(); i++) @@ -63,19 +63,19 @@ PyObject* OutputData<double>::getArray() const #endif // BORNAGAIN_PYTHON template <> -double OutputData<double>::getValue(size_t index) const +double Powerfield<double>::getValue(size_t index) const { return (*this)[index]; } template <> -double OutputData<CumulativeValue>::getValue(size_t index) const +double Powerfield<CumulativeValue>::getValue(size_t index) const { return (*this)[index].getContent(); } template <> -const OutputData<double>& OutputData<double>::normalizedToMaximum() +const Powerfield<double>& Powerfield<double>::normalizedToMaximum() { double maxval = max(); ASSERT(maxval > 0); diff --git a/Device/Data/OutputData.h b/Device/Data/Powerfield.h similarity index 79% rename from Device/Data/OutputData.h rename to Device/Data/Powerfield.h index 6fc5fc32b02b606cb6e8abba74b69911fcfc69de..113b4eccb3074155dcc5853476d4cde231248a19 100644 --- a/Device/Data/OutputData.h +++ b/Device/Data/Powerfield.h @@ -2,8 +2,8 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file Device/Data/OutputData.h -//! @brief Defines and implements templated class OutputData. +//! @file Device/Data/Powerfield.h +//! @brief Defines and implements templated class Powerfield. //! //! @homepage http://www.bornagainproject.org //! @license GNU General Public License v3 or higher (see COPYING) @@ -12,17 +12,17 @@ // // ************************************************************************************************ -#ifndef BORNAGAIN_DEVICE_DATA_OUTPUTDATA_H -#define BORNAGAIN_DEVICE_DATA_OUTPUTDATA_H +#ifndef BORNAGAIN_DEVICE_DATA_POWERFIELD_H +#define BORNAGAIN_DEVICE_DATA_POWERFIELD_H -#include "Base/Axis/FixedBinAxis.h" #include "Base/Axis/Bin.h" +#include "Base/Axis/FixedBinAxis.h" #include "Base/Py/PyObject.h" #include "Base/Types/CloneableVector.h" #include "Base/Util/Assert.h" #include "Base/Util/ThreadInfo.h" #include "Device/Data/LLData.h" -#include "Device/Data/OutputDataIterator.h" +#include "Device/Data/PowerfieldIterator.h" #include <sstream> using std::size_t; @@ -32,21 +32,21 @@ using std::size_t; //! @ingroup tools template <class T> -class OutputData { +class Powerfield { public: using value_type = T; - OutputData(); - OutputData(const OutputData&) = delete; - OutputData(OutputData&&); - const OutputData& operator=(const OutputData&) = delete; - ~OutputData(); - OutputData* clone() const; + Powerfield(); + Powerfield(const Powerfield&) = delete; + Powerfield(Powerfield&&); + const Powerfield& operator=(const Powerfield&) = delete; + ~Powerfield(); + Powerfield* clone() const; - void copyFrom(const OutputData<T>& other); + void copyFrom(const Powerfield<T>& other); template <class U> - void copyShapeFrom(const OutputData<U>& other); - OutputData<double>* meanValues() const; + void copyShapeFrom(const Powerfield<U>& other); + Powerfield<double>* meanValues() const; void addAxis(const IAxis& new_axis); void addAxis(const std::string& name, size_t size, double start, double end); @@ -81,14 +81,14 @@ public: // iterators - friend class OutputDataIterator<T, OutputData<T>>; - friend class OutputDataIterator<const T, const OutputData<T>>; + friend class PowerfieldIterator<T, Powerfield<T>>; + friend class PowerfieldIterator<const T, const Powerfield<T>>; //! Read/write iterator type - using iterator = OutputDataIterator<T, OutputData<T>>; + using iterator = PowerfieldIterator<T, Powerfield<T>>; //! Read-only iterator type - using const_iterator = OutputDataIterator<const T, const OutputData<T>>; + using const_iterator = PowerfieldIterator<const T, const Powerfield<T>>; //! Returns read/write iterator that points to the first element iterator begin(); @@ -178,16 +178,16 @@ public: void setRawDataArray(const T* source); //! addition-assignment operator for two output data - const OutputData<T>& operator+=(const OutputData<T>& right); + const Powerfield<T>& operator+=(const Powerfield<T>& right); //! substraction-assignment operator for two output data - const OutputData<T>& operator-=(const OutputData<T>& right); + const Powerfield<T>& operator-=(const Powerfield<T>& right); //! division-assignment operator for two output data - const OutputData<T>& operator/=(const OutputData<T>& right); + const Powerfield<T>& operator/=(const Powerfield<T>& right); //! multiplication-assignment operator for two output data - const OutputData<T>& operator*=(const OutputData<T>& right); + const Powerfield<T>& operator*=(const Powerfield<T>& right); //! Returns value or summed value, depending on T double getValue(size_t index) const; @@ -210,11 +210,11 @@ public: //! Returns true if object have same dimensions and number of axes bins template <class U> - bool hasSameDimensions(const OutputData<U>& right) const; + bool hasSameDimensions(const Powerfield<U>& right) const; //! Returns true if objects a) have same dimensions b) bin boundaries of axes coincide template <class U> - bool hasSameShape(const OutputData<U>& right) const; + bool hasSameShape(const Powerfield<U>& right) const; #ifdef BORNAGAIN_PYTHON //! Returns data as Python numpy array @@ -227,7 +227,7 @@ public: //! Allocates memory for current dimensions configuration void allocate(); - const OutputData<double>& normalizedToMaximum(); + const Powerfield<double>& normalizedToMaximum(); private: //! Returns serial number of axis with given name @@ -247,7 +247,7 @@ private: // --------------------------------------------------------------------- // template <class T> -OutputData<T>::OutputData(OutputData<T>&& other) +Powerfield<T>::Powerfield(Powerfield<T>&& other) { m_axes = std::move(other.m_axes); m_ll_data = other.m_ll_data; @@ -257,30 +257,30 @@ OutputData<T>::OutputData(OutputData<T>&& other) } template <class T> -OutputData<T>::OutputData() +Powerfield<T>::Powerfield() : m_ll_data(nullptr) { allocate(); } template <class T> -OutputData<T>::~OutputData() +Powerfield<T>::~Powerfield() { clear(); delete m_ll_data; } template <class T> -OutputData<T>* OutputData<T>::clone() const +Powerfield<T>* Powerfield<T>::clone() const { - auto* result = new OutputData<T>(); + auto* result = new Powerfield<T>(); result->m_axes = m_axes; (*result->m_ll_data) = *m_ll_data; return result; } template <class T> -void OutputData<T>::copyFrom(const OutputData<T>& other) +void Powerfield<T>::copyFrom(const Powerfield<T>& other) { clear(); m_axes = other.m_axes; @@ -292,7 +292,7 @@ void OutputData<T>::copyFrom(const OutputData<T>& other) template <class T> template <class U> -void OutputData<T>::copyShapeFrom(const OutputData<U>& other) +void Powerfield<T>::copyShapeFrom(const Powerfield<U>& other) { clear(); size_t rank = other.rank(); @@ -301,9 +301,9 @@ void OutputData<T>::copyShapeFrom(const OutputData<U>& other) } template <class T> -OutputData<double>* OutputData<T>::meanValues() const +Powerfield<double>* Powerfield<T>::meanValues() const { - auto* result = new OutputData<double>(); + auto* result = new Powerfield<double>(); result->copyShapeFrom(*this); result->allocate(); for (size_t i = 0; i < m_ll_data->getTotalSize(); ++i) @@ -312,7 +312,7 @@ OutputData<double>* OutputData<T>::meanValues() const } template <class T> -void OutputData<T>::addAxis(const IAxis& new_axis) +void Powerfield<T>::addAxis(const IAxis& new_axis) { ASSERT(!axisNameExists(new_axis.axisName())); if (new_axis.size() > 0) { @@ -322,7 +322,7 @@ void OutputData<T>::addAxis(const IAxis& new_axis) } template <class T> -void OutputData<T>::addAxis(const std::string& name, size_t size, double start, double end) +void Powerfield<T>::addAxis(const std::string& name, size_t size, double start, double end) { ASSERT(!axisNameExists(name)); FixedBinAxis new_axis(name, size, start, end); @@ -330,13 +330,13 @@ void OutputData<T>::addAxis(const std::string& name, size_t size, double start, } template <class T> -const IAxis& OutputData<T>::axis(size_t serial_number) const +const IAxis& Powerfield<T>::axis(size_t serial_number) const { return *m_axes[serial_number]; } template <class T> -inline std::vector<size_t> OutputData<T>::getAllSizes() const +inline std::vector<size_t> Powerfield<T>::getAllSizes() const { ASSERT(m_ll_data); std::vector<size_t> result; @@ -348,7 +348,7 @@ inline std::vector<size_t> OutputData<T>::getAllSizes() const } template <class T> -inline std::vector<T> OutputData<T>::getRawDataVector() const +inline std::vector<T> Powerfield<T>::getRawDataVector() const { ASSERT(m_ll_data); std::vector<T> result; @@ -358,21 +358,21 @@ inline std::vector<T> OutputData<T>::getRawDataVector() const } template <class T> -typename OutputData<T>::iterator OutputData<T>::begin() +typename Powerfield<T>::iterator Powerfield<T>::begin() { - typename OutputData<T>::iterator result(this); + typename Powerfield<T>::iterator result(this); return result; } template <class T> -typename OutputData<T>::const_iterator OutputData<T>::begin() const +typename Powerfield<T>::const_iterator Powerfield<T>::begin() const { - typename OutputData<T>::const_iterator result(this); + typename Powerfield<T>::const_iterator result(this); return result; } template <class T> -std::vector<int> OutputData<T>::getAxesBinIndices(size_t global_index) const +std::vector<int> Powerfield<T>::getAxesBinIndices(size_t global_index) const { ASSERT(m_ll_data); size_t remainder = global_index; @@ -387,7 +387,7 @@ std::vector<int> OutputData<T>::getAxesBinIndices(size_t global_index) const } template <class T> -size_t OutputData<T>::getAxisBinIndex(size_t global_index, size_t i_selected_axis) const +size_t Powerfield<T>::getAxisBinIndex(size_t global_index, size_t i_selected_axis) const { ASSERT(m_ll_data); size_t remainder(global_index); @@ -402,13 +402,13 @@ size_t OutputData<T>::getAxisBinIndex(size_t global_index, size_t i_selected_axi } template <class T> -size_t OutputData<T>::getAxisBinIndex(size_t global_index, const std::string& axis_name) const +size_t Powerfield<T>::getAxisBinIndex(size_t global_index, const std::string& axis_name) const { return getAxisBinIndex(global_index, getAxisIndex(axis_name)); } template <class T> -size_t OutputData<T>::toGlobalIndex(const std::vector<unsigned>& axes_indices) const +size_t Powerfield<T>::toGlobalIndex(const std::vector<unsigned>& axes_indices) const { ASSERT(m_ll_data); ASSERT(axes_indices.size() == m_ll_data->rank()); @@ -423,7 +423,7 @@ size_t OutputData<T>::toGlobalIndex(const std::vector<unsigned>& axes_indices) c } template <class T> -size_t OutputData<T>::findGlobalIndex(const std::vector<double>& coordinates) const +size_t Powerfield<T>::findGlobalIndex(const std::vector<double>& coordinates) const { ASSERT(m_ll_data); ASSERT(coordinates.size() == m_ll_data->rank()); @@ -435,20 +435,20 @@ size_t OutputData<T>::findGlobalIndex(const std::vector<double>& coordinates) co } template <class T> -double OutputData<T>::getAxisValue(size_t global_index, size_t i_selected_axis) const +double Powerfield<T>::getAxisValue(size_t global_index, size_t i_selected_axis) const { auto axis_index = getAxisBinIndex(global_index, i_selected_axis); return (*m_axes[i_selected_axis])[axis_index]; } template <class T> -double OutputData<T>::getAxisValue(size_t global_index, const std::string& axis_name) const +double Powerfield<T>::getAxisValue(size_t global_index, const std::string& axis_name) const { return getAxisValue(global_index, getAxisIndex(axis_name)); } template <class T> -std::vector<double> OutputData<T>::getAxesValues(size_t global_index) const +std::vector<double> Powerfield<T>::getAxesValues(size_t global_index) const { std::vector<int> indices = getAxesBinIndices(global_index); std::vector<double> result; @@ -458,48 +458,48 @@ std::vector<double> OutputData<T>::getAxesValues(size_t global_index) const } template <class T> -Bin1D OutputData<T>::getAxisBin(size_t global_index, size_t i_selected_axis) const +Bin1D Powerfield<T>::getAxisBin(size_t global_index, size_t i_selected_axis) const { auto axis_index = getAxisBinIndex(global_index, i_selected_axis); return m_axes[i_selected_axis]->bin(axis_index); } template <class T> -Bin1D OutputData<T>::getAxisBin(size_t global_index, const std::string& axis_name) const +Bin1D Powerfield<T>::getAxisBin(size_t global_index, const std::string& axis_name) const { return getAxisBin(global_index, getAxisIndex(axis_name)); } template <class T> -inline T OutputData<T>::totalSum() const +inline T Powerfield<T>::totalSum() const { ASSERT(m_ll_data); return m_ll_data->getTotalSum(); } template <class T> -inline T OutputData<T>::max() const +inline T Powerfield<T>::max() const { ASSERT(m_ll_data); return m_ll_data->max(); } template <class T> -void OutputData<T>::clear() +void Powerfield<T>::clear() { m_axes.clear(); allocate(); } template <class T> -void OutputData<T>::setAllTo(const T& value) +void Powerfield<T>::setAllTo(const T& value) { ASSERT(m_ll_data); m_ll_data->setAll(value); } template <class T> -void OutputData<T>::setAxisSizes(size_t rank, int* n_dims) +void Powerfield<T>::setAxisSizes(size_t rank, int* n_dims) { clear(); std::string basename("axis"); @@ -511,7 +511,7 @@ void OutputData<T>::setAxisSizes(size_t rank, int* n_dims) } template <class T> -const OutputData<T>& OutputData<T>::operator+=(const OutputData<T>& right) +const Powerfield<T>& Powerfield<T>::operator+=(const Powerfield<T>& right) { ASSERT(m_ll_data); *this->m_ll_data += *right.m_ll_data; @@ -519,7 +519,7 @@ const OutputData<T>& OutputData<T>::operator+=(const OutputData<T>& right) } template <class T> -const OutputData<T>& OutputData<T>::operator-=(const OutputData<T>& right) +const Powerfield<T>& Powerfield<T>::operator-=(const Powerfield<T>& right) { ASSERT(m_ll_data); *this->m_ll_data -= *right.m_ll_data; @@ -527,7 +527,7 @@ const OutputData<T>& OutputData<T>::operator-=(const OutputData<T>& right) } template <class T> -const OutputData<T>& OutputData<T>::operator*=(const OutputData<T>& right) +const Powerfield<T>& Powerfield<T>::operator*=(const Powerfield<T>& right) { ASSERT(m_ll_data); *this->m_ll_data *= *right.m_ll_data; @@ -535,7 +535,7 @@ const OutputData<T>& OutputData<T>::operator*=(const OutputData<T>& right) } template <class T> -bool OutputData<T>::isInitialized() const +bool Powerfield<T>::isInitialized() const { if (!m_ll_data) return false; @@ -547,7 +547,7 @@ bool OutputData<T>::isInitialized() const } template <class T> -const OutputData<T>& OutputData<T>::operator/=(const OutputData<T>& right) +const Powerfield<T>& Powerfield<T>::operator/=(const Powerfield<T>& right) { ASSERT(m_ll_data); *this->m_ll_data /= *right.m_ll_data; @@ -555,7 +555,7 @@ const OutputData<T>& OutputData<T>::operator/=(const OutputData<T>& right) } template <class T> -void OutputData<T>::allocate() +void Powerfield<T>::allocate() { delete m_ll_data; size_t rank = m_axes.size(); @@ -569,7 +569,7 @@ void OutputData<T>::allocate() } template <class T> -inline void OutputData<T>::setRawDataVector(const std::vector<T>& data_vector) +inline void Powerfield<T>::setRawDataVector(const std::vector<T>& data_vector) { ASSERT(data_vector.size() == getAllocatedSize()); for (size_t i = 0; i < getAllocatedSize(); ++i) @@ -577,7 +577,7 @@ inline void OutputData<T>::setRawDataVector(const std::vector<T>& data_vector) } template <class T> -inline void OutputData<T>::setRawDataArray(const T* source) +inline void Powerfield<T>::setRawDataArray(const T* source) { for (size_t i = 0; i < getAllocatedSize(); ++i) (*m_ll_data)[i] = source[i]; @@ -586,7 +586,7 @@ inline void OutputData<T>::setRawDataArray(const T* source) //! Returns true if object have same dimensions template <class T> template <class U> -inline bool OutputData<T>::hasSameDimensions(const OutputData<U>& right) const +inline bool Powerfield<T>::hasSameDimensions(const Powerfield<U>& right) const { if (!isInitialized()) return false; @@ -603,7 +603,7 @@ inline bool OutputData<T>::hasSameDimensions(const OutputData<U>& right) const //! Returns true if object have same dimensions and shape of axis template <class T> template <class U> -bool OutputData<T>::hasSameShape(const OutputData<U>& right) const +bool Powerfield<T>::hasSameShape(const Powerfield<U>& right) const { if (!hasSameDimensions(right)) return false; @@ -617,12 +617,12 @@ bool OutputData<T>::hasSameShape(const OutputData<U>& right) const #ifdef BORNAGAIN_PYTHON //! Returns data as Python numpy array template <> -PyObject* OutputData<double>::getArray() const; +PyObject* Powerfield<double>::getArray() const; #endif //! Returns index of axis template <class T> -size_t OutputData<T>::getAxisIndex(const std::string& axis_name) const +size_t Powerfield<T>::getAxisIndex(const std::string& axis_name) const { for (size_t i = 0; i < m_axes.size(); ++i) if (m_axes[i]->axisName() == axis_name) @@ -631,7 +631,7 @@ size_t OutputData<T>::getAxisIndex(const std::string& axis_name) const } template <class T> -bool OutputData<T>::axisNameExists(const std::string& axis_name) const +bool Powerfield<T>::axisNameExists(const std::string& axis_name) const { for (size_t i = 0; i < m_axes.size(); ++i) if (m_axes[i]->axisName() == axis_name) @@ -640,4 +640,4 @@ bool OutputData<T>::axisNameExists(const std::string& axis_name) const } #endif // USER_API -#endif // BORNAGAIN_DEVICE_DATA_OUTPUTDATA_H +#endif // BORNAGAIN_DEVICE_DATA_POWERFIELD_H diff --git a/Device/Data/OutputDataIterator.h b/Device/Data/PowerfieldIterator.h similarity index 61% rename from Device/Data/OutputDataIterator.h rename to Device/Data/PowerfieldIterator.h index 4c1264c0562ef5bba244781dd6d506c47c96d864..7c7f4bd587a9fdc3799cbb7755380a258a365766 100644 --- a/Device/Data/OutputDataIterator.h +++ b/Device/Data/PowerfieldIterator.h @@ -2,8 +2,8 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file Device/Data/OutputDataIterator.h -//! @brief Defines and implements template class OutputDataIterator. +//! @file Device/Data/PowerfieldIterator.h +//! @brief Defines and implements template class PowerfieldIterator. //! //! @homepage http://www.bornagainproject.org //! @license GNU General Public License v3 or higher (see COPYING) @@ -17,47 +17,47 @@ #endif #ifndef USER_API -#ifndef BORNAGAIN_DEVICE_DATA_OUTPUTDATAITERATOR_H -#define BORNAGAIN_DEVICE_DATA_OUTPUTDATAITERATOR_H +#ifndef BORNAGAIN_DEVICE_DATA_POWERFIELDITERATOR_H +#define BORNAGAIN_DEVICE_DATA_POWERFIELDITERATOR_H #include <cstddef> #include <iterator> #include <utility> -//! Iterator for underlying OutputData container. +//! Iterator for underlying Powerfield container. template <class TValue, class TContainer> -class OutputDataIterator { +class PowerfieldIterator { public: //! Empty constructor to comply with stl forward iterators - OutputDataIterator(); + PowerfieldIterator(); //! constructor - OutputDataIterator(TContainer* p_output_data, size_t start_at_index = 0); + PowerfieldIterator(TContainer* p_output_data, size_t start_at_index = 0); //! templated copy construction template <class TValue2, class TContainer2> - OutputDataIterator(const OutputDataIterator<TValue2, TContainer2>& other); + PowerfieldIterator(const PowerfieldIterator<TValue2, TContainer2>& other); //! non-templated copy construction - OutputDataIterator(const OutputDataIterator<TValue, TContainer>& other); + PowerfieldIterator(const PowerfieldIterator<TValue, TContainer>& other); //! templated copy assignment template <class TValue2, class TContainer2> - OutputDataIterator<TValue, TContainer>& - operator=(const OutputDataIterator<TValue2, TContainer2>& right); + PowerfieldIterator<TValue, TContainer>& + operator=(const PowerfieldIterator<TValue2, TContainer2>& right); //! non-templated copy asssignment - OutputDataIterator<TValue, TContainer>& - operator=(const OutputDataIterator<TValue, TContainer>& right); + PowerfieldIterator<TValue, TContainer>& + operator=(const PowerfieldIterator<TValue, TContainer>& right); - ~OutputDataIterator(); + ~PowerfieldIterator(); //! prefix increment - OutputDataIterator<TValue, TContainer>& operator++(); + PowerfieldIterator<TValue, TContainer>& operator++(); //! postfix increment - OutputDataIterator<TValue, TContainer> operator++(int); + PowerfieldIterator<TValue, TContainer> operator++(int); //! retrieve current element TValue& operator*() const; @@ -72,7 +72,7 @@ public: TContainer* getContainer() const { return m_output_data; } //! Swaps iterators - void swap(OutputDataIterator<TValue, TContainer>& other); + void swap(PowerfieldIterator<TValue, TContainer>& other); // typedefs for std::iterator_traits using iterator_category = std::forward_iterator_tag; @@ -92,31 +92,31 @@ private: //! make Swappable template <class TValue, class TContainer> -void swap(OutputDataIterator<TValue, TContainer>& left, - OutputDataIterator<TValue, TContainer>& right) +void swap(PowerfieldIterator<TValue, TContainer>& left, + PowerfieldIterator<TValue, TContainer>& right) { left.swap(right); } //! test for equality template <class TValue1, class TContainer1, class TValue2, class TContainer2> -bool operator==(const OutputDataIterator<TValue1, TContainer1>& left, - const OutputDataIterator<TValue2, TContainer2>& right); +bool operator==(const PowerfieldIterator<TValue1, TContainer1>& left, + const PowerfieldIterator<TValue2, TContainer2>& right); //! test for inequality template <class TValue1, class TContainer1, class TValue2, class TContainer2> -bool operator!=(const OutputDataIterator<TValue1, TContainer1>& left, - const OutputDataIterator<TValue2, TContainer2>& right); +bool operator!=(const PowerfieldIterator<TValue1, TContainer1>& left, + const PowerfieldIterator<TValue2, TContainer2>& right); template <class TValue, class TContainer> -OutputDataIterator<TValue, TContainer>::OutputDataIterator() +PowerfieldIterator<TValue, TContainer>::PowerfieldIterator() : m_current_index(0) , m_output_data(0) { } template <class TValue, class TContainer> -OutputDataIterator<TValue, TContainer>::OutputDataIterator(TContainer* p_output_data, +PowerfieldIterator<TValue, TContainer>::PowerfieldIterator(TContainer* p_output_data, size_t start_at_index) : m_current_index(start_at_index) , m_output_data(p_output_data) @@ -125,8 +125,8 @@ OutputDataIterator<TValue, TContainer>::OutputDataIterator(TContainer* p_output_ template <class TValue, class TContainer> template <class TValue2, class TContainer2> -OutputDataIterator<TValue, TContainer>::OutputDataIterator( - const OutputDataIterator<TValue2, TContainer2>& other) +PowerfieldIterator<TValue, TContainer>::PowerfieldIterator( + const PowerfieldIterator<TValue2, TContainer2>& other) : m_current_index(0) , m_output_data(0) { @@ -135,8 +135,8 @@ OutputDataIterator<TValue, TContainer>::OutputDataIterator( } template <class TValue, class TContainer> -OutputDataIterator<TValue, TContainer>::OutputDataIterator( - const OutputDataIterator<TValue, TContainer>& other) +PowerfieldIterator<TValue, TContainer>::PowerfieldIterator( + const PowerfieldIterator<TValue, TContainer>& other) : m_current_index(0) , m_output_data(0) { @@ -146,28 +146,28 @@ OutputDataIterator<TValue, TContainer>::OutputDataIterator( template <class TValue, class TContainer> template <class TValue2, class TContainer2> -OutputDataIterator<TValue, TContainer>& OutputDataIterator<TValue, TContainer>::operator=( - const OutputDataIterator<TValue2, TContainer2>& right) +PowerfieldIterator<TValue, TContainer>& PowerfieldIterator<TValue, TContainer>::operator=( + const PowerfieldIterator<TValue2, TContainer2>& right) { - OutputDataIterator<TValue, TContainer> copy(right); + PowerfieldIterator<TValue, TContainer> copy(right); swap(copy); return *this; } template <class TValue, class TContainer> -OutputDataIterator<TValue, TContainer>& OutputDataIterator<TValue, TContainer>::operator=( - const OutputDataIterator<TValue, TContainer>& right) +PowerfieldIterator<TValue, TContainer>& PowerfieldIterator<TValue, TContainer>::operator=( + const PowerfieldIterator<TValue, TContainer>& right) { - OutputDataIterator<TValue, TContainer> copy(right); + PowerfieldIterator<TValue, TContainer> copy(right); swap(copy); return *this; } template <class TValue, class TContainer> -OutputDataIterator<TValue, TContainer>::~OutputDataIterator() = default; +PowerfieldIterator<TValue, TContainer>::~PowerfieldIterator() = default; template <class TValue, class TContainer> -OutputDataIterator<TValue, TContainer>& OutputDataIterator<TValue, TContainer>::operator++() +PowerfieldIterator<TValue, TContainer>& PowerfieldIterator<TValue, TContainer>::operator++() { if (m_current_index < m_output_data->getAllocatedSize()) { ++m_current_index; @@ -176,27 +176,27 @@ OutputDataIterator<TValue, TContainer>& OutputDataIterator<TValue, TContainer>:: } template <class TValue, class TContainer> -OutputDataIterator<TValue, TContainer> OutputDataIterator<TValue, TContainer>::operator++(int /**/) +PowerfieldIterator<TValue, TContainer> PowerfieldIterator<TValue, TContainer>::operator++(int /**/) { - OutputDataIterator<TValue, TContainer> result(*this); + PowerfieldIterator<TValue, TContainer> result(*this); this->operator++(); return result; } template <class TValue, class TContainer> -TValue& OutputDataIterator<TValue, TContainer>::operator*() const +TValue& PowerfieldIterator<TValue, TContainer>::operator*() const { return (*m_output_data)[m_current_index]; } template <class TValue, class TContainer> -TValue* OutputDataIterator<TValue, TContainer>::operator->() const +TValue* PowerfieldIterator<TValue, TContainer>::operator->() const { return &((*m_output_data)[m_current_index]); } template <class TValue, class TContainer> -void OutputDataIterator<TValue, TContainer>::swap(OutputDataIterator<TValue, TContainer>& other) +void PowerfieldIterator<TValue, TContainer>::swap(PowerfieldIterator<TValue, TContainer>& other) { std::swap(this->m_current_index, other.m_current_index); std::swap(this->m_output_data, other.m_output_data); @@ -204,19 +204,19 @@ void OutputDataIterator<TValue, TContainer>::swap(OutputDataIterator<TValue, TCo //! test for equality template <class TValue1, class TContainer1, class TValue2, class TContainer2> -bool operator==(const OutputDataIterator<TValue1, TContainer1>& left, - const OutputDataIterator<TValue2, TContainer2>& right) +bool operator==(const PowerfieldIterator<TValue1, TContainer1>& left, + const PowerfieldIterator<TValue2, TContainer2>& right) { return left.getContainer() == right.getContainer() && left.getIndex() == right.getIndex(); } //! test for inequality template <class TValue1, class TContainer1, class TValue2, class TContainer2> -bool operator!=(const OutputDataIterator<TValue1, TContainer1>& left, - const OutputDataIterator<TValue2, TContainer2>& right) +bool operator!=(const PowerfieldIterator<TValue1, TContainer1>& left, + const PowerfieldIterator<TValue2, TContainer2>& right) { return !(left == right); } -#endif // BORNAGAIN_DEVICE_DATA_OUTPUTDATAITERATOR_H +#endif // BORNAGAIN_DEVICE_DATA_POWERFIELDITERATOR_H #endif // USER_API diff --git a/Device/Detector/IDetector.cpp b/Device/Detector/IDetector.cpp index 45dae952392ff9e70301046ecbd8320241cc4b4d..cd22adf324a093bb45817c6f36def7f8f0ccc511 100644 --- a/Device/Detector/IDetector.cpp +++ b/Device/Detector/IDetector.cpp @@ -170,7 +170,7 @@ void IDetector::resetRegionOfInterest() m_explicitROI.clear(); } -void IDetector::applyDetectorResolution(OutputData<double>* p_intensity_map) const +void IDetector::applyDetectorResolution(Powerfield<double>* p_intensity_map) const { ASSERT(p_intensity_map); @@ -178,7 +178,7 @@ void IDetector::applyDetectorResolution(OutputData<double>* p_intensity_map) con m_detector_resolution->applyDetectorResolution(p_intensity_map); if (detectorMask() && detectorMask()->hasMasks()) { // sets amplitude in masked areas to zero - std::unique_ptr<OutputData<double>> buff(new OutputData<double>()); + std::unique_ptr<Powerfield<double>> buff(new Powerfield<double>()); buff->copyShapeFrom(*p_intensity_map); iterateOverNonMaskedPoints([&](const_iterator it) { @@ -194,10 +194,10 @@ const IDetectorResolution* IDetector::detectorResolution() const return m_detector_resolution.get(); } -OutputData<double>* IDetector::createDetectorIntensity( +Powerfield<double>* IDetector::createDetectorIntensity( const std::vector<std::unique_ptr<DiffuseElement>>& elements) const { - std::unique_ptr<OutputData<double>> detectorMap(createDetectorMap()); + std::unique_ptr<Powerfield<double>> detectorMap(createDetectorMap()); ASSERT(detectorMap); setDataToDetectorMap(*detectorMap, elements); if (m_detector_resolution) @@ -206,12 +206,12 @@ OutputData<double>* IDetector::createDetectorIntensity( return detectorMap.release(); } -std::unique_ptr<OutputData<double>> IDetector::createDetectorMap() const +std::unique_ptr<Powerfield<double>> IDetector::createDetectorMap() const { const size_t dim = dimension(); ASSERT(dim != 0); - std::unique_ptr<OutputData<double>> result(new OutputData<double>); + std::unique_ptr<Powerfield<double>> result(new Powerfield<double>); for (size_t iAxis = 0; iAxis < dim; ++iAxis) { std::unique_ptr<IAxis> tempAxis(axis(iAxis).clone()); tempAxis->clip(regionOfInterestBounds(iAxis)); @@ -222,7 +222,7 @@ std::unique_ptr<OutputData<double>> IDetector::createDetectorMap() const } void IDetector::setDataToDetectorMap( - OutputData<double>& detectorMap, + Powerfield<double>& detectorMap, const std::vector<std::unique_ptr<DiffuseElement>>& elements) const { if (elements.empty()) diff --git a/Device/Detector/IDetector.h b/Device/Detector/IDetector.h index 040378d46dbf51729c3758df3f4aa4575733a815..493ed0e5e53e13eb4c7f1af7ba6660b090db75af 100644 --- a/Device/Detector/IDetector.h +++ b/Device/Detector/IDetector.h @@ -15,8 +15,8 @@ #ifndef BORNAGAIN_DEVICE_DETECTOR_IDETECTOR_H #define BORNAGAIN_DEVICE_DETECTOR_IDETECTOR_H -#include "Base/Types/OwningVector.h" #include "Base/Types/ICloneable.h" +#include "Base/Types/OwningVector.h" #include "Device/Coord/Axes.h" // enum Axes::Coords #include "Device/Detector/SimulationAreaIterator.h" #include "Device/Pol/PolFilter.h" @@ -30,7 +30,7 @@ class IDetectorResolution; class IResolutionFunction2D; template <class T> -class OutputData; +class Powerfield; //! Abstract detector interface. //! @@ -145,7 +145,7 @@ public: virtual size_t detectorIndexToRegionOfInterestIndex(size_t detectorIndex) const; //! Applies the detector resolution to the given intensity maps - void applyDetectorResolution(OutputData<double>* p_intensity_map) const; + void applyDetectorResolution(Powerfield<double>* p_intensity_map) const; //! Returns a pointer to detector resolution object const IDetectorResolution* detectorResolution() const; @@ -153,14 +153,14 @@ public: #ifndef SWIG //! Returns empty detector map in given axes units. //! This map is a data array limited to the size of the "Region of interest" - std::unique_ptr<OutputData<double>> createDetectorMap() const; + std::unique_ptr<Powerfield<double>> createDetectorMap() const; //! Returns detection properties const PolFilter& analyzer() const { return m_detection_properties; } #endif // SWIG //! Returns new intensity map with resolution applied, and cropped to ROI if applicable. - OutputData<double>* + Powerfield<double>* createDetectorIntensity(const std::vector<std::unique_ptr<DiffuseElement>>& elements) const; //! Return default axes units @@ -215,7 +215,7 @@ protected: private: - void setDataToDetectorMap(OutputData<double>& detectorMap, + void setDataToDetectorMap(Powerfield<double>& detectorMap, const std::vector<std::unique_ptr<DiffuseElement>>& elements) const; OwningVector<IAxis> m_axes; diff --git a/Device/Detector/IDetector2D.h b/Device/Detector/IDetector2D.h index 45ee6a82c2bee04fee5bd600218bd8c09de0479d..0037eced923c9639270cac9805eb1085bb2391c3 100644 --- a/Device/Detector/IDetector2D.h +++ b/Device/Detector/IDetector2D.h @@ -60,7 +60,7 @@ public: //! Returns vector of unmasked detector indices. std::vector<size_t> active_indices() const; - //! Creates an IPixel for the given OutputData object and index + //! Creates an IPixel for the given Powerfield object and index virtual IPixel* createPixel(size_t index) const = 0; //! Returns index of pixel that contains the specular wavevector. diff --git a/Device/Detector/RectangularDetector.h b/Device/Detector/RectangularDetector.h index 5c5ddf040a379e351e9f98c8da5cf5baa9a9c19a..2520609f9714490fef376482d182675bfc27009a 100644 --- a/Device/Detector/RectangularDetector.h +++ b/Device/Detector/RectangularDetector.h @@ -76,7 +76,7 @@ public: RectangularPixel* regionOfInterestPixel() const; protected: - //! Creates an IPixel for the given OutputData object and index + //! Creates an IPixel for the given Powerfield object and index IPixel* createPixel(size_t index) const override; //! Returns the name for the axis with given index diff --git a/Device/Detector/SphericalDetector.h b/Device/Detector/SphericalDetector.h index 5974adb645a5cc9d4aea409321cc3becafe2bb31..5f12d09ad12b61b7274e9e8f4971c3373b8385b6 100644 --- a/Device/Detector/SphericalDetector.h +++ b/Device/Detector/SphericalDetector.h @@ -54,7 +54,7 @@ public: Axes::Coords defaultCoords() const override { return Axes::Coords::RADIANS; } protected: - //! Creates an IPixel for the given OutputData object and index + //! Creates an IPixel for the given Powerfield object and index IPixel* createPixel(size_t index) const override; //! Returns the name for the axis with given index diff --git a/Device/Histo/HistoUtils.cpp b/Device/Histo/HistoUtils.cpp index 2a5e64ad62bd649f74d679fefa268ad4f3b72d84..3ba25e85de03a96fe2e52f8271dfa5b8e36d0d82 100644 --- a/Device/Histo/HistoUtils.cpp +++ b/Device/Histo/HistoUtils.cpp @@ -16,7 +16,7 @@ #include "Base/Math/Numeric.h" #include "Device/Data/DataUtils.h" #include "Device/Histo/Histogram2D.h" -#include "Device/Histo/IntensityDataIOFactory.h" +#include "Device/Histo/IOFactory.h" #include "Device/Histo/SimulationResult.h" #include <cmath> #include <iostream> @@ -27,7 +27,7 @@ std::vector<std::pair<double, double>> DataUtils::Histo::FindPeaks(const Histogr const std::string& option, double threshold) { - std::unique_ptr<OutputData<double>> data(hist.createOutputData()); + std::unique_ptr<Powerfield<double>> data(hist.createPowerfield()); std::vector<std::vector<double>> arr = DataUtils::Array::createVector2D(*data); tspectrum::Spectrum2D spec; auto peaks = spec.find_peaks(arr, sigma, option, threshold); @@ -75,13 +75,13 @@ double DataUtils::Histo::RelativeDifference(const SimulationResult& dat, double DataUtils::Histo::getRelativeDifference(const IHistogram& dat, const IHistogram& ref) { return DataUtils::Data::relativeDataDifference( - *std::unique_ptr<OutputData<double>>(dat.getData().meanValues()), - *std::unique_ptr<OutputData<double>>(ref.getData().meanValues())); + *std::unique_ptr<Powerfield<double>>(dat.getData().meanValues()), + *std::unique_ptr<Powerfield<double>>(ref.getData().meanValues())); } //! Returns true is relative difference is below threshold; prints informative output -bool DataUtils::Histo::checkRelativeDifference(const OutputData<double>& dat, - const OutputData<double>& ref, +bool DataUtils::Histo::checkRelativeDifference(const Powerfield<double>& dat, + const Powerfield<double>& ref, const double threshold) { const std::unique_ptr<const IHistogram> histo(IHistogram::createHistogram(dat)); @@ -111,30 +111,30 @@ bool DataUtils::Histo::checkRelativeDifference(const OutputData<double>& dat, bool DataUtils::Histo::agreesWithReference(const SimulationResult& dat, const std::string& refFileName, double tol) { - std::unique_ptr<OutputData<double>> refDat{IntensityDataIOFactory::readOutputData(refFileName)}; + std::unique_ptr<Powerfield<double>> refDat{IOFactory::readPowerfield(refFileName)}; if (!refDat) { std::cerr << "Could not read reference data from file " << refFileName << std::endl; return false; } - std::unique_ptr<OutputData<double>> datDat(dat.data()); + std::unique_ptr<Powerfield<double>> datDat(dat.data()); return DataUtils::Histo::checkRelativeDifference(*datDat, *refDat, tol); } bool DataUtils::Histo::filesAgree(const std::string& datFileName, const std::string& refFileName, double tol) { - std::unique_ptr<OutputData<double>> datDat; + std::unique_ptr<Powerfield<double>> datDat; try { - datDat.reset(IntensityDataIOFactory::readOutputData(datFileName)); + datDat.reset(IOFactory::readPowerfield(datFileName)); } catch (...) { std::cerr << "File comparison: Could not read data from file " << datFileName << std::endl; return false; } ASSERT(datDat); - std::unique_ptr<OutputData<double>> refDat; + std::unique_ptr<Powerfield<double>> refDat; try { - refDat.reset(IntensityDataIOFactory::readOutputData(refFileName)); + refDat.reset(IOFactory::readPowerfield(refFileName)); } catch (...) { std::cerr << "File comparison: Could not read reference data from file " << refFileName << std::endl; diff --git a/Device/Histo/HistoUtils.h b/Device/Histo/HistoUtils.h index 5316a7d279cd8a6cce76f788046c83de9e4693b4..efa406047ef6024d769b4c6f167c4fbb44bc1639 100644 --- a/Device/Histo/HistoUtils.h +++ b/Device/Histo/HistoUtils.h @@ -15,7 +15,7 @@ #ifndef BORNAGAIN_DEVICE_HISTO_HISTOUTILS_H #define BORNAGAIN_DEVICE_HISTO_HISTOUTILS_H -#include "Device/Data/OutputData.h" +#include "Device/Data/Powerfield.h" #include <string> #include <vector> @@ -40,7 +40,7 @@ double RelativeDifference(const SimulationResult& dat, const SimulationResult& r double getRelativeDifference(const IHistogram& dat, const IHistogram& ref); //! Returns true is relative difference is below threshold; prints informative output -bool checkRelativeDifference(const OutputData<double>& dat, const OutputData<double>& ref, +bool checkRelativeDifference(const Powerfield<double>& dat, const Powerfield<double>& ref, double threshold); //! Returns true if SimulatioResult agrees with data from reference file diff --git a/Device/Histo/Histogram1D.cpp b/Device/Histo/Histogram1D.cpp index 19b914bfc28122e06f65ab52f21c8cb1d551e0ad..ef6dfe84d10643c5e9c88021d8f56c447dd1984a 100644 --- a/Device/Histo/Histogram1D.cpp +++ b/Device/Histo/Histogram1D.cpp @@ -32,7 +32,7 @@ Histogram1D::Histogram1D(const IAxis& axis) { } -Histogram1D::Histogram1D(const OutputData<double>& data) +Histogram1D::Histogram1D(const Powerfield<double>& data) { init_from_data(data); } @@ -91,8 +91,8 @@ Histogram1D* Histogram1D::crop(double xmin, double xmax) const std::unique_ptr<IAxis> xaxis{xAxis().clone()}; xaxis->clip(xmin, xmax); auto* result = new Histogram1D(*xaxis); - OutputData<CumulativeValue>::const_iterator it_origin = m_data.begin(); - OutputData<CumulativeValue>::iterator it_result = result->m_data.begin(); + Powerfield<CumulativeValue>::const_iterator it_origin = m_data.begin(); + Powerfield<CumulativeValue>::iterator it_result = result->m_data.begin(); while (it_origin != m_data.end()) { const double x = m_data.getAxisValue(it_origin.getIndex(), 0); if (result->xAxis().contains(x)) { diff --git a/Device/Histo/Histogram1D.h b/Device/Histo/Histogram1D.h index e0711b9b6a36f2c116e9ac67cb820798262967c2..a64ae8e235211372cdd9e5f80f7061b0b639e9a0 100644 --- a/Device/Histo/Histogram1D.h +++ b/Device/Histo/Histogram1D.h @@ -37,8 +37,8 @@ public: //! Constructor for 1D histogram with custom axis Histogram1D(const IAxis& axis); - //! Constructor for 1D histograms from basic OutputData object - Histogram1D(const OutputData<double>& data); + //! Constructor for 1D histograms from basic Powerfield object + Histogram1D(const Powerfield<double>& data); //! Returns clone of other histogram Histogram1D* clone() const override; diff --git a/Device/Histo/Histogram2D.cpp b/Device/Histo/Histogram2D.cpp index 6c82087b1aedda98e182718db3ed0a18d042ebf3..b8beca54ffca08b193c6cd5b852bee53a59dffe4 100644 --- a/Device/Histo/Histogram2D.cpp +++ b/Device/Histo/Histogram2D.cpp @@ -35,7 +35,7 @@ Histogram2D::Histogram2D(const IAxis& axis_x, const IAxis& axis_y) { } -Histogram2D::Histogram2D(const OutputData<double>& data) +Histogram2D::Histogram2D(const Powerfield<double>& data) { init_from_data(data); } @@ -121,8 +121,8 @@ Histogram2D* Histogram2D::crop(double xmin, double ymin, double xmax, double yma yaxis->clip(ymin, ymax); auto* result = new Histogram2D(*xaxis, *yaxis); - OutputData<CumulativeValue>::const_iterator it_origin = m_data.begin(); - OutputData<CumulativeValue>::iterator it_result = result->m_data.begin(); + Powerfield<CumulativeValue>::const_iterator it_origin = m_data.begin(); + Powerfield<CumulativeValue>::iterator it_result = result->m_data.begin(); while (it_origin != m_data.end()) { double x = m_data.getAxisValue(it_origin.getIndex(), 0); double y = m_data.getAxisValue(it_origin.getIndex(), 1); diff --git a/Device/Histo/Histogram2D.h b/Device/Histo/Histogram2D.h index 438a0a15b7908a3d2442b37d11dfa2831c212619..cb6dade65ef2b0d421a2456db147d9f6183ae64f 100644 --- a/Device/Histo/Histogram2D.h +++ b/Device/Histo/Histogram2D.h @@ -45,8 +45,8 @@ public: //! Constructor for 2D histogram with custom axes Histogram2D(const IAxis& axis_x, const IAxis& axis_y); - //! Constructor for 2D histograms from basic OutputData object - Histogram2D(const OutputData<double>& data); + //! Constructor for 2D histograms from basic Powerfield object + Histogram2D(const Powerfield<double>& data); //! Constructor for 2D histograms from numpy array (thanks to swig) Histogram2D(std::vector<std::vector<double>> data); diff --git a/Device/Histo/IHistogram.cpp b/Device/Histo/IHistogram.cpp index b10a5ca6acc7857b7b262ffb2d6efb36ad18b40c..af2a1b2a735b018fbc5c61eaaedc1b3dba8ad812 100644 --- a/Device/Histo/IHistogram.cpp +++ b/Device/Histo/IHistogram.cpp @@ -15,7 +15,7 @@ #include "Base/Math/Numeric.h" #include "Device/Histo/Histogram1D.h" #include "Device/Histo/Histogram2D.h" -#include "Device/Histo/IntensityDataIOFactory.h" // TODO rm +#include "Device/Histo/IOFactory.h" // TODO rm #include <memory> IHistogram::IHistogram() = default; @@ -123,12 +123,12 @@ double IHistogram::yAxisValue(size_t i) return m_data.getAxisValue(i, 1); } -const OutputData<CumulativeValue>& IHistogram::getData() const +const Powerfield<CumulativeValue>& IHistogram::getData() const { return m_data; } -OutputData<CumulativeValue>& IHistogram::getData() +Powerfield<CumulativeValue>& IHistogram::getData() { return m_data; } @@ -185,19 +185,19 @@ int IHistogram::binNumberOfEntries(size_t binx, size_t biny) const double IHistogram::getMaximum() const { - OutputData<CumulativeValue>::const_iterator it = std::max_element(m_data.begin(), m_data.end()); + Powerfield<CumulativeValue>::const_iterator it = std::max_element(m_data.begin(), m_data.end()); return it->getContent(); } size_t IHistogram::getMaximumBinIndex() const { - OutputData<CumulativeValue>::const_iterator it = std::max_element(m_data.begin(), m_data.end()); + Powerfield<CumulativeValue>::const_iterator it = std::max_element(m_data.begin(), m_data.end()); return std::distance(m_data.begin(), it); } double IHistogram::getMinimum() const { - OutputData<CumulativeValue>::const_iterator it = std::min_element(m_data.begin(), m_data.end()); + Powerfield<CumulativeValue>::const_iterator it = std::min_element(m_data.begin(), m_data.end()); return it->getContent(); } @@ -223,7 +223,7 @@ double IHistogram::integral() const #ifdef BORNAGAIN_PYTHON PyObject* IHistogram::array(DataType dataType) const { - const std::unique_ptr<OutputData<double>> data(createOutputData(dataType)); + const std::unique_ptr<Powerfield<double>> data(createPowerfield(dataType)); return data->getArray(); } #endif // BORNAGAIN_PYTHON @@ -233,14 +233,14 @@ void IHistogram::reset() m_data.setAllTo(CumulativeValue()); } -IHistogram* IHistogram::createHistogram(const OutputData<double>& source) +IHistogram* IHistogram::createHistogram(const Powerfield<double>& source) { if (source.rank() == 1) return new Histogram1D(source); if (source.rank() == 2) return new Histogram2D(source); std::ostringstream message; - message << "IHistogram::createHistogram(const OutputData<double>& source) -> Error. "; + message << "IHistogram::createHistogram(const Powerfield<double>& source) -> Error. "; message << "The rank of source " << source.rank() << " "; message << "is not suitable for creation neither 1-dim nor 2-dim histograms."; throw std::runtime_error(message.str()); @@ -248,7 +248,7 @@ IHistogram* IHistogram::createHistogram(const OutputData<double>& source) IHistogram* IHistogram::createFrom(const std::string& filename) { - return IntensityDataIOFactory::readIntensityData(filename); + return IOFactory::readIntensityData(filename); } IHistogram* IHistogram::createFrom(const std::vector<std::vector<double>>& data) @@ -276,11 +276,11 @@ void IHistogram::check_y_axis() const } } -void IHistogram::init_from_data(const OutputData<double>& source) +void IHistogram::init_from_data(const Powerfield<double>& source) { if (rank() != source.rank()) { std::ostringstream message; - message << "IHistogram::IHistogram(const OutputData<double>& data) -> Error. "; + message << "IHistogram::IHistogram(const Powerfield<double>& data) -> Error. "; message << "The dimension of this histogram " << rank() << " "; message << "is differ from the dimension of source " << m_data.rank() << std::endl; throw std::runtime_error(message.str()); @@ -326,10 +326,10 @@ void IHistogram::copyContentFrom(const IHistogram& other) m_data[i] = other.m_data[i]; } -//! creates new OutputData with histogram's shape and put there values corresponding to DataType -OutputData<double>* IHistogram::createOutputData(IHistogram::DataType dataType) const +//! creates new Powerfield with histogram's shape and put there values corresponding to DataType +Powerfield<double>* IHistogram::createPowerfield(IHistogram::DataType dataType) const { - auto* result = new OutputData<double>; + auto* result = new Powerfield<double>; result->copyShapeFrom(m_data); for (size_t i = 0; i < getTotalNumberOfBins(); ++i) (*result)[i] = binData(i, dataType); @@ -374,11 +374,11 @@ IHistogram* IHistogram::relativeDifferenceHistogram(const IHistogram& rhs) const void IHistogram::save(const std::string& filename) const { - IntensityDataIOFactory::writeIntensityData(*this, filename); + IOFactory::writeIntensityData(*this, filename); } void IHistogram::load(const std::string& filename) { - const std::unique_ptr<IHistogram> hist(IntensityDataIOFactory::readIntensityData(filename)); + const std::unique_ptr<IHistogram> hist(IOFactory::readIntensityData(filename)); copyContentFrom(*hist); } diff --git a/Device/Histo/IHistogram.h b/Device/Histo/IHistogram.h index 606c162257634bff07d8014c4f73e9de5966c13b..d9da9fff8340023f65e2fd5a4b769283426f1f50 100644 --- a/Device/Histo/IHistogram.h +++ b/Device/Histo/IHistogram.h @@ -16,7 +16,7 @@ #define BORNAGAIN_DEVICE_HISTO_IHISTOGRAM_H #include "Device/Data/CumulativeValue.h" -#include "Device/Data/OutputData.h" +#include "Device/Data/Powerfield.h" class Histogram1D; @@ -85,8 +85,8 @@ public: //! Returns the center of bin i of the y axis. double yAxisValue(size_t i); - const OutputData<CumulativeValue>& getData() const; - OutputData<CumulativeValue>& getData(); + const Powerfield<CumulativeValue>& getData() const; + Powerfield<CumulativeValue>& getData(); //! Returns content (accumulated value) of bin i. double binContent(size_t i) const; @@ -147,7 +147,7 @@ public: //! Reset histogram content (axes remains) void reset(); - static IHistogram* createHistogram(const OutputData<double>& source); + static IHistogram* createHistogram(const Powerfield<double>& source); //! Creates new histogram from file content. static IHistogram* createFrom(const std::string& filename); @@ -155,8 +155,8 @@ public: //! Create new histogram from numpy array. static IHistogram* createFrom(const std::vector<std::vector<double>>& data); - //! Creates new OutputData with histogram's shape and values corresponding to DataType. - OutputData<double>* createOutputData(DataType dataType = DataType::INTEGRAL) const; + //! Creates new Powerfield with histogram's shape and values corresponding to DataType. + Powerfield<double>* createPowerfield(DataType dataType = DataType::INTEGRAL) const; //! Returns true if objects a) have same dimensions b) bin boundaries of axes coincide bool hasSameShape(const IHistogram& other) const; @@ -182,11 +182,11 @@ public: protected: void check_x_axis() const; void check_y_axis() const; - void init_from_data(const OutputData<double>& source); + void init_from_data(const Powerfield<double>& source); double binData(size_t i, DataType dataType) const; std::vector<double> getDataVector(DataType dataType) const; void copyContentFrom(const IHistogram& other); - OutputData<CumulativeValue> m_data; + Powerfield<CumulativeValue> m_data; }; #endif // BORNAGAIN_DEVICE_HISTO_IHISTOGRAM_H diff --git a/Device/Histo/IntensityDataIOFactory.cpp b/Device/Histo/IOFactory.cpp similarity index 60% rename from Device/Histo/IntensityDataIOFactory.cpp rename to Device/Histo/IOFactory.cpp index 679f5fab6dc5f806604e9666866c098c86ff612a..35d7cb8109226e4f192d73c0352fe5e45cc25d5d 100644 --- a/Device/Histo/IntensityDataIOFactory.cpp +++ b/Device/Histo/IOFactory.cpp @@ -2,8 +2,8 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file Device/Histo/IntensityDataIOFactory.cpp -//! @brief Implements class OutputDataIOFactory. +//! @file Device/Histo/IOFactory.cpp +//! @brief Implements class PowerfieldIOFactory. //! //! @homepage http://www.bornagainproject.org //! @license GNU General Public License v3 or higher (see COPYING) @@ -12,16 +12,16 @@ // // ************************************************************************************************ -#include "Device/Histo/IntensityDataIOFactory.h" +#include "Device/Histo/IOFactory.h" #include "Base/Util/FileSystemUtils.h" #include "Device/Histo/IHistogram.h" #include "Device/Histo/SimulationResult.h" #include "Device/InputOutput/DataFormatUtils.h" -#include "Device/InputOutput/OutputDataReadReflectometry.h" -#include "Device/InputOutput/OutputDataReadWriteINT.h" -#include "Device/InputOutput/OutputDataReadWriteNicos.h" -#include "Device/InputOutput/OutputDataReadWriteNumpyTXT.h" -#include "Device/InputOutput/OutputDataReadWriteTiff.h" +#include "Device/InputOutput/ReadReflectometry.h" +#include "Device/InputOutput/ReadWriteINT.h" +#include "Device/InputOutput/ReadWriteNicos.h" +#include "Device/InputOutput/ReadWriteNumpyTXT.h" +#include "Device/InputOutput/ReadWriteTiff.h" #include <exception> #include <fstream> #include <memory> @@ -35,8 +35,7 @@ #include "Device/InputOutput/boost_streams.h" #endif -OutputData<double>* IntensityDataIOFactory::readOutputData(const std::string& file_name, - LoaderSelector selector) +Powerfield<double>* IOFactory::readPowerfield(const std::string& file_name, LoaderSelector selector) { const auto readAs = [=](LoaderSelector testForSelector) { return (selector == testForSelector) @@ -44,67 +43,63 @@ OutputData<double>* IntensityDataIOFactory::readOutputData(const std::string& fi && fileTypeMatchesLoaderSelector(file_name, testForSelector)); }; - OutputData<double>* ret = nullptr; + Powerfield<double>* ret = nullptr; if (readAs(bornagain)) - ret = readOutputData( - file_name, [](std::istream& s) { return OutputDataReadWriteINT().readOutputData(s); }); + ret = readPowerfield(file_name, + [](std::istream& s) { return ReadWriteINT().readPowerfield(s); }); else if (readAs(nicos)) - ret = readOutputData(file_name, [](std::istream& s) { return IO::readNicosData(s); }); + ret = readPowerfield(file_name, [](std::istream& s) { return IO::readNicosData(s); }); #ifdef BA_TIFF_SUPPORT else if (readAs(tiff)) - ret = readOutputData( - file_name, [](std::istream& s) { return OutputDataReadWriteTiff().readOutputData(s); }); + ret = readPowerfield(file_name, + [](std::istream& s) { return ReadWriteTiff().readPowerfield(s); }); #endif else // Try to read ASCII by default. Binary maps to ASCII. // If the file is not actually a matrix of numbers, // the error will be thrown during the reading. - ret = readOutputData(file_name, [](std::istream& s) { - return OutputDataReadWriteNumpyTXT().readOutputData(s); - }); + ret = readPowerfield(file_name, + [](std::istream& s) { return ReadWriteNumpyTXT().readPowerfield(s); }); ASSERT(ret); return ret; } -OutputData<double>* IntensityDataIOFactory::readReflectometryData(const std::string& file_name) +Powerfield<double>* IOFactory::readReflectometryData(const std::string& file_name) { - return readOutputData( - file_name, [](std::istream& s) { return OutputDataReadReflectometry().readOutputData(s); }); + return readPowerfield(file_name, + [](std::istream& s) { return ReadReflectometry().readPowerfield(s); }); } -IHistogram* IntensityDataIOFactory::readIntensityData(const std::string& file_name) +IHistogram* IOFactory::readIntensityData(const std::string& file_name) { - std::unique_ptr<OutputData<double>> data(readOutputData(file_name)); + std::unique_ptr<Powerfield<double>> data(readPowerfield(file_name)); if (!data) throw std::runtime_error("Cannot read intensity data from file: " + file_name); return IHistogram::createHistogram(*data); } -void IntensityDataIOFactory::writeOutputData(const OutputData<double>& data, - const std::string& file_name) +void IOFactory::writePowerfield(const Powerfield<double>& data, const std::string& file_name) { if (DataUtils::Format::isIntFile(file_name)) - writeOutputData( - file_name, [&](std::ostream& s) { OutputDataReadWriteINT().writeOutputData(data, s); }); + writePowerfield(file_name, + [&](std::ostream& s) { ReadWriteINT().writePowerfield(data, s); }); #ifdef BA_TIFF_SUPPORT else if (DataUtils::Format::isTiffFile(file_name)) - writeOutputData(file_name, [&](std::ostream& s) { - OutputDataReadWriteTiff().writeOutputData(data, s); - }); + writePowerfield(file_name, + [&](std::ostream& s) { ReadWriteTiff().writePowerfield(data, s); }); #endif else - writeOutputData(file_name, [&](std::ostream& s) { - OutputDataReadWriteNumpyTXT().writeOutputData(data, s); - }); + writePowerfield(file_name, + [&](std::ostream& s) { ReadWriteNumpyTXT().writePowerfield(data, s); }); } -void IntensityDataIOFactory::writeOutputData(const std::string& file_name, - std::function<void(std::ostream&)> writeData) +void IOFactory::writePowerfield(const std::string& file_name, + std::function<void(std::ostream&)> writeData) { using namespace DataUtils::Format; @@ -138,8 +133,7 @@ void IntensityDataIOFactory::writeOutputData(const std::string& file_name, fout.close(); } -bool IntensityDataIOFactory::fileTypeMatchesLoaderSelector(const std::string& fileName, - LoaderSelector selector) +bool IOFactory::fileTypeMatchesLoaderSelector(const std::string& fileName, LoaderSelector selector) { switch (selector) { case bornagain: @@ -155,23 +149,21 @@ bool IntensityDataIOFactory::fileTypeMatchesLoaderSelector(const std::string& fi return false; } -void IntensityDataIOFactory::writeIntensityData(const IHistogram& histogram, - const std::string& file_name) +void IOFactory::writeIntensityData(const IHistogram& histogram, const std::string& file_name) { - std::unique_ptr<OutputData<double>> data(histogram.createOutputData()); - writeOutputData(*data, file_name); + std::unique_ptr<Powerfield<double>> data(histogram.createPowerfield()); + writePowerfield(*data, file_name); } -void IntensityDataIOFactory::writeSimulationResult(const SimulationResult& result, - const std::string& file_name) +void IOFactory::writeSimulationResult(const SimulationResult& result, const std::string& file_name) { auto data = result.data(); - writeOutputData(*data, file_name); + writePowerfield(*data, file_name); } -OutputData<double>* -IntensityDataIOFactory::readOutputData(const std::string& file_name, - std::function<OutputData<double>*(std::istream&)> readData) +Powerfield<double>* +IOFactory::readPowerfield(const std::string& file_name, + std::function<Powerfield<double>*(std::istream&)> readData) { if (!BaseUtils::Filesystem::IsFileExists(file_name)) throw std::runtime_error("File does not exist: " + file_name); diff --git a/Device/Histo/IntensityDataIOFactory.h b/Device/Histo/IOFactory.h similarity index 66% rename from Device/Histo/IntensityDataIOFactory.h rename to Device/Histo/IOFactory.h index 4001f83a81b27aec4adb46fab64c899dfa326125..059331dfa6817df79f06b47faf8d33febef27770 100644 --- a/Device/Histo/IntensityDataIOFactory.h +++ b/Device/Histo/IOFactory.h @@ -2,8 +2,8 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file Device/Histo/IntensityDataIOFactory.h -//! @brief Defines class IntensityDataIOFactory. +//! @file Device/Histo/IOFactory.h +//! @brief Defines class IOFactory. //! //! @homepage http://www.bornagainproject.org //! @license GNU General Public License v3 or higher (see COPYING) @@ -12,14 +12,14 @@ // // ************************************************************************************************ -#ifndef BORNAGAIN_DEVICE_HISTO_INTENSITYDATAIOFACTORY_H -#define BORNAGAIN_DEVICE_HISTO_INTENSITYDATAIOFACTORY_H +#ifndef BORNAGAIN_DEVICE_HISTO_IOFACTORY_H +#define BORNAGAIN_DEVICE_HISTO_IOFACTORY_H #include <functional> #include <string> template <class T> -class OutputData; +class Powerfield; class IHistogram; class SimulationResult; @@ -36,50 +36,50 @@ class SimulationResult; /*! Usage: \code{.py} # reading from ASCII file or g-zipped ASCII file -histogram = IntensityDataIOFactory.readIntensityData("filename.txt") -histogram = IntensityDataIOFactory.readIntensityData("filename.txt.gz") +histogram = IOFactory.readIntensityData("filename.txt") +histogram = IOFactory.readIntensityData("filename.txt.gz") # writing to 32-bits tiff file or b-zipped tiff file -IntensityDataIOFactory.writeIntensityData(histogram, "filename.tif") -IntensityDataIOFactory.writeIntensityData(histogram, "filename.tif.bz2") +IOFactory.writeIntensityData(histogram, "filename.tif") +IOFactory.writeIntensityData(histogram, "filename.tif.bz2") \endcode */ -class IntensityDataIOFactory { +class IOFactory { public: enum LoaderSelector { automatic, bornagain, tiff, nicos }; - //! Reads file and returns newly created OutputData object. If selector is automatic, then the + //! Reads file and returns newly created Powerfield object. If selector is automatic, then the //! file extension will be used to determine which file type to load. If selector is not //! automatic, then this selector will define which type of file to load (no matter which file //! extension or content). //! May throw, but will never return nullptr. - static OutputData<double>* readOutputData(const std::string& file_name, + static Powerfield<double>* readPowerfield(const std::string& file_name, LoaderSelector selector = automatic); - static OutputData<double>* readReflectometryData(const std::string& file_name); + static Powerfield<double>* readReflectometryData(const std::string& file_name); //! Reads file and returns newly created Histogram object static IHistogram* readIntensityData(const std::string& file_name); - //! Writes OutputData in file - static void writeOutputData(const OutputData<double>& data, const std::string& file_name); + //! Writes Powerfield in file + static void writePowerfield(const Powerfield<double>& data, const std::string& file_name); //! Writes histogram in file static void writeIntensityData(const IHistogram& histogram, const std::string& file_name); - //! Writes OutputData contained in the given SimulationResult object + //! Writes Powerfield contained in the given SimulationResult object static void writeSimulationResult(const SimulationResult& result, const std::string& file_name); private: - static OutputData<double>* - readOutputData(const std::string& file_name, - std::function<OutputData<double>*(std::istream&)> readData); + static Powerfield<double>* + readPowerfield(const std::string& file_name, + std::function<Powerfield<double>*(std::istream&)> readData); - static void writeOutputData(const std::string& file_name, + static void writePowerfield(const std::string& file_name, std::function<void(std::ostream&)> writeData); static bool fileTypeMatchesLoaderSelector(const std::string& fileName, LoaderSelector selector); }; -#endif // BORNAGAIN_DEVICE_HISTO_INTENSITYDATAIOFACTORY_H +#endif // BORNAGAIN_DEVICE_HISTO_IOFACTORY_H diff --git a/Device/Histo/SimulationResult.cpp b/Device/Histo/SimulationResult.cpp index d2c5081fc1d232c0f9a2b4108a48e030784e98bf..882390673de8a01b78f0eed3b53269bf925858b9 100644 --- a/Device/Histo/SimulationResult.cpp +++ b/Device/Histo/SimulationResult.cpp @@ -15,14 +15,14 @@ #include "Device/Histo/SimulationResult.h" #include "Device/Histo/Histogram2D.h" -SimulationResult::SimulationResult(const OutputData<double>& data, const ICoordSystem& coords) +SimulationResult::SimulationResult(const Powerfield<double>& data, const ICoordSystem& coords) : m_data(data.clone()) , m_coordsys(coords.clone()) { checkDimensions(); } -SimulationResult::SimulationResult(const OutputData<double>& data, const ICoordSystem*&& coords) +SimulationResult::SimulationResult(const Powerfield<double>& data, const ICoordSystem*&& coords) : m_data(data.clone()) , m_coordsys(coords) { @@ -59,7 +59,7 @@ SimulationResult& SimulationResult::operator=(SimulationResult&& other) return *this; } -std::unique_ptr<OutputData<double>> SimulationResult::data(Axes::Coords units) const +std::unique_ptr<Powerfield<double>> SimulationResult::data(Axes::Coords units) const { return m_coordsys->createConvertedData(*m_data, units); } @@ -113,7 +113,7 @@ double SimulationResult::max() const SimulationResult SimulationResult::relativeToMaximum() const { - std::unique_ptr<OutputData<double>> data2{m_data->clone()}; + std::unique_ptr<Powerfield<double>> data2{m_data->clone()}; return {data2->normalizedToMaximum(), m_coordsys->clone()}; } diff --git a/Device/Histo/SimulationResult.h b/Device/Histo/SimulationResult.h index c0a7ceead070e41af9e7021fbbf1f487b24fb809..44e0d8e9e043940c5d1036724d2e36985e5a281f 100644 --- a/Device/Histo/SimulationResult.h +++ b/Device/Histo/SimulationResult.h @@ -24,7 +24,7 @@ class Histogram1D; class Histogram2D; class IAxis; template <class T> -class OutputData; +class Powerfield; //! Information about an axis in specific units. Can be used for plotting. //! @ingroup detector @@ -35,14 +35,14 @@ struct AxisInfo { double m_max; }; -//! Wrapper around OutputData<double> that also provides unit conversions. +//! Wrapper around Powerfield<double> that also provides unit conversions. //! @ingroup detector class SimulationResult { public: SimulationResult() = default; - SimulationResult(const OutputData<double>& data, const ICoordSystem& coords); // TODO rm - SimulationResult(const OutputData<double>& data, const ICoordSystem*&& coords); + SimulationResult(const Powerfield<double>& data, const ICoordSystem& coords); // TODO rm + SimulationResult(const Powerfield<double>& data, const ICoordSystem*&& coords); ~SimulationResult(); SimulationResult(const SimulationResult& other); @@ -52,7 +52,7 @@ public: SimulationResult& operator=(SimulationResult&& other); #ifndef SWIG - std::unique_ptr<OutputData<double>> data(Axes::Coords units = Axes::Coords::UNDEFINED) const; + std::unique_ptr<Powerfield<double>> data(Axes::Coords units = Axes::Coords::UNDEFINED) const; #endif Histogram2D* histogram2d(Axes::Coords units = Axes::Coords::UNDEFINED) const; @@ -91,7 +91,7 @@ public: private: void checkDimensions() const; - std::unique_ptr<OutputData<double>> m_data; + std::unique_ptr<Powerfield<double>> m_data; std::unique_ptr<const ICoordSystem> m_coordsys; std::string m_title; diff --git a/Device/InputOutput/DataFormatUtils.cpp b/Device/InputOutput/DataFormatUtils.cpp index 00ae0116fa14424983ca90f84f94ba91416938a7..f1c4709d062c2df6d7d256d7443512af36b1951c 100644 --- a/Device/InputOutput/DataFormatUtils.cpp +++ b/Device/InputOutput/DataFormatUtils.cpp @@ -18,7 +18,7 @@ #include "Base/Axis/PointwiseAxis.h" #include "Base/Util/FileSystemUtils.h" #include "Base/Util/StringUtils.h" -#include "Device/Data/OutputData.h" +#include "Device/Data/Powerfield.h" #include <functional> #include <iostream> #include <iterator> @@ -167,11 +167,11 @@ std::unique_ptr<IAxis> DataUtils::Format::createAxis(std::istream& input_stream) } //! Fills output data raw buffer from input stream -void DataUtils::Format::fillOutputData(OutputData<double>* data, std::istream& input_stream) +void DataUtils::Format::fillPowerfield(Powerfield<double>* data, std::istream& input_stream) { std::string line; data->setAllTo(0.0); - OutputData<double>::iterator it = data->begin(); + Powerfield<double>::iterator it = data->begin(); while (std::getline(input_stream, line)) { if (line.empty() || line[0] == '#') break; @@ -186,7 +186,7 @@ void DataUtils::Format::fillOutputData(OutputData<double>* data, std::istream& i } if (it != data->end()) throw std::runtime_error( - "DataUtils::Format::fillOutputData() -> Error while parsing data."); + "DataUtils::Format::fillPowerfield() -> Error while parsing data."); } //! Parse double values from string to vector of double diff --git a/Device/InputOutput/DataFormatUtils.h b/Device/InputOutput/DataFormatUtils.h index 524589a743b3a666b789fc45d5c0be57f960c83d..3240d700133c7f2c8a301e2af5c4144853d5089f 100644 --- a/Device/InputOutput/DataFormatUtils.h +++ b/Device/InputOutput/DataFormatUtils.h @@ -3,7 +3,7 @@ // BornAgain: simulate and fit reflection and scattering // //! @file Device/InputOutput/DataFormatUtils.h -//! @brief Defines class OutputDataIOFactory. +//! @brief Defines class PowerfieldIOFactory. //! //! @homepage http://www.bornagainproject.org //! @license GNU General Public License v3 or higher (see COPYING) @@ -26,7 +26,7 @@ class IAxis; template <class T> -class OutputData; +class Powerfield; //! Utility functions for data input and output. @@ -52,7 +52,7 @@ bool isTiffFile(const std::string& file_name); std::unique_ptr<IAxis> createAxis(std::istream& input_stream); -void fillOutputData(OutputData<double>* data, std::istream& input_stream); +void fillPowerfield(Powerfield<double>* data, std::istream& input_stream); std::vector<double> parse_doubles(const std::string& str); diff --git a/Device/InputOutput/OutputDataReadReflectometry.cpp b/Device/InputOutput/ReadReflectometry.cpp similarity index 88% rename from Device/InputOutput/OutputDataReadReflectometry.cpp rename to Device/InputOutput/ReadReflectometry.cpp index eb2224cdc455bab70bd835cb51146209a277e3f2..d8b720eb4d21f270b97d7c9782380373079be784 100644 --- a/Device/InputOutput/OutputDataReadReflectometry.cpp +++ b/Device/InputOutput/ReadReflectometry.cpp @@ -2,8 +2,8 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file Device/InputOutput/OutputDataReadReflectometry.cpp -//! @brief Implements class OutputDataReadWriteReflectometry. +//! @file Device/InputOutput/ReadReflectometry.cpp +//! @brief Implements class ReadWriteReflectometry. //! //! @homepage http://www.bornagainproject.org //! @license GNU General Public License v3 or higher (see COPYING) @@ -12,18 +12,18 @@ // // ************************************************************************************************ -#include "Device/InputOutput/OutputDataReadReflectometry.h" +#include "Device/InputOutput/ReadReflectometry.h" #include "Base/Axis/PointwiseAxis.h" #include "Base/Util/StringUtils.h" -#include "Device/Data/OutputData.h" +#include "Device/Data/Powerfield.h" #include "Device/InputOutput/DataFormatUtils.h" #include <map> // #bamigration +++ this works only if separator is space or tab; it does not // work e.g. with comma or semicolon -OutputData<double>* OutputDataReadReflectometry::readOutputData(std::istream& inStream) +Powerfield<double>* ReadReflectometry::readPowerfield(std::istream& inStream) { - auto* oData = new OutputData<double>(); + auto* oData = new Powerfield<double>(); std::string line; std::vector<std::vector<double>> vecVec; std::map<double, double> QvsR; diff --git a/Device/InputOutput/OutputDataReadReflectometry.h b/Device/InputOutput/ReadReflectometry.h similarity index 62% rename from Device/InputOutput/OutputDataReadReflectometry.h rename to Device/InputOutput/ReadReflectometry.h index 767f3b18c0143ab7a9d904522979443527574919..5f300283ea41736662473914b23073607d8eccef 100644 --- a/Device/InputOutput/OutputDataReadReflectometry.h +++ b/Device/InputOutput/ReadReflectometry.h @@ -2,8 +2,8 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file Device/InputOutput/OutputDataReadReflectometry.h -//! @brief Defines OutputDataReadReflectometry +//! @file Device/InputOutput/ReadReflectometry.h +//! @brief Defines ReadReflectometry //! //! @homepage http://www.bornagainproject.org //! @license GNU General Public License v3 or higher (see COPYING) @@ -17,20 +17,20 @@ #endif #ifndef USER_API -#ifndef BORNAGAIN_DEVICE_INPUTOUTPUT_OUTPUTDATAREADREFLECTOMETRY_H -#define BORNAGAIN_DEVICE_INPUTOUTPUT_OUTPUTDATAREADREFLECTOMETRY_H +#ifndef BORNAGAIN_DEVICE_INPUTOUTPUT_READREFLECTOMETRY_H +#define BORNAGAIN_DEVICE_INPUTOUTPUT_READREFLECTOMETRY_H #include <istream> template <class T> -class OutputData; +class Powerfield; //! Class for reading reflectometry data from ASCII file. -class OutputDataReadReflectometry { +class ReadReflectometry { public: - OutputData<double>* readOutputData(std::istream& inStream); + Powerfield<double>* readPowerfield(std::istream& inStream); }; -#endif // BORNAGAIN_DEVICE_INPUTOUTPUT_OUTPUTDATAREADREFLECTOMETRY_H +#endif // BORNAGAIN_DEVICE_INPUTOUTPUT_READREFLECTOMETRY_H #endif // USER_API diff --git a/Device/InputOutput/OutputDataReadWriteINT.cpp b/Device/InputOutput/ReadWriteINT.cpp similarity index 69% rename from Device/InputOutput/OutputDataReadWriteINT.cpp rename to Device/InputOutput/ReadWriteINT.cpp index c4f73d26811be7374b76827536c701387e2b93e3..dee4d253c35d51c79db7e94699e6c125f0665ecf 100644 --- a/Device/InputOutput/OutputDataReadWriteINT.cpp +++ b/Device/InputOutput/ReadWriteINT.cpp @@ -2,8 +2,8 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file Device/InputOutput/OutputDataReadWriteINT.cpp -//! @brief Implements class OutputDataReadWriteINT. +//! @file Device/InputOutput/ReadWriteINT.cpp +//! @brief Implements class ReadWriteINT. //! //! @homepage http://www.bornagainproject.org //! @license GNU General Public License v3 or higher (see COPYING) @@ -12,14 +12,14 @@ // // ************************************************************************************************ -#include "Device/InputOutput/OutputDataReadWriteINT.h" +#include "Device/InputOutput/ReadWriteINT.h" #include "Base/Util/StringUtils.h" #include "Device/Data/ArrayUtils.h" #include "Device/InputOutput/DataFormatUtils.h" -OutputData<double>* OutputDataReadWriteINT::readOutputData(std::istream& input_stream) +Powerfield<double>* ReadWriteINT::readPowerfield(std::istream& input_stream) { - auto* result = new OutputData<double>; + auto* result = new Powerfield<double>; std::string line; while (std::getline(input_stream, line)) { @@ -30,13 +30,12 @@ OutputData<double>* OutputDataReadWriteINT::readOutputData(std::istream& input_s } if (line.find("data") != std::string::npos) - DataUtils::Format::fillOutputData(result, input_stream); + DataUtils::Format::fillPowerfield(result, input_stream); } return result; } -void OutputDataReadWriteINT::writeOutputData(const OutputData<double>& data, - std::ostream& output_stream) +void ReadWriteINT::writePowerfield(const Powerfield<double>& data, std::ostream& output_stream) { output_stream << "# BornAgain Intensity Data\n\n"; @@ -51,14 +50,14 @@ void OutputDataReadWriteINT::writeOutputData(const OutputData<double>& data, size_t n_columns = data.axis(data.rank() - 1).size(); output_stream << "\n# data\n"; - writeOutputDataDoubles(data, output_stream, n_columns); + writePowerfieldDoubles(data, output_stream, n_columns); output_stream << std::endl; } -void OutputDataReadWriteINT::writeOutputDataDoubles(const OutputData<double>& data, - std::ostream& output_stream, size_t n_columns) +void ReadWriteINT::writePowerfieldDoubles(const Powerfield<double>& data, + std::ostream& output_stream, size_t n_columns) { - OutputData<double>::const_iterator it = data.begin(); + Powerfield<double>::const_iterator it = data.begin(); output_stream.imbue(std::locale::classic()); output_stream << std::scientific << std::setprecision(12); size_t ncol(0); @@ -73,7 +72,7 @@ void OutputDataReadWriteINT::writeOutputDataDoubles(const OutputData<double>& da } } -double OutputDataReadWriteINT::ignoreDenormalized(double value) +double ReadWriteINT::ignoreDenormalized(double value) { return (std::fpclassify(value) == FP_SUBNORMAL) ? 0.0 : value; } diff --git a/Device/InputOutput/OutputDataReadWriteINT.h b/Device/InputOutput/ReadWriteINT.h similarity index 63% rename from Device/InputOutput/OutputDataReadWriteINT.h rename to Device/InputOutput/ReadWriteINT.h index d9ed8333e4f15519dc2aad9f2ff79b14391eebd5..f2f68eefe0e0ecf5ee461823e0064e4ed9817b6f 100644 --- a/Device/InputOutput/OutputDataReadWriteINT.h +++ b/Device/InputOutput/ReadWriteINT.h @@ -2,8 +2,8 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file Device/InputOutput/OutputDataReadWriteINT.h -//! @brief Defines OutputDataReadWriteINT +//! @file Device/InputOutput/ReadWriteINT.h +//! @brief Defines ReadWriteINT //! //! @homepage http://www.bornagainproject.org //! @license GNU General Public License v3 or higher (see COPYING) @@ -17,26 +17,26 @@ #endif #ifndef USER_API -#ifndef BORNAGAIN_DEVICE_INPUTOUTPUT_OUTPUTDATAREADWRITEINT_H -#define BORNAGAIN_DEVICE_INPUTOUTPUT_OUTPUTDATAREADWRITEINT_H +#ifndef BORNAGAIN_DEVICE_INPUTOUTPUT_READWRITEINT_H +#define BORNAGAIN_DEVICE_INPUTOUTPUT_READWRITEINT_H #include <istream> template <class T> -class OutputData; +class Powerfield; //! Class for reading and writing BornAgain native IntensityData from ASCII file. -class OutputDataReadWriteINT { +class ReadWriteINT { public: - OutputData<double>* readOutputData(std::istream& input_stream); - void writeOutputData(const OutputData<double>& data, std::ostream& output_stream); + Powerfield<double>* readPowerfield(std::istream& input_stream); + void writePowerfield(const Powerfield<double>& data, std::ostream& output_stream); private: - static void writeOutputDataDoubles(const OutputData<double>& data, std::ostream& output_stream, + static void writePowerfieldDoubles(const Powerfield<double>& data, std::ostream& output_stream, size_t n_columns); static double ignoreDenormalized(double value); }; -#endif // BORNAGAIN_DEVICE_INPUTOUTPUT_OUTPUTDATAREADWRITEINT_H +#endif // BORNAGAIN_DEVICE_INPUTOUTPUT_READWRITEINT_H #endif // USER_API diff --git a/Device/InputOutput/OutputDataReadWriteNicos.cpp b/Device/InputOutput/ReadWriteNicos.cpp similarity index 95% rename from Device/InputOutput/OutputDataReadWriteNicos.cpp rename to Device/InputOutput/ReadWriteNicos.cpp index cc00693ebe378541d39b0dd3b891408449983239..ce4b24d9d52bc4d2de937429f4c1f3fd1c0ea41f 100644 --- a/Device/InputOutput/OutputDataReadWriteNicos.cpp +++ b/Device/InputOutput/ReadWriteNicos.cpp @@ -2,7 +2,7 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file Device/InputOutput/OutputDataReadWriteNicos.cpp +//! @file Device/InputOutput/ReadWriteNicos.cpp //! @brief Implements function IO::readNicosData //! //! @homepage http://www.bornagainproject.org @@ -12,7 +12,7 @@ // // ************************************************************************************************ -#include "Device/InputOutput/OutputDataReadWriteNicos.h" +#include "Device/InputOutput/ReadWriteNicos.h" #include "Base/Util/StringUtils.h" namespace { @@ -44,9 +44,9 @@ unsigned int readAssignedPositiveIntValue(const std::string& line, int lineNumbe } // namespace -OutputData<double>* IO::readNicosData(std::istream& input_stream) +Powerfield<double>* IO::readNicosData(std::istream& input_stream) { - auto result = std::make_unique<OutputData<double>>(); // as unique ptr to ensure delete on throw + auto result = std::make_unique<Powerfield<double>>(); // as unique ptr to ensure delete on throw std::string line; int lineNumber = 0; diff --git a/Device/InputOutput/OutputDataReadWriteNicos.h b/Device/InputOutput/ReadWriteNicos.h similarity index 64% rename from Device/InputOutput/OutputDataReadWriteNicos.h rename to Device/InputOutput/ReadWriteNicos.h index 0c0c825147894c945a42431bfaa50c85abffb5ba..5b5897bd2036633930bb6ffe39ddbad3bd0e6357 100644 --- a/Device/InputOutput/OutputDataReadWriteNicos.h +++ b/Device/InputOutput/ReadWriteNicos.h @@ -2,7 +2,7 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file Device/InputOutput/OutputDataReadWriteNicos.h +//! @file Device/InputOutput/ReadWriteNicos.h //! @brief Defines function IO::readNicosData //! //! @homepage http://www.bornagainproject.org @@ -12,16 +12,16 @@ // // ************************************************************************************************ -#ifndef BORNAGAIN_DEVICE_INPUTOUTPUT_OUTPUTDATAREADWRITENICOS_H -#define BORNAGAIN_DEVICE_INPUTOUTPUT_OUTPUTDATAREADWRITENICOS_H +#ifndef BORNAGAIN_DEVICE_INPUTOUTPUT_READWRITENICOS_H +#define BORNAGAIN_DEVICE_INPUTOUTPUT_READWRITENICOS_H -#include "Device/Data/OutputData.h" +#include "Device/Data/Powerfield.h" //! Read/write SANSDRaw files written by Nicos (*.001). namespace IO { -OutputData<double>* readNicosData(std::istream& input_stream); +Powerfield<double>* readNicosData(std::istream& input_stream); }; -#endif // BORNAGAIN_DEVICE_INPUTOUTPUT_OUTPUTDATAREADWRITENICOS_H +#endif // BORNAGAIN_DEVICE_INPUTOUTPUT_READWRITENICOS_H diff --git a/Device/InputOutput/OutputDataReadWriteNumpyTXT.cpp b/Device/InputOutput/ReadWriteNumpyTXT.cpp similarity index 76% rename from Device/InputOutput/OutputDataReadWriteNumpyTXT.cpp rename to Device/InputOutput/ReadWriteNumpyTXT.cpp index 1aa897fec654c50ecc155c946fabe494e145b126..016f6a2ed45783db76156328330988428e4ce13b 100644 --- a/Device/InputOutput/OutputDataReadWriteNumpyTXT.cpp +++ b/Device/InputOutput/ReadWriteNumpyTXT.cpp @@ -2,8 +2,8 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file Device/InputOutput/OutputDataReadWriteNumpyTXT.cpp -//! @brief Implements class OutputDataReadWriteNumpyTXT. +//! @file Device/InputOutput/ReadWriteNumpyTXT.cpp +//! @brief Implements class ReadWriteNumpyTXT. //! //! @homepage http://www.bornagainproject.org //! @license GNU General Public License v3 or higher (see COPYING) @@ -12,7 +12,7 @@ // // ************************************************************************************************ -#include "Device/InputOutput/OutputDataReadWriteNumpyTXT.h" +#include "Device/InputOutput/ReadWriteNumpyTXT.h" #include "Base/Util/StringUtils.h" #include "Device/Data/ArrayUtils.h" #include "Device/InputOutput/DataFormatUtils.h" @@ -28,7 +28,7 @@ bool isDoubleStartChar(char c) } // namespace -OutputData<double>* OutputDataReadWriteNumpyTXT::readOutputData(std::istream& input_stream) +Powerfield<double>* ReadWriteNumpyTXT::readPowerfield(std::istream& input_stream) { std::string line; std::vector<std::vector<double>> data; @@ -54,12 +54,12 @@ OutputData<double>* OutputDataReadWriteNumpyTXT::readOutputData(std::istream& in ncols = data[0].size(); if (ncols == 0) - throw std::runtime_error("OutputDataReadNumpyTXTStrategy::readOutputData() -> Error. " + throw std::runtime_error("ReadNumpyTXTStrategy::readPowerfield() -> Error. " "Can't parse file"); for (size_t row = 0; row < nrows; row++) { if (data[row].size() != ncols) - throw std::runtime_error("OutputDataReadNumpyTXTStrategy::readOutputData() -> Error. " + throw std::runtime_error("ReadNumpyTXTStrategy::readPowerfield() -> Error. " "Number of elements is different from row to row."); } @@ -77,8 +77,7 @@ OutputData<double>* OutputDataReadWriteNumpyTXT::readOutputData(std::istream& in return DataUtils::Array::createData(data).release(); } -void OutputDataReadWriteNumpyTXT::writeOutputData(const OutputData<double>& data, - std::ostream& output_stream) +void ReadWriteNumpyTXT::writePowerfield(const Powerfield<double>& data, std::ostream& output_stream) { output_stream << "# BornAgain Intensity Data" << std::endl; output_stream << "# Simple array suitable for numpy, matlab etc." << std::endl; @@ -92,13 +91,13 @@ void OutputDataReadWriteNumpyTXT::writeOutputData(const OutputData<double>& data write2DRepresentation(data, output_stream); break; default: - throw std::runtime_error("Error in OutputDataWriteNumpyTXTStrategy::writeOutputData: data " + throw std::runtime_error("Error in PowerfieldWriteNumpyTXTStrategy::writePowerfield: data " "of unsupported dimensions"); } } -void OutputDataReadWriteNumpyTXT::write1DRepresentation(const OutputData<double>& data, - std::ostream& output_stream) +void ReadWriteNumpyTXT::write1DRepresentation(const Powerfield<double>& data, + std::ostream& output_stream) { output_stream << "# coordinates intensities" << std::endl; output_stream.imbue(std::locale::classic()); @@ -111,8 +110,8 @@ void OutputDataReadWriteNumpyTXT::write1DRepresentation(const OutputData<double> output_stream << axis_values[i] << " " << ignoreDenormalized(data[i]) << std::endl; } -void OutputDataReadWriteNumpyTXT::write2DRepresentation(const OutputData<double>& data, - std::ostream& output_stream) +void ReadWriteNumpyTXT::write2DRepresentation(const Powerfield<double>& data, + std::ostream& output_stream) { const size_t nrows = data.axis(1).size(); const size_t ncols = data.axis(0).size(); @@ -132,7 +131,7 @@ void OutputDataReadWriteNumpyTXT::write2DRepresentation(const OutputData<double> } } -double OutputDataReadWriteNumpyTXT::ignoreDenormalized(double value) +double ReadWriteNumpyTXT::ignoreDenormalized(double value) { return (std::fpclassify(value) == FP_SUBNORMAL) ? 0.0 : value; } diff --git a/Device/InputOutput/OutputDataReadWriteNumpyTXT.h b/Device/InputOutput/ReadWriteNumpyTXT.h similarity index 55% rename from Device/InputOutput/OutputDataReadWriteNumpyTXT.h rename to Device/InputOutput/ReadWriteNumpyTXT.h index fbf0b7d5db1db62ef95cf7f2048f021ab97091fc..89d06d261da8a5c58301f508dcf32fa4c47767bf 100644 --- a/Device/InputOutput/OutputDataReadWriteNumpyTXT.h +++ b/Device/InputOutput/ReadWriteNumpyTXT.h @@ -2,8 +2,8 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file Device/InputOutput/OutputDataReadWriteNumpyTXT.h -//! @brief Defines OutputDataReadWriteNumpyTXT +//! @file Device/InputOutput/ReadWriteNumpyTXT.h +//! @brief Defines ReadWriteNumpyTXT //! //! @homepage http://www.bornagainproject.org //! @license GNU General Public License v3 or higher (see COPYING) @@ -17,27 +17,27 @@ #endif #ifndef USER_API -#ifndef BORNAGAIN_DEVICE_INPUTOUTPUT_OUTPUTDATAREADWRITENUMPYTXT_H -#define BORNAGAIN_DEVICE_INPUTOUTPUT_OUTPUTDATAREADWRITENUMPYTXT_H +#ifndef BORNAGAIN_DEVICE_INPUTOUTPUT_READWRITENUMPYTXT_H +#define BORNAGAIN_DEVICE_INPUTOUTPUT_READWRITENUMPYTXT_H #include <istream> template <class T> -class OutputData; +class Powerfield; -//! Class for reading and writing OutputData from simple ASCII file with the layout as in +//! Class for reading and writing Powerfield from simple ASCII file with the layout as in //! numpy.savetxt. -class OutputDataReadWriteNumpyTXT { +class ReadWriteNumpyTXT { public: - OutputData<double>* readOutputData(std::istream& input_stream); - void writeOutputData(const OutputData<double>& data, std::ostream& output_stream); + Powerfield<double>* readPowerfield(std::istream& input_stream); + void writePowerfield(const Powerfield<double>& data, std::ostream& output_stream); private: - static void write1DRepresentation(const OutputData<double>& data, std::ostream& output_stream); - static void write2DRepresentation(const OutputData<double>& data, std::ostream& output_stream); + static void write1DRepresentation(const Powerfield<double>& data, std::ostream& output_stream); + static void write2DRepresentation(const Powerfield<double>& data, std::ostream& output_stream); static double ignoreDenormalized(double value); }; -#endif // BORNAGAIN_DEVICE_INPUTOUTPUT_OUTPUTDATAREADWRITENUMPYTXT_H +#endif // BORNAGAIN_DEVICE_INPUTOUTPUT_READWRITENUMPYTXT_H #endif // USER_API diff --git a/Device/InputOutput/OutputDataReadWriteTiff.cpp b/Device/InputOutput/ReadWriteTiff.cpp similarity index 79% rename from Device/InputOutput/OutputDataReadWriteTiff.cpp rename to Device/InputOutput/ReadWriteTiff.cpp index 4a58813cc89769b06aecc686aaf35621769ea557..9a4cd88e8ed3491d58d73bf6f1bcec99602f4984 100644 --- a/Device/InputOutput/OutputDataReadWriteTiff.cpp +++ b/Device/InputOutput/ReadWriteTiff.cpp @@ -2,8 +2,8 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file Device/InputOutput/OutputDataReadWriteTiff.cpp -//! @brief Implements class OutputDataReadWriteTiff +//! @file Device/InputOutput/ReadWriteTiff.cpp +//! @brief Implements class ReadWriteTiff //! //! @homepage http://www.bornagainproject.org //! @license GNU General Public License v3 or higher (see COPYING) @@ -14,13 +14,13 @@ #ifdef BA_TIFF_SUPPORT -#include "Device/InputOutput/OutputDataReadWriteTiff.h" +#include "Device/InputOutput/ReadWriteTiff.h" #include "Base/Util/SysUtils.h" #include <cstring> // memcpy #include <memory> #include <tiffio.hxx> -OutputDataReadWriteTiff::OutputDataReadWriteTiff() +ReadWriteTiff::ReadWriteTiff() : m_tiff(nullptr) , m_width(0) , m_height(0) @@ -30,34 +30,33 @@ OutputDataReadWriteTiff::OutputDataReadWriteTiff() { } -OutputDataReadWriteTiff::~OutputDataReadWriteTiff() +ReadWriteTiff::~ReadWriteTiff() { close(); } -void OutputDataReadWriteTiff::read(std::istream& input_stream) +void ReadWriteTiff::read(std::istream& input_stream) { m_tiff = TIFFStreamOpen("MemTIFF", &input_stream); if (!m_tiff) - throw std::runtime_error("OutputDataReadWriteTiff::read() -> Can't open the file."); + throw std::runtime_error("ReadWriteTiff::read() -> Can't open the file."); read_header(); read_data(); close(); } -OutputData<double>* OutputDataReadWriteTiff::readOutputData(std::istream& input_stream) +Powerfield<double>* ReadWriteTiff::readPowerfield(std::istream& input_stream) { read(input_stream); return m_data->clone(); } -void OutputDataReadWriteTiff::writeOutputData(const OutputData<double>& data, - std::ostream& output_stream) +void ReadWriteTiff::writePowerfield(const Powerfield<double>& data, std::ostream& output_stream) { m_data.reset(data.clone()); if (m_data->rank() != 2) - throw std::runtime_error("OutputDataReadWriteTiff::write -> Error. " + throw std::runtime_error("ReadWriteTiff::write -> Error. " "Only 2-dim arrays supported"); m_tiff = TIFFStreamOpen("MemTIFF", &output_stream); m_width = m_data->axis(0).size(); @@ -67,14 +66,14 @@ void OutputDataReadWriteTiff::writeOutputData(const OutputData<double>& data, close(); } -void OutputDataReadWriteTiff::read_header() +void ReadWriteTiff::read_header() { ASSERT(m_tiff); uint32_t width(0); uint32_t height(0); if (!TIFFGetField(m_tiff, TIFFTAG_IMAGEWIDTH, &width) || !TIFFGetField(m_tiff, TIFFTAG_IMAGELENGTH, &height)) { - throw std::runtime_error("OutputDataReadWriteTiff::read_header() -> Error. " + throw std::runtime_error("ReadWriteTiff::read_header() -> Error. " "Can't read width/height."); } @@ -115,7 +114,7 @@ void OutputDataReadWriteTiff::read_header() if (!good) { std::ostringstream message; - message << "OutputDataReadWriteTiff::read_header() -> Error. " + message << "ReadWriteTiff::read_header() -> Error. " << "Can't read tiff image with following parameters:" << std::endl << " TIFFTAG_BITSPERSAMPLE: " << m_bitsPerSample << std::endl << " TIFFTAG_SAMPLESPERPIXEL: " << m_samplesPerPixel << std::endl @@ -124,7 +123,7 @@ void OutputDataReadWriteTiff::read_header() } } -void OutputDataReadWriteTiff::read_data() +void ReadWriteTiff::read_data() { ASSERT(m_tiff); @@ -133,13 +132,11 @@ void OutputDataReadWriteTiff::read_data() tmsize_t buf_size = TIFFScanlineSize(m_tiff); tmsize_t expected_size = bytesPerSample * m_width; if (buf_size != expected_size) - throw std::runtime_error( - "OutputDataReadWriteTiff::read_data() -> Error. Wrong scanline size."); + throw std::runtime_error("ReadWriteTiff::read_data() -> Error. Wrong scanline size."); tdata_t buf = _TIFFmalloc(buf_size); if (!buf) - throw std::runtime_error( - "OutputDataReadWriteTiff::read_data() -> Error. Can't allocate buffer."); + throw std::runtime_error("ReadWriteTiff::read_data() -> Error. Can't allocate buffer."); create_output_data(); @@ -150,8 +147,7 @@ void OutputDataReadWriteTiff::read_data() for (uint32_t row = 0; row < (uint32_t)m_height; row++) { if (TIFFReadScanline(m_tiff, buf, row) < 0) - throw std::runtime_error( - "OutputDataReadWriteTiff::read_data() -> Error. Error in scanline."); + throw std::runtime_error("ReadWriteTiff::read_data() -> Error. Error in scanline."); memcpy(&line_buf[0], buf, buf_size); @@ -194,7 +190,7 @@ void OutputDataReadWriteTiff::read_data() sample = double(*reinterpret_cast<float*>(incoming)); break; default: - throw std::runtime_error("OutputDataReadWriteTiff: unexpected sample format"); + throw std::runtime_error("ReadWriteTiff: unexpected sample format"); } (*m_data)[global_index] = sample; @@ -203,7 +199,7 @@ void OutputDataReadWriteTiff::read_data() _TIFFfree(buf); } -void OutputDataReadWriteTiff::write_header() +void ReadWriteTiff::write_header() { ASSERT(m_tiff); TIFFSetField(m_tiff, TIFFTAG_ARTIST, "BornAgain.IOFactory"); @@ -226,14 +222,13 @@ void OutputDataReadWriteTiff::write_header() TIFFSetField(m_tiff, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISWHITE); } -void OutputDataReadWriteTiff::write_data() +void ReadWriteTiff::write_data() { using sample_t = int; tmsize_t buf_size = sizeof(sample_t) * m_width; tdata_t buf = _TIFFmalloc(buf_size); if (!buf) - throw std::runtime_error( - "OutputDataReadWriteTiff::write_data() -> Error. Can't allocate buffer."); + throw std::runtime_error("ReadWriteTiff::write_data() -> Error. Can't allocate buffer."); std::vector<sample_t> line_buf; line_buf.resize(m_width, 0); @@ -249,13 +244,13 @@ void OutputDataReadWriteTiff::write_data() if (TIFFWriteScanline(m_tiff, buf, row) < 0) throw std::runtime_error( - "OutputDataReadWriteTiff::write_data() -> Error. Error in TIFFWriteScanline."); + "ReadWriteTiff::write_data() -> Error. Error in TIFFWriteScanline."); } _TIFFfree(buf); TIFFFlush(m_tiff); } -void OutputDataReadWriteTiff::close() +void ReadWriteTiff::close() { if (m_tiff) { TIFFClose(m_tiff); @@ -265,10 +260,10 @@ void OutputDataReadWriteTiff::close() } } -void OutputDataReadWriteTiff::create_output_data() +void ReadWriteTiff::create_output_data() { ASSERT(m_tiff); - m_data = std::make_unique<OutputData<double>>(); + m_data = std::make_unique<Powerfield<double>>(); m_data->addAxis("x", m_width, 0.0, double(m_width)); m_data->addAxis("y", m_height, 0.0, double(m_height)); } diff --git a/Device/InputOutput/OutputDataReadWriteTiff.h b/Device/InputOutput/ReadWriteTiff.h similarity index 64% rename from Device/InputOutput/OutputDataReadWriteTiff.h rename to Device/InputOutput/ReadWriteTiff.h index c8caf385c2c3d38565895bbe193f317b35164b27..5908b06943c4093121d49162762bf4393a9a9cd0 100644 --- a/Device/InputOutput/OutputDataReadWriteTiff.h +++ b/Device/InputOutput/ReadWriteTiff.h @@ -2,8 +2,8 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file Device/InputOutput/OutputDataReadWriteTiff.h -//! @brief Defines class OutputDataReadWriteTiff +//! @file Device/InputOutput/ReadWriteTiff.h +//! @brief Defines class ReadWriteTiff //! //! @homepage http://www.bornagainproject.org //! @license GNU General Public License v3 or higher (see COPYING) @@ -17,25 +17,25 @@ #endif #ifndef USER_API -#ifndef BORNAGAIN_DEVICE_INPUTOUTPUT_OUTPUTDATAREADWRITETIFF_H -#define BORNAGAIN_DEVICE_INPUTOUTPUT_OUTPUTDATAREADWRITETIFF_H +#ifndef BORNAGAIN_DEVICE_INPUTOUTPUT_READWRITETIFF_H +#define BORNAGAIN_DEVICE_INPUTOUTPUT_READWRITETIFF_H #ifdef BA_TIFF_SUPPORT -#include "Device/Data/OutputData.h" +#include "Device/Data/Powerfield.h" #include <cstdint> #include <memory> #include <tiffio.h> //! Reads/write tiff files. -class OutputDataReadWriteTiff { +class ReadWriteTiff { public: - OutputDataReadWriteTiff(); - ~OutputDataReadWriteTiff(); + ReadWriteTiff(); + ~ReadWriteTiff(); - OutputData<double>* readOutputData(std::istream& input_stream); - void writeOutputData(const OutputData<double>& data, std::ostream& output_stream); + Powerfield<double>* readPowerfield(std::istream& input_stream); + void writePowerfield(const Powerfield<double>& data, std::ostream& output_stream); private: void read(std::istream& input_stream); @@ -49,10 +49,10 @@ private: TIFF* m_tiff; size_t m_width, m_height; uint16_t m_bitsPerSample, m_samplesPerPixel, m_sampleFormat; - std::unique_ptr<OutputData<double>> m_data; + std::unique_ptr<Powerfield<double>> m_data; }; #endif // BA_TIFF_SUPPORT -#endif // BORNAGAIN_DEVICE_INPUTOUTPUT_OUTPUTDATAREADWRITETIFF_H +#endif // BORNAGAIN_DEVICE_INPUTOUTPUT_READWRITETIFF_H #endif // USER_API diff --git a/Device/Mask/DetectorMask.cpp b/Device/Mask/DetectorMask.cpp index 16a9c3dff145192b320c54ef11880b99a79e9219..c90daaa88b789d7e0eb32f85fc55f1a1039500ef 100644 --- a/Device/Mask/DetectorMask.cpp +++ b/Device/Mask/DetectorMask.cpp @@ -71,7 +71,7 @@ bool DetectorMask::isMasked(size_t index) const Histogram2D* DetectorMask::createHistogram() const { - OutputData<double> data; + Powerfield<double> data; data.copyShapeFrom(m_mask_data); for (size_t i = 0; i < m_mask_data.getAllocatedSize(); ++i) data[i] = static_cast<double>(m_mask_data[i]); diff --git a/Device/Mask/DetectorMask.h b/Device/Mask/DetectorMask.h index 2997d39f056b511235d0e50041363c580b130d33..faf1ff80661c5814b7caf8cdb101ad1e54cbec0a 100644 --- a/Device/Mask/DetectorMask.h +++ b/Device/Mask/DetectorMask.h @@ -15,7 +15,7 @@ #ifndef BORNAGAIN_DEVICE_MASK_DETECTORMASK_H #define BORNAGAIN_DEVICE_MASK_DETECTORMASK_H -#include "Device/Data/OutputData.h" +#include "Device/Data/Powerfield.h" #ifndef SWIG #include "Base/Types/OwningVector.h" #endif @@ -25,7 +25,7 @@ class IAxis; class IShape2D; template <class T> -class OutputData; +class Powerfield; //! Collection of detector masks. //! @ingroup detector @@ -48,7 +48,7 @@ public: bool isMasked(size_t index) const; - const OutputData<bool>* getMaskData() const { return &m_mask_data; } + const Powerfield<bool>* getMaskData() const { return &m_mask_data; } Histogram2D* createHistogram() const; @@ -68,7 +68,7 @@ private: OwningVector<IShape2D> m_shapes; #endif std::vector<bool> m_mask_of_shape; - OutputData<bool> m_mask_data; + Powerfield<bool> m_mask_data; int m_number_of_masked_channels; }; diff --git a/Device/Resolution/ConvolutionDetectorResolution.cpp b/Device/Resolution/ConvolutionDetectorResolution.cpp index ff0d2c4ced9d2ec17aba79fbf3d56787f5b32b2c..ef4c3ac10d1cf68ee2e209eb0a057fd3bed8ac5d 100644 --- a/Device/Resolution/ConvolutionDetectorResolution.cpp +++ b/Device/Resolution/ConvolutionDetectorResolution.cpp @@ -51,7 +51,7 @@ std::vector<const INode*> ConvolutionDetectorResolution::nodeChildren() const } void ConvolutionDetectorResolution::applyDetectorResolution( - OutputData<double>* p_intensity_map) const + Powerfield<double>* p_intensity_map) const { if (p_intensity_map->rank() != m_dimension) { throw std::runtime_error( @@ -77,7 +77,7 @@ void ConvolutionDetectorResolution::setResolutionFunction(const IResolutionFunct m_res_function_2d.reset(resFunc.clone()); } -void ConvolutionDetectorResolution::apply1dConvolution(OutputData<double>* p_intensity_map) const +void ConvolutionDetectorResolution::apply1dConvolution(Powerfield<double>* p_intensity_map) const { ASSERT(m_res_function_1d == nullptr); if (p_intensity_map->rank() != 1) @@ -109,7 +109,7 @@ void ConvolutionDetectorResolution::apply1dConvolution(OutputData<double>* p_int p_intensity_map->setRawDataVector(result); } -void ConvolutionDetectorResolution::apply2dConvolution(OutputData<double>* p_intensity_map) const +void ConvolutionDetectorResolution::apply2dConvolution(Powerfield<double>* p_intensity_map) const { ASSERT(m_res_function_2d); if (p_intensity_map->rank() != 2) diff --git a/Device/Resolution/ConvolutionDetectorResolution.h b/Device/Resolution/ConvolutionDetectorResolution.h index 66cee00e5772f5813d50b6f070141c08a609f698..48fe8186ab78f3ad3f9a35351a3f69f95148fdb9 100644 --- a/Device/Resolution/ConvolutionDetectorResolution.h +++ b/Device/Resolution/ConvolutionDetectorResolution.h @@ -44,7 +44,7 @@ public: std::string className() const final { return "ConvolutionDetectorResolution"; } //! Convolve given intensities with the encapsulated resolution. - void applyDetectorResolution(OutputData<double>* p_intensity_map) const override; + void applyDetectorResolution(Powerfield<double>* p_intensity_map) const override; const IResolutionFunction2D* getResolutionFunction2D() const; @@ -55,8 +55,8 @@ protected: private: void setResolutionFunction(const IResolutionFunction2D& resFunc); - void apply1dConvolution(OutputData<double>* p_intensity_map) const; - void apply2dConvolution(OutputData<double>* p_intensity_map) const; + void apply1dConvolution(Powerfield<double>* p_intensity_map) const; + void apply2dConvolution(Powerfield<double>* p_intensity_map) const; double getIntegratedPDF1d(double x, double step) const; double getIntegratedPDF2d(double x, double step_x, double y, double step_y) const; diff --git a/Device/Resolution/IDetectorResolution.h b/Device/Resolution/IDetectorResolution.h index 34200b98ac6558ed5d5a3ac288c1493ca262ccc9..0468be167fa431357a440a395baff444ba4bd966 100644 --- a/Device/Resolution/IDetectorResolution.h +++ b/Device/Resolution/IDetectorResolution.h @@ -16,7 +16,7 @@ #define BORNAGAIN_DEVICE_RESOLUTION_IDETECTORRESOLUTION_H #include "Base/Types/ICloneable.h" -#include "Device/Data/OutputData.h" +#include "Device/Data/Powerfield.h" #include "Param/Node/INode.h" //! Interface for detector resolution algorithms @@ -27,7 +27,7 @@ public: IDetectorResolution* clone() const override = 0; //! Apply the resolution function to the intensity data - virtual void applyDetectorResolution(OutputData<double>* p_intensity_map) const = 0; + virtual void applyDetectorResolution(Powerfield<double>* p_intensity_map) const = 0; }; #endif // BORNAGAIN_DEVICE_RESOLUTION_IDETECTORRESOLUTION_H diff --git a/Examples/bayesian/likelihood_sampling.py b/Examples/bayesian/likelihood_sampling.py index eaad83e546b505b6e9a8b8548b7311dfed52ce41..760a909cb8c06a87fba3c9189e083584bf43d2a4 100755 --- a/Examples/bayesian/likelihood_sampling.py +++ b/Examples/bayesian/likelihood_sampling.py @@ -64,7 +64,7 @@ def get_real_data(): """ if not hasattr(get_real_data, "data"): filepath = path.join(datadir, 'genx_interchanging_layers.dat.gz') - real_data = ba.IntensityDataIOFactory.readIntensityData( + real_data = ba.IOFactory.readIntensityData( filepath).array() # translating axis values from double incident angle (degs) # to incident angle (radians) diff --git a/Examples/fit61_Galaxi/fit_galaxi_data.py b/Examples/fit61_Galaxi/fit_galaxi_data.py index 4496b78ab5be1f6dc9a2d4b693f040d1af987397..4638e30228834f9c0a1320c9fb25ac4280d7c009 100755 --- a/Examples/fit61_Galaxi/fit_galaxi_data.py +++ b/Examples/fit61_Galaxi/fit_galaxi_data.py @@ -57,7 +57,7 @@ def load_real_data(filename): Loads experimental data and returns numpy array. """ filepath = os.path.join(datadir, filename) - return ba.IntensityDataIOFactory.readIntensityData(filepath).array() + return ba.IOFactory.readIntensityData(filepath).array() def run_fitting(): diff --git a/Examples/scatter2d/GratingMC.py b/Examples/scatter2d/GratingMC.py index ff37c46a5b50bc07cc19137d22e86bf23f96c878..8a43cff01afe52e3cf25f0fccdda0acd5f4d8e40 100755 --- a/Examples/scatter2d/GratingMC.py +++ b/Examples/scatter2d/GratingMC.py @@ -75,7 +75,7 @@ if __name__ == '__main__': simulation.setTerminalProgressMonitor() result = simulation.simulate() if bp.datfile: - ba.IntensityDataIOFactory.writeSimulationResult( + ba.IOFactory.writeSimulationResult( result, bp.datfile + ".int.gz") histogram = result.histogram2d() bp.plot_histogram(histogram) diff --git a/Examples/scatter2d/MagneticCylinders1.py b/Examples/scatter2d/MagneticCylinders1.py index fefd5a0581fd5a6185afd94d1cb58ef976d09f27..74eabcc33d63c7befa0c60934b745f6f738b6805 100755 --- a/Examples/scatter2d/MagneticCylinders1.py +++ b/Examples/scatter2d/MagneticCylinders1.py @@ -49,7 +49,7 @@ def simulate(): # -------------------------------------------------------------- def run_test(): result = simulate() - # ba.IntensityDataIOFactory.writeIntensityData( + # ba.IOFactory.writeIntensityData( # result, 'polmagcylinders1_reference.int') reference = utils.get_reference_data( diff --git a/Examples/scatter2d/MagneticCylinders2.py b/Examples/scatter2d/MagneticCylinders2.py index d24b4299750c4ea298ebf1e008742eb7d13c1bb3..e10c461cd67079dabc83dfd137f84aa65b2ad8e5 100755 --- a/Examples/scatter2d/MagneticCylinders2.py +++ b/Examples/scatter2d/MagneticCylinders2.py @@ -59,7 +59,7 @@ def get_reference_data(filename): """ path = os.path.join(REFERENCE_DIR, filename) print("- read reference from", path, flush=True) - ret = IntensityDataIOFactory.readIntensityData(path) + ret = IOFactory.readIntensityData(path) print("- - reference read", flush=True) return ret @@ -72,13 +72,13 @@ def run_test(): zplus = R3(0, 0, 1) zmin = R3(0, 0, -1) - # IntensityDataIOFactory.writeIntensityData( + # IOFactory.writeIntensityData( # getSimulationIntensity(zplus, 1), 'polmagcylinders2_reference_00.int') - # IntensityDataIOFactory.writeIntensityData( + # IOFactory.writeIntensityData( # getSimulationIntensity(zplus, -1), 'polmagcylinders2_reference_01.int') - # IntensityDataIOFactory.writeIntensityData( + # IOFactory.writeIntensityData( # getSimulationIntensity(zmin, 1), 'polmagcylinders2_reference_10.int') - # IntensityDataIOFactory.writeIntensityData( + # IOFactory.writeIntensityData( # getSimulationIntensity(zmin, -1), 'polmagcylinders2_reference_11.int') diff = 0.0 diff += get_difference( diff --git a/Examples/varia/AccessingSimulationResults.py b/Examples/varia/AccessingSimulationResults.py index fe4fe9b6e5f9374801b30b1ec3f814c11e50fbe9..0bdebd2c3c8548911aab259582b6d2c196a108b4 100755 --- a/Examples/varia/AccessingSimulationResults.py +++ b/Examples/varia/AccessingSimulationResults.py @@ -137,7 +137,7 @@ if __name__ == '__main__': result = simulation.simulate() if bp.datfile: - ba.IntensityDataIOFactory.writeSimulationResult( + ba.IOFactory.writeSimulationResult( result, bp.datfile + ".int.gz") histo = result.histogram2d() diff --git a/GUI/Model/Data/Data1DViewItem.cpp b/GUI/Model/Data/Data1DViewItem.cpp index 3d80bd45c35afe75ac29e44e9bf9b88d536567c3..18fa9d99e1d9671571674e621de9c77a58bc013c 100644 --- a/GUI/Model/Data/Data1DViewItem.cpp +++ b/GUI/Model/Data/Data1DViewItem.cpp @@ -267,7 +267,7 @@ void Data1DViewItem::resetView() } //! Init ymin, ymax to match the intensity values range. -QPair<double, double> Data1DViewItem::dataRange(const OutputData<double>* data) const +QPair<double, double> Data1DViewItem::dataRange(const Powerfield<double>* data) const { if (!data) return QPair<double, double>(default_min, default_max); diff --git a/GUI/Model/Data/Data1DViewItem.h b/GUI/Model/Data/Data1DViewItem.h index 743bb0fe5f653366a6c46b081721710c284f5522..1c3b084e1c95681ff3f9f0d4b6bc4106c815e425 100644 --- a/GUI/Model/Data/Data1DViewItem.h +++ b/GUI/Model/Data/Data1DViewItem.h @@ -26,7 +26,7 @@ class Data1DProperties; class DataItem; class JobItem; template <class T> -class OutputData; +class Powerfield; //! View model for 1D DataItem. Can represent several items //! at once. In current implementation the first of carried @@ -103,7 +103,7 @@ public: DataPropertyContainer* createPropertyContainerItem(); private: - QPair<double, double> dataRange(const OutputData<double>* data) const; + QPair<double, double> dataRange(const Powerfield<double>* data) const; JobItem* m_job_item; }; diff --git a/GUI/Model/Data/DataItem.cpp b/GUI/Model/Data/DataItem.cpp index b40ef7e84c71c99c9debccc3d1e78e5d49f1d105..f43eac1603e1e3544c0e68b290d42927313e594c 100644 --- a/GUI/Model/Data/DataItem.cpp +++ b/GUI/Model/Data/DataItem.cpp @@ -13,11 +13,11 @@ // ************************************************************************************************ #include "GUI/Model/Data/DataItem.h" -#include "Device/Histo/IntensityDataIOFactory.h" +#include "Device/Histo/IOFactory.h" #include "GUI/Util/ComboProperty.h" #include "GUI/Util/Error.h" -void DataItem::setOutputData(OutputData<double>* data) +void DataItem::setPowerfield(Powerfield<double>* data) { std::unique_lock<std::mutex> lock(m_update_data_mutex); m_data.reset(data); @@ -56,10 +56,10 @@ bool DataItem::containsNonXMLData() const bool DataItem::loadData(const QString& projectDir) { const QString filename = fileName(projectDir); - auto* data = IntensityDataIOFactory::readOutputData(filename.toStdString()); + auto* data = IOFactory::readPowerfield(filename.toStdString()); if (!data) return false; - setOutputData(data); + setPowerfield(data); return true; } @@ -69,9 +69,9 @@ bool DataItem::saveData(const QString& projectDir) return false; std::unique_lock<std::mutex> lock(m_update_data_mutex); - std::unique_ptr<OutputData<double>> clone(getOutputData()->clone()); + std::unique_ptr<Powerfield<double>> clone(getPowerfield()->clone()); lock.unlock(); - IntensityDataIOFactory::writeOutputData(*clone, fileName(projectDir).toStdString()); + IOFactory::writePowerfield(*clone, fileName(projectDir).toStdString()); return true; } @@ -119,7 +119,7 @@ DataItem::DataItem(const QString& modelType) }); mapper()->setOnValueChange([this]() { - // OutputData was modified + // Powerfield was modified setLastModified(QDateTime::currentDateTime()); }); } diff --git a/GUI/Model/Data/DataItem.h b/GUI/Model/Data/DataItem.h index 472dbe5859fc020a399b37b26417bae39928418d..1dc7ebf8cf3f09f513a9c40c6216e4eaf01e63b2 100644 --- a/GUI/Model/Data/DataItem.h +++ b/GUI/Model/Data/DataItem.h @@ -15,7 +15,7 @@ #ifndef BORNAGAIN_GUI_MODEL_DATA_DATAITEM_H #define BORNAGAIN_GUI_MODEL_DATA_DATAITEM_H -#include "Device/Data/OutputData.h" +#include "Device/Data/Powerfield.h" #include "GUI/Model/BaseItem/SessionItem.h" #include "GUI/Model/Descriptor/SelectionDescriptor.h" #include "GUI/Support/IO/SaveLoadInterface.h" @@ -27,7 +27,7 @@ class ImportDataInfo; class InstrumentItem; //! Abstract base class for IntensityDataItem and SpecularDataItem. -//! Owns one simulated data set of type OutputData<double>. +//! Owns one simulated data set of type Powerfield<double>. //! For experimental data, use RealDataItem. @@ -37,11 +37,11 @@ private: static constexpr auto P_AXES_UNITS{"Axes Units"}; public: - OutputData<double>* getOutputData() { return m_data.get(); } - const OutputData<double>* getOutputData() const { return m_data.get(); } + Powerfield<double>* getPowerfield() { return m_data.get(); } + const Powerfield<double>* getPowerfield() const { return m_data.get(); } //! The given pointer becomes owned by this class!! - virtual void setOutputData(OutputData<double>* data) = 0; + virtual void setPowerfield(Powerfield<double>* data) = 0; //! Sets the raw data vector from external source. //! Checks only the equality of data size; no dimension checks are applied. @@ -76,7 +76,7 @@ public: protected: explicit DataItem(const QString& modelType); - std::unique_ptr<OutputData<double>> m_data; //!< simulation results + std::unique_ptr<Powerfield<double>> m_data; //!< simulation results QDateTime m_last_modified; std::mutex m_update_data_mutex; }; diff --git a/GUI/Model/Data/DataPropertyContainer.h b/GUI/Model/Data/DataPropertyContainer.h index 9892525761c197b5c605e11864992c7067c103f9..486c382c137dd63358d4ad31c6bd0acb04d063f6 100644 --- a/GUI/Model/Data/DataPropertyContainer.h +++ b/GUI/Model/Data/DataPropertyContainer.h @@ -21,7 +21,7 @@ class DataItem; class DataProperties; class Data1DProperties; template <class T> -class OutputData; +class Powerfield; class BA_CORE_API_ DataPropertyContainer : public SessionItem { private: diff --git a/GUI/Model/Data/DataViewUtils.cpp b/GUI/Model/Data/DataViewUtils.cpp index 7ecac068ed0510f98e2fa9047ff218008b86d54a..b307a309f22b7c28413a410a744253d5e017a4dc 100644 --- a/GUI/Model/Data/DataViewUtils.cpp +++ b/GUI/Model/Data/DataViewUtils.cpp @@ -50,18 +50,18 @@ void GUI::Model::DataViewUtils::updateAxesTitle(Data1DViewItem* view_item) view_item->setYaxisTitle(QString::fromStdString(converter->axisName(1, current_units))); } -std::unique_ptr<OutputData<double>> +std::unique_ptr<Powerfield<double>> GUI::Model::DataViewUtils::getTranslatedData(Data1DViewItem* view_item, DataItem* data_item) { - std::unique_ptr<OutputData<double>> result; - if (!data_item || !data_item->getOutputData()) + std::unique_ptr<Powerfield<double>> result; + if (!data_item || !data_item->getPowerfield()) return result; auto* converter = getConverter(view_item); auto current_units = selectedUnits(view_item); - result = converter->createOutputData(current_units); - result->setRawDataVector(data_item->getOutputData()->getRawDataVector()); + result = converter->createPowerfield(current_units); + result->setRawDataVector(data_item->getPowerfield()->getRawDataVector()); return result; } diff --git a/GUI/Model/Data/DataViewUtils.h b/GUI/Model/Data/DataViewUtils.h index a531a5f59d01c80eceb984377f495628cc04e026..0df5cca289723ce98729505692d74e5a9348eebf 100644 --- a/GUI/Model/Data/DataViewUtils.h +++ b/GUI/Model/Data/DataViewUtils.h @@ -22,13 +22,13 @@ class DataItem; class Data1DViewItem; class JobItem; template <class T> -class OutputData; +class Powerfield; namespace GUI::Model::DataViewUtils { void updateAxesTitle(Data1DViewItem* view_item); -std::unique_ptr<OutputData<double>> getTranslatedData(Data1DViewItem* view_item, +std::unique_ptr<Powerfield<double>> getTranslatedData(Data1DViewItem* view_item, DataItem* data_item); } // namespace GUI::Model::DataViewUtils diff --git a/GUI/Model/Data/IntensityDataItem.cpp b/GUI/Model/Data/IntensityDataItem.cpp index 27c0e1b1af799536b779dd54496a2020997c5038..8af4d907c8e98cf7bc5361eaa7721c95e94ccf90 100644 --- a/GUI/Model/Data/IntensityDataItem.cpp +++ b/GUI/Model/Data/IntensityDataItem.cpp @@ -68,12 +68,12 @@ IntensityDataItem::IntensityDataItem() registerTag(T_PROJECTIONS, 0, -1, {ProjectionContainerItem::M_TYPE}); } -void IntensityDataItem::setOutputData(OutputData<double>* data) +void IntensityDataItem::setPowerfield(Powerfield<double>* data) { - ASSERT(data && "Assertion failed in IntensityDataItem::setOutputData: nullptr data passed"); + ASSERT(data && "Assertion failed in IntensityDataItem::setPowerfield: nullptr data passed"); if (data->rank() != 2) - throw Error("Error in IntensityDataItem::setOutputData: cannot handle non-2D data"); - DataItem::setOutputData(data); + throw Error("Error in IntensityDataItem::setPowerfield: cannot handle non-2D data"); + DataItem::setPowerfield(data); updateAxesZoomLevel(); updateAxesLabels(); @@ -239,7 +239,7 @@ void IntensityDataItem::reset(ImportDataInfo data) setYaxisTitle(data.axisLabel(1)); MaskUnitsConverter converter; converter.convertToNbins(this); - setOutputData(std::move(data).intensityData().release()); + setPowerfield(std::move(data).intensityData().release()); setAxesRangeToData(); converter.convertFromNbins(this); } @@ -370,7 +370,7 @@ void IntensityDataItem::computeDataRange() //! Init zmin, zmax to match the intensity values range. QPair<double, double> IntensityDataItem::dataRange() const { - const OutputData<double>* data = getOutputData(); + const Powerfield<double>* data = getPowerfield(); double min(*std::min_element(data->begin(), data->end())); double max(*std::max_element(data->begin(), data->end())); if (isLogz()) { diff --git a/GUI/Model/Data/IntensityDataItem.h b/GUI/Model/Data/IntensityDataItem.h index 190621177135d5672c2e5192293dfc7291aba119..f2d66a28c83e14414577694d3ccf77cc4970aff1 100644 --- a/GUI/Model/Data/IntensityDataItem.h +++ b/GUI/Model/Data/IntensityDataItem.h @@ -40,7 +40,7 @@ public: IntensityDataItem(); - void setOutputData(OutputData<double>* data) override; + void setPowerfield(Powerfield<double>* data) override; // TODO: consider using index-based functions for axes' handlers diff --git a/GUI/Model/Data/JobItemUtils.cpp b/GUI/Model/Data/JobItemUtils.cpp index c20064c865ce59918663611dabaf7480c7aa1c04..1bf63a34db83ec15bc2e43ed4195670dbe4cee76 100644 --- a/GUI/Model/Data/JobItemUtils.cpp +++ b/GUI/Model/Data/JobItemUtils.cpp @@ -31,7 +31,7 @@ void updateAxesTitle(DataItem* intensityItem, const ICoordSystem& converter, Axe } // namespace -//! Updates axes of OutputData in IntensityData item to correspond with ::P_AXES_UNITS selection. +//! Updates axes of Powerfield in IntensityData item to correspond with ::P_AXES_UNITS selection. //! InstrumentItem is used to get domain's detector map for given units. void GUI::Model::JobItemUtils::updateDataAxes(DataItem* intensityItem, @@ -45,17 +45,17 @@ void GUI::Model::JobItemUtils::updateDataAxes(DataItem* intensityItem, return; } - if (!intensityItem->getOutputData()) + if (!intensityItem->getPowerfield()) return; Axes::Coords requested_units = GUI::Util::CoordName::coordFromName(intensityItem->selectedCoords()); auto* const converter = instrumentItem->createCoordSystem(); - auto newData = converter->createOutputData(requested_units); - newData->setRawDataVector(intensityItem->getOutputData()->getRawDataVector()); + auto newData = converter->createPowerfield(requested_units); + newData->setRawDataVector(intensityItem->getPowerfield()->getRawDataVector()); - intensityItem->setOutputData(newData.release()); + intensityItem->setPowerfield(newData.release()); intensityItem->setAxesRangeToData(); updateAxesTitle(intensityItem, *converter, requested_units); } @@ -82,22 +82,22 @@ void GUI::Model::JobItemUtils::createDefaultDetectorMap(DataItem* intensityItem, const Instrument2DItem* instrumentItem) { auto* const converter = instrumentItem->createCoordSystem(); - auto output_data = converter->createOutputData(converter->defaultUnits()); - intensityItem->setOutputData(output_data.release()); + auto output_data = converter->createPowerfield(converter->defaultUnits()); + intensityItem->setPowerfield(output_data.release()); setIntensityItemCoords(intensityItem, *converter); updateAxesTitle(intensityItem, *converter, converter->defaultUnits()); } void GUI::Model::JobItemUtils::setResults(DataItem* intensityItem, const SimulationResult& result) { - if (intensityItem->getOutputData() == nullptr) { + if (intensityItem->getPowerfield() == nullptr) { const auto& converter = result.converter(); GUI::Model::JobItemUtils::setIntensityItemCoords(intensityItem, converter); updateAxesTitle(intensityItem, converter, converter.defaultUnits()); } auto selected_units = GUI::Util::CoordName::coordFromName(intensityItem->selectedCoords()); auto data = result.data(selected_units); - intensityItem->setOutputData(data.release()); + intensityItem->setPowerfield(data.release()); } ComboProperty GUI::Model::JobItemUtils::availableUnits(const ICoordSystem& converter) diff --git a/GUI/Model/Data/JobItemUtils.h b/GUI/Model/Data/JobItemUtils.h index 30bdc9c17a29e83ab848fff64af9a7a2025e8db4..1d40b607771b1715129a9a59115dcec458912e61 100644 --- a/GUI/Model/Data/JobItemUtils.h +++ b/GUI/Model/Data/JobItemUtils.h @@ -26,11 +26,11 @@ class SimulationResult; class ICoordSystem; //! Contains convenience methods to trasfer data from domain simulation to IntensityDataItem. -//! Used to modify OutputData's axes units as requested by IntensityDataItem. +//! Used to modify Powerfield's axes units as requested by IntensityDataItem. namespace GUI::Model::JobItemUtils { -//! updates axes of OutputData in IntensityData item +//! updates axes of Powerfield in IntensityData item void updateDataAxes(DataItem* intensityItem, const InstrumentItem* instrumentItem); void setIntensityItemCoords(DataItem* intensityItem, const InstrumentItem* instrumentItem); diff --git a/GUI/Model/Data/RealDataItem.cpp b/GUI/Model/Data/RealDataItem.cpp index a34d9859f90abed39cb6ef5193def1fe58eb1a1b..31e7742cfcb4d515c52423ea0ca58b8195e66b87 100644 --- a/GUI/Model/Data/RealDataItem.cpp +++ b/GUI/Model/Data/RealDataItem.cpp @@ -115,24 +115,24 @@ void RealDataItem::removeNativeData() ASSERT(isSpecularData()); // not implemented for intensityDataItem if (nativeData() != nullptr) - nativeData()->setOutputData(nullptr); + nativeData()->setPowerfield(nullptr); } bool RealDataItem::hasNativeData() const { - return (nativeData() != nullptr) && (nativeData()->getOutputData() != nullptr); + return (nativeData() != nullptr) && (nativeData()->getPowerfield() != nullptr); } -const OutputData<double>* RealDataItem::nativeOutputData() const +const Powerfield<double>* RealDataItem::nativePowerfield() const { - return hasNativeData() ? nativeData()->getOutputData() : nullptr; + return hasNativeData() ? nativeData()->getPowerfield() : nullptr; } //! takes ownership of data -void RealDataItem::setNativeOutputData(OutputData<double>* data) +void RealDataItem::setNativePowerfield(Powerfield<double>* data) { - nativeData()->setOutputData(data); // takes ownership of odata + nativeData()->setPowerfield(data); // takes ownership of odata } //! Creates and inserts a data item except if such item with same tag already exists. @@ -160,19 +160,19 @@ void RealDataItem::initDataItem(size_t rank, const QString& tag) } } -//! Sets OutputData to underlying item. Creates it if not existing. +//! Sets Powerfield to underlying item. Creates it if not existing. -void RealDataItem::setOutputData(OutputData<double>* data) +void RealDataItem::setPowerfield(Powerfield<double>* data) { - ASSERT(data && "Assertion failed in RealDataItem::setOutputData: passed data is nullptr"); + ASSERT(data && "Assertion failed in RealDataItem::setPowerfield: passed data is nullptr"); initDataItem(data->rank(), T_INTENSITY_DATA); - dataItem()->setOutputData(data); + dataItem()->setPowerfield(data); } //! Sets imported data to underlying item. Creates it if not existing. -//! This is used for 1D import. For 2D import, use setOutputData. +//! This is used for 1D import. For 2D import, use setPowerfield. void RealDataItem::setImportData(ImportDataInfo info) { @@ -188,7 +188,7 @@ void RealDataItem::setImportData(ImportDataInfo info) dataItem()->reset(std::move(info)); setNativeDataUnits(units_name); - item<DataItem>(T_NATIVE_DATA)->setOutputData(output_data.release()); + item<DataItem>(T_NATIVE_DATA)->setPowerfield(output_data.release()); } void RealDataItem::initAsSpecularItem() @@ -368,8 +368,8 @@ void RealDataItem::rotateData() projectionsContainer->index()); // -- now rotate data - auto* const input = intensityDataItem()->getOutputData(); - intensityDataItem()->setOutputData( + auto* const input = intensityDataItem()->getPowerfield(); + intensityDataItem()->setPowerfield( DataUtils::Data::createRearrangedDataSet(*input, 1).release()); intensityDataItem()->setAxesRangeToData(); } @@ -400,17 +400,17 @@ void RealDataItem::updateToInstrument(const InstrumentItem* instrument) // instrument == nullptr => unlinking => going back to native data if (isSpecularData()) { if (hasNativeData()) { - std::unique_ptr<OutputData<double>> native_data(nativeData()->getOutputData()->clone()); + std::unique_ptr<Powerfield<double>> native_data(nativeData()->getPowerfield()->clone()); const QString units_label = nativeDataUnits(); data_item->reset(ImportDataInfo(std::move(native_data), units_label)); } else { - specularDataItem()->setOutputData(nullptr); + specularDataItem()->setPowerfield(nullptr); } } else { auto* native_data_item = nativeData(); auto* data_source = native_data_item ? native_data_item : data_item; - std::unique_ptr<OutputData<double>> native_data(data_source->getOutputData()->clone()); + std::unique_ptr<Powerfield<double>> native_data(data_source->getPowerfield()->clone()); const QString units_label = nativeDataUnits(); data_item->reset(ImportDataInfo(std::move(native_data), units_label)); } diff --git a/GUI/Model/Data/RealDataItem.h b/GUI/Model/Data/RealDataItem.h index 70b20704655a290e59c3143d9b88ca0446e3d654..deef4a37a125503d7f659861be4db7ae0d19acb4 100644 --- a/GUI/Model/Data/RealDataItem.h +++ b/GUI/Model/Data/RealDataItem.h @@ -24,7 +24,7 @@ class IntensityDataItem; class SpecularDataItem; class MaskContainerItem; template <class T> -class OutputData; +class Powerfield; class ImportDataInfo; class AbstractDataLoader; @@ -70,10 +70,10 @@ public: void setNativeDataUnits(const QString& units); void removeNativeData(); bool hasNativeData() const; - const OutputData<double>* nativeOutputData() const; - void setNativeOutputData(OutputData<double>* data); + const Powerfield<double>* nativePowerfield() const; + void setNativePowerfield(Powerfield<double>* data); - void setOutputData(OutputData<double>* data); + void setPowerfield(Powerfield<double>* data); void setImportData(ImportDataInfo info); bool holdsDimensionalData() const; diff --git a/GUI/Model/Data/SpecularDataItem.cpp b/GUI/Model/Data/SpecularDataItem.cpp index 87429e459b30d6042eca006d93d3914f40b8a007..8eff2f9dd2e7531131d30408a25d8f0e2326629d 100644 --- a/GUI/Model/Data/SpecularDataItem.cpp +++ b/GUI/Model/Data/SpecularDataItem.cpp @@ -39,15 +39,15 @@ SpecularDataItem::SpecularDataItem() yAxisItem()->setTitle(y_axis_default_name); } -void SpecularDataItem::setOutputData(OutputData<double>* data) +void SpecularDataItem::setPowerfield(Powerfield<double>* data) { if (data != nullptr) { if (data->rank() != 1) - throw Error("Error in SpecularDataItem::setOutputData: cannot handle non-1D data"); - DataItem::setOutputData(data); + throw Error("Error in SpecularDataItem::setPowerfield: cannot handle non-1D data"); + DataItem::setPowerfield(data); updateAxesZoomLevel(); } else { - DataItem::setOutputData(data); + DataItem::setPowerfield(data); } emitDataChanged(); @@ -150,7 +150,7 @@ void SpecularDataItem::reset(ImportDataInfo data) setAxesUnits(combo); setXaxisTitle(data.axisLabel(0)); setYaxisTitle(data.axisLabel(1)); - setOutputData(std::move(data).intensityData().release()); + setPowerfield(std::move(data).intensityData().release()); setAxesRangeToData(); } @@ -214,7 +214,7 @@ QPair<double, double> SpecularDataItem::dataRange() const { const double default_min = 0.0; const double default_max = 1.0; - const OutputData<double>* data = getOutputData(); + const Powerfield<double>* data = getPowerfield(); if (!data) return QPair<double, double>(default_min, default_max); double min(*std::min_element(data->begin(), data->end())); diff --git a/GUI/Model/Data/SpecularDataItem.h b/GUI/Model/Data/SpecularDataItem.h index da3e715077ce569cc954b8dd63bf0392b03f3c67..bc88f586199d100686190eb762c1e30bf59168d1 100644 --- a/GUI/Model/Data/SpecularDataItem.h +++ b/GUI/Model/Data/SpecularDataItem.h @@ -31,7 +31,7 @@ public: SpecularDataItem(); - void setOutputData(OutputData<double>* data) override; + void setPowerfield(Powerfield<double>* data) override; //! Number of bins in data int getNbins() const; diff --git a/GUI/Model/Device/InstrumentItems.cpp b/GUI/Model/Device/InstrumentItems.cpp index 0a911517ae300289edbdc373e9ffeb231fed8f89..2835051e407b2b0fde600866f8da3a80e25337f0 100644 --- a/GUI/Model/Device/InstrumentItems.cpp +++ b/GUI/Model/Device/InstrumentItems.cpp @@ -185,7 +185,7 @@ void SpecularInstrumentItem::updateToRealData(const RealDataItem* item) throw Error("Error in SpecularInstrumentItem::updateToRealData: The type " "of instrument is incompatible with passed data shape."); - const auto& data = item->nativeOutputData()->axis(0); + const auto& data = item->nativePowerfield()->axis(0); beamItem()->updateToData(data, item->nativeDataUnits()); } @@ -214,7 +214,7 @@ bool SpecularInstrumentItem::alignedWith(const RealDataItem* item) const if (!item->hasNativeData()) return false; - const auto& native_axis = item->nativeOutputData()->axis(0); + const auto& native_axis = item->nativePowerfield()->axis(0); return *instrumentAxis == native_axis; } diff --git a/GUI/Model/Device/MaskUnitsConverter.cpp b/GUI/Model/Device/MaskUnitsConverter.cpp index 46c075b718f426a83ca9a54016eeec9ad51ceb01..7e89503e5f787e9b170a707d75c3d2b4542bbbed 100644 --- a/GUI/Model/Device/MaskUnitsConverter.cpp +++ b/GUI/Model/Device/MaskUnitsConverter.cpp @@ -33,7 +33,7 @@ void MaskUnitsConverter::convertToNbins(IntensityDataItem* intensityData) } //! Converts all masks on board of IntensityDataItem from bin-fraction coordinates to coordinates -//! of axes currently defined in OutputData. +//! of axes currently defined in Powerfield. void MaskUnitsConverter::convertFromNbins(IntensityDataItem* intensityData) { @@ -45,10 +45,10 @@ void MaskUnitsConverter::convertFromNbins(IntensityDataItem* intensityData) void MaskUnitsConverter::convertIntensityDataItem(IntensityDataItem* intensityData) { - if (!intensityData || !intensityData->getOutputData()) + if (!intensityData || !intensityData->getPowerfield()) return; - m_data = intensityData->getOutputData(); + m_data = intensityData->getPowerfield(); if (intensityData->maskContainerItem()) for (auto* maskItem : intensityData->maskContainerItem()->maskItems()) diff --git a/GUI/Model/Device/MaskUnitsConverter.h b/GUI/Model/Device/MaskUnitsConverter.h index d6a91864a55ed7592b6965e16c8ec4e1b8a42052..0c5c31820457953b9fe34d64d1294a6d1adb5a67 100644 --- a/GUI/Model/Device/MaskUnitsConverter.h +++ b/GUI/Model/Device/MaskUnitsConverter.h @@ -19,16 +19,16 @@ class IntensityDataItem; class SessionItem; class IAxis; template <class T> -class OutputData; +class Powerfield; class QString; class MaskItem; //! The MaskUnitsConverter converts coordinates of all masks from one units to anoter. //! I.e. masks in 'mm' into masks in 'deg'. This is done in two steps. -//! On first step masks are converted from native coordinates (as given by axes of OutputData) +//! On first step masks are converted from native coordinates (as given by axes of Powerfield) //! into bin-fraction coordinates. //! On second step masks are converted from bin-fraction coordinates into current axes of -//! OutputData. +//! Powerfield. class MaskUnitsConverter { public: @@ -49,7 +49,7 @@ private: double convert(double value, Axis axis); - const OutputData<double>* m_data; + const Powerfield<double>* m_data; EConvertionDirection m_direction; }; diff --git a/GUI/Model/Device/PointwiseAxisItem.cpp b/GUI/Model/Device/PointwiseAxisItem.cpp index bdd309666ab8fd36e94191923299a811e7a47e51..399400e62e10b670d6ed2cd652b5b980e1c85d05 100644 --- a/GUI/Model/Device/PointwiseAxisItem.cpp +++ b/GUI/Model/Device/PointwiseAxisItem.cpp @@ -15,9 +15,9 @@ #include "GUI/Model/Device/PointwiseAxisItem.h" #include "Base/Axis/PointwiseAxis.h" #include "Device/Coord/ICoordSystem.h" -#include "Device/Data/OutputData.h" -#include "Device/Histo/IntensityDataIOFactory.h" -#include "Device/InputOutput/OutputDataReadWriteINT.h" +#include "Device/Data/Powerfield.h" +#include "Device/Histo/IOFactory.h" +#include "Device/InputOutput/ReadWriteINT.h" #include "GUI/Model/Device/InstrumentItems.h" #include "GUI/Support/XML/Serialize.h" @@ -90,11 +90,11 @@ QByteArray PointwiseAxisItem::serializeBinaryData() const if (!m_axis) return {}; - OutputData<double> axisData; + Powerfield<double> axisData; axisData.addAxis(*m_axis); std::stringstream ss; - OutputDataReadWriteINT().writeOutputData(axisData, ss); + ReadWriteINT().writePowerfield(axisData, ss); return QByteArray(ss.str().c_str(), static_cast<int>(ss.str().size())); } @@ -104,7 +104,7 @@ void PointwiseAxisItem::deserializeBinaryData(const QByteArray& data) return; std::istringstream str(data.toStdString()); - std::unique_ptr<OutputData<double>> d(OutputDataReadWriteINT().readOutputData(str)); + std::unique_ptr<Powerfield<double>> d(ReadWriteINT().readPowerfield(str)); m_axis = std::unique_ptr<IAxis>(d->axis(0).clone()); } diff --git a/GUI/Model/Job/JobItem.cpp b/GUI/Model/Job/JobItem.cpp index d58cf659404a1cc906357df0e09cc5f406028675..93cb6f65ea35114fad372ae5fdd9a12c2f80032e 100644 --- a/GUI/Model/Job/JobItem.cpp +++ b/GUI/Model/Job/JobItem.cpp @@ -122,8 +122,8 @@ void JobItem::setStatus(const JobStatus status) setItemValue(P_STATUS, jobStatusToString(status)); if (status == JobStatus::Failed) { if (DataItem* intensityItem = dataItem()) { - if (intensityItem->getOutputData()) - intensityItem->getOutputData()->setAllTo(0.0); + if (intensityItem->getPowerfield()) + intensityItem->getPowerfield()->setAllTo(0.0); emit intensityItem->emitDataChanged(); } } diff --git a/GUI/Model/Model/JobFunctions.cpp b/GUI/Model/Model/JobFunctions.cpp index 77ba92fa4baf89c1b9b57ad528e1d39bd2f9a1b0..6abf67b2133bb1a1d1d3976dae995cb894dc6931 100644 --- a/GUI/Model/Model/JobFunctions.cpp +++ b/GUI/Model/Model/JobFunctions.cpp @@ -65,14 +65,14 @@ void cropRealData(JobItem* jobItem) // adjusting real data to the size of region of interest IntensityDataItem* intensityItem = realData->intensityDataItem(); - std::unique_ptr<OutputData<double>> origData(intensityItem->getOutputData()->clone()); + std::unique_ptr<Powerfield<double>> origData(intensityItem->getPowerfield()->clone()); auto* instrument_item = jobItem->instrument2DItem(); GUI::Model::JobItemUtils::createDefaultDetectorMap(intensityItem, instrument_item); instrument_item->createInstrument()->getDetector()->iterateOverNonMaskedPoints( [&](IDetector::const_iterator it) { - auto* cropped_data = intensityItem->getOutputData(); + auto* cropped_data = intensityItem->getPowerfield(); (*cropped_data)[it.roiIndex()] = (*origData)[it.detectorIndex()]; }); @@ -167,7 +167,7 @@ void GUI::Model::JobFunctions::copyRealDataItem(JobItem* jobItem, const RealData RealDataItem* realDataItemCopy = jobItem->copyRealDataIntoJob(realDataItem); ASSERT(realDataItemCopy); - realDataItemCopy->dataItem()->setOutputData(realDataItem->dataItem()->getOutputData()->clone()); + realDataItemCopy->dataItem()->setPowerfield(realDataItem->dataItem()->getPowerfield()->clone()); // adapting the name to job name realDataItemCopy->dataItem()->setFileName( @@ -178,7 +178,7 @@ void GUI::Model::JobFunctions::copyRealDataItem(JobItem* jobItem, const RealData if (!realDataItem->hasNativeData()) return; - realDataItemCopy->setNativeOutputData(realDataItem->nativeOutputData()->clone()); + realDataItemCopy->setNativePowerfield(realDataItem->nativePowerfield()->clone()); realDataItemCopy->nativeData()->setFileName( GUI::Model::FilenameUtils::jobNativeDataFileName(jobItem->getIdentifier())); } diff --git a/GUI/Model/Project/OutputDataIOService.cpp b/GUI/Model/Project/IOService.cpp similarity index 81% rename from GUI/Model/Project/OutputDataIOService.cpp rename to GUI/Model/Project/IOService.cpp index 1aa6675cf4cae125c0d1dcb7a466fd9a10984d1b..95e97a1dc65ff67b8de8ad27b7507b6b7274b3b6 100644 --- a/GUI/Model/Project/OutputDataIOService.cpp +++ b/GUI/Model/Project/IOService.cpp @@ -2,8 +2,8 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file GUI/Model/Project/OutputDataIOService.cpp -//! @brief Implements class OutputDataIOService +//! @file GUI/Model/Project/IOService.cpp +//! @brief Implements class PowerfieldIOService //! //! @homepage http://www.bornagainproject.org //! @license GNU General Public License v3 or higher (see COPYING) @@ -12,7 +12,7 @@ // // ************************************************************************************************ -#include "GUI/Model/Project/OutputDataIOService.h" +#include "GUI/Model/Project/IOService.h" #include "GUI/Model/Job/JobItem.h" #include "GUI/Model/Model/ApplicationModels.h" #include "GUI/Model/Model/ModelPath.h" @@ -32,32 +32,32 @@ JobItem* parentJobItem(SaveLoadInterface* item) } // namespace -OutputDataIOService::OutputDataIOService(QObject* parent) +PowerfieldIOService::PowerfieldIOService(QObject* parent) : QObject(parent) , m_applicationModels(nullptr) { - setObjectName("OutputDataIOService"); + setObjectName("PowerfieldIOService"); } -OutputDataIOService::OutputDataIOService(ApplicationModels* models, QObject* parent) +PowerfieldIOService::PowerfieldIOService(ApplicationModels* models, QObject* parent) : QObject(parent) , m_applicationModels(nullptr) { - setObjectName("OutputDataIOService"); + setObjectName("PowerfieldIOService"); setApplicationModels(models); } -void OutputDataIOService::setApplicationModels(ApplicationModels* models) +void PowerfieldIOService::setApplicationModels(ApplicationModels* models) { m_applicationModels = models; } -void OutputDataIOService::save(const QString& projectDir) +void PowerfieldIOService::save(const QString& projectDir) { if (!m_history.hasHistory(projectDir)) - m_history.setHistory(projectDir, OutputDataDirHistory()); + m_history.setHistory(projectDir, PowerfieldDirHistory()); - OutputDataDirHistory newHistory; + PowerfieldDirHistory newHistory; for (SaveLoadInterface* item : dataInterfaces()) { if (m_history.wasModifiedSinceLastSave(projectDir, item)) @@ -74,9 +74,9 @@ void OutputDataIOService::save(const QString& projectDir) m_history.setHistory(projectDir, newHistory); } -void OutputDataIOService::loadDataFiles(const QString& projectDir, MessageService* messageService) +void PowerfieldIOService::loadDataFiles(const QString& projectDir, MessageService* messageService) { - OutputDataDirHistory newHistory; + PowerfieldDirHistory newHistory; for (SaveLoadInterface* item : dataInterfaces()) { try { @@ -106,7 +106,7 @@ void OutputDataIOService::loadDataFiles(const QString& projectDir, MessageServic //! Returns all non-XML items available for save/load. -QVector<SaveLoadInterface*> OutputDataIOService::dataInterfaces() const +QVector<SaveLoadInterface*> PowerfieldIOService::dataInterfaces() const { QVector<SaveLoadInterface*> result; @@ -123,7 +123,7 @@ QVector<SaveLoadInterface*> OutputDataIOService::dataInterfaces() const //! Clean old saved files. //! All files in oldSaves list, which are not in newSaves list, will be removed. -void OutputDataIOService::cleanOldFiles(const QString& projectDir, const QStringList& oldSaves, +void PowerfieldIOService::cleanOldFiles(const QString& projectDir, const QStringList& oldSaves, const QStringList& newSaves) { const auto toRemove = oldSaves.toSet().subtract(newSaves.toSet()); diff --git a/GUI/Model/Project/OutputDataIOService.h b/GUI/Model/Project/IOService.h similarity index 70% rename from GUI/Model/Project/OutputDataIOService.h rename to GUI/Model/Project/IOService.h index ecc863d80c28c6ab948d73811160beff214fd0e1..e017baeeb90f9931f0206ade8095de5d7426b4eb 100644 --- a/GUI/Model/Project/OutputDataIOService.h +++ b/GUI/Model/Project/IOService.h @@ -2,8 +2,8 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file GUI/Model/Project/OutputDataIOService.h -//! @brief Defines class OutputDataIOService +//! @file GUI/Model/Project/IOService.h +//! @brief Defines class PowerfieldIOService //! //! @homepage http://www.bornagainproject.org //! @license GNU General Public License v3 or higher (see COPYING) @@ -12,10 +12,10 @@ // // ************************************************************************************************ -#ifndef BORNAGAIN_GUI_MODEL_PROJECT_OUTPUTDATAIOSERVICE_H -#define BORNAGAIN_GUI_MODEL_PROJECT_OUTPUTDATAIOSERVICE_H +#ifndef BORNAGAIN_GUI_MODEL_PROJECT_IOSERVICE_H +#define BORNAGAIN_GUI_MODEL_PROJECT_IOSERVICE_H -#include "GUI/Support/IO/OutputDataIOHistory.h" +#include "GUI/Support/IO/IOHistory.h" #include <QObject> class ApplicationModels; @@ -27,11 +27,11 @@ class SaveLoadInterface; //! Listens all models and keep tracks of changes in items. Provides logic to //! not to re-save already saved data. -class OutputDataIOService : public QObject { +class PowerfieldIOService : public QObject { Q_OBJECT public: - explicit OutputDataIOService(QObject* parent = nullptr); - explicit OutputDataIOService(ApplicationModels* models, QObject* parent = nullptr); + explicit PowerfieldIOService(QObject* parent = nullptr); + explicit PowerfieldIOService(ApplicationModels* models, QObject* parent = nullptr); void setApplicationModels(ApplicationModels* models); @@ -45,8 +45,8 @@ private: void cleanOldFiles(const QString& projectDir, const QStringList& oldSaves, const QStringList& newSaves); - OutputDataIOHistory m_history; + PowerfieldIOHistory m_history; ApplicationModels* m_applicationModels; }; -#endif // BORNAGAIN_GUI_MODEL_PROJECT_OUTPUTDATAIOSERVICE_H +#endif // BORNAGAIN_GUI_MODEL_PROJECT_IOSERVICE_H diff --git a/GUI/Model/Project/ProjectDocument.cpp b/GUI/Model/Project/ProjectDocument.cpp index c369553496349551b8f7ed494fdc27d052fcc447..12112596acd845cae8081aec917982d96f797f72 100644 --- a/GUI/Model/Project/ProjectDocument.cpp +++ b/GUI/Model/Project/ProjectDocument.cpp @@ -17,8 +17,8 @@ #include "GUI/Model/Device/InstrumentItems.h" #include "GUI/Model/Model/JobModel.h" #include "GUI/Model/Model/RealDataModel.h" +#include "GUI/Model/Project/IOService.h" #include "GUI/Model/Project/LinkInstrumentManager.h" -#include "GUI/Model/Project/OutputDataIOService.h" #include "GUI/Model/Sample/ItemWithMaterial.h" #include "GUI/Model/Sample/MaterialItem.h" #include "GUI/Model/Sample/MultiLayerItem.h" @@ -52,7 +52,7 @@ const QString FormatVersionTag("FormatVersion"); ProjectDocument::ProjectDocument() : m_modified(false) - , m_dataService(new OutputDataIOService(this)) + , m_dataService(new PowerfieldIOService(this)) , m_singleInstrumentMode(false) , m_singleSampleMode(false) , m_functionalities(All) diff --git a/GUI/Model/Project/ProjectDocument.h b/GUI/Model/Project/ProjectDocument.h index 51c98350fc7d3855d5c97538c60d69d0327ce816..e5367731b3d381c2b85b6fbc51edf08d4ead75c9 100644 --- a/GUI/Model/Project/ProjectDocument.h +++ b/GUI/Model/Project/ProjectDocument.h @@ -27,7 +27,7 @@ class QIODevice; class MessageService; -class OutputDataIOService; +class PowerfieldIOService; class RealDataModel; class JobModel; @@ -137,7 +137,7 @@ private: ApplicationModels m_applicationModels; bool m_modified; QString m_currentVersion; - OutputDataIOService* m_dataService; + PowerfieldIOService* m_dataService; std::unique_ptr<LinkInstrumentManager> m_linkManager; bool m_singleInstrumentMode; bool m_singleSampleMode; diff --git a/GUI/Model/Sample/InterferenceItems.cpp b/GUI/Model/Sample/InterferenceItems.cpp index 917059a938bb749720f79ff92107c22ae346d8f4..16da34649af6f5c47728b67cc6337ace1c43a7d0 100644 --- a/GUI/Model/Sample/InterferenceItems.cpp +++ b/GUI/Model/Sample/InterferenceItems.cpp @@ -25,7 +25,7 @@ InterferenceItem::InterferenceItem() { m_positionVariance.init("PositionVariance", "Variance of the position in each dimension", 0.0, - Unit::nanometerPower2, "PositionVariance"); + Unit::nanometer2, "PositionVariance"); } DoubleDescriptor InterferenceItem::positionVariance() const @@ -313,7 +313,7 @@ InterferenceHardDiskItem::InterferenceHardDiskItem() { m_radius.init("Radius", "Hard disk radius", 5.0, Unit::nanometer, "radius"); m_density.init("Total particle density", "Particle density in particles per area", 0.002, - Unit::nanometerPowerMinus2, "density"); + Unit::nanometerMinus2, "density"); } std::unique_ptr<IInterference> InterferenceHardDiskItem::createInterference() const diff --git a/GUI/Model/Sample/ParticleLayoutItem.cpp b/GUI/Model/Sample/ParticleLayoutItem.cpp index 64bfe97a4002f6f107530a6d6452b9b411ae19aa..cb19e9117c66195b67c94b6275a04e4077a6bc00 100644 --- a/GUI/Model/Sample/ParticleLayoutItem.cpp +++ b/GUI/Model/Sample/ParticleLayoutItem.cpp @@ -28,7 +28,7 @@ ParticleLayoutItem::ParticleLayoutItem(const MaterialItems* materials) m_ownDensity.init("Total particle density", "Number of particles per area (particle surface density).\n " "Should be defined for disordered and 1d-ordered particle collections.", - 0.01, Unit::nanometerPowerMinus2, 10, RealLimits::nonnegative(), "density"); + 0.01, Unit::nanometerMinus2, 10, RealLimits::nonnegative(), "density"); m_weight.init("Weight", "Weight of this particle layout.\nShould be used when multiple layouts define " "different domains in the sample.", diff --git a/GUI/Support/IO/OutputDataIOHistory.cpp b/GUI/Support/IO/IOHistory.cpp similarity index 68% rename from GUI/Support/IO/OutputDataIOHistory.cpp rename to GUI/Support/IO/IOHistory.cpp index de7b3d35320e45a303b67808eaeb73957fdbd5de..6a91c20bbc7d1931f70f926cf58176cb21c0a64c 100644 --- a/GUI/Support/IO/OutputDataIOHistory.cpp +++ b/GUI/Support/IO/IOHistory.cpp @@ -2,8 +2,8 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file GUI/Support/IO/OutputDataIOHistory.cpp -//! @brief Defines OutputDataIOHistory classes +//! @file GUI/Support/IO/IOHistory.cpp +//! @brief Defines PowerfieldIOHistory classes //! //! @homepage http://www.bornagainproject.org //! @license GNU General Public License v3 or higher (see COPYING) @@ -12,32 +12,32 @@ // // ************************************************************************************************ -#include "GUI/Support/IO/OutputDataIOHistory.h" +#include "GUI/Support/IO/IOHistory.h" #include "Base/Util/Assert.h" #include "GUI/Support/IO/SaveLoadInterface.h" #include "GUI/Util/Error.h" //! Static method to create info for just saved item. -OutputDataSaveInfo OutputDataSaveInfo::createSaved(const SaveLoadInterface* item) +PowerfieldSaveInfo PowerfieldSaveInfo::createSaved(const SaveLoadInterface* item) { ASSERT(item); - OutputDataSaveInfo result; + PowerfieldSaveInfo result; result.m_data = item; result.m_file_name = item->fileName(); result.m_last_saved = QDateTime::currentDateTime(); return result; } -bool OutputDataSaveInfo::wasModifiedSinceLastSave() const +bool PowerfieldSaveInfo::wasModifiedSinceLastSave() const { return wasSavedBefore(m_data->lastModified()); } //! Returns true if IntensityDataItem was saved before given time. -bool OutputDataSaveInfo::wasSavedBefore(const QDateTime& dtime) const +bool PowerfieldSaveInfo::wasSavedBefore(const QDateTime& dtime) const { // positive number means that m_last_saved is older than dtime return m_last_saved.msecsTo(dtime) > 0; @@ -45,23 +45,23 @@ bool OutputDataSaveInfo::wasSavedBefore(const QDateTime& dtime) const //----------------------------------------------------------------------------- -void OutputDataDirHistory::markAsSaved(const SaveLoadInterface* item) +void PowerfieldDirHistory::markAsSaved(const SaveLoadInterface* item) { if (contains(item)) - throw Error("OutputDataDirHistory::markAsSaved() -> Error. " + throw Error("PowerfieldDirHistory::markAsSaved() -> Error. " "Already existing item."); // Don't create any history info for empty items if (item->containsNonXMLData()) - m_history.push_back(OutputDataSaveInfo::createSaved(item)); + m_history.push_back(PowerfieldSaveInfo::createSaved(item)); } -bool OutputDataDirHistory::wasModifiedSinceLastSave(const SaveLoadInterface* item) +bool PowerfieldDirHistory::wasModifiedSinceLastSave(const SaveLoadInterface* item) { // non existing item is treated as modified since last save return contains(item) ? itemInfo(item).wasModifiedSinceLastSave() : true; } -bool OutputDataDirHistory::contains(const SaveLoadInterface* item) +bool PowerfieldDirHistory::contains(const SaveLoadInterface* item) { for (auto& info : m_history) if (info.item() == item) @@ -72,7 +72,7 @@ bool OutputDataDirHistory::contains(const SaveLoadInterface* item) //! Returns list of file names used to save all items in a history. -QStringList OutputDataDirHistory::savedFileNames() const +QStringList PowerfieldDirHistory::savedFileNames() const { QStringList result; @@ -82,28 +82,28 @@ QStringList OutputDataDirHistory::savedFileNames() const return result; } -OutputDataSaveInfo OutputDataDirHistory::itemInfo(const SaveLoadInterface* item) const +PowerfieldSaveInfo PowerfieldDirHistory::itemInfo(const SaveLoadInterface* item) const { for (const auto& info : m_history) { if (info.item() == item) return info; } - throw Error("OutputDataDirHistory::itemInfo() -> Error. No info exists."); + throw Error("PowerfieldDirHistory::itemInfo() -> Error. No info exists."); } //----------------------------------------------------------------------------- -bool OutputDataIOHistory::hasHistory(const QString& dirname) const +bool PowerfieldIOHistory::hasHistory(const QString& dirname) const { return m_dir_history.find(dirname) != m_dir_history.end(); } -bool OutputDataIOHistory::wasModifiedSinceLastSave(const QString& dirname, +bool PowerfieldIOHistory::wasModifiedSinceLastSave(const QString& dirname, const SaveLoadInterface* item) { if (!hasHistory(dirname)) - throw Error("OutputDataIOHistory::wasModifiedSinceLastSave() -> Error. " + throw Error("PowerfieldIOHistory::wasModifiedSinceLastSave() -> Error. " "No info for directory '" + dirname + "'."); return m_dir_history[dirname].wasModifiedSinceLastSave(item); @@ -111,17 +111,17 @@ bool OutputDataIOHistory::wasModifiedSinceLastSave(const QString& dirname, //! Sets history for given directory. Previous history will be rewritten. -void OutputDataIOHistory::setHistory(const QString& dirname, const OutputDataDirHistory& history) +void PowerfieldIOHistory::setHistory(const QString& dirname, const PowerfieldDirHistory& history) { ASSERT(!dirname.isEmpty()); m_dir_history[dirname] = history; } -QStringList OutputDataIOHistory::savedFileNames(const QString& dirname) const +QStringList PowerfieldIOHistory::savedFileNames(const QString& dirname) const { if (!hasHistory(dirname)) - throw Error("OutputDataIOHistory::savedFileNames() -> Error. " + throw Error("PowerfieldIOHistory::savedFileNames() -> Error. " "No info for directory '" + dirname + "'."); diff --git a/GUI/Support/IO/OutputDataIOHistory.h b/GUI/Support/IO/IOHistory.h similarity index 70% rename from GUI/Support/IO/OutputDataIOHistory.h rename to GUI/Support/IO/IOHistory.h index 0710938c95e46cc8d8b61e284a05eccf350d77ef..88dfe45135fc25cb59027b141f777190e0577795 100644 --- a/GUI/Support/IO/OutputDataIOHistory.h +++ b/GUI/Support/IO/IOHistory.h @@ -2,8 +2,8 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file GUI/Support/IO/OutputDataIOHistory.h -//! @brief Defines OutputDataIOHistory classes +//! @file GUI/Support/IO/IOHistory.h +//! @brief Defines PowerfieldIOHistory classes //! //! @homepage http://www.bornagainproject.org //! @license GNU General Public License v3 or higher (see COPYING) @@ -12,8 +12,8 @@ // // ************************************************************************************************ -#ifndef BORNAGAIN_GUI_SUPPORT_IO_OUTPUTDATAIOHISTORY_H -#define BORNAGAIN_GUI_SUPPORT_IO_OUTPUTDATAIOHISTORY_H +#ifndef BORNAGAIN_GUI_SUPPORT_IO_IOHISTORY_H +#define BORNAGAIN_GUI_SUPPORT_IO_IOHISTORY_H #include <QDateTime> #include <QMap> @@ -23,14 +23,14 @@ class SaveLoadInterface; //! Holds information about last save for items with non-XML data. -class OutputDataSaveInfo { +class PowerfieldSaveInfo { public: - OutputDataSaveInfo() + PowerfieldSaveInfo() : m_data(nullptr) { } - static OutputDataSaveInfo createSaved(const SaveLoadInterface* item); + static PowerfieldSaveInfo createSaved(const SaveLoadInterface* item); const SaveLoadInterface* item() const { return m_data; } @@ -48,9 +48,9 @@ private: //! Save history information for collection of items with non-XML data. -class OutputDataDirHistory { +class PowerfieldDirHistory { public: - OutputDataDirHistory() = default; + PowerfieldDirHistory() = default; void markAsSaved(const SaveLoadInterface* item); @@ -61,26 +61,26 @@ public: QStringList savedFileNames() const; private: - OutputDataSaveInfo itemInfo(const SaveLoadInterface* item) const; + PowerfieldSaveInfo itemInfo(const SaveLoadInterface* item) const; - QVector<OutputDataSaveInfo> m_history; + QVector<PowerfieldSaveInfo> m_history; }; //! Save history information for set of directories. -class OutputDataIOHistory { +class PowerfieldIOHistory { public: bool hasHistory(const QString& dirname) const; bool wasModifiedSinceLastSave(const QString& dirname, const SaveLoadInterface* item); - void setHistory(const QString& dirname, const OutputDataDirHistory& history); + void setHistory(const QString& dirname, const PowerfieldDirHistory& history); QStringList savedFileNames(const QString& dirname) const; private: //!< Correspondence of directory name to save history. - QMap<QString, OutputDataDirHistory> m_dir_history; + QMap<QString, PowerfieldDirHistory> m_dir_history; }; -#endif // BORNAGAIN_GUI_SUPPORT_IO_OUTPUTDATAIOHISTORY_H +#endif // BORNAGAIN_GUI_SUPPORT_IO_IOHISTORY_H diff --git a/GUI/Support/IO/OutputDataUtils.cpp b/GUI/Support/IO/IOUtils.cpp similarity index 69% rename from GUI/Support/IO/OutputDataUtils.cpp rename to GUI/Support/IO/IOUtils.cpp index f5378732aaadd464c7446b3d57ac387bdda36ef8..96290bd1b7ceeb1b66e20ceae914f4d3f067571d 100644 --- a/GUI/Support/IO/OutputDataUtils.cpp +++ b/GUI/Support/IO/IOUtils.cpp @@ -2,8 +2,8 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file GUI/Support/IO/OutputDataUtils.cpp -//! @brief Implements OutputDataUtils namespace +//! @file GUI/Support/IO/IOUtils.cpp +//! @brief Implements PowerfieldUtils namespace //! //! @homepage http://www.bornagainproject.org //! @license GNU General Public License v3 or higher (see COPYING) @@ -12,12 +12,12 @@ // // ************************************************************************************************ -#include "GUI/Support/IO/OutputDataUtils.h" -#include "Device/Data/OutputData.h" +#include "GUI/Support/IO/IOUtils.h" +#include "Device/Data/Powerfield.h" -std::unique_ptr<OutputData<double>> GUI::Util::Output::binifyAxes(const OutputData<double>& data) +std::unique_ptr<Powerfield<double>> GUI::Util::IO::binifyAxes(const Powerfield<double>& data) { - std::unique_ptr<OutputData<double>> result(new OutputData<double>); + std::unique_ptr<Powerfield<double>> result(new Powerfield<double>); for (size_t i = 0; i < data.rank(); ++i) { const IAxis& axis = data.axis(i); result->addAxis(FixedBinAxis(axis.axisName(), axis.size(), 0., axis.size())); diff --git a/GUI/Support/IO/OutputDataUtils.h b/GUI/Support/IO/IOUtils.h similarity index 58% rename from GUI/Support/IO/OutputDataUtils.h rename to GUI/Support/IO/IOUtils.h index 82ceda0c0808d61ee3720a7eaaf00bea58d208bc..ab4be1a2f3cefa4f8335181f2f12f65e83b47276 100644 --- a/GUI/Support/IO/OutputDataUtils.h +++ b/GUI/Support/IO/IOUtils.h @@ -2,8 +2,8 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file GUI/Support/IO/OutputDataUtils.h -//! @brief Defines namespace GUI::Util::Output +//! @file GUI/Support/IO/IOUtils.h +//! @brief Defines namespace GUI::Util::IO //! //! @homepage http://www.bornagainproject.org //! @license GNU General Public License v3 or higher (see COPYING) @@ -12,21 +12,21 @@ // // ************************************************************************************************ -#ifndef BORNAGAIN_GUI_SUPPORT_IO_OUTPUTDATAUTILS_H -#define BORNAGAIN_GUI_SUPPORT_IO_OUTPUTDATAUTILS_H +#ifndef BORNAGAIN_GUI_SUPPORT_IO_IOUTILS_H +#define BORNAGAIN_GUI_SUPPORT_IO_IOUTILS_H #include <memory> template <class T> -class OutputData; +class Powerfield; //! Provides utility methods for output data. -namespace GUI::Util::Output { +namespace GUI::Util::IO { -//! Creates OutputData with bin-valued axes. -std::unique_ptr<OutputData<double>> binifyAxes(const OutputData<double>& data); +//! Creates Powerfield with bin-valued axes. +std::unique_ptr<Powerfield<double>> binifyAxes(const Powerfield<double>& data); -} // namespace GUI::Util::Output +} // namespace GUI::Util::IO -#endif // BORNAGAIN_GUI_SUPPORT_IO_OUTPUTDATAUTILS_H +#endif // BORNAGAIN_GUI_SUPPORT_IO_IOUTILS_H diff --git a/GUI/Support/IO/ImportDataInfo.cpp b/GUI/Support/IO/ImportDataInfo.cpp index b1071dcbfe9a456a109f88e0652b59c25a41a4eb..35d2e1c82d5310cdc0046d9055fc7b9849772817 100644 --- a/GUI/Support/IO/ImportDataInfo.cpp +++ b/GUI/Support/IO/ImportDataInfo.cpp @@ -14,8 +14,8 @@ #include "GUI/Support/IO/ImportDataInfo.h" #include "Device/Coord/AxisNames.h" -#include "Device/Data/OutputData.h" -#include "GUI/Support/IO/OutputDataUtils.h" +#include "Device/Data/Powerfield.h" +#include "GUI/Support/IO/IOUtils.h" #include "GUI/Util/CoordName.h" #include "GUI/Util/Error.h" #include <memory> @@ -42,23 +42,23 @@ ImportDataInfo::ImportDataInfo(ImportDataInfo&& other) { } -ImportDataInfo::ImportDataInfo(std::unique_ptr<OutputData<double>> data, Axes::Coords units) - : m_data(units == Axes::Coords::NBINS && data ? GUI::Util::Output::binifyAxes(*data) +ImportDataInfo::ImportDataInfo(std::unique_ptr<Powerfield<double>> data, Axes::Coords units) + : m_data(units == Axes::Coords::NBINS && data ? GUI::Util::IO::binifyAxes(*data) : std::move(data)) , m_coords(units) { checkValidity(); } -ImportDataInfo::ImportDataInfo(std::unique_ptr<OutputData<double>> data, const QString& units_label) +ImportDataInfo::ImportDataInfo(std::unique_ptr<Powerfield<double>> data, const QString& units_label) : m_data(std::move(data)) , m_coords(GUI::Util::CoordName::coordFromName(units_label)) { checkValidity(); } -ImportDataInfo::ImportDataInfo(OutputData<double>&& data, Axes::Coords units) - : ImportDataInfo(std::make_unique<OutputData<double>>(std::move(data)), units) +ImportDataInfo::ImportDataInfo(Powerfield<double>&& data, Axes::Coords units) + : ImportDataInfo(std::make_unique<Powerfield<double>>(std::move(data)), units) { } @@ -69,14 +69,14 @@ ImportDataInfo::operator bool() const return static_cast<bool>(m_data); } -std::unique_ptr<OutputData<double>> ImportDataInfo::clonedData() const& +std::unique_ptr<Powerfield<double>> ImportDataInfo::clonedData() const& { if (!m_data) return nullptr; - return std::unique_ptr<OutputData<double>>(m_data->clone()); + return std::unique_ptr<Powerfield<double>>(m_data->clone()); } -std::unique_ptr<OutputData<double>> ImportDataInfo::intensityData() && +std::unique_ptr<Powerfield<double>> ImportDataInfo::intensityData() && { return std::move(m_data); } diff --git a/GUI/Support/IO/ImportDataInfo.h b/GUI/Support/IO/ImportDataInfo.h index 85d358f770fc00aa268452b11b98bbac2c280774..2c5ce22de3fb9033e84ccecf5d61ea1c1747316e 100644 --- a/GUI/Support/IO/ImportDataInfo.h +++ b/GUI/Support/IO/ImportDataInfo.h @@ -20,23 +20,23 @@ #include <memory> template <class T> -class OutputData; +class Powerfield; //! Carries information about loaded data. class ImportDataInfo { public: - ImportDataInfo(std::unique_ptr<OutputData<double>> data, Axes::Coords units); - ImportDataInfo(OutputData<double>&& data, Axes::Coords units); - ImportDataInfo(std::unique_ptr<OutputData<double>> data, const QString& units); + ImportDataInfo(std::unique_ptr<Powerfield<double>> data, Axes::Coords units); + ImportDataInfo(Powerfield<double>&& data, Axes::Coords units); + ImportDataInfo(std::unique_ptr<Powerfield<double>> data, const QString& units); ImportDataInfo(ImportDataInfo&& other); ~ImportDataInfo(); //! True if the contained data is not nullptr (no info about empty data) operator bool() const; - std::unique_ptr<OutputData<double>> clonedData() const&; - std::unique_ptr<OutputData<double>> intensityData() &&; + std::unique_ptr<Powerfield<double>> clonedData() const&; + std::unique_ptr<Powerfield<double>> intensityData() &&; //! Returns number of dimensions. size_t dataRank() const; @@ -48,7 +48,7 @@ private: void checkValidity(); private: - std::unique_ptr<OutputData<double>> m_data; + std::unique_ptr<Powerfield<double>> m_data; const Axes::Coords m_coords; }; diff --git a/GUI/Support/Type/Unit.cpp b/GUI/Support/Type/Unit.cpp index e04a37521c0263a1338f73a246d4e3b84aece038..4cef29747f4de50b271009b660eedce5bbb0a144 100644 --- a/GUI/Support/Type/Unit.cpp +++ b/GUI/Support/Type/Unit.cpp @@ -28,16 +28,16 @@ double convert(double d, Unit from, Unit to) if (from == Unit::nanometer && to == Unit::angstrom) return d * 10.0; - if (from == Unit::angstromPower2 && to == Unit::nanometerPower2) + if (from == Unit::angstrom2 && to == Unit::nanometer2) return d / 100.0; - if (from == Unit::nanometerPower2 && to == Unit::angstromPower2) + if (from == Unit::nanometer2 && to == Unit::angstrom2) return d * 100.0; - if (from == Unit::angstromPowerMinus2 && to == Unit::nanometerPowerMinus2) + if (from == Unit::angstromMinus2 && to == Unit::nanometerMinus2) return d * 100.0; - if (from == Unit::nanometerPowerMinus2 && to == Unit::angstromPowerMinus2) + if (from == Unit::nanometerMinus2 && to == Unit::angstromMinus2) return d / 100.0; if (from == Unit::radiant && to == Unit::degree) @@ -62,15 +62,15 @@ QString unitAsString(const Unit& unit) return ""; case Unit::nanometer: return "nm"; - case Unit::nanometerPower2: + case Unit::nanometer2: return u8"nm\u00B2"; - case Unit::nanometerPowerMinus2: + case Unit::nanometerMinus2: return u8"1/nm\u00B2"; case Unit::angstrom: return u8"\u00c5"; - case Unit::angstromPower2: + case Unit::angstrom2: return u8"\u00c5\u00B2"; - case Unit::angstromPowerMinus2: + case Unit::angstromMinus2: return u8"1/\u00c5\u00B2"; case Unit::degree: return "°"; diff --git a/GUI/Support/Type/Unit.h b/GUI/Support/Type/Unit.h index 106bba5895cc4aaf935b0cc925a1ce12a77dec2a..d5c21c5c522fc30d93fdb2fa35efb15c546b6a94 100644 --- a/GUI/Support/Type/Unit.h +++ b/GUI/Support/Type/Unit.h @@ -26,11 +26,11 @@ class QString; enum class Unit { unitless, nanometer, - nanometerPower2, - nanometerPowerMinus2, + nanometer2, + nanometerMinus2, angstrom, - angstromPower2, - angstromPowerMinus2, + angstrom2, + angstromMinus2, degree, radiant, other //!< The unit has no enum value defined in here (e.g. when defined as an explicit string) diff --git a/GUI/View/Common/ItemComboWidget.h b/GUI/View/Common/ItemComboWidget.h index f1530bb0ae796d94192690632679d6f5d8c0ba4c..f4ac752d0060464813c9822952a3e89142e2e782 100644 --- a/GUI/View/Common/ItemComboWidget.h +++ b/GUI/View/Common/ItemComboWidget.h @@ -29,7 +29,7 @@ class QStackedWidget; //! The ItemComboWidget class combines stack of widgets with QComboBox controller to switch between //! widgets. It is used in the case when one SessionItem can be presented with different widgets. -//! For example, in JobOutputDataWidget the results of the job can be presented with either +//! For example, in JobPowerfieldWidget the results of the job can be presented with either //! IntensityDataWidget or FitDataWidget, depending from the JobView's activity type. //! For the presentation the special value of an empty string can be used which results in an diff --git a/GUI/View/Fit/FitObjectiveBuilder.cpp b/GUI/View/Fit/FitObjectiveBuilder.cpp index 7764774adbf90cbf6b72d66bc3274315dc0c744f..248ffbd556b75d76284639fddec49ad51716c563 100644 --- a/GUI/View/Fit/FitObjectiveBuilder.cpp +++ b/GUI/View/Fit/FitObjectiveBuilder.cpp @@ -75,7 +75,7 @@ std::unique_ptr<FitObjective> FitObjectiveBuilder::createFitObjective() const return buildSimulation(params); }; - result->execAddSimulationAndData(builder, *createOutputData(), nullptr, 1.0); + result->execAddSimulationAndData(builder, *createPowerfield(), nullptr, 1.0); return result; } @@ -111,17 +111,17 @@ FitObjectiveBuilder::buildSimulation(const mumufit::Parameters& params) const m_jobItem->sampleItem(), m_jobItem->instrumentItem(), m_jobItem->simulationOptionsItem()); } -std::unique_ptr<OutputData<double>> FitObjectiveBuilder::createOutputData() const +std::unique_ptr<Powerfield<double>> FitObjectiveBuilder::createPowerfield() const { auto* realDataItem = m_jobItem->realDataItem(); if (!realDataItem) - throw Error("FitObjectiveBuilder::createOutputData() -> No Real Data defined."); + throw Error("FitObjectiveBuilder::createPowerfield() -> No Real Data defined."); const DataItem* intensity_item = realDataItem->dataItem(); ASSERT(intensity_item); - ASSERT(intensity_item->getOutputData()); + ASSERT(intensity_item->getPowerfield()); - return std::unique_ptr<OutputData<double>>(intensity_item->getOutputData()->clone()); + return std::unique_ptr<Powerfield<double>>(intensity_item->getPowerfield()->clone()); } void FitObjectiveBuilder::update_fit_parameters(const mumufit::Parameters& params) const diff --git a/GUI/View/Fit/FitObjectiveBuilder.h b/GUI/View/Fit/FitObjectiveBuilder.h index c8a59f92071443379bc986d4e0bab7b1e544905c..3993cb760dae5a32b10cfc00fec1d5736e58b9e1 100644 --- a/GUI/View/Fit/FitObjectiveBuilder.h +++ b/GUI/View/Fit/FitObjectiveBuilder.h @@ -25,7 +25,7 @@ namespace mumufit { class Parameters; } template <class T> -class OutputData; +class Powerfield; class IMinimizer; class GUIFitObserver; class IChiSquaredModule; @@ -51,7 +51,7 @@ private: JobItem* m_jobItem; std::unique_ptr<ISimulation> buildSimulation(const mumufit::Parameters& params) const; - std::unique_ptr<OutputData<double>> createOutputData() const; + std::unique_ptr<Powerfield<double>> createPowerfield() const; void update_fit_parameters(const mumufit::Parameters& params) const; diff --git a/GUI/View/Fit/GUIFitObserver.h b/GUI/View/Fit/GUIFitObserver.h index 5da5a69d732e88f8c441152d32964fa2c6500943..2da8435aa6fdb428bae8cc299e9f57d6fcbd7492 100644 --- a/GUI/View/Fit/GUIFitObserver.h +++ b/GUI/View/Fit/GUIFitObserver.h @@ -21,7 +21,7 @@ #include <mutex> template <class T> -class OutputData; +class Powerfield; class IntensityDataItem; class FitObjective; diff --git a/GUI/View/Import/ImportDataUtils.cpp b/GUI/View/Import/ImportDataUtils.cpp index 0e640739cf421c7c48aee66c87d2607eaf2d6289..543045cad70dbc7f0ac8944ca9191cc9a43a6f43 100644 --- a/GUI/View/Import/ImportDataUtils.cpp +++ b/GUI/View/Import/ImportDataUtils.cpp @@ -13,11 +13,11 @@ // ************************************************************************************************ #include "GUI/View/Import/ImportDataUtils.h" -#include "Device/Data/OutputData.h" +#include "Device/Data/Powerfield.h" #include "Device/InputOutput/DataFormatUtils.h" #include "GUI/Model/Data/RealDataItem.h" +#include "GUI/Support/IO/IOUtils.h" #include "GUI/Support/IO/ImportDataInfo.h" -#include "GUI/Support/IO/OutputDataUtils.h" #include "GUI/View/Loaders/QREDataLoader.h" #include <QApplication> #include <QMessageBox> @@ -30,19 +30,18 @@ const QString filter_string_ascii = "Intensity File (*.int *.int.gz *.txt *.csv "Ascii column-wise data (*.*)"; //! Imports for 2D or 1D data, using given loader. -//! Allocates OutputData, and returns owning pointer. +//! Allocates Powerfield, and returns owning pointer. //! Currently used for all 2D, and some 1D data files. -std::unique_ptr<OutputData<double>> -ImportKnownData(const QString& fileName, - IntensityDataIOFactory::LoaderSelector loader = IntensityDataIOFactory::automatic) +std::unique_ptr<Powerfield<double>> +ImportKnownData(const QString& fileName, IOFactory::LoaderSelector loader = IOFactory::automatic) { // Try to use the canonical tools for importing data - std::unique_ptr<OutputData<double>> result; + std::unique_ptr<Powerfield<double>> result; try { - std::unique_ptr<OutputData<double>> data( - IntensityDataIOFactory::readOutputData(fileName.toStdString(), loader)); - result = GUI::Util::Output::binifyAxes(*data); + std::unique_ptr<Powerfield<double>> data( + IOFactory::readPowerfield(fileName.toStdString(), loader)); + result = GUI::Util::IO::binifyAxes(*data); } catch (std::exception& ex) { QString message = QString("Error while trying to read file\n\n'%1'\n\n%2") .arg(fileName) @@ -55,9 +54,8 @@ ImportKnownData(const QString& fileName, } // namespace -std::unique_ptr<OutputData<double>> -GUI::View::ImportDataUtils::Import2dData(const QString& fileName, - IntensityDataIOFactory::LoaderSelector loader) +std::unique_ptr<Powerfield<double>> +GUI::View::ImportDataUtils::Import2dData(const QString& fileName, IOFactory::LoaderSelector loader) { return ImportKnownData(fileName, loader); } diff --git a/GUI/View/Import/ImportDataUtils.h b/GUI/View/Import/ImportDataUtils.h index 5086acaa86a291a1cc6ea4d93bc7cbfbd62ffd44..0c14b30322cba1e6b313be2cb4d2e1a6b8764ea5 100644 --- a/GUI/View/Import/ImportDataUtils.h +++ b/GUI/View/Import/ImportDataUtils.h @@ -15,12 +15,12 @@ #ifndef BORNAGAIN_GUI_VIEW_IMPORT_IMPORTDATAUTILS_H #define BORNAGAIN_GUI_VIEW_IMPORT_IMPORTDATAUTILS_H -#include "Device/Histo/IntensityDataIOFactory.h" +#include "Device/Histo/IOFactory.h" #include <QString> #include <memory> template <class T> -class OutputData; +class Powerfield; class RealDataItem; class InstrumentItem; class AbstractDataLoader; @@ -29,9 +29,9 @@ class AbstractDataLoader; namespace GUI::View::ImportDataUtils { -//! Imports 2D data, stores them as OutputData, and returns owning pointer. -std::unique_ptr<OutputData<double>> Import2dData(const QString& fileName, - IntensityDataIOFactory::LoaderSelector loader); +//! Imports 2D data, stores them as Powerfield, and returns owning pointer. +std::unique_ptr<Powerfield<double>> Import2dData(const QString& fileName, + IOFactory::LoaderSelector loader); //! Imports 1D data into the given item. diff --git a/GUI/View/Import/RealDataSelectorWidget.cpp b/GUI/View/Import/RealDataSelectorWidget.cpp index 3e81b89fd03992f315284e7702f026567c214479..4eb583dd117b97d6d7bc0735462ab85a7afaaf73 100644 --- a/GUI/View/Import/RealDataSelectorWidget.cpp +++ b/GUI/View/Import/RealDataSelectorWidget.cpp @@ -264,21 +264,20 @@ void RealDataSelectorWidget::importData1D() void RealDataSelectorWidget::importData2D() { - QMap<QString, IntensityDataIOFactory::LoaderSelector> loaderOfFilter; + QMap<QString, IOFactory::LoaderSelector> loaderOfFilter; QString filters; - const auto addFilter = [&](IntensityDataIOFactory::LoaderSelector loaderSelector, - const QString& filter) { + const auto addFilter = [&](IOFactory::LoaderSelector loaderSelector, const QString& filter) { if (!filters.isEmpty()) filters += ";;"; filters += filter; loaderOfFilter[filter] = loaderSelector; }; - addFilter(IntensityDataIOFactory::tiff, "TIFF (*.tif *.tiff *.tif.gz)"); - addFilter(IntensityDataIOFactory::nicos, "Nicos/SANSDRaw (*.001)"); - addFilter(IntensityDataIOFactory::bornagain, "BornAgain (*.int.gz)"); - addFilter(IntensityDataIOFactory::automatic, "CSV (*.txt *.csv *.dat)"); - addFilter(IntensityDataIOFactory::automatic, "All (*.*)"); + addFilter(IOFactory::tiff, "TIFF (*.tif *.tiff *.tif.gz)"); + addFilter(IOFactory::nicos, "Nicos/SANSDRaw (*.001)"); + addFilter(IOFactory::bornagain, "BornAgain (*.int.gz)"); + addFilter(IOFactory::automatic, "CSV (*.txt *.csv *.dat)"); + addFilter(IOFactory::automatic, "All (*.*)"); QString selectedFilter = ProjectManager::instance()->recentlyUsedImportFilter2D(); @@ -293,11 +292,10 @@ void RealDataSelectorWidget::importData2D() ProjectManager::instance()->setImportDirFromFilePath(fileNames[0]); ProjectManager::instance()->setRecentlyUsedImportFilter2D(selectedFilter); - const auto selectedLoader = - loaderOfFilter.value(selectedFilter, IntensityDataIOFactory::automatic); + const auto selectedLoader = loaderOfFilter.value(selectedFilter, IOFactory::automatic); for (const auto& fileName : fileNames) { - std::unique_ptr<OutputData<double>> data = + std::unique_ptr<Powerfield<double>> data = GUI::View::ImportDataUtils::Import2dData(fileName, selectedLoader); if (!data) continue; @@ -308,7 +306,7 @@ void RealDataSelectorWidget::importData2D() if (data->rank() != 2) throw Error("The content could not be interpreted correctly as 2-dimensional."); - realDataItem->setOutputData(data.release()); + realDataItem->setPowerfield(data.release()); setCurrentItem(realDataItem); } catch (std::exception& ex) { m_itemTreeModel->removeItem(realDataItem); diff --git a/GUI/View/Job/JobResultsPresenter.cpp b/GUI/View/Job/JobResultsPresenter.cpp index 226a3c649eb2373f969ad6a974f0924f8f6275b4..c2da96d15c3fc76486b61f8b85aa574bd7ed1ac8 100644 --- a/GUI/View/Job/JobResultsPresenter.cpp +++ b/GUI/View/Job/JobResultsPresenter.cpp @@ -25,7 +25,7 @@ JobResultsPresenter::JobResultsPresenter(QWidget* parent) : ItemComboWidget(parent) { - setWindowTitle("Job OutputData"); + setWindowTitle("Job Powerfield"); setObjectName("JobResultsPresenter"); registerWidget("Heat Map", create_new<IntensityDataWidget>); diff --git a/GUI/View/Loaders/AutomaticDataLoader1D.cpp b/GUI/View/Loaders/AutomaticDataLoader1D.cpp index 42588f00c800edd3a490ed264f146383b95da4ad..e7a3dca7b22e2738d95992096d182fe2e90663bf 100644 --- a/GUI/View/Loaders/AutomaticDataLoader1D.cpp +++ b/GUI/View/Loaders/AutomaticDataLoader1D.cpp @@ -13,7 +13,7 @@ // ************************************************************************************************ #include "GUI/View/Loaders/AutomaticDataLoader1D.h" -#include "Device/InputOutput/OutputDataReadReflectometry.h" +#include "Device/InputOutput/ReadReflectometry.h" #include "GUI/Model/Data/RealDataItem.h" #include "GUI/Model/Data/SpecularDataItem.h" #include "GUI/Support/IO/ImportDataInfo.h" @@ -88,14 +88,14 @@ void AutomaticDataLoader1D::processContents() try { std::stringstream str(m_fileContent.constData()); - auto* oData = OutputDataReadReflectometry().readOutputData(str); + auto* oData = ReadReflectometry().readPowerfield(str); ImportDataInfo importInfo(std::move(*oData), Axes::Coords::QSPACE); m_item->setImportData(std::move(importInfo)); m_error.clear(); } catch (std::runtime_error& ex) { m_item->removeNativeData(); - m_item->specularDataItem()->setOutputData(nullptr); + m_item->specularDataItem()->setPowerfield(nullptr); m_error = QString::fromStdString(ex.what()); if (m_error.isEmpty()) m_error = "Unspecified error"; diff --git a/GUI/View/Loaders/AutomaticDataLoader1D.h b/GUI/View/Loaders/AutomaticDataLoader1D.h index f2b0df0d79fcec3c8e609fed2720f205401ca868..0bc381cbf2431138e8069523674bb68da2f115cd 100644 --- a/GUI/View/Loaders/AutomaticDataLoader1D.h +++ b/GUI/View/Loaders/AutomaticDataLoader1D.h @@ -15,7 +15,7 @@ #ifndef BORNAGAIN_GUI_VIEW_LOADERS_AUTOMATICDATALOADER1D_H #define BORNAGAIN_GUI_VIEW_LOADERS_AUTOMATICDATALOADER1D_H -#include "Device/Data/OutputData.h" +#include "Device/Data/Powerfield.h" #include "GUI/Support/IO/AbstractDataLoader1D.h" //! The legacy importer for reflectometry, with no user interaction. diff --git a/GUI/View/Loaders/AutomaticDataLoader1DResultModel.cpp b/GUI/View/Loaders/AutomaticDataLoader1DResultModel.cpp index 465df9c1eb631375c4905967b8176dd1ace0e0d3..a0264674f5cea8f3fa3830fb30c767d309a3e523 100644 --- a/GUI/View/Loaders/AutomaticDataLoader1DResultModel.cpp +++ b/GUI/View/Loaders/AutomaticDataLoader1DResultModel.cpp @@ -28,7 +28,7 @@ bool AutomaticDataLoader1DResultModel::rowHasError(int /*row*/) const int AutomaticDataLoader1DResultModel::rowCount() const { - auto* data = m_item->specularDataItem()->getOutputData(); + auto* data = m_item->specularDataItem()->getPowerfield(); if (!data) return 0; @@ -62,7 +62,7 @@ QString AutomaticDataLoader1DResultModel::cellText(ColumnType type, int row, int if (col < 0 || row < 0 || row >= rowCount() || type != ColumnType::processed) return QString(); - auto* data = m_item->specularDataItem()->getOutputData(); + auto* data = m_item->specularDataItem()->getPowerfield(); if (col == 0) return QString::number(data->getAxisValue(row, 0)); diff --git a/GUI/View/Loaders/QREDataLoader.cpp b/GUI/View/Loaders/QREDataLoader.cpp index 70f9399d12df7ff59c82302cb7316e5c10c5438e..20c3d5a28f6e9fc315aadbe267cbf0e3c5027c61 100644 --- a/GUI/View/Loaders/QREDataLoader.cpp +++ b/GUI/View/Loaders/QREDataLoader.cpp @@ -230,7 +230,7 @@ void QREDataLoader::processContents() const auto invalidateItemData = [this]() { m_item->removeNativeData(); - m_item->specularDataItem()->setOutputData(nullptr); + m_item->specularDataItem()->setPowerfield(nullptr); }; const bool parsingSettingsChanged = @@ -240,7 +240,7 @@ void QREDataLoader::processContents() const bool calculationSettingsChanged = m_importResult.importSettings.columnDefinitions != m_importSettings.columnDefinitions; const bool calculationIsNecessary = (parsingSettingsChanged || calculationSettingsChanged); - const bool creationOfOutputDataIsNecessary = calculationIsNecessary; + const bool creationOfPowerfieldIsNecessary = calculationIsNecessary; if (parsingSettingsChanged) // everything has to be re-parsed @@ -260,9 +260,9 @@ void QREDataLoader::processContents() return; } - if (creationOfOutputDataIsNecessary) { + if (creationOfPowerfieldIsNecessary) { try { - createOutputDataFromParsingResult(m_item); + createPowerfieldFromParsingResult(m_item); } catch (...) { m_importResult.error = "Import not successful - caught an exception."; invalidateItemData(); @@ -518,7 +518,7 @@ void QREDataLoader::calculateFromParseResult() const } } -void QREDataLoader::createOutputDataFromParsingResult(RealDataItem* item) const +void QREDataLoader::createPowerfieldFromParsingResult(RealDataItem* item) const { // create data sorted by ascending Q values. // For this, the line numbers are sorted by Q @@ -535,7 +535,7 @@ void QREDataLoader::createOutputDataFromParsingResult(RealDataItem* item) const std::sort(lineNumbers.begin(), lineNumbers.end(), [&](int a, int b) { return m_importResult.qValues[a] < m_importResult.qValues[b]; }); - // -- create OutputData + // -- create Powerfield std::vector<double> qVec; std::vector<double> rVec; @@ -544,7 +544,7 @@ void QREDataLoader::createOutputDataFromParsingResult(RealDataItem* item) const rVec.push_back(m_importResult.rValues[lineNr]); } - auto* oData = new OutputData<double>(); + auto* oData = new Powerfield<double>(); oData->addAxis(PointwiseAxis("qVector", qVec)); oData->setRawDataVector(rVec); @@ -566,11 +566,11 @@ void QREDataLoader::createOutputDataFromParsingResult(RealDataItem* item) const specularItem->setXaxisTitle(xAxisTitle); specularItem->setYaxisTitle(yAxisTitle); - specularItem->setOutputData(oData); // takes ownership of odata + specularItem->setPowerfield(oData); // takes ownership of odata specularItem->setAxesRangeToData(); item->setNativeDataUnits(units_name); - item->setNativeOutputData(oData->clone()); // takes ownership of odata + item->setNativePowerfield(oData->clone()); // takes ownership of odata } QDataStream& operator<<(QDataStream& stream, const QREDataLoader::ImportSettings& s) diff --git a/GUI/View/Loaders/QREDataLoader.h b/GUI/View/Loaders/QREDataLoader.h index 2944c652b14c43ee33a84c7610937caae3ed4ed0..89f355c972999ee43d721a6fdc86e3467e7976b2 100644 --- a/GUI/View/Loaders/QREDataLoader.h +++ b/GUI/View/Loaders/QREDataLoader.h @@ -49,7 +49,7 @@ public: private: void parseFileContent() const; void calculateFromParseResult() const; - void createOutputDataFromParsingResult(RealDataItem* item) const; + void createPowerfieldFromParsingResult(RealDataItem* item) const; private: enum class UnitInFile { none, perNanoMeter, perAngstrom, other }; diff --git a/GUI/View/Mask/MaskEditorCanvas.cpp b/GUI/View/Mask/MaskEditorCanvas.cpp index 92288ed354abeef1a1695c3ac6920706e0421a63..cc66a21ffd2ca99db59bb20eed2349df20e831ec 100644 --- a/GUI/View/Mask/MaskEditorCanvas.cpp +++ b/GUI/View/Mask/MaskEditorCanvas.cpp @@ -97,7 +97,7 @@ void MaskEditorCanvas::onSavePlotRequest() QString dirname = gSessionData->projectDocument.value()->userExportDir(); GUI::Plot::savePlot(dirname, m_scene->colorMap()->customPlot(), - m_intensityDataItem->getOutputData()); + m_intensityDataItem->getPowerfield()); } void MaskEditorCanvas::onResetViewRequest() diff --git a/GUI/View/Mask/MaskResultsPresenter.cpp b/GUI/View/Mask/MaskResultsPresenter.cpp index b21f4f99aeeab2dfa917c01449e98f530b01b882..05582401b3924eafbd07c2bb2ea1b6efd12f82b9 100644 --- a/GUI/View/Mask/MaskResultsPresenter.cpp +++ b/GUI/View/Mask/MaskResultsPresenter.cpp @@ -52,13 +52,13 @@ void MaskResultsPresenter::updatePresenter(MaskEditorFlags::PresentationType pre } //! Update IntensityDataItem in SessionModel to represent masked areas. Corresponding -//! bins of OutputData will be put to zero. +//! bins of Powerfield will be put to zero. void MaskResultsPresenter::setShowMaskMode() { - if (OutputData<double>* maskedData = createMaskPresentation()) { + if (Powerfield<double>* maskedData = createMaskPresentation()) { backup_data(); - m_intensityDataItem->setOutputData(maskedData); + m_intensityDataItem->setPowerfield(maskedData); m_intensityDataItem->setInterpolated(false); } else { m_dataBackup.reset(); @@ -70,7 +70,7 @@ void MaskResultsPresenter::setShowMaskMode() void MaskResultsPresenter::setOriginalMode() { if (m_dataBackup) { - m_intensityDataItem->setOutputData(m_dataBackup->clone()); + m_intensityDataItem->setPowerfield(m_dataBackup->clone()); m_intensityDataItem->setInterpolated(m_interpolation_flag_backup); } } @@ -78,13 +78,13 @@ void MaskResultsPresenter::setOriginalMode() void MaskResultsPresenter::backup_data() { m_interpolation_flag_backup = m_intensityDataItem->isInterpolated(); - m_dataBackup.reset(m_intensityDataItem->getOutputData()->clone()); + m_dataBackup.reset(m_intensityDataItem->getPowerfield()->clone()); } -//! Constructs OutputData which contains original intensity data except masked areas, +//! Constructs Powerfield which contains original intensity data except masked areas, //! and areas outside of ROI, where bin content is set to zero. -OutputData<double>* MaskResultsPresenter::createMaskPresentation() const +Powerfield<double>* MaskResultsPresenter::createMaskPresentation() const { // Requesting mask information std::unique_ptr<IShape2D> roi; @@ -109,7 +109,7 @@ OutputData<double>* MaskResultsPresenter::createMaskPresentation() const if (!detectorMask.hasMasks()) return nullptr; - OutputData<double>* result = m_intensityDataItem->getOutputData()->clone(); + Powerfield<double>* result = m_intensityDataItem->getPowerfield()->clone(); detectorMask.initMaskData(result->axis(0), result->axis(1)); for (size_t i = 0; i < result->getAllocatedSize(); ++i) diff --git a/GUI/View/Mask/MaskResultsPresenter.h b/GUI/View/Mask/MaskResultsPresenter.h index 2198e5f9e0c5e212c8f432c917b24aecceff4064..af496e544f007199ec972c7b4d62404cc850a056 100644 --- a/GUI/View/Mask/MaskResultsPresenter.h +++ b/GUI/View/Mask/MaskResultsPresenter.h @@ -23,7 +23,7 @@ class SessionModel; class IntensityDataItem; template <class T> -class OutputData; +class Powerfield; //! Updates bin values inside IntensityData to display current mask state. Returns IntensityData //! to original state when requested. @@ -43,12 +43,12 @@ private: void setShowMaskMode(); void setOriginalMode(); void backup_data(); - OutputData<double>* createMaskPresentation() const; + Powerfield<double>* createMaskPresentation() const; SessionModel* m_maskModel; QModelIndex m_maskContainerIndex; IntensityDataItem* m_intensityDataItem; - std::unique_ptr<OutputData<double>> m_dataBackup; + std::unique_ptr<Powerfield<double>> m_dataBackup; bool m_interpolation_flag_backup; }; diff --git a/GUI/View/Plot2D/IntensityDataCanvas.cpp b/GUI/View/Plot2D/IntensityDataCanvas.cpp index 941f6a7fadb9a9ff1da66e05bc9c4c044ebfdd7c..c87a52997df34e098e1de8e54d77c2821d898f8c 100644 --- a/GUI/View/Plot2D/IntensityDataCanvas.cpp +++ b/GUI/View/Plot2D/IntensityDataCanvas.cpp @@ -97,7 +97,7 @@ void IntensityDataCanvas::onResetViewAction() void IntensityDataCanvas::onSavePlotAction() { QString dirname = gSessionData->projectDocument.value()->userExportDir(); - GUI::Plot::savePlot(dirname, m_colorMap->customPlot(), intensityDataItem()->getOutputData()); + GUI::Plot::savePlot(dirname, m_colorMap->customPlot(), intensityDataItem()->getPowerfield()); } void IntensityDataCanvas::onMousePress(QMouseEvent* event) diff --git a/GUI/View/Plot2D/IntensityDataCanvas.h b/GUI/View/Plot2D/IntensityDataCanvas.h index 44e54f2ee98a009af4cafa5d555438a3c621a9fc..65f6838177976b4c4bf037a2f3be4a190faa1d05 100644 --- a/GUI/View/Plot2D/IntensityDataCanvas.h +++ b/GUI/View/Plot2D/IntensityDataCanvas.h @@ -15,7 +15,7 @@ #ifndef BORNAGAIN_GUI_VIEW_PLOT2D_INTENSITYDATACANVAS_H #define BORNAGAIN_GUI_VIEW_PLOT2D_INTENSITYDATACANVAS_H -#include "Device/Data/OutputData.h" +#include "Device/Data/Powerfield.h" #include "GUI/View/Common/SessionItemWidget.h" #include <memory> diff --git a/GUI/View/Plot2D/IntensityDataFFTPresenter.cpp b/GUI/View/Plot2D/IntensityDataFFTPresenter.cpp index 8d228b1f1f224b217f3875188616b224ced2fabb..5f09d58a5b626696f85e421901f950c3e1efd05b 100644 --- a/GUI/View/Plot2D/IntensityDataFFTPresenter.cpp +++ b/GUI/View/Plot2D/IntensityDataFFTPresenter.cpp @@ -49,7 +49,7 @@ IntensityDataItem* IntensityDataFFTPresenter::fftItem(IntensityDataItem* origIte QApplication::setOverrideCursor(Qt::WaitCursor); - m_fftItem->setOutputData(DataUtils::Data::createFFT(*origItem->getOutputData()).release()); + m_fftItem->setPowerfield(DataUtils::Data::createFFT(*origItem->getPowerfield()).release()); QApplication::restoreOverrideCursor(); diff --git a/GUI/View/Plot2D/IntensityDataWidget.cpp b/GUI/View/Plot2D/IntensityDataWidget.cpp index 69e4dc86bbc1dddb7a48f2fee28d9e3e592f8c40..71db6e222238286e84dff4a4bb4827274e5f3a86 100644 --- a/GUI/View/Plot2D/IntensityDataWidget.cpp +++ b/GUI/View/Plot2D/IntensityDataWidget.cpp @@ -75,7 +75,7 @@ void IntensityDataWidget::onContextMenuRequest(const QPoint& point) void IntensityDataWidget::onFFTAction() { - if (!intensityDataItem() || !intensityDataItem()->getOutputData()) + if (!intensityDataItem() || !intensityDataItem()->getPowerfield()) return; if (m_fftPresenter->inFFTMode()) { diff --git a/GUI/View/PlotComparison/FitComparisonController.cpp b/GUI/View/PlotComparison/FitComparisonController.cpp index 56aab21d2bed8776ff0a58b85501641906ba4e18..55584af9745bee864d00ddf5027573119a05bbb9 100644 --- a/GUI/View/PlotComparison/FitComparisonController.cpp +++ b/GUI/View/PlotComparison/FitComparisonController.cpp @@ -152,11 +152,11 @@ void DiffItemController::updateDiffData() auto* real_data = m_current_item->realDataItem()->dataItem(); ASSERT(sim_data && real_data); - if (!sim_data->getOutputData()) // job failed + if (!sim_data->getPowerfield()) // job failed return; - m_diff_item->setOutputData(DataUtils::Data::createRelativeDifferenceData( - *sim_data->getOutputData(), *real_data->getOutputData()) + m_diff_item->setPowerfield(DataUtils::Data::createRelativeDifferenceData( + *sim_data->getPowerfield(), *real_data->getPowerfield()) .release()); } diff --git a/GUI/View/PlotComparison/FitComparisonViewController.cpp b/GUI/View/PlotComparison/FitComparisonViewController.cpp index e387259db594029c164a8b126e7e24e062858eeb..ff23ba53a3076d6fb3dbef340684c18ed5398180 100644 --- a/GUI/View/PlotComparison/FitComparisonViewController.cpp +++ b/GUI/View/PlotComparison/FitComparisonViewController.cpp @@ -143,11 +143,11 @@ void DiffItemController::updateDiffData() auto* real_data = m_current_item->realDataItem()->dataItem(); ASSERT(sim_data && real_data); - if (!sim_data->getOutputData()) // job failed + if (!sim_data->getPowerfield()) // job failed return; - m_diff_item->setOutputData(DataUtils::Data::createRelativeDifferenceData( - *sim_data->getOutputData(), *real_data->getOutputData()) + m_diff_item->setPowerfield(DataUtils::Data::createRelativeDifferenceData( + *sim_data->getPowerfield(), *real_data->getPowerfield()) .release()); } diff --git a/GUI/View/PlotSpecular/SpecularDataCanvas.cpp b/GUI/View/PlotSpecular/SpecularDataCanvas.cpp index 891bf9c42a6b6f7fe695d654d65b529195acad44..5bb642ae3dd725f938f4158553b158e1bb4dce14 100644 --- a/GUI/View/PlotSpecular/SpecularDataCanvas.cpp +++ b/GUI/View/PlotSpecular/SpecularDataCanvas.cpp @@ -90,7 +90,7 @@ void SpecularDataCanvas::onResetViewAction() void SpecularDataCanvas::onSavePlotAction() { QString dirname = gSessionData->projectDocument.value()->userExportDir(); - GUI::Plot::savePlot(dirname, m_plot_canvas->customPlot(), specularDataItem()->getOutputData()); + GUI::Plot::savePlot(dirname, m_plot_canvas->customPlot(), specularDataItem()->getPowerfield()); } void SpecularDataCanvas::onMousePress(QMouseEvent* event) diff --git a/GUI/View/PlotSpecular/SpecularPlot.cpp b/GUI/View/PlotSpecular/SpecularPlot.cpp index a62059fc0516202e0057c93603539d16fb51e448..d30152b44cdb769ecf5830226f70c152e9f4cda0 100644 --- a/GUI/View/PlotSpecular/SpecularPlot.cpp +++ b/GUI/View/PlotSpecular/SpecularPlot.cpp @@ -237,7 +237,7 @@ void SpecularPlot::setLabel(const BasicAxisItem* item, QCPAxis* axis, QString la void SpecularPlot::setDataFromItem(SpecularDataItem* item) { ASSERT(item); - auto* data = item->getOutputData(); + auto* data = item->getPowerfield(); if (!data) return; diff --git a/GUI/View/PlotUtil/ColorMap.cpp b/GUI/View/PlotUtil/ColorMap.cpp index 3c9ceae0756d9e97868297f02311893e7992a219..3f902badb126f0bc64099c0c560f0a821006b91f 100644 --- a/GUI/View/PlotUtil/ColorMap.cpp +++ b/GUI/View/PlotUtil/ColorMap.cpp @@ -375,7 +375,7 @@ void ColorMap::setAxesLabelsFromItem(IntensityDataItem* item) void ColorMap::setDataFromItem(IntensityDataItem* item) { - auto* data = item->getOutputData(); + auto* data = item->getPowerfield(); if (!data) { m_colorMap->data()->clear(); return; diff --git a/GUI/View/PlotUtil/SavePlotAssistant.cpp b/GUI/View/PlotUtil/SavePlotAssistant.cpp index 99b5457406357a502da35e1ae59ed9e2855d530e..3ee31a094f9c7cc9ff7376b5d0a0f784c32cdc0f 100644 --- a/GUI/View/PlotUtil/SavePlotAssistant.cpp +++ b/GUI/View/PlotUtil/SavePlotAssistant.cpp @@ -14,7 +14,7 @@ #include "GUI/View/PlotUtil/SavePlotAssistant.h" #include "Base/Util/Assert.h" -#include "Device/Histo/IntensityDataIOFactory.h" +#include "Device/Histo/IOFactory.h" #include "GUI/Application/ApplicationSettings.h" #include "GUI/View/PlotUtil/ColorMap.h" #include <QFileDialog> @@ -71,7 +71,7 @@ bool isPdfFile(const QString& fileName) return fileName.endsWith(pdf_extension, Qt::CaseInsensitive); } -void saveToFile(const QString& fileName, QCustomPlot* plot, OutputData<double>* output_data) +void saveToFile(const QString& fileName, QCustomPlot* plot, Powerfield<double>* output_data) { if (isPngFile(fileName)) plot->savePng(fileName); @@ -84,7 +84,7 @@ void saveToFile(const QString& fileName, QCustomPlot* plot, OutputData<double>* else { ASSERT(output_data); - IntensityDataIOFactory::writeOutputData(*output_data, fileName.toStdString()); + IOFactory::writePowerfield(*output_data, fileName.toStdString()); } } @@ -129,7 +129,7 @@ QString composeFileName(const QString& fileName, const QString& filterName) } // namespace -void GUI::Plot::savePlot(const QString& dirname, QCustomPlot* plot, OutputData<double>* output_data) +void GUI::Plot::savePlot(const QString& dirname, QCustomPlot* plot, Powerfield<double>* output_data) { QString selectedFilter("*.png"); diff --git a/GUI/View/PlotUtil/SavePlotAssistant.h b/GUI/View/PlotUtil/SavePlotAssistant.h index c411ec4a8b2f9de48ef9c245341f88eb36b8bad3..38a38869e901bb012dc609054cec05e2da239927 100644 --- a/GUI/View/PlotUtil/SavePlotAssistant.h +++ b/GUI/View/PlotUtil/SavePlotAssistant.h @@ -19,11 +19,11 @@ class QCustomPlot; template <class T> -class OutputData; +class Powerfield; namespace GUI::Plot { -void savePlot(const QString& dirname, QCustomPlot* plot, OutputData<double>* output_data); +void savePlot(const QString& dirname, QCustomPlot* plot, Powerfield<double>* output_data); }; #endif // BORNAGAIN_GUI_VIEW_PLOTUTIL_SAVEPLOTASSISTANT_H diff --git a/GUI/View/Projection/ProjectionsPlot.cpp b/GUI/View/Projection/ProjectionsPlot.cpp index 883c67a5e14adc71f161780c8840e05fd37162f3..b381cde0bb833019cf08c40ce8868caadad94e69 100644 --- a/GUI/View/Projection/ProjectionsPlot.cpp +++ b/GUI/View/Projection/ProjectionsPlot.cpp @@ -173,7 +173,7 @@ void ProjectionsPlot::unsubscribeFromChildren() void ProjectionsPlot::updateProjectionsData() { - m_hist2d = std::make_unique<Histogram2D>(*intensityItem()->getOutputData()); + m_hist2d = std::make_unique<Histogram2D>(*intensityItem()->getPowerfield()); updateAxesRange(); updateAxesTitle(); setLogz(intensityItem()->isLogz()); diff --git a/GUI/View/Projection/SaveProjectionsAssistant.cpp b/GUI/View/Projection/SaveProjectionsAssistant.cpp index b4eee06363462f9f2c94d8d255c71d0e479ff0e1..4ffb4bdb21d5dba972f2d38ff265bf55a5737048 100644 --- a/GUI/View/Projection/SaveProjectionsAssistant.cpp +++ b/GUI/View/Projection/SaveProjectionsAssistant.cpp @@ -84,7 +84,7 @@ void SaveProjectionsAssistant::saveProjections(QWidget* parent, IntensityDataIte throw Error("TestGUI::Project::Utils::createTestFile() -> Error. " "Can't create file"); - m_hist2d = std::make_unique<Histogram2D>(*intensityItem->getOutputData()); + m_hist2d = std::make_unique<Histogram2D>(*intensityItem->getPowerfield()); QTextStream out(&file); diff --git a/GUI/View/SampleDesigner/MultiLayerForm.cpp b/GUI/View/SampleDesigner/MultiLayerForm.cpp index a2e1e6a85b4bda89034e9926052ca29143edd63d..99d8ffcd42ebc08f683e2303ba1923afbaf99f8f 100644 --- a/GUI/View/SampleDesigner/MultiLayerForm.cpp +++ b/GUI/View/SampleDesigner/MultiLayerForm.cpp @@ -220,17 +220,17 @@ void MultiLayerForm::updateUnits() if (m_useAngstrom) { set(editor, Unit::nanometer, Unit::angstrom); set(editor, Unit::angstrom, Unit::angstrom); - set(editor, Unit::nanometerPower2, Unit::angstromPower2); - set(editor, Unit::angstromPower2, Unit::angstromPower2); - set(editor, Unit::nanometerPowerMinus2, Unit::angstromPowerMinus2); - set(editor, Unit::angstromPowerMinus2, Unit::angstromPowerMinus2); + set(editor, Unit::nanometer2, Unit::angstrom2); + set(editor, Unit::angstrom2, Unit::angstrom2); + set(editor, Unit::nanometerMinus2, Unit::angstromMinus2); + set(editor, Unit::angstromMinus2, Unit::angstromMinus2); } else { set(editor, Unit::nanometer, Unit::nanometer); set(editor, Unit::angstrom, Unit::nanometer); - set(editor, Unit::nanometerPower2, Unit::nanometerPower2); - set(editor, Unit::angstromPower2, Unit::nanometerPower2); - set(editor, Unit::nanometerPowerMinus2, Unit::nanometerPowerMinus2); - set(editor, Unit::angstromPowerMinus2, Unit::nanometerPowerMinus2); + set(editor, Unit::nanometer2, Unit::nanometer2); + set(editor, Unit::angstrom2, Unit::nanometer2); + set(editor, Unit::nanometerMinus2, Unit::nanometerMinus2); + set(editor, Unit::angstromMinus2, Unit::nanometerMinus2); } if (m_useRadiant) { diff --git a/Resample/Processed/ReSample.cpp b/Resample/Processed/ReSample.cpp index 72f57dd0e41f810398faaf25532c9d44052d0fe9..4981b9ed1b75bb1269342f0bda7db3ee1353ca31 100644 --- a/Resample/Processed/ReSample.cpp +++ b/Resample/Processed/ReSample.cpp @@ -80,7 +80,7 @@ Material createAveragedMaterial(const Material& layer_mat, const Admixtures& adm const complex_t avr_mat_data = std::conj( 1.0 - std::sqrt(1.0 + averageData<complex_t>(layer_mat, admixtures, avrData))); return RefractiveMaterial(avge_name, avr_mat_data.real(), avr_mat_data.imag(), - avge_magnetization); + avge_magnetization); } if (common_type == MATERIAL_TYPES::MaterialBySLD) { complex_t (*avrData)(const Material&) = [](const Material& mat) { diff --git a/Sample/Aggregate/ParticleLayout.cpp b/Sample/Aggregate/ParticleLayout.cpp index bbe0ff06f78c83be354739bd7837b6fe43394a7c..509bb67b539369483942499be164279fb63c80b4 100644 --- a/Sample/Aggregate/ParticleLayout.cpp +++ b/Sample/Aggregate/ParticleLayout.cpp @@ -29,7 +29,7 @@ ParticleLayout* ParticleLayout::clone() const { auto* result = new ParticleLayout(); - for (const IParticle*const particle : m_particles) + for (const IParticle* const particle : m_particles) result->addAndRegisterAbstractParticle(particle->clone()); if (m_interparticle) diff --git a/Sample/Aggregate/ParticleLayout.h b/Sample/Aggregate/ParticleLayout.h index 94abcfc76305e65e88872ec3f1e5ac9a1b40d6ae..0c1bdc0a52763d2f0d334b3732c3175f7621e3c6 100644 --- a/Sample/Aggregate/ParticleLayout.h +++ b/Sample/Aggregate/ParticleLayout.h @@ -15,8 +15,8 @@ #ifndef BORNAGAIN_SAMPLE_AGGREGATE_PARTICLELAYOUT_H #define BORNAGAIN_SAMPLE_AGGREGATE_PARTICLELAYOUT_H -#include "Sample/Scattering/ISampleNode.h" #include "Base/Types/OwningVector.h" +#include "Sample/Scattering/ISampleNode.h" #include <memory> class IInterference; diff --git a/Sample/Material/Material.h b/Sample/Material/Material.h index af8205e4c54334ab65be20dff0e4e7a3a45a7f37..46b734e99f38cd34c277d1a665824bec696f813b 100644 --- a/Sample/Material/Material.h +++ b/Sample/Material/Material.h @@ -18,8 +18,8 @@ #include <heinz/Complex.h> #include <heinz/Vectors3D.h> #include <memory> -#include <vector> #include <ostream> +#include <vector> #ifndef SWIG #include "Sample/Material/BaseMaterialImpl.h" diff --git a/Sample/Material/MaterialBySLDImpl.cpp b/Sample/Material/MaterialBySLDImpl.cpp index 06fbb62167de0c750f30461dd845ccac7627cda7..05c5b5c8cbf7f494e5e2672f3c20b64186d7ec3b 100644 --- a/Sample/Material/MaterialBySLDImpl.cpp +++ b/Sample/Material/MaterialBySLDImpl.cpp @@ -67,8 +67,8 @@ std::string MaterialBySLDImpl::print() const { std::stringstream s; s << "MaterialBySLD:" << matName() << "<" << this << ">{ " - << "sld_real=" << m_sld_real << ", sld_imag = " << m_sld_imag << ", B=" << magnetization() - << "}"; + << "sld_real=" << m_sld_real << ", sld_imag = " << m_sld_imag << ", B=" << magnetization() + << "}"; return s.str(); } diff --git a/Sample/Material/MaterialFactoryFuncs.h b/Sample/Material/MaterialFactoryFuncs.h index d8f780fb0e0c36da3bf17bc0fb6a880d249186a7..d39a1e9754b62823980407d7efc39441be6f62d7 100644 --- a/Sample/Material/MaterialFactoryFuncs.h +++ b/Sample/Material/MaterialFactoryFuncs.h @@ -24,7 +24,7 @@ Material Vacuum(); //! @ingroup materials Material RefractiveMaterial(const std::string& name, double delta, double beta, - R3 magnetization = {}); + R3 magnetization = {}); //! @ingroup materials @@ -35,7 +35,7 @@ Material RefractiveMaterial(const std::string& name, double delta, double beta, //! With no parameters given, constructs default (vacuum) material with \f$n = 1\f$ and zero //! magnetization. Material RefractiveMaterial(const std::string& name, complex_t refractive_index, - R3 magnetization = {}); + R3 magnetization = {}); //! @ingroup materials diff --git a/Sample/Material/RefractiveMaterialImpl.cpp b/Sample/Material/RefractiveMaterialImpl.cpp index 33370be501b000df971e0a4f66f98e008bb08e13..37a087d232d79f10d71864e8f217d83617784e06 100644 --- a/Sample/Material/RefractiveMaterialImpl.cpp +++ b/Sample/Material/RefractiveMaterialImpl.cpp @@ -56,6 +56,6 @@ std::string RefractiveMaterialImpl::print() const { std::stringstream s; s << "RefractiveMaterial:" << matName() << "<" << this << ">{ " - << "delta=" << m_delta << ", beta=" << m_beta << ", B=" << magnetization() << "}"; + << "delta=" << m_delta << ", beta=" << m_beta << ", B=" << magnetization() << "}"; return s.str(); } diff --git a/Sample/Multilayer/MultiLayer.h b/Sample/Multilayer/MultiLayer.h index 43b3560f92b9a86c7c58b172eed85583419a867d..707ae1a4d1230982eb61d2ace5b97ae86638e9c5 100644 --- a/Sample/Multilayer/MultiLayer.h +++ b/Sample/Multilayer/MultiLayer.h @@ -15,9 +15,9 @@ #ifndef BORNAGAIN_SAMPLE_MULTILAYER_MULTILAYER_H #define BORNAGAIN_SAMPLE_MULTILAYER_MULTILAYER_H +#include "Base/Types/OwningVector.h" #include "Sample/Multilayer/RoughnessModels.h" #include "Sample/Scattering/ISampleNode.h" -#include "Base/Types/OwningVector.h" #include <functional> #include <heinz/Vectors3D.h> diff --git a/Sample/Particle/ParticleComposition.h b/Sample/Particle/ParticleComposition.h index 7a2d1073be275782ad896307c59611f612053c82..21f53d5f39aa5a9725cb3dea70dbad9966bd8747 100644 --- a/Sample/Particle/ParticleComposition.h +++ b/Sample/Particle/ParticleComposition.h @@ -15,8 +15,8 @@ #ifndef BORNAGAIN_SAMPLE_PARTICLE_PARTICLECOMPOSITION_H #define BORNAGAIN_SAMPLE_PARTICLE_PARTICLECOMPOSITION_H -#include "Sample/Particle/IParticle.h" #include "Base/Types/OwningVector.h" +#include "Sample/Particle/IParticle.h" //! A composition of particles at fixed positions //! @ingroup samples diff --git a/Sim/Export/SimulationToPython.cpp b/Sim/Export/SimulationToPython.cpp index f137f6241e09df248dbec546cba05a513f41b812..2eeb1c464005d6ed7591a569bf857be3c97be59e 100644 --- a/Sim/Export/SimulationToPython.cpp +++ b/Sim/Export/SimulationToPython.cpp @@ -504,6 +504,6 @@ std::string SimulationToPython::simulationSaveCode(const ISimulation& simulation " sample = get_sample()\n" " simulation = get_simulation(sample)\n" " result = simulation.simulate()\n" - " ba.IntensityDataIOFactory.writeSimulationResult(result, \"" + " ba.IOFactory.writeSimulationResult(result, \"" + fname + "\")\n"; } diff --git a/Sim/Fitting/FitObjective.cpp b/Sim/Fitting/FitObjective.cpp index 8d98e15660812bf2e46b35fa7e2b3dd466389f78..dfb897712f0b6cceddb1e3b2c370da220967a3b5 100644 --- a/Sim/Fitting/FitObjective.cpp +++ b/Sim/Fitting/FitObjective.cpp @@ -137,8 +137,8 @@ FitObjective::~FitObjective() = default; //! //! Should be private, but is used in several tests. void FitObjective::execAddSimulationAndData(const simulation_builder_t& builder, - const OutputData<double>& data, - std::unique_ptr<OutputData<double>>&& stdv, + const Powerfield<double>& data, + std::unique_ptr<Powerfield<double>>&& stdv, double weight) { m_fit_objects.emplace_back(builder, data, std::move(stdv), weight); diff --git a/Sim/Fitting/FitObjective.h b/Sim/Fitting/FitObjective.h index a788e1cc0c36f18f1dc811ba15553b4cc64e4244..c73a3357744d4f220a3a6e75083fc064409b2b16 100644 --- a/Sim/Fitting/FitObjective.h +++ b/Sim/Fitting/FitObjective.h @@ -46,8 +46,8 @@ public: #ifndef SWIG void execAddSimulationAndData(const simulation_builder_t& builder, - const OutputData<double>& data, - std::unique_ptr<OutputData<double>>&& stdv, double weight = 1.0); + const Powerfield<double>& data, + std::unique_ptr<Powerfield<double>>&& stdv, double weight = 1.0); #endif //! Constructs simulation/data pair for later fit. //! @param callback: simulation builder capable of producing simulations diff --git a/Sim/Fitting/ObjectiveMetric.cpp b/Sim/Fitting/ObjectiveMetric.cpp index acbd7f112218c992db992726a245d67c12f21494..5af2572f35158e3b0c3c26dd76285a5d657b42fd 100644 --- a/Sim/Fitting/ObjectiveMetric.cpp +++ b/Sim/Fitting/ObjectiveMetric.cpp @@ -13,7 +13,7 @@ // ************************************************************************************************ #include "Sim/Fitting/ObjectiveMetric.h" -#include "Device/Data/OutputData.h" +#include "Device/Data/Powerfield.h" #include "Sim/Fitting/ObjectiveMetricUtils.h" #include "Sim/Fitting/SimDataPair.h" #include <cmath> diff --git a/Sim/Fitting/SimDataPair.cpp b/Sim/Fitting/SimDataPair.cpp index fb9bcc37a630029df20f06fce529b5eb88653aa4..8e8f0a0a91ac7700c763470d866cc4e76fd2ecd0 100644 --- a/Sim/Fitting/SimDataPair.cpp +++ b/Sim/Fitting/SimDataPair.cpp @@ -32,15 +32,15 @@ namespace { throw std::runtime_error(ss.str()); } -std::unique_ptr<OutputData<double>> initUserWeights(const OutputData<double>& shape, double value) +std::unique_ptr<Powerfield<double>> initUserWeights(const Powerfield<double>& shape, double value) { - auto result = std::make_unique<OutputData<double>>(); + auto result = std::make_unique<Powerfield<double>>(); result->copyShapeFrom(shape); result->setAllTo(value); return result; } -bool haveSameDimensions(const IDetector& detector, const OutputData<double>& data) +bool haveSameDimensions(const IDetector& detector, const Powerfield<double>& data) { if (data.rank() != detector.dimension()) return false; @@ -56,10 +56,10 @@ bool haveSameDimensions(const IDetector& detector, const OutputData<double>& dat //! 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 ISimulation& simulation, const OutputData<double>& data) +SimulationResult convertData(const ISimulation& simulation, const Powerfield<double>& data) { const ICoordSystem* coordSystem = simulation.createCoordSystem(); - auto roi_data = coordSystem->createOutputData(coordSystem->defaultUnits()); + auto roi_data = coordSystem->createPowerfield(coordSystem->defaultUnits()); if (roi_data->hasSameDimensions(data)) { // data is already cropped to ROI @@ -85,8 +85,8 @@ SimulationResult convertData(const ISimulation& simulation, const OutputData<dou // class implementation // ************************************************************************************************ -SimDataPair::SimDataPair(simulation_builder_t builder, const OutputData<double>& raw_data, - std::unique_ptr<OutputData<double>>&& raw_stdv, double user_weight) +SimDataPair::SimDataPair(simulation_builder_t builder, const Powerfield<double>& raw_data, + std::unique_ptr<Powerfield<double>>&& raw_stdv, double user_weight) : m_simulation_builder(std::move(builder)) , m_raw_data(raw_data.clone()) , m_raw_uncertainties(std::move(raw_stdv)) @@ -95,9 +95,9 @@ SimDataPair::SimDataPair(simulation_builder_t builder, const OutputData<double>& validate(); } -SimDataPair::SimDataPair(simulation_builder_t builder, const OutputData<double>& raw_data, - std::unique_ptr<OutputData<double>>&& raw_stdv, - std::unique_ptr<OutputData<double>>&& user_weights) +SimDataPair::SimDataPair(simulation_builder_t builder, const Powerfield<double>& raw_data, + std::unique_ptr<Powerfield<double>>&& raw_stdv, + std::unique_ptr<Powerfield<double>>&& user_weights) : m_simulation_builder(std::move(builder)) , m_raw_data(raw_data.clone()) , m_raw_uncertainties(std::move(raw_stdv)) @@ -141,8 +141,8 @@ void SimDataPair::execSimulation(const mumufit::Parameters& params) m_uncertainties = convertData(*simulation, *m_raw_uncertainties); else { const ICoordSystem& converter = m_sim_data.converter(); - std::unique_ptr<OutputData<double>> dummy_array = - converter.createOutputData(converter.defaultUnits()); + std::unique_ptr<Powerfield<double>> dummy_array = + converter.createPowerfield(converter.defaultUnits()); m_uncertainties = SimulationResult(*dummy_array, converter); } diff --git a/Sim/Fitting/SimDataPair.h b/Sim/Fitting/SimDataPair.h index 3e6d63ddede16178aff3e9e5ec73efa3772f44b4..466070816db9a109ae2bc15837c9f11c5fdae25d 100644 --- a/Sim/Fitting/SimDataPair.h +++ b/Sim/Fitting/SimDataPair.h @@ -24,18 +24,18 @@ #include "Sim/Fitting/FitTypes.h" template <class T> -class OutputData; +class Powerfield; //! Holds pair of simulation/experimental data to fit. class SimDataPair { public: - SimDataPair(simulation_builder_t builder, const OutputData<double>& raw_data, - std::unique_ptr<OutputData<double>>&& raw_stdv, double user_weight = 1.0); + SimDataPair(simulation_builder_t builder, const Powerfield<double>& raw_data, + std::unique_ptr<Powerfield<double>>&& raw_stdv, double user_weight = 1.0); - SimDataPair(simulation_builder_t builder, const OutputData<double>& raw_data, - std::unique_ptr<OutputData<double>>&& raw_stdv, - std::unique_ptr<OutputData<double>>&& user_weights); + SimDataPair(simulation_builder_t builder, const Powerfield<double>& raw_data, + std::unique_ptr<Powerfield<double>>&& raw_stdv, + std::unique_ptr<Powerfield<double>>&& user_weights); SimDataPair(SimDataPair&& other); @@ -96,11 +96,11 @@ private: SimulationResult m_user_weights; //! Raw experimental data as obtained from the user. - std::unique_ptr<OutputData<double>> m_raw_data; + std::unique_ptr<Powerfield<double>> m_raw_data; //! Data uncertainties as provided by the user - std::unique_ptr<OutputData<double>> m_raw_uncertainties; + std::unique_ptr<Powerfield<double>> m_raw_uncertainties; //! User-defined weights - std::unique_ptr<OutputData<double>> m_raw_user_weights; + std::unique_ptr<Powerfield<double>> m_raw_user_weights; }; #endif // BORNAGAIN_SIM_FITTING_SIMDATAPAIR_H diff --git a/Sim/Simulation/DepthProbeSimulation.cpp b/Sim/Simulation/DepthProbeSimulation.cpp index 8b6db8c4fa8b1d349a5dabb3cc95296d94d661be..dbc328d04b1e626380a329ba3931d7dc7c46fc91 100644 --- a/Sim/Simulation/DepthProbeSimulation.cpp +++ b/Sim/Simulation/DepthProbeSimulation.cpp @@ -241,9 +241,9 @@ double DepthProbeSimulation::incidentAngle(size_t index) const return m_alpha_axis->bin(index).center(); } -std::unique_ptr<OutputData<double>> DepthProbeSimulation::createIntensityData() const +std::unique_ptr<Powerfield<double>> DepthProbeSimulation::createIntensityData() const { - std::unique_ptr<OutputData<double>> result = std::make_unique<OutputData<double>>(); + std::unique_ptr<Powerfield<double>> result = std::make_unique<Powerfield<double>>(); result->addAxis(*alphaAxis()); result->addAxis(*zAxis()); diff --git a/Sim/Simulation/DepthProbeSimulation.h b/Sim/Simulation/DepthProbeSimulation.h index 3eb52ffab66713f97b2658ccb0f094cde12d7cbd..01b6aaf89a0f538886829342f973ac1e65ecec42 100644 --- a/Sim/Simulation/DepthProbeSimulation.h +++ b/Sim/Simulation/DepthProbeSimulation.h @@ -16,7 +16,7 @@ #define BORNAGAIN_SIM_SIMULATION_DEPTHPROBESIMULATION_H #include "Base/Element/DepthProbeElement.h" -#include "Device/Data/OutputData.h" +#include "Device/Data/Powerfield.h" #include "Sim/Simulation/ISimulation.h" #include <vector> @@ -106,7 +106,7 @@ private: double incidentAngle(size_t index) const; //! Creates intensity data from simulation elements - std::unique_ptr<OutputData<double>> createIntensityData() const; + std::unique_ptr<Powerfield<double>> createIntensityData() const; std::unique_ptr<IAxis> m_alpha_axis; std::unique_ptr<IAxis> m_z_axis; diff --git a/Sim/Simulation/ISimulation.h b/Sim/Simulation/ISimulation.h index 8c304495b7266dad9b5414b6fcf9fc515ac085b7..73a6b01c501b298457bda55c37b7ab9cda621fa4 100644 --- a/Sim/Simulation/ISimulation.h +++ b/Sim/Simulation/ISimulation.h @@ -19,7 +19,7 @@ #include "Param/Distrib/DistributionHandler.h" template <class T> -class OutputData; +class Powerfield; class IBackground; class IComputation; class ICoordSystem; diff --git a/Sim/Simulation/OffSpecularSimulation.cpp b/Sim/Simulation/OffSpecularSimulation.cpp index fcddd06ed70155a00ca2b32a06f26a799414dd94..9266661d006a12a3e0749150d20b3bf74e9653a3 100644 --- a/Sim/Simulation/OffSpecularSimulation.cpp +++ b/Sim/Simulation/OffSpecularSimulation.cpp @@ -55,7 +55,7 @@ SimulationResult OffSpecularSimulation::pack_result() for (size_t i = 0; i < m_alpha_i_axis->size(); ++i) transferDetectorImage(i); - auto data = std::unique_ptr<OutputData<double>>(m_intensity_map.clone()); + auto data = std::unique_ptr<Powerfield<double>>(m_intensity_map.clone()); std::unique_ptr<ICoordSystem> coordsSystem(createCoordSystem()); return {*data, *coordsSystem}; } @@ -144,7 +144,7 @@ void OffSpecularSimulation::updateIntensityMap() void OffSpecularSimulation::transferDetectorImage(size_t index) { - OutputData<double> detector_image; + Powerfield<double> detector_image; size_t detector_dimension = detector().dimension(); for (size_t dim = 0; dim < detector_dimension; ++dim) detector_image.addAxis(detector().axis(dim)); diff --git a/Sim/Simulation/OffSpecularSimulation.h b/Sim/Simulation/OffSpecularSimulation.h index 004a7df7feb782500d69bd00f4c925eebd0c4dd4..d082dc8bb81aa70dff390cd27a78983c4ded7eae 100644 --- a/Sim/Simulation/OffSpecularSimulation.h +++ b/Sim/Simulation/OffSpecularSimulation.h @@ -15,7 +15,7 @@ #ifndef BORNAGAIN_SIM_SIMULATION_OFFSPECULARSIMULATION_H #define BORNAGAIN_SIM_SIMULATION_OFFSPECULARSIMULATION_H -#include "Device/Data/OutputData.h" +#include "Device/Data/Powerfield.h" #include "Sim/Simulation/ISimulation2D.h" //! Off-specular scattering simulation. @@ -72,7 +72,7 @@ private: void initialize(); std::unique_ptr<IAxis> m_alpha_i_axis; - OutputData<double> m_intensity_map; + Powerfield<double> m_intensity_map; #endif }; diff --git a/Sim/Simulation/ScatteringSimulation.cpp b/Sim/Simulation/ScatteringSimulation.cpp index ca7621893aea45ed25b182c43904a505e67c8b0d..a5506c933a48abc2c6fed5c8e7ccc677d2d6ca71 100644 --- a/Sim/Simulation/ScatteringSimulation.cpp +++ b/Sim/Simulation/ScatteringSimulation.cpp @@ -14,7 +14,7 @@ #include "Sim/Simulation/ScatteringSimulation.h" #include "Device/Coord/CoordSystem2D.h" -#include "Device/Data/OutputData.h" +#include "Device/Data/Powerfield.h" #include "Device/Detector/IDetector.h" #include "Device/Histo/SimulationResult.h" #include "Resample/Element/DiffuseElement.h" @@ -45,7 +45,7 @@ void ScatteringSimulation::prepareSimulation() SimulationResult ScatteringSimulation::pack_result() { auto* const coordsys = instrument().createScatteringCoords(); - const std::unique_ptr<OutputData<double>> data(detector().createDetectorIntensity(m_eles)); + const std::unique_ptr<Powerfield<double>> data(detector().createDetectorIntensity(m_eles)); return {*data, *coordsys}; } diff --git a/Sim/Simulation/SpecularSimulation.cpp b/Sim/Simulation/SpecularSimulation.cpp index 405025bf30341dc9d79d5da76e747f9468b7ca95..d044d8f9b1ec2db7baa811e5af8cce75e7b58756 100644 --- a/Sim/Simulation/SpecularSimulation.cpp +++ b/Sim/Simulation/SpecularSimulation.cpp @@ -18,7 +18,7 @@ #include "Device/Beam/Beam.h" #include "Device/Beam/IFootprintFactor.h" #include "Device/Coord/CoordSystem1D.h" -#include "Device/Data/OutputData.h" +#include "Device/Data/Powerfield.h" #include "Device/Detector/SpecularDetector1D.h" #include "Device/Histo/SimulationResult.h" #include "Param/Distrib/Distributions.h" @@ -75,7 +75,7 @@ size_t SpecularSimulation::numberOfElements() const SimulationResult SpecularSimulation::pack_result() { - OutputData<double> data; + Powerfield<double> data; data.addAxis(*coordinateAxis()); ASSERT(!m_eles.empty()); data.setRawDataVector(m_scan->createIntensities(m_eles)); diff --git a/Tests/Functional/Core/Consistence/CompareTwoReferences.cpp b/Tests/Functional/Core/Consistence/CompareTwoReferences.cpp index 25708a28cf4c0125e084e9dda92aa1b6d8f5409a..110235d71a35fd17b95f1f9bc45d57afc4be400b 100644 --- a/Tests/Functional/Core/Consistence/CompareTwoReferences.cpp +++ b/Tests/Functional/Core/Consistence/CompareTwoReferences.cpp @@ -15,19 +15,19 @@ #include "BATesting.h" #include "Base/Util/FileSystemUtils.h" #include "Device/Histo/HistoUtils.h" -#include "Device/Histo/IntensityDataIOFactory.h" +#include "Device/Histo/IOFactory.h" #include <iostream> namespace { -std::unique_ptr<OutputData<double>> load(const std::string& name) +std::unique_ptr<Powerfield<double>> load(const std::string& name) { ASSERT(!name.empty()); const std::string path = BaseUtils::Filesystem::jointPath(BATesting::ReferenceDir_Suite(), name + ".int.gz"); - std::unique_ptr<OutputData<double>> data; + std::unique_ptr<Powerfield<double>> data; try { - data.reset(IntensityDataIOFactory::readOutputData(path)); + data.reset(IOFactory::readPowerfield(path)); } catch (const std::exception&) { std::cout << "Data file " << path << "not found.\n" << "Run the pertinent Core standard test, copy the fresh data file" @@ -41,8 +41,8 @@ std::unique_ptr<OutputData<double>> load(const std::string& name) int compareTwoReferences(const std::string& name0, const std::string& name1, const double limit) { - std::unique_ptr<OutputData<double>> data0 = load(name0); - std::unique_ptr<OutputData<double>> data1 = load(name1); + std::unique_ptr<Powerfield<double>> data0 = load(name0); + std::unique_ptr<Powerfield<double>> data1 = load(name1); return DataUtils::Histo::checkRelativeDifference(*data0, *data1, limit); } diff --git a/Tests/Functional/Core/Consistence/ConsistenceTests.cpp b/Tests/Functional/Core/Consistence/ConsistenceTests.cpp index 51202119d0af581ba23bc0eb46f342042c8536ea..4afa380ebb5eeba9acadb9251d765e2ecf95cb40 100644 --- a/Tests/Functional/Core/Consistence/ConsistenceTests.cpp +++ b/Tests/Functional/Core/Consistence/ConsistenceTests.cpp @@ -15,7 +15,7 @@ // These tests check whether pairs of reference data sets, generated by // some other tests, coincide within reasonable numeric error margins. -#include "Device/Data/OutputData.h" +#include "Device/Data/Powerfield.h" #include "Device/Histo/SimulationResult.h" #include "Sample/StandardSamples/CylindersAndPrismsBuilder.h" #include "Sample/StandardSamples/PlainMultiLayerBySLDBuilder.h" diff --git a/Tests/Functional/Core/CoreSpecial/CoreIOPathTest.cpp b/Tests/Functional/Core/CoreSpecial/CoreIOPathTest.cpp index 0756bf3f1fe62293a9347ee9e65d9335da070c01..74de88a6a5e7edbf141a8ffa3866049bdc1529cf 100644 --- a/Tests/Functional/Core/CoreSpecial/CoreIOPathTest.cpp +++ b/Tests/Functional/Core/CoreSpecial/CoreIOPathTest.cpp @@ -15,7 +15,7 @@ #include "BATesting.h" #include "Base/Util/FileSystemUtils.h" #include "Device/Data/DataUtils.h" -#include "Device/Histo/IntensityDataIOFactory.h" +#include "Device/Histo/IOFactory.h" #include "Tests/GTestWrapper/google_test.h" #include <filesystem> #include <iostream> @@ -23,19 +23,19 @@ namespace { -std::unique_ptr<OutputData<double>> createTestData() +std::unique_ptr<Powerfield<double>> createTestData() { - std::unique_ptr<OutputData<double>> result(new OutputData<double>); + std::unique_ptr<Powerfield<double>> result(new Powerfield<double>); result->addAxis("x", 10, 0.0, 10.0); for (size_t i = 0; i < result->getAllocatedSize(); ++i) (*result)[i] = static_cast<double>(i); return result; } -bool test_io(const OutputData<double>* data, const std::string& file_name) +bool test_io(const Powerfield<double>* data, const std::string& file_name) { - IntensityDataIOFactory::writeOutputData(*data, file_name); - std::unique_ptr<OutputData<double>> loaded(IntensityDataIOFactory::readOutputData(file_name)); + IOFactory::writePowerfield(*data, file_name); + std::unique_ptr<Powerfield<double>> loaded(IOFactory::readPowerfield(file_name)); return DataUtils::Data::relativeDataDifference(*data, *loaded) <= 1e-06; } diff --git a/Tests/Functional/Core/CoreSpecial/FourierTransformationTest.cpp b/Tests/Functional/Core/CoreSpecial/FourierTransformationTest.cpp index 155913d063d33a13f199d30de696e878d5fe2ec8..5042c1d343b5c7c4ffeed18ccdd65ff6d8337382 100644 --- a/Tests/Functional/Core/CoreSpecial/FourierTransformationTest.cpp +++ b/Tests/Functional/Core/CoreSpecial/FourierTransformationTest.cpp @@ -15,7 +15,7 @@ #include "BATesting.h" #include "Base/Util/FileSystemUtils.h" #include "Device/Data/DataUtils.h" -#include "Device/Histo/IntensityDataIOFactory.h" +#include "Device/Histo/IOFactory.h" #include "Tests/GTestWrapper/google_test.h" #include <iostream> #include <memory> @@ -40,23 +40,23 @@ bool test_fft(const std::string& input_image_name, const std::string& reference_ std::cout << "Reference fft: " << reference_fft_name << std::endl; // loading input image - std::unique_ptr<OutputData<double>> input_image; + std::unique_ptr<Powerfield<double>> input_image; try { const auto filename = BaseUtils::Filesystem::jointPath(BATesting::ReferenceDir_Suite(), input_image_name); - input_image.reset(IntensityDataIOFactory::readOutputData(filename)); + input_image.reset(IOFactory::readPowerfield(filename)); } catch (const std::exception&) { std::cout << "Error: no input image.\n"; return false; } std::cout << "transforming" << std::endl; - std::unique_ptr<OutputData<double>> fft = DataUtils::Data::createFFT(*input_image); + std::unique_ptr<Powerfield<double>> fft = DataUtils::Data::createFFT(*input_image); std::cout << "loading reference" << std::endl; - std::unique_ptr<OutputData<double>> reference_fft; + std::unique_ptr<Powerfield<double>> reference_fft; try { - reference_fft.reset(IntensityDataIOFactory::readOutputData(reference_fft_name)); + reference_fft.reset(IOFactory::readPowerfield(reference_fft_name)); } catch (const std::exception&) { std::cout << "Error: no reference fft image. Creating new one.\n"; } @@ -70,7 +70,7 @@ bool test_fft(const std::string& input_image_name, const std::string& reference_ BaseUtils::Filesystem::createDirectory(BATesting::TestOutDir_Core()); std::string out_fname = BaseUtils::Filesystem::jointPath( BATesting::TestOutDir_Core(), BaseUtils::Filesystem::filename(reference_fft_name)); - IntensityDataIOFactory::writeOutputData(*fft, out_fname); + IOFactory::writePowerfield(*fft, out_fname); std::cout << "New fft image stored in " << out_fname << std::endl; } diff --git a/Tests/Functional/Core/Fitting/SimfitTestPlan.cpp b/Tests/Functional/Core/Fitting/SimfitTestPlan.cpp index f8f1d5096bcdac6cd964c25a7d390fa5663222be..471f9836152f034c50709770cd14de7d0ab86cd7 100644 --- a/Tests/Functional/Core/Fitting/SimfitTestPlan.cpp +++ b/Tests/Functional/Core/Fitting/SimfitTestPlan.cpp @@ -71,7 +71,7 @@ std::unique_ptr<ISimulation> SimfitTestPlan::createSimulation(const mumufit::Par //! Creates "experimental" data for fitting. -std::unique_ptr<OutputData<double>> SimfitTestPlan::fakeData() const +std::unique_ptr<Powerfield<double>> SimfitTestPlan::fakeData() const { // use expected values of fit parameters to construct simulation auto params = parameters(); diff --git a/Tests/Functional/Core/Fitting/SimfitTestPlan.h b/Tests/Functional/Core/Fitting/SimfitTestPlan.h index 26347af08999fcea240942b078a54a36be10c4fc..6dbaf742d6881dfcc8e005d5c0b3150640ab62f9 100644 --- a/Tests/Functional/Core/Fitting/SimfitTestPlan.h +++ b/Tests/Functional/Core/Fitting/SimfitTestPlan.h @@ -21,7 +21,7 @@ class MultiLayer; template <class T> -class OutputData; +class Powerfield; //! Contains all logic to construct FitObjective, setup Minimizer and check minimization results. @@ -43,7 +43,7 @@ protected: { return {}; } - virtual std::unique_ptr<OutputData<double>> fakeData() const; + virtual std::unique_ptr<Powerfield<double>> fakeData() const; simulation_builder_t m_sim_builder; const bool m_residual_based; diff --git a/Tests/Functional/Core/SuitePersist/Check.cpp b/Tests/Functional/Core/SuitePersist/Check.cpp index ae372def816d87fa6fab27ec3efff91220197a9c..80bfe8d424a085d4c349c627298ca55742f481e7 100644 --- a/Tests/Functional/Core/SuitePersist/Check.cpp +++ b/Tests/Functional/Core/SuitePersist/Check.cpp @@ -16,7 +16,7 @@ #include "BATesting.h" #include "Base/Util/FileSystemUtils.h" #include "Device/Histo/HistoUtils.h" -#include "Device/Histo/IntensityDataIOFactory.h" +#include "Device/Histo/IOFactory.h" #include "Device/Histo/SimulationResult.h" #include "Sim/Simulation/ISimulation.h" #include <iostream> @@ -26,9 +26,9 @@ bool checkSimulation(const std::string& name, ISimulation& direct_simulation, const double limit) { // Run simulation directly. - const std::unique_ptr<OutputData<double>> result_data = direct_simulation.simulate().data(); + const std::unique_ptr<Powerfield<double>> result_data = direct_simulation.simulate().data(); - std::unique_ptr<OutputData<double>> reference; + std::unique_ptr<Powerfield<double>> reference; // Load reference if available. ASSERT(!name.empty()); @@ -36,7 +36,7 @@ bool checkSimulation(const std::string& name, ISimulation& direct_simulation, co const std::string refPath = BaseUtils::Filesystem::jointPath(BATesting::ReferenceDir_Suite(), name + ".int.gz"); std::cout << "- reference: " << refPath << "\n"; - reference.reset(IntensityDataIOFactory::readOutputData(refPath)); + reference.reset(IOFactory::readPowerfield(refPath)); } catch (const std::exception&) { std::cerr << "FAILED: cannot read reference\n"; } @@ -56,7 +56,7 @@ bool checkSimulation(const std::string& name, ISimulation& direct_simulation, co BaseUtils::Filesystem::createDirectories(BATesting::TestOutDir_Suite()); std::string out_fname = BaseUtils::Filesystem::jointPath(BATesting::TestOutDir_Suite(), name + ".int.gz"); - IntensityDataIOFactory::writeOutputData(*result_data, out_fname); + IOFactory::writePowerfield(*result_data, out_fname); std::cout << "Notes:\n- to visualize an intensity map, use " << BABuild::srcDir() << "/devtools/view/plot_int.py\n" << "- to plot a difference image, use " << BABuild::srcDir() diff --git a/Tests/Functional/GUI/Check.cpp b/Tests/Functional/GUI/Check.cpp index 086d2ec30ef388f098ab9a938ca67fdda9686ad3..9ba39442d14562759e216a8082c4e29fc6ecdbd3 100644 --- a/Tests/Functional/GUI/Check.cpp +++ b/Tests/Functional/GUI/Check.cpp @@ -16,7 +16,7 @@ #include "BATesting.h" #include "Base/Util/FileSystemUtils.h" #include "Device/Histo/HistoUtils.h" -#include "Device/Histo/IntensityDataIOFactory.h" +#include "Device/Histo/IOFactory.h" #include "Device/Histo/SimulationResult.h" #include "GUI/Model/Device/InstrumentItems.h" #include "GUI/Model/Sample/MaterialItems.h" @@ -29,7 +29,7 @@ namespace { -std::unique_ptr<OutputData<double>> domainData(const std::string& /*test_name*/, +std::unique_ptr<Powerfield<double>> domainData(const std::string& /*test_name*/, const ISimulation& direct_simulation) { // initializing necessary GUI @@ -45,7 +45,7 @@ std::unique_ptr<OutputData<double>> domainData(const std::string& /*test_name*/, GUI::Model::DomainSimulationBuilder::createSimulation( multiLayerItem.get(), instrumentItems.instrumentItems().front(), optionsItem); - return std::unique_ptr<OutputData<double>>(domain_simulation->simulate().data()); + return std::unique_ptr<Powerfield<double>>(domain_simulation->simulate().data()); } } // namespace @@ -54,9 +54,9 @@ std::unique_ptr<OutputData<double>> domainData(const std::string& /*test_name*/, bool checkSimulation(const std::string& name, ISimulation& direct_simulation, const double limit) { - const std::unique_ptr<OutputData<double>> domain_data = domainData(name, direct_simulation); + const std::unique_ptr<Powerfield<double>> domain_data = domainData(name, direct_simulation); - const std::unique_ptr<OutputData<double>> ref_data = direct_simulation.simulate().data(); + const std::unique_ptr<Powerfield<double>> ref_data = direct_simulation.simulate().data(); bool ok = DataUtils::Histo::checkRelativeDifference(*domain_data, *ref_data, limit); @@ -65,12 +65,12 @@ bool checkSimulation(const std::string& name, ISimulation& direct_simulation, co // Save simulation, as it differs from reference. BaseUtils::Filesystem::createDirectories(BATesting::TestOutDir_AdHoc()); - std::map<const std::string, const OutputData<double>*> tosave{{"gui", domain_data.get()}, + std::map<const std::string, const Powerfield<double>*> tosave{{"gui", domain_data.get()}, {"std", ref_data.get()}}; for (const auto& [kind, data] : tosave) { std::string out_fname = BaseUtils::Filesystem::jointPath(BATesting::TestOutDir_AdHoc(), name + "." + kind + ".int.gz"); - IntensityDataIOFactory::writeOutputData(*data, out_fname); + IOFactory::writePowerfield(*data, out_fname); std::cout << "Saved " << out_fname << "\n"; } std::cout << "Notes:\n" diff --git a/Tests/Functional/Py/Suite/Check.cpp b/Tests/Functional/Py/Suite/Check.cpp index a9223ac5aece79f855cf0748800e839c4c47aa14..0634d17eba4aaf416b714426051124e09555cff0 100644 --- a/Tests/Functional/Py/Suite/Check.cpp +++ b/Tests/Functional/Py/Suite/Check.cpp @@ -16,7 +16,7 @@ #include "BATesting.h" #include "Base/Util/FileSystemUtils.h" #include "Device/Histo/HistoUtils.h" -#include "Device/Histo/IntensityDataIOFactory.h" +#include "Device/Histo/IOFactory.h" #include "Device/Histo/SimulationResult.h" #include "Sim/Export/ExportToPython.h" #include "Sim/Simulation/ISimulation.h" @@ -25,7 +25,7 @@ namespace { -std::unique_ptr<OutputData<double>> domainData(const std::string& test_name, +std::unique_ptr<Powerfield<double>> domainData(const std::string& test_name, const ISimulation& direct_simulation) { const std::string output_name = @@ -58,8 +58,7 @@ std::unique_ptr<OutputData<double>> domainData(const std::string& test_name, if (err) throw std::runtime_error("Exported Python script did not execute properly"); - auto result = - std::unique_ptr<OutputData<double>>(IntensityDataIOFactory::readOutputData(output_path)); + auto result = std::unique_ptr<Powerfield<double>>(IOFactory::readPowerfield(output_path)); if (!result) throw std::runtime_error("Could not read back simulation output from file " + output_path); return result; @@ -73,9 +72,9 @@ bool checkSimulation(const std::string& name, ISimulation& direct_simulation, co { std::cout << "PySuite test: checkSimulation(" << name << ")" << std::endl; - const std::unique_ptr<OutputData<double>> domain_data = domainData(name, direct_simulation); + const std::unique_ptr<Powerfield<double>> domain_data = domainData(name, direct_simulation); std::cout << "- got domain data" << std::endl; - const std::unique_ptr<OutputData<double>> ref_data = direct_simulation.simulate().data(); + const std::unique_ptr<Powerfield<double>> ref_data = direct_simulation.simulate().data(); std::cout << "- ran simulation" << std::endl; return DataUtils::Histo::checkRelativeDifference(*domain_data, *ref_data, limit); diff --git a/Tests/PyUnit/intensitydata.py b/Tests/PyUnit/intensitydata.py index 041ca3d5742da0805f4fc35d690ed98f5b8ee6c3..1678296fafba80175edae1bc4d2fc92110ea5b27 100644 --- a/Tests/PyUnit/intensitydata.py +++ b/Tests/PyUnit/intensitydata.py @@ -18,14 +18,14 @@ class IntensityDataTest(unittest.TestCase): def test_create_1d_output_data_from_numpy(self): input = numpy.array([0, 1, 2, 3, 4, 5, 6], dtype=float) - output_data = ba.importArrayToOutputData(input) + output_data = ba.importArrayToPowerfield(input) output = output_data.getArray() self.assertEqual(input.size, output.size) numpy.testing.assert_allclose(input, output) def test_create_2d_output_data_from_numpy(self): input = numpy.array([[0, 1], [2, 3]], dtype=float) - output_data = ba.importArrayToOutputData(input) + output_data = ba.importArrayToPowerfield(input) output = output_data.getArray() self.assertEqual(input.size, output.size) numpy.testing.assert_allclose(input, output) diff --git a/Tests/PyUnit/intensitydata_io.py b/Tests/PyUnit/intensitydata_io.py index f8f7e198f9173258a077ee5357c786fa16efa3c8..f4aa80a051ce86ae38ac46d86948ec68666a99f7 100644 --- a/Tests/PyUnit/intensitydata_io.py +++ b/Tests/PyUnit/intensitydata_io.py @@ -43,7 +43,7 @@ def get_boundaries_flat_in_sin(nbins, start, end): return result -class OutputDataIOTest(unittest.TestCase): +class IOTest(unittest.TestCase): """ Test serialization of IntensityData """ @@ -52,8 +52,8 @@ class OutputDataIOTest(unittest.TestCase): data = ba.IntensityData() data.addAxis(ba.FixedBinAxis("axis0", 10, -1.00000001, 1)) fill_data(data) - ba.IntensityDataIOFactory.writeOutputData(data, "tmp.int") - newdata = ba.IntensityDataIOFactory.readOutputData("tmp.int") + ba.IOFactory.writePowerfield(data, "tmp.int") + newdata = ba.IOFactory.readPowerfield("tmp.int") self.assertTrue(is_the_same_data(data, newdata)) def test_02_FixedBinAxis_2D(self): @@ -61,8 +61,8 @@ class OutputDataIOTest(unittest.TestCase): data.addAxis(ba.FixedBinAxis("axis0", 9, -1.00000001, 1)) data.addAxis(ba.FixedBinAxis("axis1", 3, -4, 5)) fill_data(data) - ba.IntensityDataIOFactory.writeOutputData(data, "tmp.int") - newdata = ba.IntensityDataIOFactory.readOutputData("tmp.int") + ba.IOFactory.writePowerfield(data, "tmp.int") + newdata = ba.IOFactory.readPowerfield("tmp.int") self.assertTrue(is_the_same_data(data, newdata)) def test_03_FixedBinAxis_3D(self): @@ -71,8 +71,8 @@ class OutputDataIOTest(unittest.TestCase): data.addAxis(ba.FixedBinAxis("axis1", 1, -4, 5)) data.addAxis(ba.FixedBinAxis("axis2", 3, 0, 1)) fill_data(data) - ba.IntensityDataIOFactory.writeOutputData(data, "tmp.int") - newdata = ba.IntensityDataIOFactory.readOutputData("tmp.int") + ba.IOFactory.writePowerfield(data, "tmp.int") + newdata = ba.IOFactory.readPowerfield("tmp.int") self.assertTrue(is_the_same_data(data, newdata)) def test_04_VariableBinAxis_1D(self): @@ -82,8 +82,8 @@ class OutputDataIOTest(unittest.TestCase): "axis0", 10, get_boundaries_flat_in_sin(10, -5*deg, 5*deg))) fill_data(data) - ba.IntensityDataIOFactory.writeOutputData(data, "tmp.int") - newdata = ba.IntensityDataIOFactory.readOutputData("tmp.int") + ba.IOFactory.writePowerfield(data, "tmp.int") + newdata = ba.IOFactory.readPowerfield("tmp.int") self.assertTrue(is_the_same_data(data, newdata)) def test_05_VariableBinAxis_2D(self): @@ -96,8 +96,8 @@ class OutputDataIOTest(unittest.TestCase): ba.VariableBinAxis("axis1", 3, get_boundaries_flat_in_sin(3, 0, 2*deg))) fill_data(data) - ba.IntensityDataIOFactory.writeOutputData(data, "tmp.int") - newdata = ba.IntensityDataIOFactory.readOutputData("tmp.int") + ba.IOFactory.writePowerfield(data, "tmp.int") + newdata = ba.IOFactory.readPowerfield("tmp.int") self.assertTrue(is_the_same_data(data, newdata)) def test_06_VariableAndFixedMix(self): @@ -107,8 +107,8 @@ class OutputDataIOTest(unittest.TestCase): ba.VariableBinAxis("axis1", 3, get_boundaries_flat_in_sin(3, 0, 2*deg))) fill_data(data) - ba.IntensityDataIOFactory.writeOutputData(data, "tmp.int") - newdata = ba.IntensityDataIOFactory.readOutputData("tmp.int") + ba.IOFactory.writePowerfield(data, "tmp.int") + newdata = ba.IOFactory.readPowerfield("tmp.int") self.assertTrue(is_the_same_data(data, newdata)) def test_07_ConstKBinAxis_2D(self): @@ -116,8 +116,8 @@ class OutputDataIOTest(unittest.TestCase): data.addAxis(ba.ConstKBinAxis("axis0", 9, -1.00000001*deg, 1*deg)) data.addAxis(ba.ConstKBinAxis("axis1", 3, -4*deg, 5*deg)) fill_data(data) - ba.IntensityDataIOFactory.writeOutputData(data, "tmp.int") - newdata = ba.IntensityDataIOFactory.readOutputData("tmp.int") + ba.IOFactory.writePowerfield(data, "tmp.int") + newdata = ba.IOFactory.readPowerfield("tmp.int") self.assertTrue(is_the_same_data(data, newdata)) def test_08_CustomBinAxis_2D(self): @@ -125,8 +125,8 @@ class OutputDataIOTest(unittest.TestCase): data.addAxis(ba.CustomBinAxis("axis0", 9, -1.00000001*deg, 1*deg)) data.addAxis(ba.CustomBinAxis("axis1", 3, -4*deg, 5*deg)) fill_data(data) - ba.IntensityDataIOFactory.writeOutputData(data, "tmp.int") - newdata = ba.IntensityDataIOFactory.readOutputData("tmp.int") + ba.IOFactory.writePowerfield(data, "tmp.int") + newdata = ba.IOFactory.readPowerfield("tmp.int") self.assertTrue(is_the_same_data(data, newdata)) def test_SaveToINT(self): @@ -135,16 +135,16 @@ class OutputDataIOTest(unittest.TestCase): data.addAxis(ba.FixedBinAxis("axis1", 5, 0, 5)) fill_data(data) - ba.IntensityDataIOFactory.writeOutputData(data, "tmp.int") - newdata = ba.IntensityDataIOFactory.readOutputData("tmp.int") + ba.IOFactory.writePowerfield(data, "tmp.int") + newdata = ba.IOFactory.readPowerfield("tmp.int") self.assertTrue(is_the_same_data(data, newdata)) - ba.IntensityDataIOFactory.writeOutputData(data, "tmp.int.gz") - newdata = ba.IntensityDataIOFactory.readOutputData("tmp.int.gz") + ba.IOFactory.writePowerfield(data, "tmp.int.gz") + newdata = ba.IOFactory.readPowerfield("tmp.int.gz") self.assertTrue(is_the_same_data(data, newdata)) - ba.IntensityDataIOFactory.writeOutputData(data, "tmp.int.bz2") - newdata = ba.IntensityDataIOFactory.readOutputData("tmp.int.bz2") + ba.IOFactory.writePowerfield(data, "tmp.int.bz2") + newdata = ba.IOFactory.readPowerfield("tmp.int.bz2") self.assertTrue(is_the_same_data(data, newdata)) def test_SaveToTXT(self): @@ -153,15 +153,15 @@ class OutputDataIOTest(unittest.TestCase): data.addAxis(ba.FixedBinAxis("axis1", 5, 0, 5)) fill_data(data) - ba.IntensityDataIOFactory.writeOutputData(data, "tmp.txt") - newdata = ba.IntensityDataIOFactory.readOutputData("tmp.txt") + ba.IOFactory.writePowerfield(data, "tmp.txt") + newdata = ba.IOFactory.readPowerfield("tmp.txt") self.assertTrue(is_the_same_data(data, newdata)) - def test_SaveNumpyArray_ReadOutputData(self): + def test_SaveNumpyArray_ReadPowerfield(self): arr = numpy.array([[0, 1, 2, 3.0], [4, 5, 6, 7.0], [8, 9, 10, 11.0]]) numpy.savetxt('tmp.txt', arr) - newdata = ba.IntensityDataIOFactory.readOutputData("tmp.txt") + newdata = ba.IOFactory.readPowerfield("tmp.txt") self.assertTrue(numpy.array_equal(newdata.getArray(), arr)) def test_SaveNumpyArray_ReadRawDataVector(self): @@ -169,19 +169,19 @@ class OutputDataIOTest(unittest.TestCase): [8, 9, 10, 11.0]]) numpy.savetxt('tmp.txt', arr) newdata = numpy.array( - ba.IntensityDataIOFactory.readOutputData( + ba.IOFactory.readPowerfield( "tmp.txt").getRawDataVector()) expected = numpy.array( [8., 4., 0., 9., 5., 1., 10., 6., 2., 11., 7., 3.]) self.assertTrue(numpy.array_equal(newdata, expected)) - def test_SaveOutputData_ReadNumpyArray(self): + def test_SavePowerfield_ReadNumpyArray(self): data = ba.IntensityData() data.addAxis(ba.FixedBinAxis("axis0", 10, 0, 10)) data.addAxis(ba.FixedBinAxis("axis1", 5, 0, 5)) fill_data(data) - ba.IntensityDataIOFactory.writeOutputData(data, "tmp.txt") + ba.IOFactory.writePowerfield(data, "tmp.txt") arr = numpy.loadtxt("tmp.txt") self.assertTrue(numpy.array_equal(data.getArray(), arr)) diff --git a/Tests/PyUnit/intensitydata_io_tiff.py b/Tests/PyUnit/intensitydata_io_tiff.py index 0ad79eae80a6eeb602b4c79c9f2678f60b58abd2..cf0adb27b6f1c6051eac38205508ce639137c9eb 100644 --- a/Tests/PyUnit/intensitydata_io_tiff.py +++ b/Tests/PyUnit/intensitydata_io_tiff.py @@ -29,7 +29,7 @@ def is_the_same_data(data1, data2): return True -class OutputDataIOTiffTest(unittest.TestCase): +class IOTiffTest(unittest.TestCase): """ Test serialization of ba.IntensityData into TIFF format """ @@ -40,16 +40,16 @@ class OutputDataIOTiffTest(unittest.TestCase): data.addAxis(ba.FixedBinAxis("y", 5, 0, 5)) fill_data(data) - ba.IntensityDataIOFactory.writeOutputData(data, "tmp.tif") - newdata = ba.IntensityDataIOFactory.readOutputData("tmp.tif") + ba.IOFactory.writePowerfield(data, "tmp.tif") + newdata = ba.IOFactory.readPowerfield("tmp.tif") self.assertTrue(is_the_same_data(data, newdata)) - ba.IntensityDataIOFactory.writeOutputData(data, "tmp.tif.gz") - newdata = ba.IntensityDataIOFactory.readOutputData("tmp.tif.gz") + ba.IOFactory.writePowerfield(data, "tmp.tif.gz") + newdata = ba.IOFactory.readPowerfield("tmp.tif.gz") self.assertTrue(is_the_same_data(data, newdata)) - ba.IntensityDataIOFactory.writeOutputData(data, "tmp.tif.bz2") - newdata = ba.IntensityDataIOFactory.readOutputData("tmp.tif.bz2") + ba.IOFactory.writePowerfield(data, "tmp.tif.bz2") + newdata = ba.IOFactory.readPowerfield("tmp.tif.bz2") self.assertTrue(is_the_same_data(data, newdata)) diff --git a/Tests/PyUnit/transform_BoxComposition.py b/Tests/PyUnit/transform_BoxComposition.py index 0df8ea42b8562b31d24bccb87487aee0aad36ed0..4cb4c2cd6d0f193f12ac277ba823424da768984d 100644 --- a/Tests/PyUnit/transform_BoxComposition.py +++ b/Tests/PyUnit/transform_BoxComposition.py @@ -61,7 +61,7 @@ class TransformBoxCompositionTest(unittest.TestCase): R3(0, 0, -layer_thickness/2.0 - height/2)) reference_data = self.get_result(particle) - #IntensityDataIOFactory.writeIntensityData(reference_data, "ref_BoxComposition.int") + #IOFactory.writeIntensityData(reference_data, "ref_BoxComposition.int") # composition box = Particle(particle_material, @@ -95,7 +95,7 @@ class TransformBoxCompositionTest(unittest.TestCase): R3(0, 0, -layer_thickness/2.0 - height/2)) reference_data = self.get_result(particle) - #IntensityDataIOFactory.writeIntensityData(reference_data, "ref_BoxCompositionRotateX.int") + #IOFactory.writeIntensityData(reference_data, "ref_BoxCompositionRotateX.int") # composition box = Particle(particle_material, @@ -128,7 +128,7 @@ class TransformBoxCompositionTest(unittest.TestCase): R3(0, 0, -layer_thickness/2.0 - height/2)) reference_data = self.get_result(particle) - #IntensityDataIOFactory.writeIntensityData(reference_data, "ref_BoxCompositionRotateY.int") + #IOFactory.writeIntensityData(reference_data, "ref_BoxCompositionRotateY.int") # composition box = Particle(particle_material, @@ -162,7 +162,7 @@ class TransformBoxCompositionTest(unittest.TestCase): R3(0, 0, -layer_thickness/2.0 - height/2)) reference_data = self.get_result(particle) - #IntensityDataIOFactory.writeIntensityData(reference_data, "ref_BoxCompositionRotateZ.int") + #IOFactory.writeIntensityData(reference_data, "ref_BoxCompositionRotateZ.int") # composition box = Particle(particle_material, @@ -196,7 +196,7 @@ class TransformBoxCompositionTest(unittest.TestCase): R3(0, 0, -layer_thickness/2.0 - height/2)) reference_data = self.get_result(particle) - #IntensityDataIOFactory.writeIntensityData( + #IOFactory.writeIntensityData( # reference_data, "ref_BoxCompositionRotateZandY.int") # composition @@ -230,7 +230,7 @@ class TransformBoxCompositionTest(unittest.TestCase): particle.setParticlePosition( R3(0, 0, -layer_thickness/2.0 - height/2)) reference_data = self.get_result(particle) - #IntensityDataIOFactory.writeIntensityData(reference_data, "ref_BoxStackComposition.int") + #IOFactory.writeIntensityData(reference_data, "ref_BoxStackComposition.int") # composition composition = ParticleComposition() diff --git a/Tests/PyUnit/transform_CoreShellBox.py b/Tests/PyUnit/transform_CoreShellBox.py index d2fc9c47a0f1ec0c6adb496250172425f9f3d09f..88184e09355d9069a32904745665f894624faf7b 100644 --- a/Tests/PyUnit/transform_CoreShellBox.py +++ b/Tests/PyUnit/transform_CoreShellBox.py @@ -213,7 +213,7 @@ class TransformCoreShellBoxTest(unittest.TestCase): 2)) # center of coreshell in center of the layer reference_data = self.get_result(coreshell_ref) - #IntensityDataIOFactory.writeIntensityData(reference_data, "ref_CoreShellBoxRotateZandY.int") + #IOFactory.writeIntensityData(reference_data, "ref_CoreShellBoxRotateZandY.int") # building second CoreShell particle shell_length = 50.0 diff --git a/Tests/PyUnit/transform_box.py b/Tests/PyUnit/transform_box.py index a41b59f0c83bb9d556f549d7ee5e538250e4d74b..37f318b7856f1c44b17f77ffa372f732dce23242 100644 --- a/Tests/PyUnit/transform_box.py +++ b/Tests/PyUnit/transform_box.py @@ -55,7 +55,7 @@ class BoxTransformationsTest(unittest.TestCase): ba.Box(length, width, height)) box.setParticlePosition(R3(0, 0, -layer_thickness/2 - height/2)) reference_data = self.get_result(box) - #IntensityDataIOFactory.writeIntensityData(reference_data, "ref_TransformBox.int") + #IOFactory.writeIntensityData(reference_data, "ref_TransformBox.int") # second box length = 50 diff --git a/Tests/Unit/Device/ArrayUtilsTest.cpp b/Tests/Unit/Device/ArrayUtilsTest.cpp index 134047349d6ffe319afa2e483c122d159c2144dc..c3ce27f34f25aae010a3f1ebba8d9f76a6a315b0 100644 --- a/Tests/Unit/Device/ArrayUtilsTest.cpp +++ b/Tests/Unit/Device/ArrayUtilsTest.cpp @@ -5,7 +5,7 @@ class ArrayUtilsTest : public ::testing::Test { }; -TEST_F(ArrayUtilsTest, OutputDataFromVector1D) +TEST_F(ArrayUtilsTest, PowerfieldFromVector1D) { // double const std::vector<double> vec_double = {10.0, 20.0, 30.0, 40.0}; @@ -17,10 +17,10 @@ TEST_F(ArrayUtilsTest, OutputDataFromVector1D) EXPECT_EQ(data1->axis(0).upperBound(), 4.0); } -TEST_F(ArrayUtilsTest, OutputDataToVector1D) +TEST_F(ArrayUtilsTest, PowerfieldToVector1D) { const std::vector<double> expected = {10.0, 20.0, 30.0, 40.0}; - OutputData<double> data; + Powerfield<double> data; data.addAxis("axis0", 4, 10.0, 20.0); data.setRawDataVector(expected); @@ -30,7 +30,7 @@ TEST_F(ArrayUtilsTest, OutputDataToVector1D) EXPECT_EQ(vec, expected); } -TEST_F(ArrayUtilsTest, OutputDataFromVector2D) +TEST_F(ArrayUtilsTest, PowerfieldFromVector2D) { const std::vector<std::vector<double>> vec_double = { {0.0, 1.0, 2.0, 3.0}, {4.0, 5.0, 6.0, 7.0}, {8.0, 9.0, 10.0, 11.0}}; @@ -51,9 +51,9 @@ TEST_F(ArrayUtilsTest, OutputDataFromVector2D) EXPECT_EQ(data->getRawDataVector(), expected); } -TEST_F(ArrayUtilsTest, OutputDataToVector2D) +TEST_F(ArrayUtilsTest, PowerfieldToVector2D) { - OutputData<double> data; + Powerfield<double> data; data.addAxis("axis0", 4, 10.0, 20.0); data.addAxis("axis1", 3, 30.0, 40.0); const std::vector<double> values = {8.0, 4.0, 0.0, 9.0, 5.0, 1.0, diff --git a/Tests/Unit/Device/Histogram1DTest.cpp b/Tests/Unit/Device/Histogram1DTest.cpp index 3e60c4124c701cedaf72e21ac6cf0ded23870a7a..db2c2bca70e3b12a2d2e53f85d5278ac714f962f 100644 --- a/Tests/Unit/Device/Histogram1DTest.cpp +++ b/Tests/Unit/Device/Histogram1DTest.cpp @@ -127,7 +127,7 @@ TEST_F(Histogram1DTest, crop) TEST_F(Histogram1DTest, CreateHistogram) { - OutputData<double> data; + Powerfield<double> data; data.addAxis("x-axis", 10, 0.0, 10.0); for (size_t i = 0; i < data.getAllocatedSize(); ++i) data[i] = double(i); @@ -145,7 +145,7 @@ TEST_F(Histogram1DTest, CreateHistogram) } } -TEST_F(Histogram1DTest, CreateOutputData) +TEST_F(Histogram1DTest, CreatePowerfield) { Histogram1D hist(10, -5.0, 5.0); @@ -154,7 +154,7 @@ TEST_F(Histogram1DTest, CreateOutputData) hist.fill(hist.xAxisValue(i), 3.0); } - std::unique_ptr<OutputData<double>> data(hist.createOutputData(IHistogram::DataType::INTEGRAL)); + std::unique_ptr<Powerfield<double>> data(hist.createPowerfield(IHistogram::DataType::INTEGRAL)); EXPECT_EQ(size_t(1), data->rank()); EXPECT_EQ(data->getAllocatedSize(), hist.getNbinsX()); EXPECT_EQ(data->axis(0).lowerBound(), hist.xMin()); @@ -162,15 +162,15 @@ TEST_F(Histogram1DTest, CreateOutputData) for (size_t i = 0; i < data->getAllocatedSize(); ++i) EXPECT_EQ(4.0, (*data)[i]); - data.reset(hist.createOutputData(IHistogram::DataType::AVERAGE)); + data.reset(hist.createPowerfield(IHistogram::DataType::AVERAGE)); for (size_t i = 0; i < data->getAllocatedSize(); ++i) EXPECT_EQ(2.0, (*data)[i]); - data.reset(hist.createOutputData(IHistogram::DataType::STANDARD_ERROR)); + data.reset(hist.createPowerfield(IHistogram::DataType::STANDARD_ERROR)); for (size_t i = 0; i < data->getAllocatedSize(); ++i) EXPECT_EQ(1.0, (*data)[i]); - data.reset(hist.createOutputData(IHistogram::DataType::NENTRIES)); + data.reset(hist.createPowerfield(IHistogram::DataType::NENTRIES)); for (size_t i = 0; i < data->getAllocatedSize(); ++i) EXPECT_EQ(2.0, (*data)[i]); } diff --git a/Tests/Unit/Device/Histogram2DTest.cpp b/Tests/Unit/Device/Histogram2DTest.cpp index c2cfb686e8748edfa91d7db3351d2410ff238b82..f61957b9af99a39d05f451add63b85d580c02f83 100644 --- a/Tests/Unit/Device/Histogram2DTest.cpp +++ b/Tests/Unit/Device/Histogram2DTest.cpp @@ -332,7 +332,7 @@ TEST_F(Histogram2DTest, crop) TEST_F(Histogram2DTest, CreateHistogram) { - OutputData<double> data; + Powerfield<double> data; data.addAxis("x-axis", 10, 0.0, 10.0); data.addAxis("y-axis", 5, -5.0, 0.0); for (size_t i = 0; i < data.getAllocatedSize(); ++i) @@ -353,7 +353,7 @@ TEST_F(Histogram2DTest, CreateHistogram) } } -TEST_F(Histogram2DTest, CreateOutputData) +TEST_F(Histogram2DTest, CreatePowerfield) { Histogram2D h2(10, -5.0, 5.0, 5, -5.0, 0.0); @@ -365,7 +365,7 @@ TEST_F(Histogram2DTest, CreateOutputData) } } - std::unique_ptr<OutputData<double>> data(h2.createOutputData(IHistogram::DataType::INTEGRAL)); + std::unique_ptr<Powerfield<double>> data(h2.createPowerfield(IHistogram::DataType::INTEGRAL)); EXPECT_EQ(size_t(2), data->rank()); EXPECT_EQ(data->getAllocatedSize(), h2.getTotalNumberOfBins()); EXPECT_EQ(data->axis(0).lowerBound(), h2.xMin()); @@ -375,15 +375,15 @@ TEST_F(Histogram2DTest, CreateOutputData) for (size_t i = 0; i < data->getAllocatedSize(); ++i) EXPECT_EQ(double(i), (*data)[i]); - data.reset(h2.createOutputData(IHistogram::DataType::AVERAGE)); + data.reset(h2.createPowerfield(IHistogram::DataType::AVERAGE)); for (size_t i = 0; i < data->getAllocatedSize(); ++i) EXPECT_EQ(double(i), (*data)[i]); - data.reset(h2.createOutputData(IHistogram::DataType::STANDARD_ERROR)); + data.reset(h2.createPowerfield(IHistogram::DataType::STANDARD_ERROR)); for (size_t i = 0; i < data->getAllocatedSize(); ++i) EXPECT_EQ(0.0, (*data)[i]); - data.reset(h2.createOutputData(IHistogram::DataType::NENTRIES)); + data.reset(h2.createPowerfield(IHistogram::DataType::NENTRIES)); for (size_t i = 0; i < data->getAllocatedSize(); ++i) EXPECT_EQ(1.0, (*data)[i]); } diff --git a/Tests/Unit/Device/IOReaderWriterTest.cpp b/Tests/Unit/Device/IOReaderWriterTest.cpp index ed1d5802647279f9d3684f43d51867e099ef3c12..48ec02f2ef25f1eea11f54c14ba029ec6d99ba2c 100644 --- a/Tests/Unit/Device/IOReaderWriterTest.cpp +++ b/Tests/Unit/Device/IOReaderWriterTest.cpp @@ -1,13 +1,13 @@ -#include "Device/InputOutput/OutputDataReadWriteINT.h" -#include "Device/InputOutput/OutputDataReadWriteNumpyTXT.h" -#include "Device/InputOutput/OutputDataReadWriteTiff.h" +#include "Device/InputOutput/ReadWriteINT.h" +#include "Device/InputOutput/ReadWriteNumpyTXT.h" +#include "Device/InputOutput/ReadWriteTiff.h" #include "Tests/GTestWrapper/google_test.h" class IOReaderWriterTest : public ::testing::Test { protected: IOReaderWriterTest(); - OutputData<double> m_model_data; + Powerfield<double> m_model_data; }; IOReaderWriterTest::IOReaderWriterTest() @@ -20,13 +20,13 @@ IOReaderWriterTest::IOReaderWriterTest() m_model_data[i] = static_cast<double>(i); } -TEST_F(IOReaderWriterTest, TestOutputDataReadWriteINT) +TEST_F(IOReaderWriterTest, TestRWINT) { std::stringstream ss; - OutputDataReadWriteINT write_int; - write_int.writeOutputData(m_model_data, ss); - OutputDataReadWriteINT read_int; - auto result = std::unique_ptr<OutputData<double>>(read_int.readOutputData(ss)); + ReadWriteINT write_int; + write_int.writePowerfield(m_model_data, ss); + ReadWriteINT read_int; + auto result = std::unique_ptr<Powerfield<double>>(read_int.readPowerfield(ss)); auto compare_axis = [this, &result](size_t index) { EXPECT_EQ(m_model_data.axis(index).size(), result->axis(index).size()); @@ -42,14 +42,14 @@ TEST_F(IOReaderWriterTest, TestOutputDataReadWriteINT) EXPECT_EQ(m_model_data[i], (*result)[i]); } -TEST_F(IOReaderWriterTest, TestOutputDataReadWriteNumpyTXT) +TEST_F(IOReaderWriterTest, TestRWNumpyTXT) { std::stringstream ss; - OutputDataReadWriteNumpyTXT write_txt; - write_txt.writeOutputData(m_model_data, ss); + ReadWriteNumpyTXT write_txt; + write_txt.writePowerfield(m_model_data, ss); - OutputDataReadWriteNumpyTXT read_txt; - auto result = std::unique_ptr<OutputData<double>>(read_txt.readOutputData(ss)); + ReadWriteNumpyTXT read_txt; + auto result = std::unique_ptr<Powerfield<double>>(read_txt.readPowerfield(ss)); EXPECT_EQ(m_model_data.rank(), result->rank()); EXPECT_EQ(m_model_data.getAllSizes(), result->getAllSizes()); for (size_t i = 0, size = m_model_data.getAllocatedSize(); i < size; ++i) @@ -58,14 +58,14 @@ TEST_F(IOReaderWriterTest, TestOutputDataReadWriteNumpyTXT) #ifdef BA_TIFF_SUPPORT -TEST_F(IOReaderWriterTest, TestOutputDataReadWriteTiff) +TEST_F(IOReaderWriterTest, TestRWTiff) { std::stringstream ss; - OutputDataReadWriteTiff write_tiff; - write_tiff.writeOutputData(m_model_data, ss); + ReadWriteTiff write_tiff; + write_tiff.writePowerfield(m_model_data, ss); - OutputDataReadWriteTiff read_tiff; - auto result = std::unique_ptr<OutputData<double>>(read_tiff.readOutputData(ss)); + ReadWriteTiff read_tiff; + auto result = std::unique_ptr<Powerfield<double>>(read_tiff.readPowerfield(ss)); EXPECT_EQ(m_model_data.rank(), result->rank()); EXPECT_EQ(m_model_data.getAllSizes(), result->getAllSizes()); for (size_t i = 0, size = m_model_data.getAllocatedSize(); i < size; ++i) diff --git a/Tests/Unit/Device/IntensityDataFunctionsTest.cpp b/Tests/Unit/Device/IntensityDataFunctionsTest.cpp index f85c6488e555b4e84497d1b8c8af8efbb8025bde..3af731a962d383e040ae7505f765429ab45cde9d 100644 --- a/Tests/Unit/Device/IntensityDataFunctionsTest.cpp +++ b/Tests/Unit/Device/IntensityDataFunctionsTest.cpp @@ -7,7 +7,7 @@ class DataUtilsTest : public ::testing::Test { TEST_F(DataUtilsTest, ClipDataSetFixed) { - OutputData<double> data; + Powerfield<double> data; FixedBinAxis axis0("axis0", 10, -5.0, 5.0); data.addAxis(axis0); FixedBinAxis axis1("axis1", 3, 0.0, 3.0); @@ -29,7 +29,7 @@ TEST_F(DataUtilsTest, ClipDataSetVariable) static const double arr[] = {-1.0, -0.5, 0.5, 1.0, 2.0}; std::vector<double> values(arr, arr + sizeof(arr) / sizeof(arr[0])); - OutputData<double> data; + Powerfield<double> data; VariableBinAxis axis0("axis0", 4, values); data.addAxis(axis0); VariableBinAxis axis1("axis1", 4, values); @@ -48,12 +48,12 @@ TEST_F(DataUtilsTest, ClipDataSetVariable) TEST_F(DataUtilsTest, createRearrangedDataSet) { - OutputData<double> input_data; + Powerfield<double> input_data; input_data.addAxis("axis0", 2, 1.0, 2.0); input_data.addAxis("axis1", 3, 3.0, 4.0); input_data.setRawDataVector(std::vector<double>{1.0, 2.0, 3.0, 4.0, 5.0, 6.0}); - std::unique_ptr<OutputData<double>> output_data = + std::unique_ptr<Powerfield<double>> output_data = DataUtils::Data::createRearrangedDataSet(input_data, 5); EXPECT_EQ(3.0, output_data->axis(0).binBoundaries().front()); @@ -122,16 +122,16 @@ TEST_F(DataUtilsTest, coordinateToFromBinf) EXPECT_EQ(3.5, DataUtils::Data::coordinateFromBinf(8.5, axis)); } -//! Transformation of coordinates from one OutputData to another using conversion from axes +//! Transformation of coordinates from one Powerfield to another using conversion from axes //! coordinates to bin-fraction-coordinates and then to another axes coordinates. TEST_F(DataUtilsTest, outputDataCoordinatesToFromBinf) { - OutputData<double> data1; + Powerfield<double> data1; data1.addAxis("axis0", 8, -5.0, 3.0); data1.addAxis("axis1", 3, 2.0, 5.0); - OutputData<double> data2; + Powerfield<double> data2; data2.addAxis("axis0", 8, -10.0, 70.0); data2.addAxis("axis1", 3, -10.0, 20.0); @@ -149,9 +149,9 @@ TEST_F(DataUtilsTest, outputDataCoordinatesToFromBinf) EXPECT_DOUBLE_EQ(y, 21.0); } -TEST_F(DataUtilsTest, create2DArrayfromOutputDataTest) +TEST_F(DataUtilsTest, create2DArrayfromPowerfieldTest) { - OutputData<double> out_data; + Powerfield<double> out_data; out_data.addAxis("axis0", 2, 1.0, 2.0); out_data.addAxis("axis1", 3, 3.0, 4.0); EXPECT_EQ(6u, out_data.getAllocatedSize()); @@ -172,18 +172,18 @@ TEST_F(DataUtilsTest, create2DArrayfromOutputDataTest) auto arr_out = out_data.getRawDataVector(); EXPECT_EQ(arr_in, arr_out); - auto array_2d = DataUtils::Data::create2DArrayfromOutputData(out_data); + auto array_2d = DataUtils::Data::create2DArrayfromPowerfield(out_data); std::vector<std::vector<double>> array_expected_2d{{arr_in[0], arr_in[1], arr_in[2]}, {arr_in[3], arr_in[4], arr_in[5]}}; EXPECT_EQ(array_expected_2d, array_2d); } -TEST_F(DataUtilsTest, createOutputDatafrom2DArrayTest) +TEST_F(DataUtilsTest, createPowerfieldfrom2DArrayTest) { std::vector<double> arr_in{1, 2, 3, 4, 5, 6}; std::vector<std::vector<double>> array_2d{{arr_in[0], arr_in[1], arr_in[2]}, {arr_in[3], arr_in[4], arr_in[5]}}; - auto data = DataUtils::Data::createOutputDatafrom2DArray(array_2d); + auto data = DataUtils::Data::createPowerfieldfrom2DArray(array_2d); EXPECT_EQ(arr_in, data->getRawDataVector()); } diff --git a/Tests/Unit/Device/OutputDataIteratorTest.cpp b/Tests/Unit/Device/PowerfieldIteratorTest.cpp similarity index 61% rename from Tests/Unit/Device/OutputDataIteratorTest.cpp rename to Tests/Unit/Device/PowerfieldIteratorTest.cpp index 0c4d10466737607fdbbc5255d9f76839157dcc16..02e81f62e478b8d46bd496494737862a0bc71e20 100644 --- a/Tests/Unit/Device/OutputDataIteratorTest.cpp +++ b/Tests/Unit/Device/PowerfieldIteratorTest.cpp @@ -1,21 +1,21 @@ -#include "Device/Data/OutputData.h" +#include "Device/Data/Powerfield.h" #include "Tests/GTestWrapper/google_test.h" -class OutputDataIteratorTest : public ::testing::Test { +class PowerfieldIteratorTest : public ::testing::Test { protected: - OutputDataIteratorTest(); + PowerfieldIteratorTest(); - OutputData<double> _data; + Powerfield<double> _data; }; -OutputDataIteratorTest::OutputDataIteratorTest() +PowerfieldIteratorTest::PowerfieldIteratorTest() { auto* dims = new int[2]; dims[0] = 3; dims[1] = 5; _data.setAxisSizes(2, dims); double value = 0.0; - OutputData<double>::iterator it = _data.begin(); + Powerfield<double>::iterator it = _data.begin(); while (it != _data.end()) { *it = value; value += 1.0; @@ -24,9 +24,9 @@ OutputDataIteratorTest::OutputDataIteratorTest() delete[] dims; } -TEST_F(OutputDataIteratorTest, Iterate) +TEST_F(PowerfieldIteratorTest, Iterate) { - OutputData<double>::iterator it = _data.begin(); + Powerfield<double>::iterator it = _data.begin(); EXPECT_EQ(0.0, *it); for (size_t i = 0; i < 14; ++i) { ++it; @@ -38,9 +38,9 @@ TEST_F(OutputDataIteratorTest, Iterate) EXPECT_EQ(it, _data.end()); } -TEST_F(OutputDataIteratorTest, ConstIterate) +TEST_F(PowerfieldIteratorTest, ConstIterate) { - OutputData<double>::const_iterator it = _data.begin(); + Powerfield<double>::const_iterator it = _data.begin(); EXPECT_EQ(0.0, *it); for (size_t i = 0; i < 14; ++i) { ++it; diff --git a/Tests/Unit/Device/OutputDataTest.cpp b/Tests/Unit/Device/PowerfieldTest.cpp similarity index 83% rename from Tests/Unit/Device/OutputDataTest.cpp rename to Tests/Unit/Device/PowerfieldTest.cpp index da8f57b041ae678dde3b3bfc26e7c6299697352e..d7f2e373764e219a632bc8ce8075586a5ff4680d 100644 --- a/Tests/Unit/Device/OutputDataTest.cpp +++ b/Tests/Unit/Device/PowerfieldTest.cpp @@ -3,16 +3,16 @@ #include "Tests/GTestWrapper/google_test.h" #include <algorithm> -class OutputDataTest : public ::testing::Test { +class PowerfieldTest : public ::testing::Test { protected: - OutputDataTest(); + PowerfieldTest(); - OutputData<int> int_data_0d; - OutputData<double> db_data_3d; + Powerfield<int> int_data_0d; + Powerfield<double> db_data_3d; std::vector<size_t> zero_3d_coordinate; }; -OutputDataTest::OutputDataTest() +PowerfieldTest::PowerfieldTest() { zero_3d_coordinate.push_back(0); zero_3d_coordinate.push_back(0); @@ -24,25 +24,25 @@ OutputDataTest::OutputDataTest() db_data_3d.addAxis(angle_axis); db_data_3d.addAxis(length_axis); db_data_3d.addAxis(index_axis); - OutputData<double>::iterator it = db_data_3d.begin(); + Powerfield<double>::iterator it = db_data_3d.begin(); for (size_t i = 0; i < 2000; ++i) { *it = (double)i; ++it; } } -TEST_F(OutputDataTest, SingleElementAfterConstruction) +TEST_F(PowerfieldTest, SingleElementAfterConstruction) { EXPECT_EQ(1u, int_data_0d.getAllocatedSize()); } -TEST_F(OutputDataTest, SizeAfterAddingAxes) +TEST_F(PowerfieldTest, SizeAfterAddingAxes) { EXPECT_EQ(1u, int_data_0d.getAllocatedSize()); EXPECT_EQ(2000u, db_data_3d.getAllocatedSize()); } -TEST_F(OutputDataTest, DataInitialization) +TEST_F(PowerfieldTest, DataInitialization) { std::vector<unsigned> coordinates; coordinates.push_back(11); @@ -51,9 +51,9 @@ TEST_F(OutputDataTest, DataInitialization) EXPECT_DOUBLE_EQ((double)1143, db_data_3d[db_data_3d.toGlobalIndex(coordinates)]); } -TEST_F(OutputDataTest, isInitialized) +TEST_F(PowerfieldTest, isInitialized) { - OutputData<double> data1; + Powerfield<double> data1; EXPECT_FALSE(data1.isInitialized()); data1.addAxis("axis", 10, 0.0, 10.0); EXPECT_TRUE(data1.isInitialized()); @@ -61,10 +61,10 @@ TEST_F(OutputDataTest, isInitialized) EXPECT_FALSE(data1.isInitialized()); } -TEST_F(OutputDataTest, DataCopying) +TEST_F(PowerfieldTest, DataCopying) { - OutputData<double> data1; - OutputData<double> data2; + Powerfield<double> data1; + Powerfield<double> data2; data1.addAxis("axis1", 10, 0., 10.); data2.addAxis("axis1", 10, 0., 10.); EXPECT_TRUE(data1.hasSameDimensions(data2)); @@ -97,18 +97,18 @@ TEST_F(OutputDataTest, DataCopying) EXPECT_TRUE(data2.hasSameShape(data2)); } -TEST_F(OutputDataTest, MaxElement) +TEST_F(PowerfieldTest, MaxElement) { - OutputData<double> data; + Powerfield<double> data; data.addAxis("axis1", 10, 0., 10.); data.addAxis("axis2", 2, 0., 10.); - OutputData<double>::iterator it = data.begin(); + Powerfield<double>::iterator it = data.begin(); for (size_t i = 0; i < data.getAllocatedSize(); ++i) if (i == 10) (*it) = 10.0; - OutputData<double>::const_iterator cit = std::max_element(data.begin(), data.end()); + Powerfield<double>::const_iterator cit = std::max_element(data.begin(), data.end()); EXPECT_EQ(10., (*cit)); EXPECT_EQ(10., data.max()); @@ -122,9 +122,9 @@ TEST_F(OutputDataTest, MaxElement) // 0 | 0 2 4 6 8 10 12 14 16 18 | // -------------------------------------------- // | 0 1 2 3 4 5 6 7 8 9 | x -TEST_F(OutputDataTest, ValueOfAxis) +TEST_F(PowerfieldTest, ValueOfAxis) { - OutputData<double> data; + Powerfield<double> data; data.addAxis("axis1", 10, 0., 10.); data.addAxis("axis2", 2, 0., 10.); EXPECT_EQ(0.5, data.getAxisValue(0, "axis1")); @@ -152,9 +152,9 @@ TEST_F(OutputDataTest, ValueOfAxis) // 0 | 0 2 4 6 8 10 12 14 16 18 | // -------------------------------------------- // | 0 1 2 3 4 5 6 7 8 9 | x -TEST_F(OutputDataTest, GetAxisBin) +TEST_F(PowerfieldTest, GetAxisBin) { - OutputData<double> data; + Powerfield<double> data; data.addAxis("axis1", 10, 0., 10.); data.addAxis("axis2", 2, 0., 10.); @@ -168,19 +168,19 @@ TEST_F(OutputDataTest, GetAxisBin) EXPECT_EQ(7.5, data.getAxisBin(19, "axis2").center()); } -TEST_F(OutputDataTest, SetCleared) +TEST_F(PowerfieldTest, SetCleared) { db_data_3d.clear(); db_data_3d.setAllTo(1.0); EXPECT_EQ(db_data_3d[0], 1.0); } -TEST_F(OutputDataTest, MixedTypeOperations) +TEST_F(PowerfieldTest, MixedTypeOperations) { - OutputData<bool> data_bool; + Powerfield<bool> data_bool; data_bool.addAxis("axis1", 10, 0.0, 10.0); - OutputData<bool> data_double; + Powerfield<bool> data_double; data_double.addAxis("axis1", 10, 0.0, 10.0); EXPECT_TRUE(data_bool.hasSameShape(data_double)); diff --git a/Tests/Unit/Device/ReadSANSDRawTest.cpp b/Tests/Unit/Device/ReadSANSDRawTest.cpp index 44cd5fe1e20689c4d16dbd79dd59b3fa83710741..53836bc36c747f6a7d0cd75e5bab23c78099ca67 100644 --- a/Tests/Unit/Device/ReadSANSDRawTest.cpp +++ b/Tests/Unit/Device/ReadSANSDRawTest.cpp @@ -1,6 +1,6 @@ #include "BATesting.h" -#include "Device/Data/OutputData.h" -#include "Device/Histo/IntensityDataIOFactory.h" +#include "Device/Data/Powerfield.h" +#include "Device/Histo/IOFactory.h" #include "Tests/GTestWrapper/google_test.h" class ReadSANSDRawTest : public ::testing::Test { @@ -9,8 +9,7 @@ class ReadSANSDRawTest : public ::testing::Test { TEST_F(ReadSANSDRawTest, Read) { const auto fname = BATesting::ExampleDataDir() + "/SANSDRaw.001"; - OutputData<double>* data = - IntensityDataIOFactory::readOutputData(fname, IntensityDataIOFactory::automatic); + Powerfield<double>* data = IOFactory::readPowerfield(fname, IOFactory::automatic); EXPECT_NE(data, nullptr); if (!data) return; diff --git a/Tests/Unit/Device/SimulationResultTest.cpp b/Tests/Unit/Device/SimulationResultTest.cpp index 373b7db047d4e2ab94e320a19557266cc5f7f9a3..3e13a47a95aee701ee4dbfef7ce2a07b3cad6052 100644 --- a/Tests/Unit/Device/SimulationResultTest.cpp +++ b/Tests/Unit/Device/SimulationResultTest.cpp @@ -2,7 +2,7 @@ #include "Base/Const/Units.h" #include "Device/Beam/Beam.h" #include "Device/Coord/CoordSystem2D.h" -#include "Device/Data/OutputData.h" +#include "Device/Data/Powerfield.h" #include "Device/Detector/SphericalDetector.h" #include "Tests/GTestWrapper/google_test.h" @@ -11,10 +11,10 @@ class SimulationResultTest : public ::testing::Test { TEST_F(SimulationResultTest, max) { - OutputData<double> data; + Powerfield<double> data; data.addAxis("axis1", 10, 0., 10.); data.addAxis("axis2", 2, 0., 10.); - OutputData<double>::iterator it = data.begin(); + Powerfield<double>::iterator it = data.begin(); for (size_t i = 0; i < data.getAllocatedSize(); ++i) if (i == 10) (*it) = 10.0; diff --git a/Tests/Unit/Device/SpecularDetector1DTest.cpp b/Tests/Unit/Device/SpecularDetector1DTest.cpp index e17d318ae28442e915adfa4ab7882e5751a1e0dc..487309393ea7ed961cf5853e238f1bacd8675c6a 100644 --- a/Tests/Unit/Device/SpecularDetector1DTest.cpp +++ b/Tests/Unit/Device/SpecularDetector1DTest.cpp @@ -1,7 +1,7 @@ #include "Device/Detector/SpecularDetector1D.h" #include "Base/Const/Units.h" #include "Device/Beam/Beam.h" -#include "Device/Data/OutputData.h" +#include "Device/Data/Powerfield.h" #include "Tests/GTestWrapper/google_test.h" #include <memory> @@ -25,7 +25,7 @@ TEST_F(SpecularDetectorTest, basicBehaviour) EXPECT_EQ(axis.upperBound(), detector.axis(0).upperBound()); // throwing exceptions - OutputData<double>* p_intensity_map(nullptr); + Powerfield<double>* p_intensity_map(nullptr); EXPECT_FAILED_ASSERT(detector.applyDetectorResolution(p_intensity_map)); } diff --git a/Tests/Unit/Device/SphericalDetectorTest.cpp b/Tests/Unit/Device/SphericalDetectorTest.cpp index 8f5e4257153353232caf606177f475ffad6a05e2..8751329e76bb2466e6b3f55fec40ae2cb6dd16dc 100644 --- a/Tests/Unit/Device/SphericalDetectorTest.cpp +++ b/Tests/Unit/Device/SphericalDetectorTest.cpp @@ -33,7 +33,7 @@ TEST_F(SphericalDetectorTest, initialState) // behavior EXPECT_FAILED_ASSERT(detector.axis(0)); - OutputData<double>* p_intensity_map(nullptr); + Powerfield<double>* p_intensity_map(nullptr); EXPECT_FAILED_ASSERT(detector.applyDetectorResolution(p_intensity_map)); } @@ -142,7 +142,7 @@ TEST_F(SphericalDetectorTest, MaskOfDetector) Polygon polygon(x, y); detector.addMask(polygon, true); - const OutputData<bool>* mask = detector.detectorMask()->getMaskData(); + const Powerfield<bool>* mask = detector.detectorMask()->getMaskData(); for (size_t index = 0; index < mask->getAllocatedSize(); ++index) { double x = mask->getAxisValue(index, 0); double y = mask->getAxisValue(index, 1); diff --git a/Tests/Unit/FittingTestHelper.h b/Tests/Unit/FittingTestHelper.h index 464237ca3e924a7ecec65b9d97bdb194bcdaf7ac..daeb062dfd915d7c4a8fd4abb526b13ec994eefc 100644 --- a/Tests/Unit/FittingTestHelper.h +++ b/Tests/Unit/FittingTestHelper.h @@ -2,7 +2,7 @@ #define BORNAGAIN_TESTS_UNIT_FITTINGTESTHELPER_H #include "Base/Const/Units.h" -#include "Device/Data/OutputData.h" +#include "Device/Data/Powerfield.h" #include "Fit/Param/Parameters.h" #include "Sample/Material/MaterialFactoryFuncs.h" #include "Sample/Multilayer/Layer.h" @@ -45,9 +45,9 @@ public: return std::unique_ptr<ISimulation>(result.release()); } - std::unique_ptr<OutputData<double>> createData(double value) + std::unique_ptr<Powerfield<double>> createData(double value) { - std::unique_ptr<OutputData<double>> result(new OutputData<double>); + std::unique_ptr<Powerfield<double>> result(new Powerfield<double>); result->addAxis(FixedBinAxis("phi_f", m_nx, m_xmin, m_xmax)); result->addAxis(FixedBinAxis("alpha_f", m_ny, m_ymin, m_ymax)); result->setAllTo(value); diff --git a/Tests/Unit/GUI/TestDataItemViews.cpp b/Tests/Unit/GUI/TestDataItemViews.cpp index fed476b3f07643de1e69b01096ee03f221c6101d..2b37a5514e1c1d81add3cbfbafb2eede01ca1ea7 100644 --- a/Tests/Unit/GUI/TestDataItemViews.cpp +++ b/Tests/Unit/GUI/TestDataItemViews.cpp @@ -18,7 +18,7 @@ DataItem* TestDataItemViews::insertNewDataItem(SessionModel& model, double val) { auto* item = model.insertItem<SpecularDataItem>(); auto data = UTest::GUI::createData(val, UTest::GUI::DIM::D1); - item->setOutputData(data.release()); + item->setPowerfield(data.release()); return item; } diff --git a/Tests/Unit/GUI/TestDataItems.cpp b/Tests/Unit/GUI/TestDataItems.cpp index 2535d09464066b2710ba74f073cdf3389330dbde..a18faafbeaa0c3731fedafd4c8ee8057d117f2bd 100644 --- a/Tests/Unit/GUI/TestDataItems.cpp +++ b/Tests/Unit/GUI/TestDataItems.cpp @@ -26,7 +26,7 @@ public: QTest::qSleep(nap_time); - // changing item (OutputData) + // changing item (Powerfield) item->emitDataChanged(); QDateTime time3 = item->lastModified(); EXPECT_TRUE(time2.msecsTo(time3) > nap_time / 2); diff --git a/Tests/Unit/GUI/TestOutputDataIOService.cpp b/Tests/Unit/GUI/TestIOService.cpp similarity index 75% rename from Tests/Unit/GUI/TestOutputDataIOService.cpp rename to Tests/Unit/GUI/TestIOService.cpp index b143821a02065448ce425f682942f51c7b713703..e60117a9288c5057e6119ddaaa7c5a8ac94e7791 100644 --- a/Tests/Unit/GUI/TestOutputDataIOService.cpp +++ b/Tests/Unit/GUI/TestIOService.cpp @@ -1,4 +1,4 @@ -#include "Device/Histo/IntensityDataIOFactory.h" +#include "Device/Histo/IOFactory.h" #include "GUI/Model/Data/IntensityDataItem.h" #include "GUI/Model/Data/JobItemUtils.h" #include "GUI/Model/Data/RealDataItem.h" @@ -7,7 +7,7 @@ #include "GUI/Model/Model/JobFunctions.h" #include "GUI/Model/Model/JobModel.h" #include "GUI/Model/Model/RealDataModel.h" -#include "GUI/Model/Project/OutputDataIOService.h" +#include "GUI/Model/Project/IOService.h" #include "GUI/Support/IO/ImportDataInfo.h" #include "GUI/Support/IO/ProjectUtils.h" #include "GUI/Util/Error.h" @@ -17,13 +17,13 @@ #include <QTest> #include <memory> -class TestOutputDataIOService : public ::testing::Test { +class TestIOService : public ::testing::Test { protected: - TestOutputDataIOService(); - OutputData<double> m_data; + TestIOService(); + Powerfield<double> m_data; }; -TestOutputDataIOService::TestOutputDataIOService() +TestIOService::TestIOService() { FixedBinAxis axis0("x", 10, 0.0, 1.0); FixedBinAxis axis1("y", 10, -1.0, 1.0); @@ -33,7 +33,7 @@ TestOutputDataIOService::TestOutputDataIOService() //! Test methods for retrieving nonXML data. -TEST_F(TestOutputDataIOService, nonXMLData) +TEST_F(TestIOService, nonXMLData) { ApplicationModels models; @@ -43,7 +43,7 @@ TEST_F(TestOutputDataIOService, nonXMLData) // adding RealDataItem auto* realData = models.realDataModel()->insertIntensityDataItem(); - realData->setOutputData(UTest::GUI::createData().release()); + realData->setPowerfield(UTest::GUI::createData().release()); EXPECT_EQ(models.realDataModel()->nonXMLItems().size(), 1); // adding JobItem @@ -54,11 +54,11 @@ TEST_F(TestOutputDataIOService, nonXMLData) // adding RealDataItem to jobItem RealDataItem* realData2 = jobItem->createRealDataItem(); EXPECT_EQ(models.jobModel()->nonXMLItems().size(), 1); - realData2->setOutputData(UTest::GUI::createData(0.0, UTest::GUI::DIM::D1).release()); + realData2->setPowerfield(UTest::GUI::createData(0.0, UTest::GUI::DIM::D1).release()); EXPECT_EQ(models.jobModel()->nonXMLItems().size(), 2); - // checking data items of OutputDataIOService - OutputDataIOService service(&models); + // checking data items of PowerfieldIOService + PowerfieldIOService service(&models); EXPECT_EQ(service.dataInterfaces().size(), 3); // checking data items of ApplicationModels @@ -69,18 +69,18 @@ TEST_F(TestOutputDataIOService, nonXMLData) EXPECT_EQ(dataItems.indexOf(realData2->dataItem()), 2); // Replacing the data inside RealDataItem with the data of the same dimensions - realData->setOutputData(UTest::GUI::createData(2.0).release()); + realData->setPowerfield(UTest::GUI::createData(2.0).release()); EXPECT_EQ(models.realDataModel()->nonXMLItems().size(), 1); // Replacing the data inside RealDataItem with the data of different dimensions auto data = UTest::GUI::createData(3.0, UTest::GUI::DIM::D1); - EXPECT_THROW(dynamic_cast<RealDataItem*>(realData)->setOutputData(data.get()), Error); + EXPECT_THROW(dynamic_cast<RealDataItem*>(realData)->setPowerfield(data.get()), Error); EXPECT_EQ(models.realDataModel()->nonXMLItems().size(), 1); } -//! Tests OutputDataSaveInfo class intended for storing info about the last save. +//! Tests PowerfieldSaveInfo class intended for storing info about the last save. -TEST_F(TestOutputDataIOService, OutputDataSaveInfo) +TEST_F(TestIOService, SaveInfo) { SessionModel model("TempModel"); auto* item = model.insertItem<IntensityDataItem>(); @@ -90,7 +90,7 @@ TEST_F(TestOutputDataIOService, OutputDataSaveInfo) const int nap_time(10); QTest::qSleep(nap_time); - OutputDataSaveInfo info = OutputDataSaveInfo::createSaved(item); + PowerfieldSaveInfo info = PowerfieldSaveInfo::createSaved(item); EXPECT_FALSE(info.wasModifiedSinceLastSave()); QTest::qSleep(nap_time); @@ -98,20 +98,20 @@ TEST_F(TestOutputDataIOService, OutputDataSaveInfo) EXPECT_TRUE(info.wasModifiedSinceLastSave()); } -//! Tests OutputDataDirHistory class intended for storing save history of several +//! Tests PowerfieldDirHistory class intended for storing save history of several //! IntensityDataItems in a directory. -TEST_F(TestOutputDataIOService, OutputDataDirHistory) +TEST_F(TestIOService, DirHistory) { SessionModel model("TempModel"); auto* item1 = model.insertItem<IntensityDataItem>(); auto* item2 = model.insertItem<IntensityDataItem>(); - item1->setOutputData(m_data.clone()); + item1->setPowerfield(m_data.clone()); item1->setLastModified(QDateTime::currentDateTime()); item2->setLastModified(QDateTime::currentDateTime()); // empty history - OutputDataDirHistory history; + PowerfieldDirHistory history; EXPECT_FALSE(history.contains(item1)); // non-existing item is treated as modified EXPECT_TRUE(history.wasModifiedSinceLastSave(item1)); @@ -135,25 +135,25 @@ TEST_F(TestOutputDataIOService, OutputDataDirHistory) EXPECT_TRUE(history.wasModifiedSinceLastSave(item1)); } -//! Tests OutputDataIOHistory class (save info for several independent directories). +//! Tests PowerfieldIOHistory class (save info for several independent directories). -TEST_F(TestOutputDataIOService, OutputDataIOHistory) +TEST_F(TestIOService, IOHistory) { SessionModel model("TempModel"); auto* item1 = model.insertItem<IntensityDataItem>(); auto* item2 = model.insertItem<IntensityDataItem>(); - item1->setOutputData(m_data.clone()); - item2->setOutputData(m_data.clone()); + item1->setPowerfield(m_data.clone()); + item2->setPowerfield(m_data.clone()); item1->setLastModified(QDateTime::currentDateTime()); item2->setLastModified(QDateTime::currentDateTime()); - OutputDataDirHistory dirHistory1; + PowerfieldDirHistory dirHistory1; dirHistory1.markAsSaved(item1); dirHistory1.markAsSaved(item2); - OutputDataDirHistory dirHistory2; + PowerfieldDirHistory dirHistory2; dirHistory2.markAsSaved(item1); // Modifying item @@ -161,7 +161,7 @@ TEST_F(TestOutputDataIOService, OutputDataIOHistory) item1->setLastModified(QDateTime::currentDateTime()); // Creating two histories - OutputDataIOHistory history; + PowerfieldIOHistory history; history.setHistory("dir1", dirHistory1); history.setHistory("dir2", dirHistory2); @@ -176,11 +176,11 @@ TEST_F(TestOutputDataIOService, OutputDataIOHistory) EXPECT_THROW(history.wasModifiedSinceLastSave("dir3", item1), Error); } -//! Testing saving abilities of OutputDataIOService class. +//! Testing saving abilities of PowerfieldIOService class. -TEST_F(TestOutputDataIOService, OutputDataIOService) +TEST_F(TestIOService, IOService) { - const QString projectDir("test_OutputDataIOService"); + const QString projectDir("test_PowerfieldIOService"); UTest::GUI::create_dir(projectDir); const double value1(1.0), value2(2.0), value3(3.0); @@ -193,7 +193,7 @@ TEST_F(TestOutputDataIOService, OutputDataIOService) realData2->updateNonXMLDataFileNames(); // Saving first time - OutputDataIOService service(&models); + PowerfieldIOService service(&models); service.save(projectDir); QTest::qSleep(10); @@ -204,24 +204,24 @@ TEST_F(TestOutputDataIOService, OutputDataIOService) EXPECT_TRUE(QFile::exists(fname2)); // Reading data from disk, checking it is the same - std::unique_ptr<OutputData<double>> dataOnDisk1( - IntensityDataIOFactory::readOutputData(fname1.toStdString())); - std::unique_ptr<OutputData<double>> dataOnDisk2( - IntensityDataIOFactory::readOutputData(fname2.toStdString())); - EXPECT_TRUE(UTest::GUI::isTheSame(*dataOnDisk1, *realData1->dataItem()->getOutputData())); - EXPECT_TRUE(UTest::GUI::isTheSame(*dataOnDisk2, *realData2->dataItem()->getOutputData())); + std::unique_ptr<Powerfield<double>> dataOnDisk1( + IOFactory::readPowerfield(fname1.toStdString())); + std::unique_ptr<Powerfield<double>> dataOnDisk2( + IOFactory::readPowerfield(fname2.toStdString())); + EXPECT_TRUE(UTest::GUI::isTheSame(*dataOnDisk1, *realData1->dataItem()->getPowerfield())); + EXPECT_TRUE(UTest::GUI::isTheSame(*dataOnDisk2, *realData2->dataItem()->getPowerfield())); // Modifying data and saving the project. - realData2->setOutputData(UTest::GUI::createData(value3).release()); + realData2->setPowerfield(UTest::GUI::createData(value3).release()); service.save(projectDir); QTest::qSleep(10); - EXPECT_TRUE(UTest::GUI::isTheSame(*dataOnDisk1, *realData1->dataItem()->getOutputData())); - EXPECT_TRUE(UTest::GUI::isTheSame(*dataOnDisk2, *realData2->dataItem()->getOutputData()) + EXPECT_TRUE(UTest::GUI::isTheSame(*dataOnDisk1, *realData1->dataItem()->getPowerfield())); + EXPECT_TRUE(UTest::GUI::isTheSame(*dataOnDisk2, *realData2->dataItem()->getPowerfield()) == false); // checking that data on disk has changed - dataOnDisk2.reset(IntensityDataIOFactory::readOutputData(fname2.toStdString())); - EXPECT_TRUE(UTest::GUI::isTheSame(*dataOnDisk2, *realData2->dataItem()->getOutputData())); + dataOnDisk2.reset(IOFactory::readPowerfield(fname2.toStdString())); + EXPECT_TRUE(UTest::GUI::isTheSame(*dataOnDisk2, *realData2->dataItem()->getPowerfield())); // Renaming RealData and check that file on disk changed the name realData2->setDataName("data2new"); @@ -231,13 +231,13 @@ TEST_F(TestOutputDataIOService, OutputDataIOService) QString fname2new = "./" + projectDir + "/realdata_data2new_0.int.gz"; EXPECT_TRUE(QFile::exists(fname2new)); - EXPECT_TRUE(UTest::GUI::isTheSame(fname2new, *realData2->dataItem()->getOutputData())); + EXPECT_TRUE(UTest::GUI::isTheSame(fname2new, *realData2->dataItem()->getPowerfield())); // Check that file with old name was removed. EXPECT_FALSE(QFile::exists(fname2)); } -TEST_F(TestOutputDataIOService, RealDataItemWithNativeData) +TEST_F(TestIOService, RealDataItemWithNativeData) { ApplicationModels models; @@ -249,7 +249,7 @@ TEST_F(TestOutputDataIOService, RealDataItemWithNativeData) auto* realData = models.realDataModel()->insertIntensityDataItem(); EXPECT_EQ(models.realDataModel()->nonXMLItems().size(), 1); - ImportDataInfo import_data(std::unique_ptr<OutputData<double>>(m_data.clone()), "nbins"); + ImportDataInfo import_data(std::unique_ptr<Powerfield<double>>(m_data.clone()), "nbins"); realData->setImportData(std::move(import_data)); // TODO: setImportData tested here with 2D data while main code uses it for 1D only. @@ -267,8 +267,8 @@ TEST_F(TestOutputDataIOService, RealDataItemWithNativeData) GUI::Model::JobFunctions::copyRealDataItem(jobItem, realData); EXPECT_EQ(models.jobModel()->nonXMLItems().size(), 3); - // checking data items of OutputDataIOService - OutputDataIOService service(&models); + // checking data items of PowerfieldIOService + PowerfieldIOService service(&models); EXPECT_EQ(service.dataInterfaces().size(), 5); const QString projectDir("test_NativeData"); @@ -295,8 +295,8 @@ TEST_F(TestOutputDataIOService, RealDataItemWithNativeData) EXPECT_TRUE(QFile::exists(fname4)); auto readData = [](const QString& filename) { - return std::unique_ptr<OutputData<double>>( - IntensityDataIOFactory::readOutputData(filename.toStdString())); + return std::unique_ptr<Powerfield<double>>( + IOFactory::readPowerfield(filename.toStdString())); }; // Reading data from disk, checking it is the same @@ -304,8 +304,8 @@ TEST_F(TestOutputDataIOService, RealDataItemWithNativeData) auto dataOnDisk2 = readData(fname2); auto dataOnDisk3 = readData(fname3); auto dataOnDisk4 = readData(fname4); - EXPECT_TRUE(UTest::GUI::isTheSame(*dataOnDisk1, *data1->getOutputData())); - EXPECT_TRUE(UTest::GUI::isTheSame(*dataOnDisk2, *data2->getOutputData())); - EXPECT_TRUE(UTest::GUI::isTheSame(*dataOnDisk3, *data3->getOutputData())); - EXPECT_TRUE(UTest::GUI::isTheSame(*dataOnDisk4, *data4->getOutputData())); + EXPECT_TRUE(UTest::GUI::isTheSame(*dataOnDisk1, *data1->getPowerfield())); + EXPECT_TRUE(UTest::GUI::isTheSame(*dataOnDisk2, *data2->getPowerfield())); + EXPECT_TRUE(UTest::GUI::isTheSame(*dataOnDisk3, *data3->getPowerfield())); + EXPECT_TRUE(UTest::GUI::isTheSame(*dataOnDisk4, *data4->getPowerfield())); } diff --git a/Tests/Unit/GUI/TestRealDataModel.cpp b/Tests/Unit/GUI/TestRealDataModel.cpp index 1e735d46240c04efebfb693e2862ea9634353495..2da77c121a2b70a0b6ec089325f7017d35c60c1e 100644 --- a/Tests/Unit/GUI/TestRealDataModel.cpp +++ b/Tests/Unit/GUI/TestRealDataModel.cpp @@ -44,25 +44,25 @@ TEST_F(TestRealDataModel, removeNativeData) item->initNativeData(); EXPECT_NE(item->nativeData(), nullptr); EXPECT_FALSE(item->hasNativeData()); - EXPECT_EQ(item->nativeData()->getOutputData(), nullptr); + EXPECT_EQ(item->nativeData()->getPowerfield(), nullptr); // call remove while no output data set yet item->removeNativeData(); EXPECT_NE(item->nativeData(), nullptr); EXPECT_FALSE(item->hasNativeData()); - EXPECT_EQ(item->nativeData()->getOutputData(), nullptr); + EXPECT_EQ(item->nativeData()->getPowerfield(), nullptr); // add data - auto* oData = new OutputData<double>(); + auto* oData = new Powerfield<double>(); oData->addAxis(PointwiseAxis("qVector", std::vector<double>({1, 2}))); oData->setRawDataVector(std::vector<double>({3, 4})); - item->nativeData()->setOutputData(oData); // takes ownership of odata + item->nativeData()->setPowerfield(oData); // takes ownership of odata EXPECT_TRUE(item->hasNativeData()); - EXPECT_NE(item->nativeData()->getOutputData(), nullptr); + EXPECT_NE(item->nativeData()->getPowerfield(), nullptr); // call remove with existing output data item->removeNativeData(); EXPECT_NE(item->nativeData(), nullptr); EXPECT_FALSE(item->hasNativeData()); - EXPECT_EQ(item->nativeData()->getOutputData(), nullptr); + EXPECT_EQ(item->nativeData()->getPowerfield(), nullptr); } diff --git a/Tests/Unit/GUI/Utils.cpp b/Tests/Unit/GUI/Utils.cpp index 439ef19efd3ea67f5f08687f6827b2c6acb86b2f..8fa9fbcd749928c4b760bcfb5f6affb3010cd241 100644 --- a/Tests/Unit/GUI/Utils.cpp +++ b/Tests/Unit/GUI/Utils.cpp @@ -14,7 +14,7 @@ #include "Tests/Unit/GUI/Utils.h" #include "Device/Data/DataUtils.h" -#include "Device/Histo/IntensityDataIOFactory.h" +#include "Device/Histo/IOFactory.h" #include "GUI/Model/Data/RealDataItem.h" #include "GUI/Model/Model/SessionModel.h" #include "GUI/Support/IO/ProjectUtils.h" @@ -38,9 +38,9 @@ void UTest::GUI::create_dir(const QString& dir_name) + "' in parent directory '.'."); } -std::unique_ptr<OutputData<double>> UTest::GUI::createData(double value, DIM n_dim) +std::unique_ptr<Powerfield<double>> UTest::GUI::createData(double value, DIM n_dim) { - std::unique_ptr<OutputData<double>> result(new OutputData<double>()); + std::unique_ptr<Powerfield<double>> result(new Powerfield<double>()); result->addAxis("x", nxsize, -1.0, 1.0); if (n_dim == DIM::D2) result->addAxis("y", nysize, 0.0, 2.0); @@ -52,20 +52,20 @@ RealDataItem* UTest::GUI::createRealData(const QString& name, SessionModel& mode DIM n_dim) { auto* result = model.insertItem<RealDataItem>(); - result->setOutputData(createData(value, n_dim).release()); + result->setPowerfield(createData(value, n_dim).release()); result->setDataName(name); return result; } -bool UTest::GUI::isTheSame(const OutputData<double>& data1, const OutputData<double>& data2) +bool UTest::GUI::isTheSame(const Powerfield<double>& data1, const Powerfield<double>& data2) { double diff = DataUtils::Data::relativeDataDifference(data1, data2); return diff < 1e-10; } -bool UTest::GUI::isTheSame(const QString& fileName, const OutputData<double>& data) +bool UTest::GUI::isTheSame(const QString& fileName, const Powerfield<double>& data) { - std::unique_ptr<OutputData<double>> dataOnDisk( - IntensityDataIOFactory::readOutputData(fileName.toStdString())); + std::unique_ptr<Powerfield<double>> dataOnDisk( + IOFactory::readPowerfield(fileName.toStdString())); return isTheSame(*dataOnDisk, data); } diff --git a/Tests/Unit/GUI/Utils.h b/Tests/Unit/GUI/Utils.h index bf24e7225235a692ddf8cbfa23f05c414c3e9502..3f7164e0869400abbf01e10ba07008b1131d81b5 100644 --- a/Tests/Unit/GUI/Utils.h +++ b/Tests/Unit/GUI/Utils.h @@ -22,7 +22,7 @@ #include <QXmlStreamWriter> template <class T> -class OutputData; +class Powerfield; class RealDataItem; namespace UTest::GUI { @@ -34,9 +34,9 @@ enum class DIM { D1 = 1, D2 = 2 }; void create_dir(const QString& dir_name); //! Creates output data array for testing purposes -std::unique_ptr<OutputData<double>> createData(double value = 0.0, DIM n_dim = DIM::D2); +std::unique_ptr<Powerfield<double>> createData(double value = 0.0, DIM n_dim = DIM::D2); -//! Creates real data item initialized with OutputData for testing purposes +//! Creates real data item initialized with Powerfield for testing purposes RealDataItem* createRealData(const QString& name, SessionModel& model, double value = 0.0, DIM n_dim = DIM::D2); @@ -70,10 +70,10 @@ T propertyFromXML(const QString& buffer) } //! Helper function to test if data are the same. -bool isTheSame(const OutputData<double>& data1, const OutputData<double>& data2); +bool isTheSame(const Powerfield<double>& data1, const Powerfield<double>& data2); //! Helper function to check if file on disk represents same data. -bool isTheSame(const QString& fileName, const OutputData<double>& data); +bool isTheSame(const QString& fileName, const Powerfield<double>& data); } // namespace UTest::GUI diff --git a/Tests/Unit/Numeric/FourierTransformTest.cpp b/Tests/Unit/Numeric/FourierTransformTest.cpp index a8368bccd40fe88fae2e6255439b08b12bdd9d51..39ee6d9c4b5dca0ad7cac059ad0d6606fd413d4f 100644 --- a/Tests/Unit/Numeric/FourierTransformTest.cpp +++ b/Tests/Unit/Numeric/FourierTransformTest.cpp @@ -1,6 +1,6 @@ #include "Base/Math/FourierTransform.h" #include "Base/Math/Constants.h" -#include "Device/Data/OutputData.h" +#include "Device/Data/Powerfield.h" #include "Tests/GTestWrapper/google_test.h" class FourierTransformTest : public ::testing::Test { diff --git a/Tests/Unit/Resample/MaterialTest.cpp b/Tests/Unit/Resample/MaterialTest.cpp index 43299e057c8885a7f8dee9b29a03e729382895fe..f669cbc764e05b53fc502448de29da733b041e53 100644 --- a/Tests/Unit/Resample/MaterialTest.cpp +++ b/Tests/Unit/Resample/MaterialTest.cpp @@ -35,8 +35,7 @@ TEST_F(MaterialTest, MaterialConstruction) EXPECT_EQ(material_data, material4.materialData()); EXPECT_EQ(default_magnetism, material4.magnetization()); - Material material5 = - RefractiveMaterial("Material", material_data.real(), material_data.imag()); + Material material5 = RefractiveMaterial("Material", material_data.real(), material_data.imag()); EXPECT_EQ(material_data, material5.materialData()); EXPECT_EQ(default_magnetism, material5.magnetization()); diff --git a/Tests/Unit/Sim/ChiSquaredModuleTest.cpp b/Tests/Unit/Sim/ChiSquaredModuleTest.cpp index a822a45386d8668505809a85dd3559c3a35563d1..25709935a6c658c073d851565b756f9409993e14 100644 --- a/Tests/Unit/Sim/ChiSquaredModuleTest.cpp +++ b/Tests/Unit/Sim/ChiSquaredModuleTest.cpp @@ -1,5 +1,5 @@ #include "Sim/Residual/ChiSquaredModule.h" -#include "Device/Data/OutputData.h" +#include "Device/Data/Powerfield.h" #include "Sim/Residual/VarianceFunctions.h" #include "Tests/GTestWrapper/google_test.h" @@ -9,8 +9,8 @@ class ChiSquaredModuleTest : public ::testing::Test { protected: ChiSquaredModule m_chi_empty; ChiSquaredModule m_chi_default; - OutputData<double> m_real_data; - OutputData<double> m_simul_data; + Powerfield<double> m_real_data; + Powerfield<double> m_simul_data; }; TEST_F(ChiSquaredModuleTest, InitialState) diff --git a/Tests/Unit/Sim/CoordSystem1DTest.cpp b/Tests/Unit/Sim/CoordSystem1DTest.cpp index 69f7c899d78124d67ca6f6b8ed404a17171d5935..0f3d782f864f7f426e9a48fe0d73f82d6164bd48 100644 --- a/Tests/Unit/Sim/CoordSystem1DTest.cpp +++ b/Tests/Unit/Sim/CoordSystem1DTest.cpp @@ -4,7 +4,7 @@ #include "Base/Const/Units.h" #include "Base/Math/Constants.h" #include "Device/Beam/Beam.h" -#include "Device/Data/OutputData.h" +#include "Device/Data/Powerfield.h" #include "Sim/Scan/QzScan.h" #include "Tests/GTestWrapper/google_test.h" @@ -89,7 +89,7 @@ void CoordSystem1DTest::checkConventionalConverter(const CoordSystem1D& test_obj EXPECT_EQ(axis_rq4->upperBound(), test_object.calculateMax(0, Axes::Coords::RQ4)); EXPECT_TRUE(*axis_rq4 == *axis_qspace); - OutputData<double> fake_data; + Powerfield<double> fake_data; fake_data.addAxis(m_axis); std::vector<double> raw_fake(m_axis.size(), 1.0); fake_data.setRawDataVector(raw_fake); @@ -157,7 +157,7 @@ void CoordSystem1DTest::checkQSpecConverter(const CoordSystem1D& test_object) EXPECT_EQ(axis_rq4->upperBound(), test_object.calculateMax(0, Axes::Coords::RQ4)); EXPECT_TRUE(*axis_rq4 == *axis_qspace); - OutputData<double> fake_data; + Powerfield<double> fake_data; fake_data.addAxis(m_axis); std::vector<double> raw_fake(m_axis.size(), 1.0); fake_data.setRawDataVector(raw_fake); diff --git a/Tests/Unit/Sim/FitObjectiveTest.cpp b/Tests/Unit/Sim/FitObjectiveTest.cpp index 24b64d63d51e5d9fb89b0d067ea337463689a641..fc21d4f85a7a10592e17d6e33231967ea2ef2072 100644 --- a/Tests/Unit/Sim/FitObjectiveTest.cpp +++ b/Tests/Unit/Sim/FitObjectiveTest.cpp @@ -33,7 +33,7 @@ TEST_F(FitObjectiveTest, twoDatasets) mumufit::Parameters params; objective.evaluate(params); - // checking flat array with experimental data made of two OutputData + // checking flat array with experimental data made of two Powerfield std::vector<double> expected_exp1(helper1.size(), exp_value1); std::vector<double> expected_exp2(helper2.size(), exp_value2); expected_exp1.insert(expected_exp1.end(), expected_exp2.begin(), expected_exp2.end()); diff --git a/Tests/Unit/Sim/SpecularSimulationTest.cpp b/Tests/Unit/Sim/SpecularSimulationTest.cpp index 5126609bca40bf7b1355eee604a1262736cb3179..951e900d6756e7cffde30c5089b565fc8e001375 100644 --- a/Tests/Unit/Sim/SpecularSimulationTest.cpp +++ b/Tests/Unit/Sim/SpecularSimulationTest.cpp @@ -185,7 +185,7 @@ TEST_F(SpecularSimulationTest, OutOfRangeAngles) beam.setInclinationAngleGuarded(-0.2 * Units::deg); const SimulationResult sim_result = sim->simulate(); - std::unique_ptr<OutputData<double>> data(sim_result.data()); + std::unique_ptr<Powerfield<double>> data(sim_result.data()); EXPECT_EQ(0.0, (*data)[0]); EXPECT_NE(0.0, (*data)[1]); diff --git a/Wrap/Python/ba_plot.py b/Wrap/Python/ba_plot.py index 805750ba161a3acf59da30e111a0c9e3f51e3575..ebb93df112c8c37492e9d2111984e360366f3695 100644 --- a/Wrap/Python/ba_plot.py +++ b/Wrap/Python/ba_plot.py @@ -266,7 +266,7 @@ def save_results(results, name): formatN = "%" + str(nDigits) + "i" for i, result in enumerate(results): fname = name + "." + (formatN % i) + ".int.gz" - ba.IntensityDataIOFactory.writeSimulationResult(result, fname) + ba.IOFactory.writeSimulationResult(result, fname) class MultiPlot: @@ -411,7 +411,7 @@ def plot_simulation_result(result): Draws simulation result and (optionally) shows the plot. """ if datfile: - ba.IntensityDataIOFactory.writeSimulationResult( + ba.IOFactory.writeSimulationResult( result, datfile + ".int.gz") if not do_plot: return diff --git a/Wrap/Swig/libBornAgainDevice.i b/Wrap/Swig/libBornAgainDevice.i index aef9c67f3de018d4c4088d0541c0813e3616cd61..6df14075c350b8eb72156ccb7534d0f98b3236c3 100644 --- a/Wrap/Swig/libBornAgainDevice.i +++ b/Wrap/Swig/libBornAgainDevice.i @@ -34,7 +34,7 @@ #include "Device/Histo/HistoUtils.h" #include "Device/Histo/Histogram1D.h" #include "Device/Histo/Histogram2D.h" -#include "Device/Histo/IntensityDataIOFactory.h" +#include "Device/Histo/IOFactory.h" #include "Device/Histo/SimulationResult.h" #include "Device/Instrument/Instrument.h" #include "Device/Mask/Ellipse.h" @@ -58,17 +58,17 @@ // ownership %newobject SimulationResult::histogram2d(Axes::Coords units_type = Axes::Coords::UNDEFINED) const; -%newobject IntensityDataIOFactory::readOutputData(const std::string& file_name); -%newobject IntensityDataIOFactory::readIntensityData(const std::string& file_name); +%newobject IOFactory::readPowerfield(const std::string& file_name); +%newobject IOFactory::readIntensityData(const std::string& file_name); %newobject DetectorMask::createHistogram() const; -%newobject DataUtils::Data::importArrayToOutputData; +%newobject DataUtils::Data::importArrayToPowerfield; %newobject IHistogram::createFrom(const std::string& filename); %newobject IHistogram::createFrom(const std::vector<std::vector<double>>& data); -%include "Device/Data/OutputData.h" -%template(IntensityData) OutputData<double>; +%include "Device/Data/Powerfield.h" +%template(IntensityData) Powerfield<double>; %include "Device/Data/DataUtils.h" %include "Device/Beam/Beam.h" @@ -98,10 +98,10 @@ %include "Device/Histo/IHistogram.h" %include "Device/Histo/Histogram1D.h" %include "Device/Histo/Histogram2D.h" -%include "Device/Histo/IntensityDataIOFactory.h" +%include "Device/Histo/IOFactory.h" %include "Device/Histo/SimulationResult.h" -%extend OutputData<double> { +%extend Powerfield<double> { double __getitem__(unsigned int i) { return (*($self))[i]; } double __setitem__(unsigned int i, double value) { diff --git a/auto/Wrap/doxygenDevice.i b/auto/Wrap/doxygenDevice.i index 5ecd5d17aaf8bfa448d078d33deb886f0ffe0cd8..e5af0eded26b530841e1d8c23f503d660028c387 100644 --- a/auto/Wrap/doxygenDevice.i +++ b/auto/Wrap/doxygenDevice.i @@ -174,7 +174,7 @@ Constructor taking a 2 dimensional resolution function as argument. %feature("docstring") ConvolutionDetectorResolution::className "std::string ConvolutionDetectorResolution::className() const final "; -%feature("docstring") ConvolutionDetectorResolution::applyDetectorResolution "void ConvolutionDetectorResolution::applyDetectorResolution(OutputData< double > *p_intensity_map) const override +%feature("docstring") ConvolutionDetectorResolution::applyDetectorResolution "void ConvolutionDetectorResolution::applyDetectorResolution(Powerfield< double > *p_intensity_map) const override Convolve given intensities with the encapsulated resolution. "; @@ -266,9 +266,9 @@ Calculates maximum on-axis value in given units. Creates axis in converted units. "; -%feature("docstring") CoordSystem1D::createConvertedData "std::unique_ptr< OutputData< double > > CoordSystem1D::createConvertedData(const OutputData< double > &data, Axes::Coords units) const override +%feature("docstring") CoordSystem1D::createConvertedData "std::unique_ptr< Powerfield< double > > CoordSystem1D::createConvertedData(const Powerfield< double > &data, Axes::Coords units) const override -Creates OutputData array in converter units. +Creates Powerfield array in converter units. "; @@ -436,7 +436,7 @@ Init the map of masks for the given detector plane. %feature("docstring") DetectorMask::isMasked "bool DetectorMask::isMasked(size_t index) const "; -%feature("docstring") DetectorMask::getMaskData "const OutputData<bool>* DetectorMask::getMaskData() const +%feature("docstring") DetectorMask::getMaskData "const Powerfield<bool>* DetectorMask::getMaskData() const "; %feature("docstring") DetectorMask::createHistogram "Histogram2D * DetectorMask::createHistogram() const @@ -625,9 +625,9 @@ Array of size nbins+1 containing low-edges for each bin and upper edge of last b Constructor for 1D histogram with custom axis. "; -%feature("docstring") Histogram1D::Histogram1D "Histogram1D::Histogram1D(const OutputData< double > &data) +%feature("docstring") Histogram1D::Histogram1D "Histogram1D::Histogram1D(const Powerfield< double > &data) -Constructor for 1D histograms from basic OutputData object. +Constructor for 1D histograms from basic Powerfield object. "; %feature("docstring") Histogram1D::clone "Histogram1D * Histogram1D::clone() const override @@ -734,9 +734,9 @@ Array of size nbins+1 containing low-edges for each bin and upper edge of last b Constructor for 2D histogram with custom axes. "; -%feature("docstring") Histogram2D::Histogram2D "Histogram2D::Histogram2D(const OutputData< double > &data) +%feature("docstring") Histogram2D::Histogram2D "Histogram2D::Histogram2D(const Powerfield< double > &data) -Constructor for 2D histograms from basic OutputData object. +Constructor for 2D histograms from basic Powerfield object. "; %feature("docstring") Histogram2D::Histogram2D "Histogram2D::Histogram2D(std::vector< std::vector< double >> data) @@ -888,7 +888,7 @@ C++ includes: ICoordSystem.h %feature("docstring") ICoordSystem::clone "ICoordSystem* ICoordSystem::clone() const override=0 "; -%feature("docstring") ICoordSystem::createOutputData "std::unique_ptr< OutputData< double > > ICoordSystem::createOutputData(Axes::Coords units) const +%feature("docstring") ICoordSystem::createPowerfield "std::unique_ptr< Powerfield< double > > ICoordSystem::createPowerfield(Axes::Coords units) const Returns zero-valued output data array in specified units. "; @@ -917,9 +917,9 @@ Returns zero-valued output data array in specified units. %feature("docstring") ICoordSystem::createConvertedAxis "virtual std::unique_ptr<const IAxis> ICoordSystem::createConvertedAxis(size_t i_axis, Axes::Coords units) const =0 "; -%feature("docstring") ICoordSystem::createConvertedData "std::unique_ptr< OutputData< double > > ICoordSystem::createConvertedData(const OutputData< double > &data, Axes::Coords units) const +%feature("docstring") ICoordSystem::createConvertedData "std::unique_ptr< Powerfield< double > > ICoordSystem::createConvertedData(const Powerfield< double > &data, Axes::Coords units) const -Creates OutputData array in converter units. +Creates Powerfield array in converter units. "; @@ -1055,7 +1055,7 @@ Convert an index of the region of interest to an index of the detector. If no re %feature("docstring") IDetector::detectorIndexToRegionOfInterestIndex "size_t IDetector::detectorIndexToRegionOfInterestIndex(size_t detectorIndex) const "; -%feature("docstring") IDetector::applyDetectorResolution "void IDetector::applyDetectorResolution(OutputData< double > *p_intensity_map) const +%feature("docstring") IDetector::applyDetectorResolution "void IDetector::applyDetectorResolution(Powerfield< double > *p_intensity_map) const Applies the detector resolution to the given intensity maps. "; @@ -1065,7 +1065,7 @@ Applies the detector resolution to the given intensity maps. Returns a pointer to detector resolution object. "; -%feature("docstring") IDetector::createDetectorMap "std::unique_ptr< OutputData< double > > IDetector::createDetectorMap() const +%feature("docstring") IDetector::createDetectorMap "std::unique_ptr< Powerfield< double > > IDetector::createDetectorMap() const Returns empty detector map in given axes units. This map is a data array limited to the size of the \"Region of interest\" "; @@ -1075,7 +1075,7 @@ Returns empty detector map in given axes units. This map is a data array limited Returns detection properties. "; -%feature("docstring") IDetector::createDetectorIntensity "OutputData< double > * IDetector::createDetectorIntensity(const std::vector< std::unique_ptr< DiffuseElement >> &elements) const +%feature("docstring") IDetector::createDetectorIntensity "Powerfield< double > * IDetector::createDetectorIntensity(const std::vector< std::unique_ptr< DiffuseElement >> &elements) const Returns new intensity map with resolution applied, and cropped to ROI if applicable. "; @@ -1162,7 +1162,7 @@ Returns vector of unmasked detector indices. %feature("docstring") IDetector2D::createPixel "virtual IPixel* IDetector2D::createPixel(size_t index) const =0 -Creates an IPixel for the given OutputData object and index. +Creates an IPixel for the given Powerfield object and index. "; %feature("docstring") IDetector2D::indexOfSpecular "virtual size_t IDetector2D::indexOfSpecular(const Beam &beam) const =0 @@ -1188,7 +1188,7 @@ C++ includes: IDetectorResolution.h %feature("docstring") IDetectorResolution::clone "IDetectorResolution* IDetectorResolution::clone() const override=0 "; -%feature("docstring") IDetectorResolution::applyDetectorResolution "virtual void IDetectorResolution::applyDetectorResolution(OutputData< double > *p_intensity_map) const =0 +%feature("docstring") IDetectorResolution::applyDetectorResolution "virtual void IDetectorResolution::applyDetectorResolution(Powerfield< double > *p_intensity_map) const =0 Apply the resolution function to the intensity data. "; @@ -1329,10 +1329,10 @@ Returns the center of bin i of the x axis. Returns the center of bin i of the y axis. "; -%feature("docstring") IHistogram::getData "const OutputData< CumulativeValue > & IHistogram::getData() const +%feature("docstring") IHistogram::getData "const Powerfield< CumulativeValue > & IHistogram::getData() const "; -%feature("docstring") IHistogram::getData "OutputData< CumulativeValue > & IHistogram::getData() +%feature("docstring") IHistogram::getData "Powerfield< CumulativeValue > & IHistogram::getData() "; %feature("docstring") IHistogram::binContent "double IHistogram::binContent(size_t i) const @@ -1425,11 +1425,11 @@ Returns numpy array with bin content (accumulated values). Reset histogram content (axes remains) "; -%feature("docstring") IHistogram::createOutputData "OutputData< double > * IHistogram::createOutputData(DataType dataType=DataType::INTEGRAL) const +%feature("docstring") IHistogram::createPowerfield "Powerfield< double > * IHistogram::createPowerfield(DataType dataType=DataType::INTEGRAL) const -Creates new OutputData with histogram's shape and values corresponding to DataType. +Creates new Powerfield with histogram's shape and values corresponding to DataType. -creates new OutputData with histogram's shape and put there values corresponding to DataType +creates new Powerfield with histogram's shape and put there values corresponding to DataType "; %feature("docstring") IHistogram::hasSameShape "bool IHistogram::hasSameShape(const IHistogram &other) const @@ -1581,14 +1581,14 @@ init detector with beam settings "; -// File: classIntensityDataIOFactory.xml -%feature("docstring") IntensityDataIOFactory " +// File: classIOFactory.xml +%feature("docstring") IOFactory " Provides users with possibility to read and write IntensityData from/to files in different format. Type of the file will be deduced from file name. *.txt - ASCII file with 2D array [nrow][ncol], layout as in numpy. *.int - BornAgain internal ASCII format. *.tif - 32-bits tiff file. If file name ends with \"*.gz\" or \"*.bz2\" the file will be zipped on the fly using appropriate algorithm. Usage: -C++ includes: IntensityDataIOFactory.h +C++ includes: IOFactory.h "; @@ -1723,100 +1723,220 @@ C++ includes: CoordSystem2D.h "; -// File: classOutputData.xml -%feature("docstring") OutputData " +// File: classPolFilter.xml +%feature("docstring") PolFilter " + +Detector properties (efficiency, transmission). + +C++ includes: PolFilter.h +"; + +%feature("docstring") PolFilter::PolFilter "PolFilter::PolFilter(R3 direction, double efficiency, double total_transmission) +"; + +%feature("docstring") PolFilter::PolFilter "PolFilter::PolFilter() +"; + +%feature("docstring") PolFilter::~PolFilter "PolFilter::~PolFilter() override=default +"; + +%feature("docstring") PolFilter::className "std::string PolFilter::className() const final +"; + +%feature("docstring") PolFilter::parDefs "std::vector<ParaMeta> PolFilter::parDefs() const final +"; + +%feature("docstring") PolFilter::setDirEffTra "void PolFilter::setDirEffTra(R3 direction, double efficiency, double total_transmission) + +Sets the polarization analyzer characteristics of the detector. +"; + +%feature("docstring") PolFilter::matrix "SpinMatrix PolFilter::matrix() const + +Return the polarization density matrix (in spin basis along z-axis) +"; + +%feature("docstring") PolFilter::polDirection "R3 PolFilter::polDirection() const + +Retrieve the analyzer characteristics. +"; + +%feature("docstring") PolFilter::polEfficiency "double PolFilter::polEfficiency() const + +will always return positive value +"; + +%feature("docstring") PolFilter::totalTransmission "double PolFilter::totalTransmission() const +"; + + +// File: classPolygon.xml +%feature("docstring") Polygon " + +A polygon, for use in detector masks. Polygon defined by two arrays with x and y coordinates of points. Sizes of arrays should coincide. If polygon is unclosed (the last point doesn't repeat the first one), it will be closed automatically. + +C++ includes: Polygon.h +"; + +%feature("docstring") Polygon::Polygon "Polygon::Polygon(std::vector< double > x, std::vector< double > y) + +Parameters: +----------- + +x: +Vector of x-coordinates of polygon points. + +y: +Vector of y-coordinates of polygon points. If polygon is unclosed (the last point doesn't repeat the first one), it will be closed automatically. +"; + +%feature("docstring") Polygon::Polygon "Polygon::Polygon(std::vector< std::pair< double, double >> points) + +If polygon is unclosed (the last point doesn't repeat the first one), it will be closed automatically. + +Parameters: +----------- + +points: +Two dimensional vector of (x,y) coordinates of polygon points. +"; + +%feature("docstring") Polygon::Polygon "Polygon::Polygon(const PolygonPrivate *d) +"; + +%feature("docstring") Polygon::~Polygon "Polygon::~Polygon() override +"; + +%feature("docstring") Polygon::clone "Polygon* Polygon::clone() const override +"; + +%feature("docstring") Polygon::contains "bool Polygon::contains(double x, double y) const override + +Returns true if point with given coordinates is inside or on border of the shape. +"; + +%feature("docstring") Polygon::contains "bool Polygon::contains(const Bin1D &binx, const Bin1D &biny) const override + +Returns true if area defined by two bins is inside or on border of polygon (more precisely, if mid point of two bins satisfy this condition). +"; + +%feature("docstring") Polygon::getArea "double Polygon::getArea() const +"; + +%feature("docstring") Polygon::getPoints "void Polygon::getPoints(std::vector< double > &xpos, std::vector< double > &ypos) const +"; + + +// File: classPolygonPrivate.xml +%feature("docstring") PolygonPrivate " + +The private data for polygons to hide boost dependency from the header. +"; + +%feature("docstring") PolygonPrivate::PolygonPrivate "PolygonPrivate::PolygonPrivate(const std::vector< double > &x, const std::vector< double > &y) +"; + +%feature("docstring") PolygonPrivate::PolygonPrivate "PolygonPrivate::PolygonPrivate(const std::vector< std::pair< double, double >> &pts) +"; + +%feature("docstring") PolygonPrivate::get_points "void PolygonPrivate::get_points(std::vector< double > &xpos, std::vector< double > &ypos) +"; + + +// File: classPowerfield.xml +%feature("docstring") Powerfield " Templated class to store data in multi-dimensional space. Used with type T = double, CumulativeValue, bool -C++ includes: OutputData.h +C++ includes: Powerfield.h "; -%feature("docstring") OutputData::OutputData "OutputData< T >::OutputData() +%feature("docstring") Powerfield::Powerfield "Powerfield< T >::Powerfield() "; -%feature("docstring") OutputData::OutputData "OutputData< T >::OutputData(const OutputData &)=delete +%feature("docstring") Powerfield::Powerfield "Powerfield< T >::Powerfield(const Powerfield &)=delete "; -%feature("docstring") OutputData::OutputData "OutputData< T >::OutputData(OutputData &&) +%feature("docstring") Powerfield::Powerfield "Powerfield< T >::Powerfield(Powerfield &&) "; -%feature("docstring") OutputData::~OutputData "OutputData< T >::~OutputData() +%feature("docstring") Powerfield::~Powerfield "Powerfield< T >::~Powerfield() "; -%feature("docstring") OutputData::clone "OutputData< T > * OutputData< T >::clone() const +%feature("docstring") Powerfield::clone "Powerfield< T > * Powerfield< T >::clone() const "; -%feature("docstring") OutputData::copyFrom "void OutputData< T >::copyFrom(const OutputData< T > &other) +%feature("docstring") Powerfield::copyFrom "void Powerfield< T >::copyFrom(const Powerfield< T > &other) "; -%feature("docstring") OutputData::copyShapeFrom "void OutputData< T >::copyShapeFrom(const OutputData< U > &other) +%feature("docstring") Powerfield::copyShapeFrom "void Powerfield< T >::copyShapeFrom(const Powerfield< U > &other) "; -%feature("docstring") OutputData::meanValues "OutputData< double > * OutputData< T >::meanValues() const +%feature("docstring") Powerfield::meanValues "Powerfield< double > * Powerfield< T >::meanValues() const "; -%feature("docstring") OutputData::addAxis "void OutputData< T >::addAxis(const IAxis &new_axis) +%feature("docstring") Powerfield::addAxis "void Powerfield< T >::addAxis(const IAxis &new_axis) "; -%feature("docstring") OutputData::addAxis "void OutputData< T >::addAxis(const std::string &name, size_t size, double start, double end) +%feature("docstring") Powerfield::addAxis "void Powerfield< T >::addAxis(const std::string &name, size_t size, double start, double end) "; -%feature("docstring") OutputData::axis "const IAxis & OutputData< T >::axis(size_t serial_number) const +%feature("docstring") Powerfield::axis "const IAxis & Powerfield< T >::axis(size_t serial_number) const Returns axis with given serial number. "; -%feature("docstring") OutputData::rank "size_t OutputData< T >::rank() const +%feature("docstring") Powerfield::rank "size_t Powerfield< T >::rank() const Returns number of dimensions. "; -%feature("docstring") OutputData::getAllocatedSize "size_t OutputData< T >::getAllocatedSize() const +%feature("docstring") Powerfield::getAllocatedSize "size_t Powerfield< T >::getAllocatedSize() const Returns total size of data buffer (product of bin number in every dimension). "; -%feature("docstring") OutputData::getAllSizes "std::vector< size_t > OutputData< T >::getAllSizes() const +%feature("docstring") Powerfield::getAllSizes "std::vector< size_t > Powerfield< T >::getAllSizes() const Returns all sizes of its axes. "; -%feature("docstring") OutputData::getRawDataVector "std::vector< T > OutputData< T >::getRawDataVector() const +%feature("docstring") Powerfield::getRawDataVector "std::vector< T > Powerfield< T >::getRawDataVector() const Returns copy of raw data vector. "; -%feature("docstring") OutputData::totalSum "T OutputData< T >::totalSum() const +%feature("docstring") Powerfield::totalSum "T Powerfield< T >::totalSum() const Returns sum of all values in the data structure. "; -%feature("docstring") OutputData::max "T OutputData< T >::max() const +%feature("docstring") Powerfield::max "T Powerfield< T >::max() const Returns maximum value in the data structure. "; -%feature("docstring") OutputData::begin "OutputData< T >::iterator OutputData< T >::begin() +%feature("docstring") Powerfield::begin "Powerfield< T >::iterator Powerfield< T >::begin() Returns read/write iterator that points to the first element. "; -%feature("docstring") OutputData::begin "OutputData< T >::const_iterator OutputData< T >::begin() const +%feature("docstring") Powerfield::begin "Powerfield< T >::const_iterator Powerfield< T >::begin() const Returns read-only iterator that points to the first element. "; -%feature("docstring") OutputData::end "iterator OutputData< T >::end() +%feature("docstring") Powerfield::end "iterator Powerfield< T >::end() Returns read/write iterator that points to the one past last element. "; -%feature("docstring") OutputData::end "const_iterator OutputData< T >::end() const +%feature("docstring") Powerfield::end "const_iterator Powerfield< T >::end() const Returns read-only iterator that points to the one past last element. "; -%feature("docstring") OutputData::getAxesBinIndices "std::vector< int > OutputData< T >::getAxesBinIndices(size_t global_index) const +%feature("docstring") Powerfield::getAxesBinIndices "std::vector< int > Powerfield< T >::getAxesBinIndices(size_t global_index) const Returns vector of axes indices for given global index @@ -1829,7 +1949,7 @@ The global index of this data structure. Vector of bin indices for all axes defined "; -%feature("docstring") OutputData::getAxisBinIndex "size_t OutputData< T >::getAxisBinIndex(size_t global_index, size_t i_selected_axis) const +%feature("docstring") Powerfield::getAxisBinIndex "size_t Powerfield< T >::getAxisBinIndex(size_t global_index, size_t i_selected_axis) const Returns axis bin index for given global index @@ -1845,7 +1965,7 @@ Serial number of selected axis. Corresponding bin index for selected axis "; -%feature("docstring") OutputData::getAxisBinIndex "size_t OutputData< T >::getAxisBinIndex(size_t global_index, const std::string &axis_name) const +%feature("docstring") Powerfield::getAxisBinIndex "size_t Powerfield< T >::getAxisBinIndex(size_t global_index, const std::string &axis_name) const Returns axis bin index for given global index @@ -1861,7 +1981,7 @@ The name of selected axis. Corresponding bin index for selected axis "; -%feature("docstring") OutputData::toGlobalIndex "size_t OutputData< T >::toGlobalIndex(const std::vector< unsigned > &axes_indices) const +%feature("docstring") Powerfield::toGlobalIndex "size_t Powerfield< T >::toGlobalIndex(const std::vector< unsigned > &axes_indices) const Returns global index for specified indices of axes @@ -1874,7 +1994,7 @@ Vector of axes indices for all specified axes in this dataset Corresponding global index "; -%feature("docstring") OutputData::findGlobalIndex "size_t OutputData< T >::findGlobalIndex(const std::vector< double > &coordinates) const +%feature("docstring") Powerfield::findGlobalIndex "size_t Powerfield< T >::findGlobalIndex(const std::vector< double > &coordinates) const Returns global index for specified axes values @@ -1887,7 +2007,7 @@ Vector of axes coordinates for all specified axes in this dataset Closest global index "; -%feature("docstring") OutputData::getAxisValue "double OutputData< T >::getAxisValue(size_t global_index, size_t i_selected_axis) const +%feature("docstring") Powerfield::getAxisValue "double Powerfield< T >::getAxisValue(size_t global_index, size_t i_selected_axis) const Returns the value of selected axis for given global_index. @@ -1903,7 +2023,7 @@ Serial number of selected axis. corresponding bin center of selected axis "; -%feature("docstring") OutputData::getAxisValue "double OutputData< T >::getAxisValue(size_t global_index, const std::string &axis_name) const +%feature("docstring") Powerfield::getAxisValue "double Powerfield< T >::getAxisValue(size_t global_index, const std::string &axis_name) const Returns the value of selected axis for given global_index. @@ -1919,7 +2039,7 @@ The name of selected axis. corresponding bin center of selected axis "; -%feature("docstring") OutputData::getAxesValues "std::vector< double > OutputData< T >::getAxesValues(size_t global_index) const +%feature("docstring") Powerfield::getAxesValues "std::vector< double > Powerfield< T >::getAxesValues(size_t global_index) const Returns values on all defined axes for given globalbin number @@ -1932,7 +2052,7 @@ The global index of this data structure. Vector of corresponding bin centers "; -%feature("docstring") OutputData::getAxisBin "Bin1D OutputData< T >::getAxisBin(size_t global_index, size_t i_selected_axis) const +%feature("docstring") Powerfield::getAxisBin "Bin1D Powerfield< T >::getAxisBin(size_t global_index, size_t i_selected_axis) const Returns bin of selected axis for given global_index. @@ -1948,7 +2068,7 @@ Serial number of selected axis. Corresponding Bin1D object "; -%feature("docstring") OutputData::getAxisBin "Bin1D OutputData< T >::getAxisBin(size_t global_index, const std::string &axis_name) const +%feature("docstring") Powerfield::getAxisBin "Bin1D Powerfield< T >::getAxisBin(size_t global_index, const std::string &axis_name) const Returns bin of selected axis for given global_index. @@ -1964,289 +2084,169 @@ The name of selected axis. Corresponding Bin1D object "; -%feature("docstring") OutputData::clear "void OutputData< T >::clear() +%feature("docstring") Powerfield::clear "void Powerfield< T >::clear() Sets object into initial state (no dimensions, data) "; -%feature("docstring") OutputData::setAllTo "void OutputData< T >::setAllTo(const T &value) +%feature("docstring") Powerfield::setAllTo "void Powerfield< T >::setAllTo(const T &value) Sets content of output data to specific value. "; -%feature("docstring") OutputData::setAxisSizes "void OutputData< T >::setAxisSizes(size_t rank, int *n_dims) +%feature("docstring") Powerfield::setAxisSizes "void Powerfield< T >::setAxisSizes(size_t rank, int *n_dims) Adds 'rank' axes with indicated sizes. "; -%feature("docstring") OutputData::setRawDataVector "void OutputData< T >::setRawDataVector(const std::vector< T > &data_vector) +%feature("docstring") Powerfield::setRawDataVector "void Powerfield< T >::setRawDataVector(const std::vector< T > &data_vector) Sets new values to raw data vector. "; -%feature("docstring") OutputData::setRawDataArray "void OutputData< T >::setRawDataArray(const T *source) +%feature("docstring") Powerfield::setRawDataArray "void Powerfield< T >::setRawDataArray(const T *source) Sets new values to raw data array. "; -%feature("docstring") OutputData::getValue "double OutputData< T >::getValue(size_t index) const +%feature("docstring") Powerfield::getValue "double Powerfield< T >::getValue(size_t index) const Returns value or summed value, depending on T. "; -%feature("docstring") OutputData::hasSameDimensions "bool OutputData< T >::hasSameDimensions(const OutputData< U > &right) const +%feature("docstring") Powerfield::hasSameDimensions "bool Powerfield< T >::hasSameDimensions(const Powerfield< U > &right) const Returns true if object have same dimensions and number of axes bins. Returns true if object have same dimensions. "; -%feature("docstring") OutputData::hasSameShape "bool OutputData< T >::hasSameShape(const OutputData< U > &right) const +%feature("docstring") Powerfield::hasSameShape "bool Powerfield< T >::hasSameShape(const Powerfield< U > &right) const Returns true if objects a) have same dimensions b) bin boundaries of axes coincide. Returns true if object have same dimensions and shape of axis. "; -%feature("docstring") OutputData::getArray "PyObject* OutputData< T >::getArray() const +%feature("docstring") Powerfield::getArray "PyObject* Powerfield< T >::getArray() const Returns data as Python numpy array. "; -%feature("docstring") OutputData::isInitialized "bool OutputData< T >::isInitialized() const +%feature("docstring") Powerfield::isInitialized "bool Powerfield< T >::isInitialized() const Returns true if object is correctly initialized. "; -%feature("docstring") OutputData::allocate "void OutputData< T >::allocate() +%feature("docstring") Powerfield::allocate "void Powerfield< T >::allocate() Allocates memory for current dimensions configuration. "; -%feature("docstring") OutputData::normalizedToMaximum "const OutputData<double>& OutputData< T >::normalizedToMaximum() +%feature("docstring") Powerfield::normalizedToMaximum "const Powerfield<double>& Powerfield< T >::normalizedToMaximum() "; -%feature("docstring") OutputData::getArray "PyObject * OutputData< double >::getArray() const +%feature("docstring") Powerfield::getArray "PyObject * Powerfield< double >::getArray() const "; -%feature("docstring") OutputData::getValue "double OutputData< double >::getValue(size_t index) const +%feature("docstring") Powerfield::getValue "double Powerfield< double >::getValue(size_t index) const "; -%feature("docstring") OutputData::normalizedToMaximum "const OutputData< double > & OutputData< double >::normalizedToMaximum() +%feature("docstring") Powerfield::normalizedToMaximum "const Powerfield< double > & Powerfield< double >::normalizedToMaximum() "; -%feature("docstring") OutputData::getArray "PyObject * OutputData< double >::getArray() const +%feature("docstring") Powerfield::getArray "PyObject * Powerfield< double >::getArray() const Returns data as Python numpy array. "; -// File: classOutputDataIterator.xml -%feature("docstring") OutputDataIterator " +// File: classPowerfieldIterator.xml +%feature("docstring") PowerfieldIterator " -Iterator for underlying OutputData container. +Iterator for underlying Powerfield container. -C++ includes: OutputDataIterator.h +C++ includes: PowerfieldIterator.h "; -%feature("docstring") OutputDataIterator::OutputDataIterator "OutputDataIterator< TValue, TContainer >::OutputDataIterator() +%feature("docstring") PowerfieldIterator::PowerfieldIterator "PowerfieldIterator< TValue, TContainer >::PowerfieldIterator() Empty constructor to comply with stl forward iterators. "; -%feature("docstring") OutputDataIterator::OutputDataIterator "OutputDataIterator< TValue, TContainer >::OutputDataIterator(TContainer *p_output_data, size_t start_at_index=0) +%feature("docstring") PowerfieldIterator::PowerfieldIterator "PowerfieldIterator< TValue, TContainer >::PowerfieldIterator(TContainer *p_output_data, size_t start_at_index=0) constructor "; -%feature("docstring") OutputDataIterator::OutputDataIterator "OutputDataIterator< TValue, TContainer >::OutputDataIterator(const OutputDataIterator< TValue2, TContainer2 > &other) +%feature("docstring") PowerfieldIterator::PowerfieldIterator "PowerfieldIterator< TValue, TContainer >::PowerfieldIterator(const PowerfieldIterator< TValue2, TContainer2 > &other) templated copy construction "; -%feature("docstring") OutputDataIterator::OutputDataIterator "OutputDataIterator< TValue, TContainer >::OutputDataIterator(const OutputDataIterator< TValue, TContainer > &other) +%feature("docstring") PowerfieldIterator::PowerfieldIterator "PowerfieldIterator< TValue, TContainer >::PowerfieldIterator(const PowerfieldIterator< TValue, TContainer > &other) non-templated copy construction "; -%feature("docstring") OutputDataIterator::~OutputDataIterator "OutputDataIterator< TValue, TContainer >::~OutputDataIterator() +%feature("docstring") PowerfieldIterator::~PowerfieldIterator "PowerfieldIterator< TValue, TContainer >::~PowerfieldIterator() "; -%feature("docstring") OutputDataIterator::getIndex "size_t OutputDataIterator< TValue, TContainer >::getIndex() const +%feature("docstring") PowerfieldIterator::getIndex "size_t PowerfieldIterator< TValue, TContainer >::getIndex() const Returns current index. "; -%feature("docstring") OutputDataIterator::getContainer "TContainer* OutputDataIterator< TValue, TContainer >::getContainer() const +%feature("docstring") PowerfieldIterator::getContainer "TContainer* PowerfieldIterator< TValue, TContainer >::getContainer() const Returns container pointer. "; -%feature("docstring") OutputDataIterator::swap "void OutputDataIterator< TValue, TContainer >::swap(OutputDataIterator< TValue, TContainer > &other) +%feature("docstring") PowerfieldIterator::swap "void PowerfieldIterator< TValue, TContainer >::swap(PowerfieldIterator< TValue, TContainer > &other) Swaps iterators. "; -// File: classOutputDataReadReflectometry.xml -%feature("docstring") OutputDataReadReflectometry " +// File: classReadReflectometry.xml +%feature("docstring") ReadReflectometry " Class for reading reflectometry data from ASCII file. -C++ includes: OutputDataReadReflectometry.h +C++ includes: ReadReflectometry.h "; -%feature("docstring") OutputDataReadReflectometry::readOutputData "OutputData< double > * OutputDataReadReflectometry::readOutputData(std::istream &inStream) +%feature("docstring") ReadReflectometry::readPowerfield "Powerfield< double > * ReadReflectometry::readPowerfield(std::istream &inStream) "; -// File: classOutputDataReadWriteINT.xml -%feature("docstring") OutputDataReadWriteINT " +// File: classReadWriteINT.xml +%feature("docstring") ReadWriteINT " Class for reading and writing BornAgain native IntensityData from ASCII file. -C++ includes: OutputDataReadWriteINT.h +C++ includes: ReadWriteINT.h "; -%feature("docstring") OutputDataReadWriteINT::readOutputData "OutputData< double > * OutputDataReadWriteINT::readOutputData(std::istream &input_stream) +%feature("docstring") ReadWriteINT::readPowerfield "Powerfield< double > * ReadWriteINT::readPowerfield(std::istream &input_stream) "; -%feature("docstring") OutputDataReadWriteINT::writeOutputData "void OutputDataReadWriteINT::writeOutputData(const OutputData< double > &data, std::ostream &output_stream) +%feature("docstring") ReadWriteINT::writePowerfield "void ReadWriteINT::writePowerfield(const Powerfield< double > &data, std::ostream &output_stream) "; -// File: classOutputDataReadWriteNumpyTXT.xml -%feature("docstring") OutputDataReadWriteNumpyTXT " +// File: classReadWriteNumpyTXT.xml +%feature("docstring") ReadWriteNumpyTXT " -Class for reading and writing OutputData from simple ASCII file with the layout as in numpy.savetxt. +Class for reading and writing Powerfield from simple ASCII file with the layout as in numpy.savetxt. -C++ includes: OutputDataReadWriteNumpyTXT.h +C++ includes: ReadWriteNumpyTXT.h "; -%feature("docstring") OutputDataReadWriteNumpyTXT::readOutputData "OutputData< double > * OutputDataReadWriteNumpyTXT::readOutputData(std::istream &input_stream) +%feature("docstring") ReadWriteNumpyTXT::readPowerfield "Powerfield< double > * ReadWriteNumpyTXT::readPowerfield(std::istream &input_stream) "; -%feature("docstring") OutputDataReadWriteNumpyTXT::writeOutputData "void OutputDataReadWriteNumpyTXT::writeOutputData(const OutputData< double > &data, std::ostream &output_stream) -"; - - -// File: classPolFilter.xml -%feature("docstring") PolFilter " - -Detector properties (efficiency, transmission). - -C++ includes: PolFilter.h -"; - -%feature("docstring") PolFilter::PolFilter "PolFilter::PolFilter(R3 direction, double efficiency, double total_transmission) -"; - -%feature("docstring") PolFilter::PolFilter "PolFilter::PolFilter() -"; - -%feature("docstring") PolFilter::~PolFilter "PolFilter::~PolFilter() override=default -"; - -%feature("docstring") PolFilter::className "std::string PolFilter::className() const final -"; - -%feature("docstring") PolFilter::parDefs "std::vector<ParaMeta> PolFilter::parDefs() const final -"; - -%feature("docstring") PolFilter::setDirEffTra "void PolFilter::setDirEffTra(R3 direction, double efficiency, double total_transmission) - -Sets the polarization analyzer characteristics of the detector. -"; - -%feature("docstring") PolFilter::matrix "SpinMatrix PolFilter::matrix() const - -Return the polarization density matrix (in spin basis along z-axis) -"; - -%feature("docstring") PolFilter::polDirection "R3 PolFilter::polDirection() const - -Retrieve the analyzer characteristics. -"; - -%feature("docstring") PolFilter::polEfficiency "double PolFilter::polEfficiency() const - -will always return positive value -"; - -%feature("docstring") PolFilter::totalTransmission "double PolFilter::totalTransmission() const -"; - - -// File: classPolygon.xml -%feature("docstring") Polygon " - -A polygon, for use in detector masks. Polygon defined by two arrays with x and y coordinates of points. Sizes of arrays should coincide. If polygon is unclosed (the last point doesn't repeat the first one), it will be closed automatically. - -C++ includes: Polygon.h -"; - -%feature("docstring") Polygon::Polygon "Polygon::Polygon(std::vector< double > x, std::vector< double > y) - -Parameters: ------------ - -x: -Vector of x-coordinates of polygon points. - -y: -Vector of y-coordinates of polygon points. If polygon is unclosed (the last point doesn't repeat the first one), it will be closed automatically. -"; - -%feature("docstring") Polygon::Polygon "Polygon::Polygon(std::vector< std::pair< double, double >> points) - -If polygon is unclosed (the last point doesn't repeat the first one), it will be closed automatically. - -Parameters: ------------ - -points: -Two dimensional vector of (x,y) coordinates of polygon points. -"; - -%feature("docstring") Polygon::Polygon "Polygon::Polygon(const PolygonPrivate *d) -"; - -%feature("docstring") Polygon::~Polygon "Polygon::~Polygon() override -"; - -%feature("docstring") Polygon::clone "Polygon* Polygon::clone() const override -"; - -%feature("docstring") Polygon::contains "bool Polygon::contains(double x, double y) const override - -Returns true if point with given coordinates is inside or on border of the shape. -"; - -%feature("docstring") Polygon::contains "bool Polygon::contains(const Bin1D &binx, const Bin1D &biny) const override - -Returns true if area defined by two bins is inside or on border of polygon (more precisely, if mid point of two bins satisfy this condition). -"; - -%feature("docstring") Polygon::getArea "double Polygon::getArea() const -"; - -%feature("docstring") Polygon::getPoints "void Polygon::getPoints(std::vector< double > &xpos, std::vector< double > &ypos) const -"; - - -// File: classPolygonPrivate.xml -%feature("docstring") PolygonPrivate " - -The private data for polygons to hide boost dependency from the header. -"; - -%feature("docstring") PolygonPrivate::PolygonPrivate "PolygonPrivate::PolygonPrivate(const std::vector< double > &x, const std::vector< double > &y) -"; - -%feature("docstring") PolygonPrivate::PolygonPrivate "PolygonPrivate::PolygonPrivate(const std::vector< std::pair< double, double >> &pts) -"; - -%feature("docstring") PolygonPrivate::get_points "void PolygonPrivate::get_points(std::vector< double > &xpos, std::vector< double > &ypos) +%feature("docstring") ReadWriteNumpyTXT::writePowerfield "void ReadWriteNumpyTXT::writePowerfield(const Powerfield< double > &data, std::ostream &output_stream) "; @@ -2474,7 +2474,7 @@ Convenience function to create an end-iterator matching to this iterator. // File: classSimulationResult.xml %feature("docstring") SimulationResult " -Wrapper around OutputData<double> that also provides unit conversions. +Wrapper around Powerfield<double> that also provides unit conversions. C++ includes: SimulationResult.h "; @@ -2482,10 +2482,10 @@ C++ includes: SimulationResult.h %feature("docstring") SimulationResult::SimulationResult "SimulationResult::SimulationResult()=default "; -%feature("docstring") SimulationResult::SimulationResult "SimulationResult::SimulationResult(const OutputData< double > &data, const ICoordSystem &coords) +%feature("docstring") SimulationResult::SimulationResult "SimulationResult::SimulationResult(const Powerfield< double > &data, const ICoordSystem &coords) "; -%feature("docstring") SimulationResult::SimulationResult "SimulationResult::SimulationResult(const OutputData< double > &data, const ICoordSystem *&&coords) +%feature("docstring") SimulationResult::SimulationResult "SimulationResult::SimulationResult(const Powerfield< double > &data, const ICoordSystem *&&coords) "; %feature("docstring") SimulationResult::~SimulationResult "SimulationResult::~SimulationResult() @@ -2497,7 +2497,7 @@ C++ includes: SimulationResult.h %feature("docstring") SimulationResult::SimulationResult "SimulationResult::SimulationResult(SimulationResult &&other) "; -%feature("docstring") SimulationResult::data "std::unique_ptr< OutputData< double > > SimulationResult::data(Axes::Coords units=Axes::Coords::UNDEFINED) const +%feature("docstring") SimulationResult::data "std::unique_ptr< Powerfield< double > > SimulationResult::data(Axes::Coords units=Axes::Coords::UNDEFINED) const "; %feature("docstring") SimulationResult::histogram2d "Histogram2D * SimulationResult::histogram2d(Axes::Coords units=Axes::Coords::UNDEFINED) const @@ -2783,20 +2783,20 @@ Returns default units to convert to. Returns shape nrows, ncols of 2D array. "; -%feature("docstring") DataUtils::Array::createData "std::unique_ptr< OutputData< double > > DataUtils::Array::createData(const std::vector< double > &vec) +%feature("docstring") DataUtils::Array::createData "std::unique_ptr< Powerfield< double > > DataUtils::Array::createData(const std::vector< double > &vec) "; -%feature("docstring") DataUtils::Array::createData "std::unique_ptr< OutputData< double > > DataUtils::Array::createData(const std::vector< std::vector< double >> &vec) +%feature("docstring") DataUtils::Array::createData "std::unique_ptr< Powerfield< double > > DataUtils::Array::createData(const std::vector< std::vector< double >> &vec) "; -%feature("docstring") DataUtils::Array::createVector1D "std::vector< double > DataUtils::Array::createVector1D(const OutputData< double > &data) +%feature("docstring") DataUtils::Array::createVector1D "std::vector< double > DataUtils::Array::createVector1D(const Powerfield< double > &data) -Creates 1D vector from OutputData. +Creates 1D vector from Powerfield. "; -%feature("docstring") DataUtils::Array::createVector2D "std::vector< std::vector< double > > DataUtils::Array::createVector2D(const OutputData< double > &data) +%feature("docstring") DataUtils::Array::createVector2D "std::vector< std::vector< double > > DataUtils::Array::createVector2D(const Powerfield< double > &data) -Creates 2D vector from OutputData. +Creates 2D vector from Powerfield. "; @@ -2804,7 +2804,7 @@ Creates 2D vector from OutputData. // File: namespaceDataUtils_1_1Data.xml -%feature("docstring") DataUtils::Data::relativeDataDifference "double DataUtils::Data::relativeDataDifference(const OutputData< double > &dat, const OutputData< double > &ref) +%feature("docstring") DataUtils::Data::relativeDataDifference "double DataUtils::Data::relativeDataDifference(const Powerfield< double > &dat, const Powerfield< double > &ref) Returns relative difference between two data sets sum(dat[i] - ref[i])/ref[i]). "; @@ -2819,52 +2819,52 @@ Transforms coordinate on axis into the bin-fraction-coordinate. Transforms bin-fraction-coordinate into axis coordinate. "; -%feature("docstring") DataUtils::Data::coordinateToBinf "void DataUtils::Data::coordinateToBinf(double &x, double &y, const OutputData< double > &data) +%feature("docstring") DataUtils::Data::coordinateToBinf "void DataUtils::Data::coordinateToBinf(double &x, double &y, const Powerfield< double > &data) -Transforms x,y coordinate from OutputData axes coordinates to bin-fraction-coordinates. +Transforms x,y coordinate from Powerfield axes coordinates to bin-fraction-coordinates. "; -%feature("docstring") DataUtils::Data::coordinateFromBinf "void DataUtils::Data::coordinateFromBinf(double &x, double &y, const OutputData< double > &data) +%feature("docstring") DataUtils::Data::coordinateFromBinf "void DataUtils::Data::coordinateFromBinf(double &x, double &y, const Powerfield< double > &data) -Transforms x,y coordinate from bin-fraction-coordinates to OutputData's axes coordinates. +Transforms x,y coordinate from bin-fraction-coordinates to Powerfield's axes coordinates. "; -%feature("docstring") DataUtils::Data::create2DArrayfromOutputData "std::vector< std::vector< double > > DataUtils::Data::create2DArrayfromOutputData(const OutputData< double > &data) +%feature("docstring") DataUtils::Data::create2DArrayfromPowerfield "std::vector< std::vector< double > > DataUtils::Data::create2DArrayfromPowerfield(const Powerfield< double > &data) -Creates a vector of vectors of double (2D Array) from OutputData. +Creates a vector of vectors of double (2D Array) from Powerfield. "; -%feature("docstring") DataUtils::Data::importArrayToOutputData "OutputData< double > * DataUtils::Data::importArrayToOutputData(const std::vector< double > &vec) +%feature("docstring") DataUtils::Data::importArrayToPowerfield "Powerfield< double > * DataUtils::Data::importArrayToPowerfield(const std::vector< double > &vec) Reads 1D array of doubles to Python, for use in persistence test. "; -%feature("docstring") DataUtils::Data::importArrayToOutputData "OutputData< double > * DataUtils::Data::importArrayToOutputData(const std::vector< std::vector< double >> &vec) +%feature("docstring") DataUtils::Data::importArrayToPowerfield "Powerfield< double > * DataUtils::Data::importArrayToPowerfield(const std::vector< std::vector< double >> &vec) Reads 2D array of doubles to Python, for use in persistence test. "; -%feature("docstring") DataUtils::Data::createRelativeDifferenceData "std::unique_ptr< OutputData< double > > DataUtils::Data::createRelativeDifferenceData(const OutputData< double > &data, const OutputData< double > &reference) +%feature("docstring") DataUtils::Data::createRelativeDifferenceData "std::unique_ptr< Powerfield< double > > DataUtils::Data::createRelativeDifferenceData(const Powerfield< double > &data, const Powerfield< double > &reference) "; -%feature("docstring") DataUtils::Data::createRearrangedDataSet "std::unique_ptr< OutputData< double > > DataUtils::Data::createRearrangedDataSet(const OutputData< double > &data, int n) +%feature("docstring") DataUtils::Data::createRearrangedDataSet "std::unique_ptr< Powerfield< double > > DataUtils::Data::createRearrangedDataSet(const Powerfield< double > &data, int n) Returns new object with input data rotated by n*90 deg counterclockwise (n > 0) or clockwise (n < 0) Axes are swapped if the data is effectively rotated by 90 or 270 degrees Applicable to 2D arrays only "; -%feature("docstring") DataUtils::Data::createClippedDataSet "std::unique_ptr< OutputData< double > > DataUtils::Data::createClippedDataSet(const OutputData< double > &origin, double x1, double y1, double x2, double y2) +%feature("docstring") DataUtils::Data::createClippedDataSet "std::unique_ptr< Powerfield< double > > DataUtils::Data::createClippedDataSet(const Powerfield< double > &origin, double x1, double y1, double x2, double y2) Returns new IntensityData objects which axes clipped to represent the specified rectangle. "; -%feature("docstring") DataUtils::Data::createOutputDatafrom2DArray "std::unique_ptr< OutputData< double > > DataUtils::Data::createOutputDatafrom2DArray(const std::vector< std::vector< double >> &array_2d) +%feature("docstring") DataUtils::Data::createPowerfieldfrom2DArray "std::unique_ptr< Powerfield< double > > DataUtils::Data::createPowerfieldfrom2DArray(const std::vector< std::vector< double >> &array_2d) -Creates OutputData from a 2D Array. +Creates Powerfield from a 2D Array. "; -%feature("docstring") DataUtils::Data::createFFT "std::unique_ptr< OutputData< double > > DataUtils::Data::createFFT(const OutputData< double > &data) +%feature("docstring") DataUtils::Data::createFFT "std::unique_ptr< Powerfield< double > > DataUtils::Data::createFFT(const Powerfield< double > &data) -Creates Fourier Transform ( OutputData format) of intensity map ( OutputData format). +Creates Fourier Transform ( Powerfield format) of intensity map ( Powerfield format). "; @@ -2906,7 +2906,7 @@ Returns true if file name corresponds to tiff file (can be also compressed) Creates axis of certain type from input stream. "; -%feature("docstring") DataUtils::Format::fillOutputData "void DataUtils::Format::fillOutputData(OutputData< double > *data, std::istream &input_stream) +%feature("docstring") DataUtils::Format::fillPowerfield "void DataUtils::Format::fillPowerfield(Powerfield< double > *data, std::istream &input_stream) Fills output data raw buffer from input stream. "; @@ -2936,7 +2936,7 @@ Returns sum of relative differences between each pair of elements: (a, b) -> 2*a %feature("docstring") DataUtils::Histo::getRelativeDifference "double DataUtils::Histo::getRelativeDifference(const IHistogram &dat, const IHistogram &ref) "; -%feature("docstring") DataUtils::Histo::checkRelativeDifference "bool DataUtils::Histo::checkRelativeDifference(const OutputData< double > &dat, const OutputData< double > &ref, double threshold) +%feature("docstring") DataUtils::Histo::checkRelativeDifference "bool DataUtils::Histo::checkRelativeDifference(const Powerfield< double > &dat, const Powerfield< double > &ref, double threshold) Returns true is relative difference is below threshold; prints informative output. "; @@ -2953,7 +2953,7 @@ Returns true if data in both files agree. // File: namespaceIO.xml -%feature("docstring") IO::readNicosData "OutputData< double > * IO::readNicosData(std::istream &input_stream) +%feature("docstring") IO::readNicosData "Powerfield< double > * IO::readNicosData(std::istream &input_stream) "; @@ -3031,14 +3031,14 @@ Returns true if data in both files agree. "; -// File: OutputData_8cpp.xml +// File: Powerfield_8cpp.xml -// File: OutputData_8h.xml +// File: Powerfield_8h.xml -// File: OutputDataIterator_8h.xml -%feature("docstring") swap "void swap(OutputDataIterator< TValue, TContainer > &left, OutputDataIterator< TValue, TContainer > &right) +// File: PowerfieldIterator_8h.xml +%feature("docstring") swap "void swap(PowerfieldIterator< TValue, TContainer > &left, PowerfieldIterator< TValue, TContainer > &right) make Swappable "; @@ -3110,10 +3110,10 @@ make Swappable // File: IHistogram_8h.xml -// File: IntensityDataIOFactory_8cpp.xml +// File: IOFactory_8cpp.xml -// File: IntensityDataIOFactory_8h.xml +// File: IOFactory_8h.xml // File: SimulationResult_8cpp.xml @@ -3131,34 +3131,34 @@ make Swappable // File: DataFormatUtils_8h.xml -// File: OutputDataReadReflectometry_8cpp.xml +// File: ReadReflectometry_8cpp.xml -// File: OutputDataReadReflectometry_8h.xml +// File: ReadReflectometry_8h.xml -// File: OutputDataReadWriteINT_8cpp.xml +// File: ReadWriteINT_8cpp.xml -// File: OutputDataReadWriteINT_8h.xml +// File: ReadWriteINT_8h.xml -// File: OutputDataReadWriteNicos_8cpp.xml +// File: ReadWriteNicos_8cpp.xml -// File: OutputDataReadWriteNicos_8h.xml +// File: ReadWriteNicos_8h.xml -// File: OutputDataReadWriteNumpyTXT_8cpp.xml +// File: ReadWriteNumpyTXT_8cpp.xml -// File: OutputDataReadWriteNumpyTXT_8h.xml +// File: ReadWriteNumpyTXT_8h.xml -// File: OutputDataReadWriteTiff_8cpp.xml +// File: ReadWriteTiff_8cpp.xml -// File: OutputDataReadWriteTiff_8h.xml +// File: ReadWriteTiff_8h.xml // File: Instrument_8cpp.xml diff --git a/auto/Wrap/doxygenSim.i b/auto/Wrap/doxygenSim.i index 1224e1974620bee101df002e4b811686cacce826..0f93d05191801fd5ce4e158cb65724e1eea092f3 100644 --- a/auto/Wrap/doxygenSim.i +++ b/auto/Wrap/doxygenSim.i @@ -380,7 +380,7 @@ C++ includes: FitObjective.h %feature("docstring") FitObjective::~FitObjective "FitObjective::~FitObjective() "; -%feature("docstring") FitObjective::execAddSimulationAndData "void FitObjective::execAddSimulationAndData(const simulation_builder_t &builder, const OutputData< double > &data, std::unique_ptr< OutputData< double >> &&stdv, double weight=1.0) +%feature("docstring") FitObjective::execAddSimulationAndData "void FitObjective::execAddSimulationAndData(const simulation_builder_t &builder, const Powerfield< double > &data, std::unique_ptr< Powerfield< double >> &&stdv, double weight=1.0) Constructs simulation/data pair for later fit. @@ -1324,10 +1324,6 @@ Returns the total number of the intensity values in the simulation result. "; -// File: classOutputData.xml -%feature("docstring") OutputData ""; - - // File: classParticleLayoutContribution.xml %feature("docstring") ParticleLayoutContribution " @@ -1436,6 +1432,10 @@ user-defined weighting factors. Used linearly, no matter which norm is chosen. "; +// File: classPowerfield.xml +%feature("docstring") Powerfield ""; + + // File: classPyBuilderCallback.xml %feature("docstring") PyBuilderCallback " @@ -1780,10 +1780,10 @@ Holds pair of simulation/experimental data to fit. C++ includes: SimDataPair.h "; -%feature("docstring") SimDataPair::SimDataPair "SimDataPair::SimDataPair(simulation_builder_t builder, const OutputData< double > &raw_data, std::unique_ptr< OutputData< double >> &&raw_stdv, double user_weight=1.0) +%feature("docstring") SimDataPair::SimDataPair "SimDataPair::SimDataPair(simulation_builder_t builder, const Powerfield< double > &raw_data, std::unique_ptr< Powerfield< double >> &&raw_stdv, double user_weight=1.0) "; -%feature("docstring") SimDataPair::SimDataPair "SimDataPair::SimDataPair(simulation_builder_t builder, const OutputData< double > &raw_data, std::unique_ptr< OutputData< double >> &&raw_stdv, std::unique_ptr< OutputData< double >> &&user_weights) +%feature("docstring") SimDataPair::SimDataPair "SimDataPair::SimDataPair(simulation_builder_t builder, const Powerfield< double > &raw_data, std::unique_ptr< Powerfield< double >> &&raw_stdv, std::unique_ptr< Powerfield< double >> &&user_weights) "; %feature("docstring") SimDataPair::SimDataPair "SimDataPair::SimDataPair(SimDataPair &&other) diff --git a/auto/Wrap/libBornAgainDevice.py b/auto/Wrap/libBornAgainDevice.py index 63c5d2373ccf4045d2960d983fabbe9e634aeff6..ae8ef6955c498f96280a83521d6f2cc231740730 100644 --- a/auto/Wrap/libBornAgainDevice.py +++ b/auto/Wrap/libBornAgainDevice.py @@ -2073,7 +2073,7 @@ class vector_R3(object): def swap(self, v): r""" swap(vector_R3 self, vector_R3 v) - void swap(OutputDataIterator< TValue, TContainer > &left, OutputDataIterator< TValue, TContainer > &right) + void swap(PowerfieldIterator< TValue, TContainer > &left, PowerfieldIterator< TValue, TContainer > &right) make Swappable @@ -2331,7 +2331,7 @@ class vector_C3(object): def swap(self, v): r""" swap(vector_C3 self, vector_C3 v) - void swap(OutputDataIterator< TValue, TContainer > &left, OutputDataIterator< TValue, TContainer > &right) + void swap(PowerfieldIterator< TValue, TContainer > &left, PowerfieldIterator< TValue, TContainer > &right) make Swappable @@ -2431,7 +2431,7 @@ class IntensityData(object): Templated class to store data in multi-dimensional space. Used with type T = double, CumulativeValue, bool - C++ includes: OutputData.h + C++ includes: Powerfield.h """ @@ -2442,7 +2442,7 @@ class IntensityData(object): r""" __init__(IntensityData self) -> IntensityData __init__(IntensityData self, IntensityData arg2) -> IntensityData - OutputData< T >::OutputData(OutputData &&) + Powerfield< T >::Powerfield(Powerfield &&) """ _libBornAgainDevice.IntensityData_swiginit(self, _libBornAgainDevice.new_IntensityData(*args)) @@ -2451,7 +2451,7 @@ class IntensityData(object): def clone(self): r""" clone(IntensityData self) -> IntensityData - OutputData< T > * OutputData< T >::clone() const + Powerfield< T > * Powerfield< T >::clone() const """ return _libBornAgainDevice.IntensityData_clone(self) @@ -2459,7 +2459,7 @@ class IntensityData(object): def copyFrom(self, other): r""" copyFrom(IntensityData self, IntensityData other) - void OutputData< T >::copyFrom(const OutputData< T > &other) + void Powerfield< T >::copyFrom(const Powerfield< T > &other) """ return _libBornAgainDevice.IntensityData_copyFrom(self, other) @@ -2467,7 +2467,7 @@ class IntensityData(object): def meanValues(self): r""" meanValues(IntensityData self) -> IntensityData - OutputData< double > * OutputData< T >::meanValues() const + Powerfield< double > * Powerfield< T >::meanValues() const """ return _libBornAgainDevice.IntensityData_meanValues(self) @@ -2476,7 +2476,7 @@ class IntensityData(object): r""" addAxis(IntensityData self, IAxis new_axis) addAxis(IntensityData self, std::string const & name, size_t size, double start, double end) - void OutputData< T >::addAxis(const std::string &name, size_t size, double start, double end) + void Powerfield< T >::addAxis(const std::string &name, size_t size, double start, double end) """ return _libBornAgainDevice.IntensityData_addAxis(self, *args) @@ -2484,7 +2484,7 @@ class IntensityData(object): def axis(self, serial_number): r""" axis(IntensityData self, size_t serial_number) -> IAxis - const IAxis & OutputData< T >::axis(size_t serial_number) const + const IAxis & Powerfield< T >::axis(size_t serial_number) const Returns axis with given serial number. @@ -2494,7 +2494,7 @@ class IntensityData(object): def rank(self): r""" rank(IntensityData self) -> size_t - size_t OutputData< T >::rank() const + size_t Powerfield< T >::rank() const Returns number of dimensions. @@ -2504,7 +2504,7 @@ class IntensityData(object): def getAllocatedSize(self): r""" getAllocatedSize(IntensityData self) -> size_t - size_t OutputData< T >::getAllocatedSize() const + size_t Powerfield< T >::getAllocatedSize() const Returns total size of data buffer (product of bin number in every dimension). @@ -2514,7 +2514,7 @@ class IntensityData(object): def getAllSizes(self): r""" getAllSizes(IntensityData self) -> std::vector< size_t,std::allocator< size_t > > - std::vector< size_t > OutputData< T >::getAllSizes() const + std::vector< size_t > Powerfield< T >::getAllSizes() const Returns all sizes of its axes. @@ -2524,7 +2524,7 @@ class IntensityData(object): def getRawDataVector(self): r""" getRawDataVector(IntensityData self) -> vdouble1d_t - std::vector< T > OutputData< T >::getRawDataVector() const + std::vector< T > Powerfield< T >::getRawDataVector() const Returns copy of raw data vector. @@ -2534,7 +2534,7 @@ class IntensityData(object): def totalSum(self): r""" totalSum(IntensityData self) -> double - T OutputData< T >::totalSum() const + T Powerfield< T >::totalSum() const Returns sum of all values in the data structure. @@ -2544,7 +2544,7 @@ class IntensityData(object): def max(self): r""" max(IntensityData self) -> double - T OutputData< T >::max() const + T Powerfield< T >::max() const Returns maximum value in the data structure. @@ -2553,9 +2553,9 @@ class IntensityData(object): def begin(self, *args): r""" - begin(IntensityData self) -> OutputData< double >::iterator - begin(IntensityData self) -> OutputData< double >::const_iterator - OutputData< T >::const_iterator OutputData< T >::begin() const + begin(IntensityData self) -> Powerfield< double >::iterator + begin(IntensityData self) -> Powerfield< double >::const_iterator + Powerfield< T >::const_iterator Powerfield< T >::begin() const Returns read-only iterator that points to the first element. @@ -2564,9 +2564,9 @@ class IntensityData(object): def end(self, *args): r""" - end(IntensityData self) -> OutputData< double >::iterator - end(IntensityData self) -> OutputData< double >::const_iterator - const_iterator OutputData< T >::end() const + end(IntensityData self) -> Powerfield< double >::iterator + end(IntensityData self) -> Powerfield< double >::const_iterator + const_iterator Powerfield< T >::end() const Returns read-only iterator that points to the one past last element. @@ -2576,7 +2576,7 @@ class IntensityData(object): def getAxesBinIndices(self, global_index): r""" getAxesBinIndices(IntensityData self, size_t global_index) -> vector_integer_t - std::vector< int > OutputData< T >::getAxesBinIndices(size_t global_index) const + std::vector< int > Powerfield< T >::getAxesBinIndices(size_t global_index) const Returns vector of axes indices for given global index @@ -2595,7 +2595,7 @@ class IntensityData(object): r""" getAxisBinIndex(IntensityData self, size_t global_index, size_t i_selected_axis) -> size_t getAxisBinIndex(IntensityData self, size_t global_index, std::string const & axis_name) -> size_t - size_t OutputData< T >::getAxisBinIndex(size_t global_index, const std::string &axis_name) const + size_t Powerfield< T >::getAxisBinIndex(size_t global_index, const std::string &axis_name) const Returns axis bin index for given global index @@ -2616,7 +2616,7 @@ class IntensityData(object): def toGlobalIndex(self, axes_indices): r""" toGlobalIndex(IntensityData self, std::vector< unsigned int,std::allocator< unsigned int > > const & axes_indices) -> size_t - size_t OutputData< T >::toGlobalIndex(const std::vector< unsigned > &axes_indices) const + size_t Powerfield< T >::toGlobalIndex(const std::vector< unsigned > &axes_indices) const Returns global index for specified indices of axes @@ -2634,7 +2634,7 @@ class IntensityData(object): def findGlobalIndex(self, coordinates): r""" findGlobalIndex(IntensityData self, vdouble1d_t coordinates) -> size_t - size_t OutputData< T >::findGlobalIndex(const std::vector< double > &coordinates) const + size_t Powerfield< T >::findGlobalIndex(const std::vector< double > &coordinates) const Returns global index for specified axes values @@ -2653,7 +2653,7 @@ class IntensityData(object): r""" getAxisValue(IntensityData self, size_t global_index, size_t i_selected_axis) -> double getAxisValue(IntensityData self, size_t global_index, std::string const & axis_name) -> double - double OutputData< T >::getAxisValue(size_t global_index, const std::string &axis_name) const + double Powerfield< T >::getAxisValue(size_t global_index, const std::string &axis_name) const Returns the value of selected axis for given global_index. @@ -2674,7 +2674,7 @@ class IntensityData(object): def getAxesValues(self, global_index): r""" getAxesValues(IntensityData self, size_t global_index) -> vdouble1d_t - std::vector< double > OutputData< T >::getAxesValues(size_t global_index) const + std::vector< double > Powerfield< T >::getAxesValues(size_t global_index) const Returns values on all defined axes for given globalbin number @@ -2693,7 +2693,7 @@ class IntensityData(object): r""" getAxisBin(IntensityData self, size_t global_index, size_t i_selected_axis) -> Bin1D getAxisBin(IntensityData self, size_t global_index, std::string const & axis_name) -> Bin1D - Bin1D OutputData< T >::getAxisBin(size_t global_index, const std::string &axis_name) const + Bin1D Powerfield< T >::getAxisBin(size_t global_index, const std::string &axis_name) const Returns bin of selected axis for given global_index. @@ -2714,7 +2714,7 @@ class IntensityData(object): def clear(self): r""" clear(IntensityData self) - void OutputData< T >::clear() + void Powerfield< T >::clear() Sets object into initial state (no dimensions, data) @@ -2724,7 +2724,7 @@ class IntensityData(object): def setAllTo(self, value): r""" setAllTo(IntensityData self, double const & value) - void OutputData< T >::setAllTo(const T &value) + void Powerfield< T >::setAllTo(const T &value) Sets content of output data to specific value. @@ -2734,7 +2734,7 @@ class IntensityData(object): def setAxisSizes(self, rank, n_dims): r""" setAxisSizes(IntensityData self, size_t rank, int * n_dims) - void OutputData< T >::setAxisSizes(size_t rank, int *n_dims) + void Powerfield< T >::setAxisSizes(size_t rank, int *n_dims) Adds 'rank' axes with indicated sizes. @@ -2744,7 +2744,7 @@ class IntensityData(object): def setRawDataVector(self, data_vector): r""" setRawDataVector(IntensityData self, vdouble1d_t data_vector) - void OutputData< T >::setRawDataVector(const std::vector< T > &data_vector) + void Powerfield< T >::setRawDataVector(const std::vector< T > &data_vector) Sets new values to raw data vector. @@ -2754,7 +2754,7 @@ class IntensityData(object): def setRawDataArray(self, source): r""" setRawDataArray(IntensityData self, double const * source) - void OutputData< T >::setRawDataArray(const T *source) + void Powerfield< T >::setRawDataArray(const T *source) Sets new values to raw data array. @@ -2782,7 +2782,7 @@ class IntensityData(object): def getValue(self, index): r""" getValue(IntensityData self, size_t index) -> double - double OutputData< double >::getValue(size_t index) const + double Powerfield< double >::getValue(size_t index) const """ return _libBornAgainDevice.IntensityData_getValue(self, index) @@ -2790,7 +2790,7 @@ class IntensityData(object): def getArray(self): r""" getArray(IntensityData self) -> PyObject * - PyObject * OutputData< double >::getArray() const + PyObject * Powerfield< double >::getArray() const Returns data as Python numpy array. @@ -2800,7 +2800,7 @@ class IntensityData(object): def isInitialized(self): r""" isInitialized(IntensityData self) -> bool - bool OutputData< T >::isInitialized() const + bool Powerfield< T >::isInitialized() const Returns true if object is correctly initialized. @@ -2810,7 +2810,7 @@ class IntensityData(object): def allocate(self): r""" allocate(IntensityData self) - void OutputData< T >::allocate() + void Powerfield< T >::allocate() Allocates memory for current dimensions configuration. @@ -2820,7 +2820,7 @@ class IntensityData(object): def normalizedToMaximum(self): r""" normalizedToMaximum(IntensityData self) -> IntensityData - const OutputData< double > & OutputData< double >::normalizedToMaximum() + const Powerfield< double > & Powerfield< double >::normalizedToMaximum() """ return _libBornAgainDevice.IntensityData_normalizedToMaximum(self) @@ -2840,7 +2840,7 @@ _libBornAgainDevice.IntensityData_swigregister(IntensityData) def relativeDataDifference(dat, ref): r""" relativeDataDifference(IntensityData dat, IntensityData ref) -> double - double DataUtils::Data::relativeDataDifference(const OutputData< double > &dat, const OutputData< double > &ref) + double DataUtils::Data::relativeDataDifference(const Powerfield< double > &dat, const Powerfield< double > &ref) Returns relative difference between two data sets sum(dat[i] - ref[i])/ref[i]). @@ -2851,9 +2851,9 @@ def coordinateToBinf(*args): r""" coordinateToBinf(double coordinate, IAxis axis) -> double coordinateToBinf(double & x, double & y, IntensityData data) - void DataUtils::Data::coordinateToBinf(double &x, double &y, const OutputData< double > &data) + void DataUtils::Data::coordinateToBinf(double &x, double &y, const Powerfield< double > &data) - Transforms x,y coordinate from OutputData axes coordinates to bin-fraction-coordinates. + Transforms x,y coordinate from Powerfield axes coordinates to bin-fraction-coordinates. """ return _libBornAgainDevice.coordinateToBinf(*args) @@ -2862,33 +2862,33 @@ def coordinateFromBinf(*args): r""" coordinateFromBinf(double value, IAxis axis) -> double coordinateFromBinf(double & x, double & y, IntensityData data) - void DataUtils::Data::coordinateFromBinf(double &x, double &y, const OutputData< double > &data) + void DataUtils::Data::coordinateFromBinf(double &x, double &y, const Powerfield< double > &data) - Transforms x,y coordinate from bin-fraction-coordinates to OutputData's axes coordinates. + Transforms x,y coordinate from bin-fraction-coordinates to Powerfield's axes coordinates. """ return _libBornAgainDevice.coordinateFromBinf(*args) -def create2DArrayfromOutputData(data): +def create2DArrayfromPowerfield(data): r""" - create2DArrayfromOutputData(IntensityData data) -> vdouble2d_t - std::vector< std::vector< double > > DataUtils::Data::create2DArrayfromOutputData(const OutputData< double > &data) + create2DArrayfromPowerfield(IntensityData data) -> vdouble2d_t + std::vector< std::vector< double > > DataUtils::Data::create2DArrayfromPowerfield(const Powerfield< double > &data) - Creates a vector of vectors of double (2D Array) from OutputData. + Creates a vector of vectors of double (2D Array) from Powerfield. """ - return _libBornAgainDevice.create2DArrayfromOutputData(data) + return _libBornAgainDevice.create2DArrayfromPowerfield(data) -def importArrayToOutputData(*args): +def importArrayToPowerfield(*args): r""" - importArrayToOutputData(vdouble1d_t vec) -> IntensityData - importArrayToOutputData(vdouble2d_t vec) -> IntensityData - OutputData< double > * DataUtils::Data::importArrayToOutputData(const std::vector< std::vector< double >> &vec) + importArrayToPowerfield(vdouble1d_t vec) -> IntensityData + importArrayToPowerfield(vdouble2d_t vec) -> IntensityData + Powerfield< double > * DataUtils::Data::importArrayToPowerfield(const std::vector< std::vector< double >> &vec) Reads 2D array of doubles to Python, for use in persistence test. """ - return _libBornAgainDevice.importArrayToOutputData(*args) + return _libBornAgainDevice.importArrayToPowerfield(*args) class Beam(libBornAgainParam.INode): r""" @@ -3789,7 +3789,7 @@ class IDetectorResolution(libBornAgainBase.ICloneable, libBornAgainParam.INode): def applyDetectorResolution(self, p_intensity_map): r""" applyDetectorResolution(IDetectorResolution self, IntensityData p_intensity_map) - virtual void IDetectorResolution::applyDetectorResolution(OutputData< double > *p_intensity_map) const =0 + virtual void IDetectorResolution::applyDetectorResolution(Powerfield< double > *p_intensity_map) const =0 Apply the resolution function to the intensity data. @@ -4015,8 +4015,8 @@ class DetectorMask(object): def getMaskData(self): r""" - getMaskData(DetectorMask self) -> OutputData< bool > const * - const OutputData<bool>* DetectorMask::getMaskData() const + getMaskData(DetectorMask self) -> Powerfield< bool > const * + const Powerfield<bool>* DetectorMask::getMaskData() const """ return _libBornAgainDevice.DetectorMask_getMaskData(self) @@ -4279,7 +4279,7 @@ class IDetector(libBornAgainBase.ICloneable, libBornAgainParam.INode): def applyDetectorResolution(self, p_intensity_map): r""" applyDetectorResolution(IDetector self, IntensityData p_intensity_map) - void IDetector::applyDetectorResolution(OutputData< double > *p_intensity_map) const + void IDetector::applyDetectorResolution(Powerfield< double > *p_intensity_map) const Applies the detector resolution to the given intensity maps. @@ -4299,7 +4299,7 @@ class IDetector(libBornAgainBase.ICloneable, libBornAgainParam.INode): def createDetectorIntensity(self, elements): r""" createDetectorIntensity(IDetector self, std::vector< std::unique_ptr< DiffuseElement >,std::allocator< std::unique_ptr< DiffuseElement > > > const & elements) -> IntensityData - OutputData< double > * IDetector::createDetectorIntensity(const std::vector< std::unique_ptr< DiffuseElement >> &elements) const + Powerfield< double > * IDetector::createDetectorIntensity(const std::vector< std::unique_ptr< DiffuseElement >> &elements) const Returns new intensity map with resolution applied, and cropped to ROI if applicable. @@ -4456,7 +4456,7 @@ class IDetector2D(IDetector): createPixel(IDetector2D self, size_t index) -> IPixel * virtual IPixel* IDetector2D::createPixel(size_t index) const =0 - Creates an IPixel for the given OutputData object and index. + Creates an IPixel for the given Powerfield object and index. """ return _libBornAgainDevice.IDetector2D_createPixel(self, index) @@ -4910,7 +4910,7 @@ def getRelativeDifference(dat, ref): def checkRelativeDifference(dat, ref, threshold): r""" checkRelativeDifference(IntensityData dat, IntensityData ref, double threshold) -> bool - bool DataUtils::Histo::checkRelativeDifference(const OutputData< double > &dat, const OutputData< double > &ref, double threshold) + bool DataUtils::Histo::checkRelativeDifference(const Powerfield< double > &dat, const Powerfield< double > &ref, double threshold) Returns true is relative difference is below threshold; prints informative output. @@ -5131,9 +5131,9 @@ class IHistogram(object): def getData(self, *args): r""" - getData(IHistogram self) -> OutputData< CumulativeValue > const - getData(IHistogram self) -> OutputData< CumulativeValue > & - OutputData< CumulativeValue > & IHistogram::getData() + getData(IHistogram self) -> Powerfield< CumulativeValue > const + getData(IHistogram self) -> Powerfield< CumulativeValue > & + Powerfield< CumulativeValue > & IHistogram::getData() """ return _libBornAgainDevice.IHistogram_getData(self, *args) @@ -5295,17 +5295,17 @@ class IHistogram(object): """ return _libBornAgainDevice.IHistogram_createFrom(*args) - def createOutputData(self, *args): + def createPowerfield(self, *args): r""" - createOutputData(IHistogram self, IHistogram::DataType dataType=DataType::INTEGRAL) -> IntensityData - OutputData< double > * IHistogram::createOutputData(DataType dataType=DataType::INTEGRAL) const + createPowerfield(IHistogram self, IHistogram::DataType dataType=DataType::INTEGRAL) -> IntensityData + Powerfield< double > * IHistogram::createPowerfield(DataType dataType=DataType::INTEGRAL) const - Creates new OutputData with histogram's shape and values corresponding to DataType. + Creates new Powerfield with histogram's shape and values corresponding to DataType. - creates new OutputData with histogram's shape and put there values corresponding to DataType + creates new Powerfield with histogram's shape and put there values corresponding to DataType """ - return _libBornAgainDevice.IHistogram_createOutputData(self, *args) + return _libBornAgainDevice.IHistogram_createPowerfield(self, *args) def hasSameShape(self, other): r""" @@ -5394,9 +5394,9 @@ class Histogram1D(IHistogram): __init__(Histogram1D self, int nbinsx, vdouble1d_t xbins) -> Histogram1D __init__(Histogram1D self, IAxis axis) -> Histogram1D __init__(Histogram1D self, IntensityData data) -> Histogram1D - Histogram1D::Histogram1D(const OutputData< double > &data) + Histogram1D::Histogram1D(const Powerfield< double > &data) - Constructor for 1D histograms from basic OutputData object. + Constructor for 1D histograms from basic Powerfield object. """ _libBornAgainDevice.Histogram1D_swiginit(self, _libBornAgainDevice.new_Histogram1D(*args)) @@ -5632,7 +5632,7 @@ class Histogram2D(IHistogram): # Register Histogram2D in _libBornAgainDevice: _libBornAgainDevice.Histogram2D_swigregister(Histogram2D) -class IntensityDataIOFactory(object): +class IOFactory(object): r""" @@ -5640,92 +5640,92 @@ class IntensityDataIOFactory(object): Usage: - C++ includes: IntensityDataIOFactory.h + C++ includes: IOFactory.h """ thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr - automatic = _libBornAgainDevice.IntensityDataIOFactory_automatic + automatic = _libBornAgainDevice.IOFactory_automatic - bornagain = _libBornAgainDevice.IntensityDataIOFactory_bornagain + bornagain = _libBornAgainDevice.IOFactory_bornagain - tiff = _libBornAgainDevice.IntensityDataIOFactory_tiff + tiff = _libBornAgainDevice.IOFactory_tiff - nicos = _libBornAgainDevice.IntensityDataIOFactory_nicos + nicos = _libBornAgainDevice.IOFactory_nicos @staticmethod - def readOutputData(*args): - r"""readOutputData(std::string const & file_name, IntensityDataIOFactory::LoaderSelector selector=automatic) -> IntensityData""" - return _libBornAgainDevice.IntensityDataIOFactory_readOutputData(*args) + def readPowerfield(*args): + r"""readPowerfield(std::string const & file_name, IOFactory::LoaderSelector selector=automatic) -> IntensityData""" + return _libBornAgainDevice.IOFactory_readPowerfield(*args) @staticmethod def readReflectometryData(file_name): r"""readReflectometryData(std::string const & file_name) -> IntensityData""" - return _libBornAgainDevice.IntensityDataIOFactory_readReflectometryData(file_name) + return _libBornAgainDevice.IOFactory_readReflectometryData(file_name) @staticmethod def readIntensityData(file_name): r"""readIntensityData(std::string const & file_name) -> IHistogram""" - return _libBornAgainDevice.IntensityDataIOFactory_readIntensityData(file_name) + return _libBornAgainDevice.IOFactory_readIntensityData(file_name) @staticmethod - def writeOutputData(data, file_name): - r"""writeOutputData(IntensityData data, std::string const & file_name)""" - return _libBornAgainDevice.IntensityDataIOFactory_writeOutputData(data, file_name) + def writePowerfield(data, file_name): + r"""writePowerfield(IntensityData data, std::string const & file_name)""" + return _libBornAgainDevice.IOFactory_writePowerfield(data, file_name) @staticmethod def writeIntensityData(histogram, file_name): r"""writeIntensityData(IHistogram histogram, std::string const & file_name)""" - return _libBornAgainDevice.IntensityDataIOFactory_writeIntensityData(histogram, file_name) + return _libBornAgainDevice.IOFactory_writeIntensityData(histogram, file_name) @staticmethod def writeSimulationResult(result, file_name): r"""writeSimulationResult(SimulationResult result, std::string const & file_name)""" - return _libBornAgainDevice.IntensityDataIOFactory_writeSimulationResult(result, file_name) + return _libBornAgainDevice.IOFactory_writeSimulationResult(result, file_name) def __init__(self): r""" - __init__(IntensityDataIOFactory self) -> IntensityDataIOFactory + __init__(IOFactory self) -> IOFactory Provides users with possibility to read and write IntensityData from/to files in different format. Type of the file will be deduced from file name. *.txt - ASCII file with 2D array [nrow][ncol], layout as in numpy. *.int - BornAgain internal ASCII format. *.tif - 32-bits tiff file. If file name ends with "*.gz" or "*.bz2" the file will be zipped on the fly using appropriate algorithm. Usage: - C++ includes: IntensityDataIOFactory.h + C++ includes: IOFactory.h """ - _libBornAgainDevice.IntensityDataIOFactory_swiginit(self, _libBornAgainDevice.new_IntensityDataIOFactory()) - __swig_destroy__ = _libBornAgainDevice.delete_IntensityDataIOFactory + _libBornAgainDevice.IOFactory_swiginit(self, _libBornAgainDevice.new_IOFactory()) + __swig_destroy__ = _libBornAgainDevice.delete_IOFactory -# Register IntensityDataIOFactory in _libBornAgainDevice: -_libBornAgainDevice.IntensityDataIOFactory_swigregister(IntensityDataIOFactory) +# Register IOFactory in _libBornAgainDevice: +_libBornAgainDevice.IOFactory_swigregister(IOFactory) -def IntensityDataIOFactory_readOutputData(*args): - r"""IntensityDataIOFactory_readOutputData(std::string const & file_name, IntensityDataIOFactory::LoaderSelector selector=automatic) -> IntensityData""" - return _libBornAgainDevice.IntensityDataIOFactory_readOutputData(*args) +def IOFactory_readPowerfield(*args): + r"""IOFactory_readPowerfield(std::string const & file_name, IOFactory::LoaderSelector selector=automatic) -> IntensityData""" + return _libBornAgainDevice.IOFactory_readPowerfield(*args) -def IntensityDataIOFactory_readReflectometryData(file_name): - r"""IntensityDataIOFactory_readReflectometryData(std::string const & file_name) -> IntensityData""" - return _libBornAgainDevice.IntensityDataIOFactory_readReflectometryData(file_name) +def IOFactory_readReflectometryData(file_name): + r"""IOFactory_readReflectometryData(std::string const & file_name) -> IntensityData""" + return _libBornAgainDevice.IOFactory_readReflectometryData(file_name) -def IntensityDataIOFactory_readIntensityData(file_name): - r"""IntensityDataIOFactory_readIntensityData(std::string const & file_name) -> IHistogram""" - return _libBornAgainDevice.IntensityDataIOFactory_readIntensityData(file_name) +def IOFactory_readIntensityData(file_name): + r"""IOFactory_readIntensityData(std::string const & file_name) -> IHistogram""" + return _libBornAgainDevice.IOFactory_readIntensityData(file_name) -def IntensityDataIOFactory_writeOutputData(data, file_name): - r"""IntensityDataIOFactory_writeOutputData(IntensityData data, std::string const & file_name)""" - return _libBornAgainDevice.IntensityDataIOFactory_writeOutputData(data, file_name) +def IOFactory_writePowerfield(data, file_name): + r"""IOFactory_writePowerfield(IntensityData data, std::string const & file_name)""" + return _libBornAgainDevice.IOFactory_writePowerfield(data, file_name) -def IntensityDataIOFactory_writeIntensityData(histogram, file_name): - r"""IntensityDataIOFactory_writeIntensityData(IHistogram histogram, std::string const & file_name)""" - return _libBornAgainDevice.IntensityDataIOFactory_writeIntensityData(histogram, file_name) +def IOFactory_writeIntensityData(histogram, file_name): + r"""IOFactory_writeIntensityData(IHistogram histogram, std::string const & file_name)""" + return _libBornAgainDevice.IOFactory_writeIntensityData(histogram, file_name) -def IntensityDataIOFactory_writeSimulationResult(result, file_name): - r"""IntensityDataIOFactory_writeSimulationResult(SimulationResult result, std::string const & file_name)""" - return _libBornAgainDevice.IntensityDataIOFactory_writeSimulationResult(result, file_name) +def IOFactory_writeSimulationResult(result, file_name): + r"""IOFactory_writeSimulationResult(SimulationResult result, std::string const & file_name)""" + return _libBornAgainDevice.IOFactory_writeSimulationResult(result, file_name) class AxisInfo(object): r""" @@ -5763,7 +5763,7 @@ class SimulationResult(object): r""" - Wrapper around OutputData<double> that also provides unit conversions. + Wrapper around Powerfield<double> that also provides unit conversions. C++ includes: SimulationResult.h diff --git a/auto/Wrap/libBornAgainDevice_wrap.cpp b/auto/Wrap/libBornAgainDevice_wrap.cpp index 1d25bede8d57aca23b8f67576e01d455a0314d10..cc414c8ed62c1fb9cf252146357024e2aafc7e66 100644 --- a/auto/Wrap/libBornAgainDevice_wrap.cpp +++ b/auto/Wrap/libBornAgainDevice_wrap.cpp @@ -3119,21 +3119,21 @@ namespace Swig { #define SWIGTYPE_p_IFootprintFactor swig_types[19] #define SWIGTYPE_p_IHistogram swig_types[20] #define SWIGTYPE_p_INode swig_types[21] -#define SWIGTYPE_p_IPixel swig_types[22] -#define SWIGTYPE_p_IResolutionFunction2D swig_types[23] -#define SWIGTYPE_p_IShape2D swig_types[24] -#define SWIGTYPE_p_Instrument swig_types[25] -#define SWIGTYPE_p_IntensityDataIOFactory swig_types[26] +#define SWIGTYPE_p_IOFactory swig_types[22] +#define SWIGTYPE_p_IPixel swig_types[23] +#define SWIGTYPE_p_IResolutionFunction2D swig_types[24] +#define SWIGTYPE_p_IShape2D swig_types[25] +#define SWIGTYPE_p_Instrument swig_types[26] #define SWIGTYPE_p_Line swig_types[27] -#define SWIGTYPE_p_OutputDataIteratorT_double_OutputDataT_double_t_t swig_types[28] -#define SWIGTYPE_p_OutputDataIteratorT_double_const_OutputDataT_double_t_const_t swig_types[29] -#define SWIGTYPE_p_OutputDataT_CumulativeValue_t swig_types[30] -#define SWIGTYPE_p_OutputDataT_bool_t swig_types[31] -#define SWIGTYPE_p_OutputDataT_double_t swig_types[32] -#define SWIGTYPE_p_OwningVectorT_IAxis_t swig_types[33] -#define SWIGTYPE_p_PolMatrices swig_types[34] -#define SWIGTYPE_p_Polygon swig_types[35] -#define SWIGTYPE_p_PolygonPrivate swig_types[36] +#define SWIGTYPE_p_OwningVectorT_IAxis_t swig_types[28] +#define SWIGTYPE_p_PolMatrices swig_types[29] +#define SWIGTYPE_p_Polygon swig_types[30] +#define SWIGTYPE_p_PolygonPrivate swig_types[31] +#define SWIGTYPE_p_PowerfieldIteratorT_double_PowerfieldT_double_t_t swig_types[32] +#define SWIGTYPE_p_PowerfieldIteratorT_double_const_PowerfieldT_double_t_const_t swig_types[33] +#define SWIGTYPE_p_PowerfieldT_CumulativeValue_t swig_types[34] +#define SWIGTYPE_p_PowerfieldT_bool_t swig_types[35] +#define SWIGTYPE_p_PowerfieldT_double_t swig_types[36] #define SWIGTYPE_p_RealLimits swig_types[37] #define SWIGTYPE_p_Rectangle swig_types[38] #define SWIGTYPE_p_RectangularDetector swig_types[39] @@ -6969,7 +6969,7 @@ SWIGINTERN void std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg__insert__SWIG_ #include "Device/Histo/HistoUtils.h" #include "Device/Histo/Histogram1D.h" #include "Device/Histo/Histogram2D.h" -#include "Device/Histo/IntensityDataIOFactory.h" +#include "Device/Histo/IOFactory.h" #include "Device/Histo/SimulationResult.h" #include "Device/Instrument/Instrument.h" #include "Device/Mask/Ellipse.h" @@ -7214,8 +7214,8 @@ SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val) return res; } -SWIGINTERN double OutputData_Sl_double_Sg____getitem__(OutputData< double > *self,unsigned int i){ return (*(self))[i]; } -SWIGINTERN double OutputData_Sl_double_Sg____setitem__(OutputData< double > *self,unsigned int i,double value){ +SWIGINTERN double Powerfield_Sl_double_Sg____getitem__(Powerfield< double > *self,unsigned int i){ return (*(self))[i]; } +SWIGINTERN double Powerfield_Sl_double_Sg____setitem__(Powerfield< double > *self,unsigned int i,double value){ (*(self))[i] = value; return (*(self))[i]; } @@ -31298,11 +31298,11 @@ SWIGINTERN PyObject *vector_C3_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject SWIGINTERN PyObject *_wrap_new_IntensityData__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { PyObject *resultobj = 0; - OutputData< double > *result = 0 ; + Powerfield< double > *result = 0 ; if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (OutputData< double > *)new OutputData< double >(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OutputDataT_double_t, SWIG_POINTER_NEW | 0 ); + result = (Powerfield< double > *)new Powerfield< double >(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PowerfieldT_double_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -31311,22 +31311,22 @@ fail: SWIGINTERN PyObject *_wrap_new_IntensityData__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; - OutputData< double > *arg1 = 0 ; + Powerfield< double > *arg1 = 0 ; void *argp1 = 0 ; int res1 = 0 ; - OutputData< double > *result = 0 ; + Powerfield< double > *result = 0 ; if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_OutputDataT_double_t, 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_PowerfieldT_double_t, 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IntensityData" "', argument " "1"" of type '" "OutputData< double > &&""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IntensityData" "', argument " "1"" of type '" "Powerfield< double > &&""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IntensityData" "', argument " "1"" of type '" "OutputData< double > &&""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IntensityData" "', argument " "1"" of type '" "Powerfield< double > &&""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); - result = (OutputData< double > *)new OutputData< double >((OutputData< double > &&)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OutputDataT_double_t, SWIG_POINTER_NEW | 0 ); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); + result = (Powerfield< double > *)new Powerfield< double >((Powerfield< double > &&)*arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PowerfieldT_double_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -31347,7 +31347,7 @@ SWIGINTERN PyObject *_wrap_new_IntensityData(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OutputDataT_double_t, SWIG_POINTER_NO_NULL); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_PowerfieldT_double_t, SWIG_POINTER_NO_NULL); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IntensityData__SWIG_1(self, argc, argv); @@ -31357,26 +31357,26 @@ SWIGINTERN PyObject *_wrap_new_IntensityData(PyObject *self, PyObject *args) { fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_IntensityData'.\n" " Possible C/C++ prototypes are:\n" - " OutputData< double >::OutputData()\n" - " OutputData< double >::OutputData(OutputData< double > &&)\n"); + " Powerfield< double >::Powerfield()\n" + " Powerfield< double >::Powerfield(Powerfield< double > &&)\n"); return 0; } SWIGINTERN PyObject *_wrap_delete_IntensityData(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 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_OutputDataT_double_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IntensityData" "', argument " "1"" of type '" "OutputData< double > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IntensityData" "', argument " "1"" of type '" "Powerfield< double > *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; @@ -31387,21 +31387,21 @@ fail: SWIGINTERN PyObject *_wrap_IntensityData_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; - OutputData< double > *result = 0 ; + Powerfield< double > *result = 0 ; if (!args) SWIG_fail; swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_clone" "', argument " "1"" of type '" "OutputData< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_clone" "', argument " "1"" of type '" "Powerfield< double > const *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); - result = (OutputData< double > *)((OutputData< double > const *)arg1)->clone(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); + result = (Powerfield< double > *)((Powerfield< double > const *)arg1)->clone(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -31410,8 +31410,8 @@ fail: SWIGINTERN PyObject *_wrap_IntensityData_copyFrom(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; - OutputData< double > *arg2 = 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 0 ; + Powerfield< double > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -31419,20 +31419,20 @@ SWIGINTERN PyObject *_wrap_IntensityData_copyFrom(PyObject *SWIGUNUSEDPARM(self) PyObject *swig_obj[2] ; if (!SWIG_Python_UnpackTuple(args, "IntensityData_copyFrom", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_copyFrom" "', argument " "1"" of type '" "OutputData< double > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_copyFrom" "', argument " "1"" of type '" "Powerfield< double > *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_OutputDataT_double_t, 0 | 0); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_PowerfieldT_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IntensityData_copyFrom" "', argument " "2"" of type '" "OutputData< double > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IntensityData_copyFrom" "', argument " "2"" of type '" "Powerfield< double > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntensityData_copyFrom" "', argument " "2"" of type '" "OutputData< double > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntensityData_copyFrom" "', argument " "2"" of type '" "Powerfield< double > const &""'"); } - arg2 = reinterpret_cast< OutputData< double > * >(argp2); - (arg1)->copyFrom((OutputData< double > const &)*arg2); + arg2 = reinterpret_cast< Powerfield< double > * >(argp2); + (arg1)->copyFrom((Powerfield< double > const &)*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -31442,21 +31442,21 @@ fail: SWIGINTERN PyObject *_wrap_IntensityData_meanValues(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; - OutputData< double > *result = 0 ; + Powerfield< double > *result = 0 ; if (!args) SWIG_fail; swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_meanValues" "', argument " "1"" of type '" "OutputData< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_meanValues" "', argument " "1"" of type '" "Powerfield< double > const *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); - result = (OutputData< double > *)((OutputData< double > const *)arg1)->meanValues(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); + result = (Powerfield< double > *)((Powerfield< double > const *)arg1)->meanValues(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -31465,7 +31465,7 @@ fail: SWIGINTERN PyObject *_wrap_IntensityData_addAxis__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 0 ; IAxis *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -31473,11 +31473,11 @@ SWIGINTERN PyObject *_wrap_IntensityData_addAxis__SWIG_0(PyObject *SWIGUNUSEDPAR int res2 = 0 ; if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_addAxis" "', argument " "1"" of type '" "OutputData< double > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_addAxis" "', argument " "1"" of type '" "Powerfield< double > *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_IAxis, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IntensityData_addAxis" "', argument " "2"" of type '" "IAxis const &""'"); @@ -31496,7 +31496,7 @@ fail: SWIGINTERN PyObject *_wrap_IntensityData_addAxis__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 0 ; std::string *arg2 = 0 ; size_t arg3 ; double arg4 ; @@ -31512,11 +31512,11 @@ SWIGINTERN PyObject *_wrap_IntensityData_addAxis__SWIG_1(PyObject *SWIGUNUSEDPAR int ecode5 = 0 ; if ((nobjs < 5) || (nobjs > 5)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_addAxis" "', argument " "1"" of type '" "OutputData< double > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_addAxis" "', argument " "1"" of type '" "Powerfield< double > *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); { std::string *ptr = (std::string *)0; res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); @@ -31564,7 +31564,7 @@ SWIGINTERN PyObject *_wrap_IntensityData_addAxis(PyObject *self, PyObject *args) if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OutputDataT_double_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_PowerfieldT_double_t, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_IAxis, SWIG_POINTER_NO_NULL | 0); @@ -31577,7 +31577,7 @@ SWIGINTERN PyObject *_wrap_IntensityData_addAxis(PyObject *self, PyObject *args) if (argc == 5) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OutputDataT_double_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_PowerfieldT_double_t, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); @@ -31609,15 +31609,15 @@ SWIGINTERN PyObject *_wrap_IntensityData_addAxis(PyObject *self, PyObject *args) fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'IntensityData_addAxis'.\n" " Possible C/C++ prototypes are:\n" - " OutputData< double >::addAxis(IAxis const &)\n" - " OutputData< double >::addAxis(std::string const &,size_t,double,double)\n"); + " Powerfield< double >::addAxis(IAxis const &)\n" + " Powerfield< double >::addAxis(std::string const &,size_t,double,double)\n"); return 0; } SWIGINTERN PyObject *_wrap_IntensityData_axis(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 0 ; size_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; @@ -31627,17 +31627,17 @@ SWIGINTERN PyObject *_wrap_IntensityData_axis(PyObject *SWIGUNUSEDPARM(self), Py IAxis *result = 0 ; if (!SWIG_Python_UnpackTuple(args, "IntensityData_axis", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_axis" "', argument " "1"" of type '" "OutputData< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_axis" "', argument " "1"" of type '" "Powerfield< double > const *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntensityData_axis" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); - result = (IAxis *) &((OutputData< double > const *)arg1)->axis(arg2); + result = (IAxis *) &((Powerfield< double > const *)arg1)->axis(arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IAxis, 0 | 0 ); return resultobj; fail: @@ -31647,7 +31647,7 @@ fail: SWIGINTERN PyObject *_wrap_IntensityData_rank(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; @@ -31655,12 +31655,12 @@ SWIGINTERN PyObject *_wrap_IntensityData_rank(PyObject *SWIGUNUSEDPARM(self), Py if (!args) SWIG_fail; swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_rank" "', argument " "1"" of type '" "OutputData< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_rank" "', argument " "1"" of type '" "Powerfield< double > const *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); - result = ((OutputData< double > const *)arg1)->rank(); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); + result = ((Powerfield< double > const *)arg1)->rank(); resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -31670,7 +31670,7 @@ fail: SWIGINTERN PyObject *_wrap_IntensityData_getAllocatedSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; @@ -31678,12 +31678,12 @@ SWIGINTERN PyObject *_wrap_IntensityData_getAllocatedSize(PyObject *SWIGUNUSEDPA if (!args) SWIG_fail; swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_getAllocatedSize" "', argument " "1"" of type '" "OutputData< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_getAllocatedSize" "', argument " "1"" of type '" "Powerfield< double > const *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); - result = ((OutputData< double > const *)arg1)->getAllocatedSize(); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); + result = ((Powerfield< double > const *)arg1)->getAllocatedSize(); resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -31693,7 +31693,7 @@ fail: SWIGINTERN PyObject *_wrap_IntensityData_getAllSizes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; @@ -31701,12 +31701,12 @@ SWIGINTERN PyObject *_wrap_IntensityData_getAllSizes(PyObject *SWIGUNUSEDPARM(se if (!args) SWIG_fail; swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_getAllSizes" "', argument " "1"" of type '" "OutputData< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_getAllSizes" "', argument " "1"" of type '" "Powerfield< double > const *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); - result = ((OutputData< double > const *)arg1)->getAllSizes(); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); + result = ((Powerfield< double > const *)arg1)->getAllSizes(); resultobj = SWIG_NewPointerObj((new std::vector< size_t,std::allocator< size_t > >(static_cast< const std::vector< size_t,std::allocator< size_t > >& >(result))), SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -31716,7 +31716,7 @@ fail: SWIGINTERN PyObject *_wrap_IntensityData_getRawDataVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; @@ -31724,12 +31724,12 @@ SWIGINTERN PyObject *_wrap_IntensityData_getRawDataVector(PyObject *SWIGUNUSEDPA if (!args) SWIG_fail; swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_getRawDataVector" "', argument " "1"" of type '" "OutputData< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_getRawDataVector" "', argument " "1"" of type '" "Powerfield< double > const *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); - result = ((OutputData< double > const *)arg1)->getRawDataVector(); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); + result = ((Powerfield< double > const *)arg1)->getRawDataVector(); resultobj = swig::from(static_cast< std::vector< double,std::allocator< double > > >(result)); return resultobj; fail: @@ -31739,7 +31739,7 @@ fail: SWIGINTERN PyObject *_wrap_IntensityData_totalSum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; @@ -31747,12 +31747,12 @@ SWIGINTERN PyObject *_wrap_IntensityData_totalSum(PyObject *SWIGUNUSEDPARM(self) if (!args) SWIG_fail; swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_totalSum" "', argument " "1"" of type '" "OutputData< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_totalSum" "', argument " "1"" of type '" "Powerfield< double > const *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); - result = (double)((OutputData< double > const *)arg1)->totalSum(); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); + result = (double)((Powerfield< double > const *)arg1)->totalSum(); resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -31762,7 +31762,7 @@ fail: SWIGINTERN PyObject *_wrap_IntensityData_max(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; @@ -31770,12 +31770,12 @@ SWIGINTERN PyObject *_wrap_IntensityData_max(PyObject *SWIGUNUSEDPARM(self), PyO if (!args) SWIG_fail; swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_max" "', argument " "1"" of type '" "OutputData< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_max" "', argument " "1"" of type '" "Powerfield< double > const *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); - result = (double)((OutputData< double > const *)arg1)->max(); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); + result = (double)((Powerfield< double > const *)arg1)->max(); resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -31785,19 +31785,19 @@ fail: SWIGINTERN PyObject *_wrap_IntensityData_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - SwigValueWrapper< OutputDataIterator< double,OutputData< double > > > result; + SwigValueWrapper< PowerfieldIterator< double,Powerfield< double > > > result; if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_begin" "', argument " "1"" of type '" "OutputData< double > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_begin" "', argument " "1"" of type '" "Powerfield< double > *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); result = (arg1)->begin(); - resultobj = SWIG_NewPointerObj((new OutputData< double >::iterator(static_cast< const OutputData< double >::iterator& >(result))), SWIGTYPE_p_OutputDataIteratorT_double_OutputDataT_double_t_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Powerfield< double >::iterator(static_cast< const Powerfield< double >::iterator& >(result))), SWIGTYPE_p_PowerfieldIteratorT_double_PowerfieldT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -31806,19 +31806,19 @@ fail: SWIGINTERN PyObject *_wrap_IntensityData_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - SwigValueWrapper< OutputDataIterator< double const,OutputData< double > const > > result; + SwigValueWrapper< PowerfieldIterator< double const,Powerfield< double > const > > result; if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_begin" "', argument " "1"" of type '" "OutputData< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_begin" "', argument " "1"" of type '" "Powerfield< double > const *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); - result = ((OutputData< double > const *)arg1)->begin(); - resultobj = SWIG_NewPointerObj((new OutputData< double >::const_iterator(static_cast< const OutputData< double >::const_iterator& >(result))), SWIGTYPE_p_OutputDataIteratorT_double_const_OutputDataT_double_t_const_t, SWIG_POINTER_OWN | 0 ); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); + result = ((Powerfield< double > const *)arg1)->begin(); + resultobj = SWIG_NewPointerObj((new Powerfield< double >::const_iterator(static_cast< const Powerfield< double >::const_iterator& >(result))), SWIGTYPE_p_PowerfieldIteratorT_double_const_PowerfieldT_double_t_const_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -31836,7 +31836,7 @@ SWIGINTERN PyObject *_wrap_IntensityData_begin(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OutputDataT_double_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_PowerfieldT_double_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_IntensityData_begin__SWIG_0(self, argc, argv); @@ -31845,7 +31845,7 @@ SWIGINTERN PyObject *_wrap_IntensityData_begin(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OutputDataT_double_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_PowerfieldT_double_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_IntensityData_begin__SWIG_1(self, argc, argv); @@ -31855,27 +31855,27 @@ SWIGINTERN PyObject *_wrap_IntensityData_begin(PyObject *self, PyObject *args) { fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'IntensityData_begin'.\n" " Possible C/C++ prototypes are:\n" - " OutputData< double >::begin()\n" - " OutputData< double >::begin() const\n"); + " Powerfield< double >::begin()\n" + " Powerfield< double >::begin() const\n"); return 0; } SWIGINTERN PyObject *_wrap_IntensityData_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - SwigValueWrapper< OutputDataIterator< double,OutputData< double > > > result; + SwigValueWrapper< PowerfieldIterator< double,Powerfield< double > > > result; if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_end" "', argument " "1"" of type '" "OutputData< double > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_end" "', argument " "1"" of type '" "Powerfield< double > *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); result = (arg1)->end(); - resultobj = SWIG_NewPointerObj((new OutputData< double >::iterator(static_cast< const OutputData< double >::iterator& >(result))), SWIGTYPE_p_OutputDataIteratorT_double_OutputDataT_double_t_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Powerfield< double >::iterator(static_cast< const Powerfield< double >::iterator& >(result))), SWIGTYPE_p_PowerfieldIteratorT_double_PowerfieldT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -31884,19 +31884,19 @@ fail: SWIGINTERN PyObject *_wrap_IntensityData_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - SwigValueWrapper< OutputDataIterator< double const,OutputData< double > const > > result; + SwigValueWrapper< PowerfieldIterator< double const,Powerfield< double > const > > result; if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_end" "', argument " "1"" of type '" "OutputData< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_end" "', argument " "1"" of type '" "Powerfield< double > const *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); - result = ((OutputData< double > const *)arg1)->end(); - resultobj = SWIG_NewPointerObj((new OutputData< double >::const_iterator(static_cast< const OutputData< double >::const_iterator& >(result))), SWIGTYPE_p_OutputDataIteratorT_double_const_OutputDataT_double_t_const_t, SWIG_POINTER_OWN | 0 ); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); + result = ((Powerfield< double > const *)arg1)->end(); + resultobj = SWIG_NewPointerObj((new Powerfield< double >::const_iterator(static_cast< const Powerfield< double >::const_iterator& >(result))), SWIGTYPE_p_PowerfieldIteratorT_double_const_PowerfieldT_double_t_const_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -31914,7 +31914,7 @@ SWIGINTERN PyObject *_wrap_IntensityData_end(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OutputDataT_double_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_PowerfieldT_double_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_IntensityData_end__SWIG_0(self, argc, argv); @@ -31923,7 +31923,7 @@ SWIGINTERN PyObject *_wrap_IntensityData_end(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OutputDataT_double_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_PowerfieldT_double_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_IntensityData_end__SWIG_1(self, argc, argv); @@ -31933,15 +31933,15 @@ SWIGINTERN PyObject *_wrap_IntensityData_end(PyObject *self, PyObject *args) { fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'IntensityData_end'.\n" " Possible C/C++ prototypes are:\n" - " OutputData< double >::end()\n" - " OutputData< double >::end() const\n"); + " Powerfield< double >::end()\n" + " Powerfield< double >::end() const\n"); return 0; } SWIGINTERN PyObject *_wrap_IntensityData_getAxesBinIndices(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 0 ; size_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; @@ -31951,17 +31951,17 @@ SWIGINTERN PyObject *_wrap_IntensityData_getAxesBinIndices(PyObject *SWIGUNUSEDP std::vector< int,std::allocator< int > > result; if (!SWIG_Python_UnpackTuple(args, "IntensityData_getAxesBinIndices", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_getAxesBinIndices" "', argument " "1"" of type '" "OutputData< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_getAxesBinIndices" "', argument " "1"" of type '" "Powerfield< double > const *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntensityData_getAxesBinIndices" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); - result = ((OutputData< double > const *)arg1)->getAxesBinIndices(arg2); + result = ((Powerfield< double > const *)arg1)->getAxesBinIndices(arg2); resultobj = swig::from(static_cast< std::vector< int,std::allocator< int > > >(result)); return resultobj; fail: @@ -31971,7 +31971,7 @@ fail: SWIGINTERN PyObject *_wrap_IntensityData_getAxisBinIndex__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 0 ; size_t arg2 ; size_t arg3 ; void *argp1 = 0 ; @@ -31983,11 +31983,11 @@ SWIGINTERN PyObject *_wrap_IntensityData_getAxisBinIndex__SWIG_0(PyObject *SWIGU size_t result; if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_getAxisBinIndex" "', argument " "1"" of type '" "OutputData< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_getAxisBinIndex" "', argument " "1"" of type '" "Powerfield< double > const *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntensityData_getAxisBinIndex" "', argument " "2"" of type '" "size_t""'"); @@ -31998,7 +31998,7 @@ SWIGINTERN PyObject *_wrap_IntensityData_getAxisBinIndex__SWIG_0(PyObject *SWIGU SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntensityData_getAxisBinIndex" "', argument " "3"" of type '" "size_t""'"); } arg3 = static_cast< size_t >(val3); - result = ((OutputData< double > const *)arg1)->getAxisBinIndex(arg2,arg3); + result = ((Powerfield< double > const *)arg1)->getAxisBinIndex(arg2,arg3); resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -32008,7 +32008,7 @@ fail: SWIGINTERN PyObject *_wrap_IntensityData_getAxisBinIndex__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 0 ; size_t arg2 ; std::string *arg3 = 0 ; void *argp1 = 0 ; @@ -32019,11 +32019,11 @@ SWIGINTERN PyObject *_wrap_IntensityData_getAxisBinIndex__SWIG_1(PyObject *SWIGU size_t result; if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_getAxisBinIndex" "', argument " "1"" of type '" "OutputData< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_getAxisBinIndex" "', argument " "1"" of type '" "Powerfield< double > const *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntensityData_getAxisBinIndex" "', argument " "2"" of type '" "size_t""'"); @@ -32040,7 +32040,7 @@ SWIGINTERN PyObject *_wrap_IntensityData_getAxisBinIndex__SWIG_1(PyObject *SWIGU } arg3 = ptr; } - result = ((OutputData< double > const *)arg1)->getAxisBinIndex(arg2,(std::string const &)*arg3); + result = ((Powerfield< double > const *)arg1)->getAxisBinIndex(arg2,(std::string const &)*arg3); resultobj = SWIG_From_size_t(static_cast< size_t >(result)); if (SWIG_IsNewObj(res3)) delete arg3; return resultobj; @@ -32061,7 +32061,7 @@ SWIGINTERN PyObject *_wrap_IntensityData_getAxisBinIndex(PyObject *self, PyObjec if (argc == 3) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OutputDataT_double_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_PowerfieldT_double_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -32082,7 +32082,7 @@ SWIGINTERN PyObject *_wrap_IntensityData_getAxisBinIndex(PyObject *self, PyObjec if (argc == 3) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OutputDataT_double_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_PowerfieldT_double_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -32102,15 +32102,15 @@ SWIGINTERN PyObject *_wrap_IntensityData_getAxisBinIndex(PyObject *self, PyObjec fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'IntensityData_getAxisBinIndex'.\n" " Possible C/C++ prototypes are:\n" - " OutputData< double >::getAxisBinIndex(size_t,size_t) const\n" - " OutputData< double >::getAxisBinIndex(size_t,std::string const &) const\n"); + " Powerfield< double >::getAxisBinIndex(size_t,size_t) const\n" + " Powerfield< double >::getAxisBinIndex(size_t,std::string const &) const\n"); return 0; } SWIGINTERN PyObject *_wrap_IntensityData_toGlobalIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 0 ; std::vector< unsigned int,std::allocator< unsigned int > > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -32120,11 +32120,11 @@ SWIGINTERN PyObject *_wrap_IntensityData_toGlobalIndex(PyObject *SWIGUNUSEDPARM( size_t result; if (!SWIG_Python_UnpackTuple(args, "IntensityData_toGlobalIndex", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_toGlobalIndex" "', argument " "1"" of type '" "OutputData< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_toGlobalIndex" "', argument " "1"" of type '" "Powerfield< double > const *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IntensityData_toGlobalIndex" "', argument " "2"" of type '" "std::vector< unsigned int,std::allocator< unsigned int > > const &""'"); @@ -32133,7 +32133,7 @@ SWIGINTERN PyObject *_wrap_IntensityData_toGlobalIndex(PyObject *SWIGUNUSEDPARM( SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntensityData_toGlobalIndex" "', argument " "2"" of type '" "std::vector< unsigned int,std::allocator< unsigned int > > const &""'"); } arg2 = reinterpret_cast< std::vector< unsigned int,std::allocator< unsigned int > > * >(argp2); - result = ((OutputData< double > const *)arg1)->toGlobalIndex((std::vector< unsigned int,std::allocator< unsigned int > > const &)*arg2); + result = ((Powerfield< double > const *)arg1)->toGlobalIndex((std::vector< unsigned int,std::allocator< unsigned int > > const &)*arg2); resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -32143,7 +32143,7 @@ fail: SWIGINTERN PyObject *_wrap_IntensityData_findGlobalIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 0 ; std::vector< double,std::allocator< double > > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -32152,11 +32152,11 @@ SWIGINTERN PyObject *_wrap_IntensityData_findGlobalIndex(PyObject *SWIGUNUSEDPAR size_t result; if (!SWIG_Python_UnpackTuple(args, "IntensityData_findGlobalIndex", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_findGlobalIndex" "', argument " "1"" of type '" "OutputData< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_findGlobalIndex" "', argument " "1"" of type '" "Powerfield< double > const *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); { std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; res2 = swig::asptr(swig_obj[1], &ptr); @@ -32168,7 +32168,7 @@ SWIGINTERN PyObject *_wrap_IntensityData_findGlobalIndex(PyObject *SWIGUNUSEDPAR } arg2 = ptr; } - result = ((OutputData< double > const *)arg1)->findGlobalIndex((std::vector< double,std::allocator< double > > const &)*arg2); + result = ((Powerfield< double > const *)arg1)->findGlobalIndex((std::vector< double,std::allocator< double > > const &)*arg2); resultobj = SWIG_From_size_t(static_cast< size_t >(result)); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; @@ -32180,7 +32180,7 @@ fail: SWIGINTERN PyObject *_wrap_IntensityData_getAxisValue__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 0 ; size_t arg2 ; size_t arg3 ; void *argp1 = 0 ; @@ -32192,11 +32192,11 @@ SWIGINTERN PyObject *_wrap_IntensityData_getAxisValue__SWIG_0(PyObject *SWIGUNUS double result; if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_getAxisValue" "', argument " "1"" of type '" "OutputData< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_getAxisValue" "', argument " "1"" of type '" "Powerfield< double > const *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntensityData_getAxisValue" "', argument " "2"" of type '" "size_t""'"); @@ -32207,7 +32207,7 @@ SWIGINTERN PyObject *_wrap_IntensityData_getAxisValue__SWIG_0(PyObject *SWIGUNUS SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntensityData_getAxisValue" "', argument " "3"" of type '" "size_t""'"); } arg3 = static_cast< size_t >(val3); - result = (double)((OutputData< double > const *)arg1)->getAxisValue(arg2,arg3); + result = (double)((Powerfield< double > const *)arg1)->getAxisValue(arg2,arg3); resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -32217,7 +32217,7 @@ fail: SWIGINTERN PyObject *_wrap_IntensityData_getAxisValue__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 0 ; size_t arg2 ; std::string *arg3 = 0 ; void *argp1 = 0 ; @@ -32228,11 +32228,11 @@ SWIGINTERN PyObject *_wrap_IntensityData_getAxisValue__SWIG_1(PyObject *SWIGUNUS double result; if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_getAxisValue" "', argument " "1"" of type '" "OutputData< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_getAxisValue" "', argument " "1"" of type '" "Powerfield< double > const *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntensityData_getAxisValue" "', argument " "2"" of type '" "size_t""'"); @@ -32249,7 +32249,7 @@ SWIGINTERN PyObject *_wrap_IntensityData_getAxisValue__SWIG_1(PyObject *SWIGUNUS } arg3 = ptr; } - result = (double)((OutputData< double > const *)arg1)->getAxisValue(arg2,(std::string const &)*arg3); + result = (double)((Powerfield< double > const *)arg1)->getAxisValue(arg2,(std::string const &)*arg3); resultobj = SWIG_From_double(static_cast< double >(result)); if (SWIG_IsNewObj(res3)) delete arg3; return resultobj; @@ -32270,7 +32270,7 @@ SWIGINTERN PyObject *_wrap_IntensityData_getAxisValue(PyObject *self, PyObject * if (argc == 3) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OutputDataT_double_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_PowerfieldT_double_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -32291,7 +32291,7 @@ SWIGINTERN PyObject *_wrap_IntensityData_getAxisValue(PyObject *self, PyObject * if (argc == 3) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OutputDataT_double_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_PowerfieldT_double_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -32311,15 +32311,15 @@ SWIGINTERN PyObject *_wrap_IntensityData_getAxisValue(PyObject *self, PyObject * fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'IntensityData_getAxisValue'.\n" " Possible C/C++ prototypes are:\n" - " OutputData< double >::getAxisValue(size_t,size_t) const\n" - " OutputData< double >::getAxisValue(size_t,std::string const &) const\n"); + " Powerfield< double >::getAxisValue(size_t,size_t) const\n" + " Powerfield< double >::getAxisValue(size_t,std::string const &) const\n"); return 0; } SWIGINTERN PyObject *_wrap_IntensityData_getAxesValues(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 0 ; size_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; @@ -32329,17 +32329,17 @@ SWIGINTERN PyObject *_wrap_IntensityData_getAxesValues(PyObject *SWIGUNUSEDPARM( std::vector< double,std::allocator< double > > result; if (!SWIG_Python_UnpackTuple(args, "IntensityData_getAxesValues", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_getAxesValues" "', argument " "1"" of type '" "OutputData< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_getAxesValues" "', argument " "1"" of type '" "Powerfield< double > const *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntensityData_getAxesValues" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); - result = ((OutputData< double > const *)arg1)->getAxesValues(arg2); + result = ((Powerfield< double > const *)arg1)->getAxesValues(arg2); resultobj = swig::from(static_cast< std::vector< double,std::allocator< double > > >(result)); return resultobj; fail: @@ -32349,7 +32349,7 @@ fail: SWIGINTERN PyObject *_wrap_IntensityData_getAxisBin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 0 ; size_t arg2 ; size_t arg3 ; void *argp1 = 0 ; @@ -32361,11 +32361,11 @@ SWIGINTERN PyObject *_wrap_IntensityData_getAxisBin__SWIG_0(PyObject *SWIGUNUSED Bin1D result; if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_getAxisBin" "', argument " "1"" of type '" "OutputData< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_getAxisBin" "', argument " "1"" of type '" "Powerfield< double > const *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntensityData_getAxisBin" "', argument " "2"" of type '" "size_t""'"); @@ -32376,7 +32376,7 @@ SWIGINTERN PyObject *_wrap_IntensityData_getAxisBin__SWIG_0(PyObject *SWIGUNUSED SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntensityData_getAxisBin" "', argument " "3"" of type '" "size_t""'"); } arg3 = static_cast< size_t >(val3); - result = ((OutputData< double > const *)arg1)->getAxisBin(arg2,arg3); + result = ((Powerfield< double > const *)arg1)->getAxisBin(arg2,arg3); resultobj = SWIG_NewPointerObj((new Bin1D(static_cast< const Bin1D& >(result))), SWIGTYPE_p_Bin1D, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -32386,7 +32386,7 @@ fail: SWIGINTERN PyObject *_wrap_IntensityData_getAxisBin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 0 ; size_t arg2 ; std::string *arg3 = 0 ; void *argp1 = 0 ; @@ -32397,11 +32397,11 @@ SWIGINTERN PyObject *_wrap_IntensityData_getAxisBin__SWIG_1(PyObject *SWIGUNUSED Bin1D result; if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_getAxisBin" "', argument " "1"" of type '" "OutputData< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_getAxisBin" "', argument " "1"" of type '" "Powerfield< double > const *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntensityData_getAxisBin" "', argument " "2"" of type '" "size_t""'"); @@ -32418,7 +32418,7 @@ SWIGINTERN PyObject *_wrap_IntensityData_getAxisBin__SWIG_1(PyObject *SWIGUNUSED } arg3 = ptr; } - result = ((OutputData< double > const *)arg1)->getAxisBin(arg2,(std::string const &)*arg3); + result = ((Powerfield< double > const *)arg1)->getAxisBin(arg2,(std::string const &)*arg3); resultobj = SWIG_NewPointerObj((new Bin1D(static_cast< const Bin1D& >(result))), SWIGTYPE_p_Bin1D, SWIG_POINTER_OWN | 0 ); if (SWIG_IsNewObj(res3)) delete arg3; return resultobj; @@ -32439,7 +32439,7 @@ SWIGINTERN PyObject *_wrap_IntensityData_getAxisBin(PyObject *self, PyObject *ar if (argc == 3) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OutputDataT_double_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_PowerfieldT_double_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -32460,7 +32460,7 @@ SWIGINTERN PyObject *_wrap_IntensityData_getAxisBin(PyObject *self, PyObject *ar if (argc == 3) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OutputDataT_double_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_PowerfieldT_double_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -32480,26 +32480,26 @@ SWIGINTERN PyObject *_wrap_IntensityData_getAxisBin(PyObject *self, PyObject *ar fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'IntensityData_getAxisBin'.\n" " Possible C/C++ prototypes are:\n" - " OutputData< double >::getAxisBin(size_t,size_t) const\n" - " OutputData< double >::getAxisBin(size_t,std::string const &) const\n"); + " Powerfield< double >::getAxisBin(size_t,size_t) const\n" + " Powerfield< double >::getAxisBin(size_t,std::string const &) const\n"); return 0; } SWIGINTERN PyObject *_wrap_IntensityData_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 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_OutputDataT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_clear" "', argument " "1"" of type '" "OutputData< double > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_clear" "', argument " "1"" of type '" "Powerfield< double > *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); (arg1)->clear(); resultobj = SWIG_Py_Void(); return resultobj; @@ -32510,7 +32510,7 @@ fail: SWIGINTERN PyObject *_wrap_IntensityData_setAllTo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 0 ; double *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -32520,11 +32520,11 @@ SWIGINTERN PyObject *_wrap_IntensityData_setAllTo(PyObject *SWIGUNUSEDPARM(self) PyObject *swig_obj[2] ; if (!SWIG_Python_UnpackTuple(args, "IntensityData_setAllTo", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_setAllTo" "', argument " "1"" of type '" "OutputData< double > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_setAllTo" "', argument " "1"" of type '" "Powerfield< double > *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntensityData_setAllTo" "', argument " "2"" of type '" "double""'"); @@ -32541,7 +32541,7 @@ fail: SWIGINTERN PyObject *_wrap_IntensityData_setAxisSizes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 0 ; size_t arg2 ; int *arg3 = (int *) 0 ; void *argp1 = 0 ; @@ -32553,11 +32553,11 @@ SWIGINTERN PyObject *_wrap_IntensityData_setAxisSizes(PyObject *SWIGUNUSEDPARM(s PyObject *swig_obj[3] ; if (!SWIG_Python_UnpackTuple(args, "IntensityData_setAxisSizes", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_setAxisSizes" "', argument " "1"" of type '" "OutputData< double > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_setAxisSizes" "', argument " "1"" of type '" "Powerfield< double > *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntensityData_setAxisSizes" "', argument " "2"" of type '" "size_t""'"); @@ -32578,7 +32578,7 @@ fail: SWIGINTERN PyObject *_wrap_IntensityData_setRawDataVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 0 ; std::vector< double,std::allocator< double > > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -32586,11 +32586,11 @@ SWIGINTERN PyObject *_wrap_IntensityData_setRawDataVector(PyObject *SWIGUNUSEDPA PyObject *swig_obj[2] ; if (!SWIG_Python_UnpackTuple(args, "IntensityData_setRawDataVector", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_setRawDataVector" "', argument " "1"" of type '" "OutputData< double > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_setRawDataVector" "', argument " "1"" of type '" "Powerfield< double > *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); { std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; res2 = swig::asptr(swig_obj[1], &ptr); @@ -32614,7 +32614,7 @@ fail: SWIGINTERN PyObject *_wrap_IntensityData_setRawDataArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 0 ; double *arg2 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -32623,11 +32623,11 @@ SWIGINTERN PyObject *_wrap_IntensityData_setRawDataArray(PyObject *SWIGUNUSEDPAR PyObject *swig_obj[2] ; if (!SWIG_Python_UnpackTuple(args, "IntensityData_setRawDataArray", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_setRawDataArray" "', argument " "1"" of type '" "OutputData< double > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_setRawDataArray" "', argument " "1"" of type '" "Powerfield< double > *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_double, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IntensityData_setRawDataArray" "', argument " "2"" of type '" "double const *""'"); @@ -32643,31 +32643,31 @@ fail: SWIGINTERN PyObject *_wrap_IntensityData___iadd__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; - OutputData< double > *arg2 = 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 0 ; + Powerfield< double > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject *swig_obj[2] ; - OutputData< double > *result = 0 ; + Powerfield< double > *result = 0 ; if (!SWIG_Python_UnpackTuple(args, "IntensityData___iadd__", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OutputDataT_double_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData___iadd__" "', argument " "1"" of type '" "OutputData< double > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData___iadd__" "', argument " "1"" of type '" "Powerfield< double > *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_OutputDataT_double_t, 0 | 0); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_PowerfieldT_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IntensityData___iadd__" "', argument " "2"" of type '" "OutputData< double > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IntensityData___iadd__" "', argument " "2"" of type '" "Powerfield< double > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntensityData___iadd__" "', argument " "2"" of type '" "OutputData< double > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntensityData___iadd__" "', argument " "2"" of type '" "Powerfield< double > const &""'"); } - arg2 = reinterpret_cast< OutputData< double > * >(argp2); - result = (OutputData< double > *) &(arg1)->operator +=((OutputData< double > const &)*arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OutputDataT_double_t, SWIG_POINTER_OWN | 0 ); + arg2 = reinterpret_cast< Powerfield< double > * >(argp2); + result = (Powerfield< double > *) &(arg1)->operator +=((Powerfield< double > const &)*arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PowerfieldT_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -32676,31 +32676,31 @@ fail: SWIGINTERN PyObject *_wrap_IntensityData___isub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; - OutputData< double > *arg2 = 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 0 ; + Powerfield< double > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject *swig_obj[2] ; - OutputData< double > *result = 0 ; + Powerfield< double > *result = 0 ; if (!SWIG_Python_UnpackTuple(args, "IntensityData___isub__", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OutputDataT_double_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData___isub__" "', argument " "1"" of type '" "OutputData< double > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData___isub__" "', argument " "1"" of type '" "Powerfield< double > *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_OutputDataT_double_t, 0 | 0); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_PowerfieldT_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IntensityData___isub__" "', argument " "2"" of type '" "OutputData< double > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IntensityData___isub__" "', argument " "2"" of type '" "Powerfield< double > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntensityData___isub__" "', argument " "2"" of type '" "OutputData< double > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntensityData___isub__" "', argument " "2"" of type '" "Powerfield< double > const &""'"); } - arg2 = reinterpret_cast< OutputData< double > * >(argp2); - result = (OutputData< double > *) &(arg1)->operator -=((OutputData< double > const &)*arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OutputDataT_double_t, SWIG_POINTER_OWN | 0 ); + arg2 = reinterpret_cast< Powerfield< double > * >(argp2); + result = (Powerfield< double > *) &(arg1)->operator -=((Powerfield< double > const &)*arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PowerfieldT_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -32709,31 +32709,31 @@ fail: SWIGINTERN PyObject *_wrap_IntensityData___itruediv__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; - OutputData< double > *arg2 = 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 0 ; + Powerfield< double > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject *swig_obj[2] ; - OutputData< double > *result = 0 ; + Powerfield< double > *result = 0 ; if (!SWIG_Python_UnpackTuple(args, "IntensityData___itruediv__", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OutputDataT_double_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData___itruediv__" "', argument " "1"" of type '" "OutputData< double > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData___itruediv__" "', argument " "1"" of type '" "Powerfield< double > *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_OutputDataT_double_t, 0 | 0); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_PowerfieldT_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IntensityData___itruediv__" "', argument " "2"" of type '" "OutputData< double > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IntensityData___itruediv__" "', argument " "2"" of type '" "Powerfield< double > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntensityData___itruediv__" "', argument " "2"" of type '" "OutputData< double > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntensityData___itruediv__" "', argument " "2"" of type '" "Powerfield< double > const &""'"); } - arg2 = reinterpret_cast< OutputData< double > * >(argp2); - result = (OutputData< double > *) &(arg1)->operator /=((OutputData< double > const &)*arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OutputDataT_double_t, SWIG_POINTER_OWN | 0 ); + arg2 = reinterpret_cast< Powerfield< double > * >(argp2); + result = (Powerfield< double > *) &(arg1)->operator /=((Powerfield< double > const &)*arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PowerfieldT_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -32742,31 +32742,31 @@ fail: SWIGINTERN PyObject *_wrap_IntensityData___imul__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; - OutputData< double > *arg2 = 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 0 ; + Powerfield< double > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject *swig_obj[2] ; - OutputData< double > *result = 0 ; + Powerfield< double > *result = 0 ; if (!SWIG_Python_UnpackTuple(args, "IntensityData___imul__", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OutputDataT_double_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData___imul__" "', argument " "1"" of type '" "OutputData< double > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData___imul__" "', argument " "1"" of type '" "Powerfield< double > *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_OutputDataT_double_t, 0 | 0); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_PowerfieldT_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IntensityData___imul__" "', argument " "2"" of type '" "OutputData< double > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IntensityData___imul__" "', argument " "2"" of type '" "Powerfield< double > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntensityData___imul__" "', argument " "2"" of type '" "OutputData< double > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntensityData___imul__" "', argument " "2"" of type '" "Powerfield< double > const &""'"); } - arg2 = reinterpret_cast< OutputData< double > * >(argp2); - result = (OutputData< double > *) &(arg1)->operator *=((OutputData< double > const &)*arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OutputDataT_double_t, SWIG_POINTER_OWN | 0 ); + arg2 = reinterpret_cast< Powerfield< double > * >(argp2); + result = (Powerfield< double > *) &(arg1)->operator *=((Powerfield< double > const &)*arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PowerfieldT_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -32775,7 +32775,7 @@ fail: SWIGINTERN PyObject *_wrap_IntensityData_getValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 0 ; size_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; @@ -32785,17 +32785,17 @@ SWIGINTERN PyObject *_wrap_IntensityData_getValue(PyObject *SWIGUNUSEDPARM(self) double result; if (!SWIG_Python_UnpackTuple(args, "IntensityData_getValue", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_getValue" "', argument " "1"" of type '" "OutputData< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_getValue" "', argument " "1"" of type '" "Powerfield< double > const *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntensityData_getValue" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); - result = (double)((OutputData< double > const *)arg1)->getValue(arg2); + result = (double)((Powerfield< double > const *)arg1)->getValue(arg2); resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -32805,7 +32805,7 @@ fail: SWIGINTERN PyObject *_wrap_IntensityData_getArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; @@ -32813,12 +32813,12 @@ SWIGINTERN PyObject *_wrap_IntensityData_getArray(PyObject *SWIGUNUSEDPARM(self) if (!args) SWIG_fail; swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_getArray" "', argument " "1"" of type '" "OutputData< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_getArray" "', argument " "1"" of type '" "Powerfield< double > const *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); - result = (PyObject *)((OutputData< double > const *)arg1)->getArray(); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); + result = (PyObject *)((Powerfield< double > const *)arg1)->getArray(); resultobj = result; return resultobj; fail: @@ -32828,7 +32828,7 @@ fail: SWIGINTERN PyObject *_wrap_IntensityData_isInitialized(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; @@ -32836,12 +32836,12 @@ SWIGINTERN PyObject *_wrap_IntensityData_isInitialized(PyObject *SWIGUNUSEDPARM( if (!args) SWIG_fail; swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_isInitialized" "', argument " "1"" of type '" "OutputData< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_isInitialized" "', argument " "1"" of type '" "Powerfield< double > const *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); - result = (bool)((OutputData< double > const *)arg1)->isInitialized(); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); + result = (bool)((Powerfield< double > const *)arg1)->isInitialized(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -32851,18 +32851,18 @@ fail: SWIGINTERN PyObject *_wrap_IntensityData_allocate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 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_OutputDataT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_allocate" "', argument " "1"" of type '" "OutputData< double > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_allocate" "', argument " "1"" of type '" "Powerfield< double > *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); (arg1)->allocate(); resultobj = SWIG_Py_Void(); return resultobj; @@ -32873,21 +32873,21 @@ fail: SWIGINTERN PyObject *_wrap_IntensityData_normalizedToMaximum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; - OutputData< double > *result = 0 ; + Powerfield< double > *result = 0 ; if (!args) SWIG_fail; swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_normalizedToMaximum" "', argument " "1"" of type '" "OutputData< double > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData_normalizedToMaximum" "', argument " "1"" of type '" "Powerfield< double > *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); - result = (OutputData< double > *) &(arg1)->normalizedToMaximum(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); + result = (Powerfield< double > *) &(arg1)->normalizedToMaximum(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -32896,7 +32896,7 @@ fail: SWIGINTERN PyObject *_wrap_IntensityData___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 0 ; unsigned int arg2 ; void *argp1 = 0 ; int res1 = 0 ; @@ -32906,17 +32906,17 @@ SWIGINTERN PyObject *_wrap_IntensityData___getitem__(PyObject *SWIGUNUSEDPARM(se double result; if (!SWIG_Python_UnpackTuple(args, "IntensityData___getitem__", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData___getitem__" "', argument " "1"" of type '" "OutputData< double > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData___getitem__" "', argument " "1"" of type '" "Powerfield< double > *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntensityData___getitem__" "', argument " "2"" of type '" "unsigned int""'"); } arg2 = static_cast< unsigned int >(val2); - result = (double)OutputData_Sl_double_Sg____getitem__(arg1,arg2); + result = (double)Powerfield_Sl_double_Sg____getitem__(arg1,arg2); resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -32926,7 +32926,7 @@ fail: SWIGINTERN PyObject *_wrap_IntensityData___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - OutputData< double > *arg1 = (OutputData< double > *) 0 ; + Powerfield< double > *arg1 = (Powerfield< double > *) 0 ; unsigned int arg2 ; double arg3 ; void *argp1 = 0 ; @@ -32939,11 +32939,11 @@ SWIGINTERN PyObject *_wrap_IntensityData___setitem__(PyObject *SWIGUNUSEDPARM(se double result; if (!SWIG_Python_UnpackTuple(args, "IntensityData___setitem__", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData___setitem__" "', argument " "1"" of type '" "OutputData< double > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityData___setitem__" "', argument " "1"" of type '" "Powerfield< double > *""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntensityData___setitem__" "', argument " "2"" of type '" "unsigned int""'"); @@ -32954,7 +32954,7 @@ SWIGINTERN PyObject *_wrap_IntensityData___setitem__(PyObject *SWIGUNUSEDPARM(se SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntensityData___setitem__" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (double)OutputData_Sl_double_Sg____setitem__(arg1,arg2,arg3); + result = (double)Powerfield_Sl_double_Sg____setitem__(arg1,arg2,arg3); resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -32965,7 +32965,7 @@ fail: SWIGINTERN PyObject *IntensityData_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_OutputDataT_double_t, SWIG_NewClientData(obj)); + SWIG_TypeNewClientData(SWIGTYPE_p_PowerfieldT_double_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -32975,8 +32975,8 @@ SWIGINTERN PyObject *IntensityData_swiginit(PyObject *SWIGUNUSEDPARM(self), PyOb SWIGINTERN PyObject *_wrap_relativeDataDifference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - OutputData< double > *arg1 = 0 ; - OutputData< double > *arg2 = 0 ; + Powerfield< double > *arg1 = 0 ; + Powerfield< double > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -32985,23 +32985,23 @@ SWIGINTERN PyObject *_wrap_relativeDataDifference(PyObject *SWIGUNUSEDPARM(self) double result; if (!SWIG_Python_UnpackTuple(args, "relativeDataDifference", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_OutputDataT_double_t, 0 | 0); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_PowerfieldT_double_t, 0 | 0); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "relativeDataDifference" "', argument " "1"" of type '" "OutputData< double > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "relativeDataDifference" "', argument " "1"" of type '" "Powerfield< double > const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "relativeDataDifference" "', argument " "1"" of type '" "OutputData< double > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "relativeDataDifference" "', argument " "1"" of type '" "Powerfield< double > const &""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_OutputDataT_double_t, 0 | 0); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_PowerfieldT_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "relativeDataDifference" "', argument " "2"" of type '" "OutputData< double > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "relativeDataDifference" "', argument " "2"" of type '" "Powerfield< double > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "relativeDataDifference" "', argument " "2"" of type '" "OutputData< double > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "relativeDataDifference" "', argument " "2"" of type '" "Powerfield< double > const &""'"); } - arg2 = reinterpret_cast< OutputData< double > * >(argp2); - result = (double)DataUtils::Data::relativeDataDifference((OutputData< double > const &)*arg1,(OutputData< double > const &)*arg2); + arg2 = reinterpret_cast< Powerfield< double > * >(argp2); + result = (double)DataUtils::Data::relativeDataDifference((Powerfield< double > const &)*arg1,(Powerfield< double > const &)*arg2); resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -33077,7 +33077,7 @@ SWIGINTERN PyObject *_wrap_coordinateToBinf__SWIG_1(PyObject *SWIGUNUSEDPARM(sel PyObject *resultobj = 0; double *arg1 = 0 ; double *arg2 = 0 ; - OutputData< double > *arg3 = 0 ; + Powerfield< double > *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -33102,15 +33102,15 @@ SWIGINTERN PyObject *_wrap_coordinateToBinf__SWIG_1(PyObject *SWIGUNUSEDPARM(sel SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "coordinateToBinf" "', argument " "2"" of type '" "double &""'"); } arg2 = reinterpret_cast< double * >(argp2); - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_OutputDataT_double_t, 0 | 0); + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_PowerfieldT_double_t, 0 | 0); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "coordinateToBinf" "', argument " "3"" of type '" "OutputData< double > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "coordinateToBinf" "', argument " "3"" of type '" "Powerfield< double > const &""'"); } if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "coordinateToBinf" "', argument " "3"" of type '" "OutputData< double > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "coordinateToBinf" "', argument " "3"" of type '" "Powerfield< double > const &""'"); } - arg3 = reinterpret_cast< OutputData< double > * >(argp3); - DataUtils::Data::coordinateToBinf(*arg1,*arg2,(OutputData< double > const &)*arg3); + arg3 = reinterpret_cast< Powerfield< double > * >(argp3); + DataUtils::Data::coordinateToBinf(*arg1,*arg2,(Powerfield< double > const &)*arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -33150,7 +33150,7 @@ SWIGINTERN PyObject *_wrap_coordinateToBinf(PyObject *self, PyObject *args) { int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_double, SWIG_POINTER_NO_NULL); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_OutputDataT_double_t, SWIG_POINTER_NO_NULL | 0); + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_PowerfieldT_double_t, SWIG_POINTER_NO_NULL | 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_coordinateToBinf__SWIG_1(self, argc, argv); @@ -33163,7 +33163,7 @@ fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'coordinateToBinf'.\n" " Possible C/C++ prototypes are:\n" " DataUtils::Data::coordinateToBinf(double,IAxis const &)\n" - " DataUtils::Data::coordinateToBinf(double &,double &,OutputData< double > const &)\n"); + " DataUtils::Data::coordinateToBinf(double &,double &,Powerfield< double > const &)\n"); return 0; } @@ -33172,7 +33172,7 @@ SWIGINTERN PyObject *_wrap_coordinateFromBinf__SWIG_1(PyObject *SWIGUNUSEDPARM(s PyObject *resultobj = 0; double *arg1 = 0 ; double *arg2 = 0 ; - OutputData< double > *arg3 = 0 ; + Powerfield< double > *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -33197,15 +33197,15 @@ SWIGINTERN PyObject *_wrap_coordinateFromBinf__SWIG_1(PyObject *SWIGUNUSEDPARM(s SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "coordinateFromBinf" "', argument " "2"" of type '" "double &""'"); } arg2 = reinterpret_cast< double * >(argp2); - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_OutputDataT_double_t, 0 | 0); + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_PowerfieldT_double_t, 0 | 0); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "coordinateFromBinf" "', argument " "3"" of type '" "OutputData< double > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "coordinateFromBinf" "', argument " "3"" of type '" "Powerfield< double > const &""'"); } if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "coordinateFromBinf" "', argument " "3"" of type '" "OutputData< double > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "coordinateFromBinf" "', argument " "3"" of type '" "Powerfield< double > const &""'"); } - arg3 = reinterpret_cast< OutputData< double > * >(argp3); - DataUtils::Data::coordinateFromBinf(*arg1,*arg2,(OutputData< double > const &)*arg3); + arg3 = reinterpret_cast< Powerfield< double > * >(argp3); + DataUtils::Data::coordinateFromBinf(*arg1,*arg2,(Powerfield< double > const &)*arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -33245,7 +33245,7 @@ SWIGINTERN PyObject *_wrap_coordinateFromBinf(PyObject *self, PyObject *args) { int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_double, SWIG_POINTER_NO_NULL); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_OutputDataT_double_t, SWIG_POINTER_NO_NULL | 0); + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_PowerfieldT_double_t, SWIG_POINTER_NO_NULL | 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_coordinateFromBinf__SWIG_1(self, argc, argv); @@ -33258,14 +33258,14 @@ fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'coordinateFromBinf'.\n" " Possible C/C++ prototypes are:\n" " DataUtils::Data::coordinateFromBinf(double,IAxis const &)\n" - " DataUtils::Data::coordinateFromBinf(double &,double &,OutputData< double > const &)\n"); + " DataUtils::Data::coordinateFromBinf(double &,double &,Powerfield< double > const &)\n"); return 0; } -SWIGINTERN PyObject *_wrap_create2DArrayfromOutputData(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_create2DArrayfromPowerfield(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - OutputData< double > *arg1 = 0 ; + Powerfield< double > *arg1 = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; @@ -33273,15 +33273,15 @@ SWIGINTERN PyObject *_wrap_create2DArrayfromOutputData(PyObject *SWIGUNUSEDPARM( if (!args) SWIG_fail; swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_OutputDataT_double_t, 0 | 0); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_PowerfieldT_double_t, 0 | 0); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "create2DArrayfromOutputData" "', argument " "1"" of type '" "OutputData< double > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "create2DArrayfromPowerfield" "', argument " "1"" of type '" "Powerfield< double > const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "create2DArrayfromOutputData" "', argument " "1"" of type '" "OutputData< double > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "create2DArrayfromPowerfield" "', argument " "1"" of type '" "Powerfield< double > const &""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); - result = DataUtils::Data::create2DArrayfromOutputData((OutputData< double > const &)*arg1); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); + result = DataUtils::Data::create2DArrayfromPowerfield((Powerfield< 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)); return resultobj; fail: @@ -33289,26 +33289,26 @@ fail: } -SWIGINTERN PyObject *_wrap_importArrayToOutputData__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { +SWIGINTERN PyObject *_wrap_importArrayToPowerfield__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< double,std::allocator< double > > *arg1 = 0 ; int res1 = SWIG_OLDOBJ ; - OutputData< double > *result = 0 ; + Powerfield< double > *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 '" "importArrayToOutputData" "', argument " "1"" of type '" "std::vector< double,std::allocator< double > > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "importArrayToPowerfield" "', argument " "1"" of type '" "std::vector< double,std::allocator< double > > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "importArrayToOutputData" "', argument " "1"" of type '" "std::vector< double,std::allocator< double > > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "importArrayToPowerfield" "', argument " "1"" of type '" "std::vector< double,std::allocator< double > > const &""'"); } arg1 = ptr; } - result = (OutputData< double > *)DataUtils::Data::importArrayToOutputData((std::vector< double,std::allocator< double > > const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OutputDataT_double_t, SWIG_POINTER_OWN | 0 ); + result = (Powerfield< double > *)DataUtils::Data::importArrayToPowerfield((std::vector< double,std::allocator< double > > const &)*arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PowerfieldT_double_t, SWIG_POINTER_OWN | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; fail: @@ -33317,26 +33317,26 @@ fail: } -SWIGINTERN PyObject *_wrap_importArrayToOutputData__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { +SWIGINTERN PyObject *_wrap_importArrayToPowerfield__SWIG_1(PyObject *SWIGUNUSEDPARM(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 ; - OutputData< double > *result = 0 ; + Powerfield< double > *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 '" "importArrayToOutputData" "', argument " "1"" of type '" "std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "importArrayToPowerfield" "', 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 '" "importArrayToOutputData" "', argument " "1"" 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 '" "importArrayToPowerfield" "', argument " "1"" of type '" "std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &""'"); } arg1 = ptr; } - result = (OutputData< double > *)DataUtils::Data::importArrayToOutputData((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_OutputDataT_double_t, SWIG_POINTER_OWN | 0 ); + result = (Powerfield< double > *)DataUtils::Data::importArrayToPowerfield((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_PowerfieldT_double_t, SWIG_POINTER_OWN | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; fail: @@ -33345,20 +33345,20 @@ fail: } -SWIGINTERN PyObject *_wrap_importArrayToOutputData(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_importArrayToPowerfield(PyObject *self, PyObject *args) { Py_ssize_t argc; PyObject *argv[2] = { 0 }; - if (!(argc = SWIG_Python_UnpackTuple(args, "importArrayToOutputData", 0, 1, argv))) SWIG_fail; + if (!(argc = SWIG_Python_UnpackTuple(args, "importArrayToPowerfield", 0, 1, argv))) SWIG_fail; --argc; if (argc == 1) { int _v; int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); _v = SWIG_CheckState(res); if (_v) { - return _wrap_importArrayToOutputData__SWIG_0(self, argc, argv); + return _wrap_importArrayToPowerfield__SWIG_0(self, argc, argv); } } if (argc == 1) { @@ -33366,15 +33366,15 @@ SWIGINTERN PyObject *_wrap_importArrayToOutputData(PyObject *self, PyObject *arg 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_importArrayToOutputData__SWIG_1(self, argc, argv); + return _wrap_importArrayToPowerfield__SWIG_1(self, argc, argv); } } fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'importArrayToOutputData'.\n" + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'importArrayToPowerfield'.\n" " Possible C/C++ prototypes are:\n" - " DataUtils::Data::importArrayToOutputData(std::vector< double,std::allocator< double > > const &)\n" - " DataUtils::Data::importArrayToOutputData(std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &)\n"); + " DataUtils::Data::importArrayToPowerfield(std::vector< double,std::allocator< double > > const &)\n" + " DataUtils::Data::importArrayToPowerfield(std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &)\n"); return 0; } @@ -37040,7 +37040,7 @@ fail: SWIGINTERN PyObject *_wrap_IDetectorResolution_applyDetectorResolution(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; IDetectorResolution *arg1 = (IDetectorResolution *) 0 ; - OutputData< double > *arg2 = (OutputData< double > *) 0 ; + Powerfield< double > *arg2 = (Powerfield< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -37053,11 +37053,11 @@ SWIGINTERN PyObject *_wrap_IDetectorResolution_applyDetectorResolution(PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetectorResolution_applyDetectorResolution" "', argument " "1"" of type '" "IDetectorResolution const *""'"); } arg1 = reinterpret_cast< IDetectorResolution * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDetectorResolution_applyDetectorResolution" "', argument " "2"" of type '" "OutputData< double > *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDetectorResolution_applyDetectorResolution" "', argument " "2"" of type '" "Powerfield< double > *""'"); } - arg2 = reinterpret_cast< OutputData< double > * >(argp2); + arg2 = reinterpret_cast< Powerfield< double > * >(argp2); ((IDetectorResolution const *)arg1)->applyDetectorResolution(arg2); resultobj = SWIG_Py_Void(); return resultobj; @@ -37632,7 +37632,7 @@ SWIGINTERN PyObject *_wrap_DetectorMask_getMaskData(PyObject *SWIGUNUSEDPARM(sel void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; - OutputData< bool > *result = 0 ; + Powerfield< bool > *result = 0 ; if (!args) SWIG_fail; swig_obj[0] = args; @@ -37641,8 +37641,8 @@ SWIGINTERN PyObject *_wrap_DetectorMask_getMaskData(PyObject *SWIGUNUSEDPARM(sel SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DetectorMask_getMaskData" "', argument " "1"" of type '" "DetectorMask const *""'"); } arg1 = reinterpret_cast< DetectorMask * >(argp1); - result = (OutputData< bool > *)((DetectorMask const *)arg1)->getMaskData(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OutputDataT_bool_t, 0 | 0 ); + result = (Powerfield< bool > *)((DetectorMask const *)arg1)->getMaskData(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PowerfieldT_bool_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -38407,7 +38407,7 @@ fail: SWIGINTERN PyObject *_wrap_IDetector_applyDetectorResolution(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; IDetector *arg1 = (IDetector *) 0 ; - OutputData< double > *arg2 = (OutputData< double > *) 0 ; + Powerfield< double > *arg2 = (Powerfield< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -38420,11 +38420,11 @@ SWIGINTERN PyObject *_wrap_IDetector_applyDetectorResolution(PyObject *SWIGUNUSE SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector_applyDetectorResolution" "', argument " "1"" of type '" "IDetector const *""'"); } arg1 = reinterpret_cast< IDetector * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDetector_applyDetectorResolution" "', argument " "2"" of type '" "OutputData< double > *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDetector_applyDetectorResolution" "', argument " "2"" of type '" "Powerfield< double > *""'"); } - arg2 = reinterpret_cast< OutputData< double > * >(argp2); + arg2 = reinterpret_cast< Powerfield< double > * >(argp2); ((IDetector const *)arg1)->applyDetectorResolution(arg2); resultobj = SWIG_Py_Void(); return resultobj; @@ -38465,7 +38465,7 @@ SWIGINTERN PyObject *_wrap_IDetector_createDetectorIntensity(PyObject *SWIGUNUSE void *argp2 = 0 ; int res2 = 0 ; PyObject *swig_obj[2] ; - OutputData< double > *result = 0 ; + Powerfield< double > *result = 0 ; if (!SWIG_Python_UnpackTuple(args, "IDetector_createDetectorIntensity", 2, 2, swig_obj)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IDetector, 0 | 0 ); @@ -38481,8 +38481,8 @@ SWIGINTERN PyObject *_wrap_IDetector_createDetectorIntensity(PyObject *SWIGUNUSE SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDetector_createDetectorIntensity" "', argument " "2"" of type '" "std::vector< std::unique_ptr< DiffuseElement >,std::allocator< std::unique_ptr< DiffuseElement > > > const &""'"); } arg2 = reinterpret_cast< std::vector< std::unique_ptr< DiffuseElement >,std::allocator< std::unique_ptr< DiffuseElement > > > * >(argp2); - result = (OutputData< double > *)((IDetector const *)arg1)->createDetectorIntensity((std::vector< std::unique_ptr< DiffuseElement >,std::allocator< std::unique_ptr< DiffuseElement > > > const &)*arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + result = (Powerfield< double > *)((IDetector const *)arg1)->createDetectorIntensity((std::vector< std::unique_ptr< DiffuseElement >,std::allocator< std::unique_ptr< DiffuseElement > > > const &)*arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -41445,8 +41445,8 @@ fail: SWIGINTERN PyObject *_wrap_checkRelativeDifference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - OutputData< double > *arg1 = 0 ; - OutputData< double > *arg2 = 0 ; + Powerfield< double > *arg1 = 0 ; + Powerfield< double > *arg2 = 0 ; double arg3 ; void *argp1 = 0 ; int res1 = 0 ; @@ -41458,28 +41458,28 @@ SWIGINTERN PyObject *_wrap_checkRelativeDifference(PyObject *SWIGUNUSEDPARM(self bool result; if (!SWIG_Python_UnpackTuple(args, "checkRelativeDifference", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_OutputDataT_double_t, 0 | 0); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_PowerfieldT_double_t, 0 | 0); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "checkRelativeDifference" "', argument " "1"" of type '" "OutputData< double > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "checkRelativeDifference" "', argument " "1"" of type '" "Powerfield< double > const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "checkRelativeDifference" "', argument " "1"" of type '" "OutputData< double > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "checkRelativeDifference" "', argument " "1"" of type '" "Powerfield< double > const &""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_OutputDataT_double_t, 0 | 0); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_PowerfieldT_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "checkRelativeDifference" "', argument " "2"" of type '" "OutputData< double > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "checkRelativeDifference" "', argument " "2"" of type '" "Powerfield< double > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "checkRelativeDifference" "', argument " "2"" of type '" "OutputData< double > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "checkRelativeDifference" "', argument " "2"" of type '" "Powerfield< double > const &""'"); } - arg2 = reinterpret_cast< OutputData< double > * >(argp2); + arg2 = reinterpret_cast< Powerfield< double > * >(argp2); 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)DataUtils::Histo::checkRelativeDifference((OutputData< double > const &)*arg1,(OutputData< double > const &)*arg2,arg3); + result = (bool)DataUtils::Histo::checkRelativeDifference((Powerfield< double > const &)*arg1,(Powerfield< double > const &)*arg2,arg3); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -42145,7 +42145,7 @@ SWIGINTERN PyObject *_wrap_IHistogram_getData__SWIG_0(PyObject *SWIGUNUSEDPARM(s IHistogram *arg1 = (IHistogram *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - OutputData< CumulativeValue > *result = 0 ; + Powerfield< CumulativeValue > *result = 0 ; if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IHistogram, 0 | 0 ); @@ -42153,8 +42153,8 @@ SWIGINTERN PyObject *_wrap_IHistogram_getData__SWIG_0(PyObject *SWIGUNUSEDPARM(s SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IHistogram_getData" "', argument " "1"" of type '" "IHistogram const *""'"); } arg1 = reinterpret_cast< IHistogram * >(argp1); - result = (OutputData< CumulativeValue > *) &((IHistogram const *)arg1)->getData(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OutputDataT_CumulativeValue_t, 0 | 0 ); + result = (Powerfield< CumulativeValue > *) &((IHistogram const *)arg1)->getData(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PowerfieldT_CumulativeValue_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -42166,7 +42166,7 @@ SWIGINTERN PyObject *_wrap_IHistogram_getData__SWIG_1(PyObject *SWIGUNUSEDPARM(s IHistogram *arg1 = (IHistogram *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - OutputData< CumulativeValue > *result = 0 ; + Powerfield< CumulativeValue > *result = 0 ; if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IHistogram, 0 | 0 ); @@ -42174,8 +42174,8 @@ SWIGINTERN PyObject *_wrap_IHistogram_getData__SWIG_1(PyObject *SWIGUNUSEDPARM(s SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IHistogram_getData" "', argument " "1"" of type '" "IHistogram *""'"); } arg1 = reinterpret_cast< IHistogram * >(argp1); - result = (OutputData< CumulativeValue > *) &(arg1)->getData(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OutputDataT_CumulativeValue_t, 0 | 0 ); + result = (Powerfield< CumulativeValue > *) &(arg1)->getData(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PowerfieldT_CumulativeValue_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -43032,7 +43032,7 @@ fail: SWIGINTERN PyObject *_wrap_IHistogram_createHistogram(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - OutputData< double > *arg1 = 0 ; + Powerfield< double > *arg1 = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; @@ -43040,15 +43040,15 @@ SWIGINTERN PyObject *_wrap_IHistogram_createHistogram(PyObject *SWIGUNUSEDPARM(s if (!args) SWIG_fail; swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_OutputDataT_double_t, 0 | 0); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_PowerfieldT_double_t, 0 | 0); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IHistogram_createHistogram" "', argument " "1"" of type '" "OutputData< double > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IHistogram_createHistogram" "', argument " "1"" of type '" "Powerfield< double > const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IHistogram_createHistogram" "', argument " "1"" of type '" "OutputData< double > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IHistogram_createHistogram" "', argument " "1"" of type '" "Powerfield< double > const &""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); - result = (IHistogram *)IHistogram::createHistogram((OutputData< double > const &)*arg1); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); + result = (IHistogram *)IHistogram::createHistogram((Powerfield< double > const &)*arg1); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IHistogram, 0 | 0 ); return resultobj; fail: @@ -43146,7 +43146,7 @@ fail: } -SWIGINTERN PyObject *_wrap_IHistogram_createOutputData__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { +SWIGINTERN PyObject *_wrap_IHistogram_createPowerfield__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; IHistogram *arg1 = (IHistogram *) 0 ; IHistogram::DataType arg2 ; @@ -43154,55 +43154,55 @@ SWIGINTERN PyObject *_wrap_IHistogram_createOutputData__SWIG_0(PyObject *SWIGUNU int res1 = 0 ; int val2 ; int ecode2 = 0 ; - OutputData< double > *result = 0 ; + Powerfield< double > *result = 0 ; if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IHistogram, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IHistogram_createOutputData" "', argument " "1"" of type '" "IHistogram const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IHistogram_createPowerfield" "', argument " "1"" of type '" "IHistogram const *""'"); } arg1 = reinterpret_cast< IHistogram * >(argp1); ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IHistogram_createOutputData" "', argument " "2"" of type '" "IHistogram::DataType""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IHistogram_createPowerfield" "', argument " "2"" of type '" "IHistogram::DataType""'"); } arg2 = static_cast< IHistogram::DataType >(val2); - result = (OutputData< double > *)((IHistogram const *)arg1)->createOutputData(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + result = (Powerfield< double > *)((IHistogram const *)arg1)->createPowerfield(arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_IHistogram_createOutputData__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { +SWIGINTERN PyObject *_wrap_IHistogram_createPowerfield__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; IHistogram *arg1 = (IHistogram *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - OutputData< double > *result = 0 ; + Powerfield< double > *result = 0 ; if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IHistogram, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IHistogram_createOutputData" "', argument " "1"" of type '" "IHistogram const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IHistogram_createPowerfield" "', argument " "1"" of type '" "IHistogram const *""'"); } arg1 = reinterpret_cast< IHistogram * >(argp1); - result = (OutputData< double > *)((IHistogram const *)arg1)->createOutputData(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + result = (Powerfield< double > *)((IHistogram const *)arg1)->createPowerfield(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_IHistogram_createOutputData(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_IHistogram_createPowerfield(PyObject *self, PyObject *args) { Py_ssize_t argc; PyObject *argv[3] = { 0 }; - if (!(argc = SWIG_Python_UnpackTuple(args, "IHistogram_createOutputData", 0, 2, argv))) SWIG_fail; + if (!(argc = SWIG_Python_UnpackTuple(args, "IHistogram_createPowerfield", 0, 2, argv))) SWIG_fail; --argc; if (argc == 1) { int _v; @@ -43210,7 +43210,7 @@ SWIGINTERN PyObject *_wrap_IHistogram_createOutputData(PyObject *self, PyObject int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_IHistogram, 0); _v = SWIG_CheckState(res); if (_v) { - return _wrap_IHistogram_createOutputData__SWIG_1(self, argc, argv); + return _wrap_IHistogram_createPowerfield__SWIG_1(self, argc, argv); } } if (argc == 2) { @@ -43224,16 +43224,16 @@ SWIGINTERN PyObject *_wrap_IHistogram_createOutputData(PyObject *self, PyObject _v = SWIG_CheckState(res); } if (_v) { - return _wrap_IHistogram_createOutputData__SWIG_0(self, argc, argv); + return _wrap_IHistogram_createPowerfield__SWIG_0(self, argc, argv); } } } fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'IHistogram_createOutputData'.\n" + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'IHistogram_createPowerfield'.\n" " Possible C/C++ prototypes are:\n" - " IHistogram::createOutputData(IHistogram::DataType) const\n" - " IHistogram::createOutputData() const\n"); + " IHistogram::createPowerfield(IHistogram::DataType) const\n" + " IHistogram::createPowerfield() const\n"); return 0; } @@ -43548,21 +43548,21 @@ fail: SWIGINTERN PyObject *_wrap_new_Histogram1D__SWIG_3(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; - OutputData< double > *arg1 = 0 ; + Powerfield< double > *arg1 = 0 ; void *argp1 = 0 ; int res1 = 0 ; Histogram1D *result = 0 ; if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_OutputDataT_double_t, 0 | 0); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_PowerfieldT_double_t, 0 | 0); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Histogram1D" "', argument " "1"" of type '" "OutputData< double > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Histogram1D" "', argument " "1"" of type '" "Powerfield< double > const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Histogram1D" "', argument " "1"" of type '" "OutputData< double > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Histogram1D" "', argument " "1"" of type '" "Powerfield< double > const &""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); - result = (Histogram1D *)new Histogram1D((OutputData< double > const &)*arg1); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); + result = (Histogram1D *)new Histogram1D((Powerfield< double > const &)*arg1); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Histogram1D, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -43588,7 +43588,7 @@ SWIGINTERN PyObject *_wrap_new_Histogram1D(PyObject *self, PyObject *args) { } if (argc == 1) { int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_OutputDataT_double_t, SWIG_POINTER_NO_NULL | 0); + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_PowerfieldT_double_t, SWIG_POINTER_NO_NULL | 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_Histogram1D__SWIG_3(self, argc, argv); @@ -43637,7 +43637,7 @@ fail: " Histogram1D::Histogram1D(int,double,double)\n" " Histogram1D::Histogram1D(int,std::vector< double,std::allocator< double > > const &)\n" " Histogram1D::Histogram1D(IAxis const &)\n" - " Histogram1D::Histogram1D(OutputData< double > const &)\n"); + " Histogram1D::Histogram1D(Powerfield< double > const &)\n"); return 0; } @@ -44174,21 +44174,21 @@ fail: SWIGINTERN PyObject *_wrap_new_Histogram2D__SWIG_3(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; - OutputData< double > *arg1 = 0 ; + Powerfield< double > *arg1 = 0 ; void *argp1 = 0 ; int res1 = 0 ; Histogram2D *result = 0 ; if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_OutputDataT_double_t, 0 | 0); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_PowerfieldT_double_t, 0 | 0); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Histogram2D" "', argument " "1"" of type '" "OutputData< double > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Histogram2D" "', argument " "1"" of type '" "Powerfield< double > const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Histogram2D" "', argument " "1"" of type '" "OutputData< double > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Histogram2D" "', argument " "1"" of type '" "Powerfield< double > const &""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); - result = (Histogram2D *)new Histogram2D((OutputData< double > const &)*arg1); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); + result = (Histogram2D *)new Histogram2D((Powerfield< double > const &)*arg1); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Histogram2D, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -44229,7 +44229,7 @@ SWIGINTERN PyObject *_wrap_new_Histogram2D(PyObject *self, PyObject *args) { --argc; if (argc == 1) { int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_OutputDataT_double_t, SWIG_POINTER_NO_NULL | 0); + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_PowerfieldT_double_t, SWIG_POINTER_NO_NULL | 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_Histogram2D__SWIG_3(self, argc, argv); @@ -44326,7 +44326,7 @@ fail: " Histogram2D::Histogram2D(int,double,double,int,double,double)\n" " Histogram2D::Histogram2D(int,std::vector< double,std::allocator< double > > const &,int,std::vector< double,std::allocator< double > > const &)\n" " Histogram2D::Histogram2D(IAxis const &,IAxis const &)\n" - " Histogram2D::Histogram2D(OutputData< double > const &)\n" + " Histogram2D::Histogram2D(Powerfield< double > const &)\n" " Histogram2D::Histogram2D(std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >)\n"); return 0; } @@ -44987,34 +44987,34 @@ SWIGINTERN PyObject *Histogram2D_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObje return SWIG_Python_InitShadowInstance(args); } -SWIGINTERN PyObject *_wrap_IntensityDataIOFactory_readOutputData__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { +SWIGINTERN PyObject *_wrap_IOFactory_readPowerfield__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::string *arg1 = 0 ; - IntensityDataIOFactory::LoaderSelector arg2 ; + IOFactory::LoaderSelector arg2 ; int res1 = SWIG_OLDOBJ ; int val2 ; int ecode2 = 0 ; - OutputData< double > *result = 0 ; + Powerfield< double > *result = 0 ; if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; { std::string *ptr = (std::string *)0; res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityDataIOFactory_readOutputData" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IOFactory_readPowerfield" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntensityDataIOFactory_readOutputData" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IOFactory_readPowerfield" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntensityDataIOFactory_readOutputData" "', argument " "2"" of type '" "IntensityDataIOFactory::LoaderSelector""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IOFactory_readPowerfield" "', argument " "2"" of type '" "IOFactory::LoaderSelector""'"); } - arg2 = static_cast< IntensityDataIOFactory::LoaderSelector >(val2); - result = (OutputData< double > *)IntensityDataIOFactory::readOutputData((std::string const &)*arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + arg2 = static_cast< IOFactory::LoaderSelector >(val2); + result = (Powerfield< double > *)IOFactory::readPowerfield((std::string const &)*arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; fail: @@ -45023,26 +45023,26 @@ fail: } -SWIGINTERN PyObject *_wrap_IntensityDataIOFactory_readOutputData__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { +SWIGINTERN PyObject *_wrap_IOFactory_readPowerfield__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::string *arg1 = 0 ; int res1 = SWIG_OLDOBJ ; - OutputData< double > *result = 0 ; + Powerfield< double > *result = 0 ; if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; { std::string *ptr = (std::string *)0; res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityDataIOFactory_readOutputData" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IOFactory_readPowerfield" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntensityDataIOFactory_readOutputData" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IOFactory_readPowerfield" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } - result = (OutputData< double > *)IntensityDataIOFactory::readOutputData((std::string const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OutputDataT_double_t, SWIG_POINTER_OWN | 0 ); + result = (Powerfield< double > *)IOFactory::readPowerfield((std::string const &)*arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PowerfieldT_double_t, SWIG_POINTER_OWN | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; fail: @@ -45051,20 +45051,20 @@ fail: } -SWIGINTERN PyObject *_wrap_IntensityDataIOFactory_readOutputData(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_IOFactory_readPowerfield(PyObject *self, PyObject *args) { Py_ssize_t argc; PyObject *argv[3] = { 0 }; - if (!(argc = SWIG_Python_UnpackTuple(args, "IntensityDataIOFactory_readOutputData", 0, 2, argv))) SWIG_fail; + if (!(argc = SWIG_Python_UnpackTuple(args, "IOFactory_readPowerfield", 0, 2, argv))) SWIG_fail; --argc; if (argc == 1) { int _v; int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0)); _v = SWIG_CheckState(res); if (_v) { - return _wrap_IntensityDataIOFactory_readOutputData__SWIG_1(self, argc, argv); + return _wrap_IOFactory_readPowerfield__SWIG_1(self, argc, argv); } } if (argc == 2) { @@ -45077,26 +45077,26 @@ SWIGINTERN PyObject *_wrap_IntensityDataIOFactory_readOutputData(PyObject *self, _v = SWIG_CheckState(res); } if (_v) { - return _wrap_IntensityDataIOFactory_readOutputData__SWIG_0(self, argc, argv); + return _wrap_IOFactory_readPowerfield__SWIG_0(self, argc, argv); } } } fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'IntensityDataIOFactory_readOutputData'.\n" + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'IOFactory_readPowerfield'.\n" " Possible C/C++ prototypes are:\n" - " IntensityDataIOFactory::readOutputData(std::string const &,IntensityDataIOFactory::LoaderSelector)\n" - " IntensityDataIOFactory::readOutputData(std::string const &)\n"); + " IOFactory::readPowerfield(std::string const &,IOFactory::LoaderSelector)\n" + " IOFactory::readPowerfield(std::string const &)\n"); return 0; } -SWIGINTERN PyObject *_wrap_IntensityDataIOFactory_readReflectometryData(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_IOFactory_readReflectometryData(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::string *arg1 = 0 ; int res1 = SWIG_OLDOBJ ; PyObject *swig_obj[1] ; - OutputData< double > *result = 0 ; + Powerfield< double > *result = 0 ; if (!args) SWIG_fail; swig_obj[0] = args; @@ -45104,15 +45104,15 @@ SWIGINTERN PyObject *_wrap_IntensityDataIOFactory_readReflectometryData(PyObject std::string *ptr = (std::string *)0; res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityDataIOFactory_readReflectometryData" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IOFactory_readReflectometryData" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntensityDataIOFactory_readReflectometryData" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IOFactory_readReflectometryData" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } - result = (OutputData< double > *)IntensityDataIOFactory::readReflectometryData((std::string const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OutputDataT_double_t, 0 | 0 ); + result = (Powerfield< double > *)IOFactory::readReflectometryData((std::string const &)*arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PowerfieldT_double_t, 0 | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; fail: @@ -45121,7 +45121,7 @@ fail: } -SWIGINTERN PyObject *_wrap_IntensityDataIOFactory_readIntensityData(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_IOFactory_readIntensityData(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::string *arg1 = 0 ; int res1 = SWIG_OLDOBJ ; @@ -45134,14 +45134,14 @@ SWIGINTERN PyObject *_wrap_IntensityDataIOFactory_readIntensityData(PyObject *SW std::string *ptr = (std::string *)0; res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityDataIOFactory_readIntensityData" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IOFactory_readIntensityData" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntensityDataIOFactory_readIntensityData" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IOFactory_readIntensityData" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } - result = (IHistogram *)IntensityDataIOFactory::readIntensityData((std::string const &)*arg1); + result = (IHistogram *)IOFactory::readIntensityData((std::string const &)*arg1); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IHistogram, SWIG_POINTER_OWN | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; @@ -45151,36 +45151,36 @@ fail: } -SWIGINTERN PyObject *_wrap_IntensityDataIOFactory_writeOutputData(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_IOFactory_writePowerfield(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - OutputData< double > *arg1 = 0 ; + Powerfield< double > *arg1 = 0 ; std::string *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 = SWIG_OLDOBJ ; PyObject *swig_obj[2] ; - if (!SWIG_Python_UnpackTuple(args, "IntensityDataIOFactory_writeOutputData", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_OutputDataT_double_t, 0 | 0); + if (!SWIG_Python_UnpackTuple(args, "IOFactory_writePowerfield", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_PowerfieldT_double_t, 0 | 0); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityDataIOFactory_writeOutputData" "', argument " "1"" of type '" "OutputData< double > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IOFactory_writePowerfield" "', argument " "1"" of type '" "Powerfield< double > const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntensityDataIOFactory_writeOutputData" "', argument " "1"" of type '" "OutputData< double > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IOFactory_writePowerfield" "', argument " "1"" of type '" "Powerfield< double > const &""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); + arg1 = reinterpret_cast< Powerfield< double > * >(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 '" "IntensityDataIOFactory_writeOutputData" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IOFactory_writePowerfield" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntensityDataIOFactory_writeOutputData" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IOFactory_writePowerfield" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } - IntensityDataIOFactory::writeOutputData((OutputData< double > const &)*arg1,(std::string const &)*arg2); + IOFactory::writePowerfield((Powerfield< double > const &)*arg1,(std::string const &)*arg2); resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; @@ -45190,7 +45190,7 @@ fail: } -SWIGINTERN PyObject *_wrap_IntensityDataIOFactory_writeIntensityData(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_IOFactory_writeIntensityData(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; IHistogram *arg1 = 0 ; std::string *arg2 = 0 ; @@ -45199,27 +45199,27 @@ SWIGINTERN PyObject *_wrap_IntensityDataIOFactory_writeIntensityData(PyObject *S int res2 = SWIG_OLDOBJ ; PyObject *swig_obj[2] ; - if (!SWIG_Python_UnpackTuple(args, "IntensityDataIOFactory_writeIntensityData", 2, 2, swig_obj)) SWIG_fail; + if (!SWIG_Python_UnpackTuple(args, "IOFactory_writeIntensityData", 2, 2, swig_obj)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_IHistogram, 0 | 0); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityDataIOFactory_writeIntensityData" "', argument " "1"" of type '" "IHistogram const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IOFactory_writeIntensityData" "', argument " "1"" of type '" "IHistogram const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntensityDataIOFactory_writeIntensityData" "', argument " "1"" of type '" "IHistogram const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IOFactory_writeIntensityData" "', argument " "1"" of type '" "IHistogram const &""'"); } arg1 = reinterpret_cast< IHistogram * >(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 '" "IntensityDataIOFactory_writeIntensityData" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IOFactory_writeIntensityData" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntensityDataIOFactory_writeIntensityData" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IOFactory_writeIntensityData" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } - IntensityDataIOFactory::writeIntensityData((IHistogram const &)*arg1,(std::string const &)*arg2); + IOFactory::writeIntensityData((IHistogram const &)*arg1,(std::string const &)*arg2); resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; @@ -45229,7 +45229,7 @@ fail: } -SWIGINTERN PyObject *_wrap_IntensityDataIOFactory_writeSimulationResult(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_IOFactory_writeSimulationResult(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SimulationResult *arg1 = 0 ; std::string *arg2 = 0 ; @@ -45238,27 +45238,27 @@ SWIGINTERN PyObject *_wrap_IntensityDataIOFactory_writeSimulationResult(PyObject int res2 = SWIG_OLDOBJ ; PyObject *swig_obj[2] ; - if (!SWIG_Python_UnpackTuple(args, "IntensityDataIOFactory_writeSimulationResult", 2, 2, swig_obj)) SWIG_fail; + if (!SWIG_Python_UnpackTuple(args, "IOFactory_writeSimulationResult", 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 '" "IntensityDataIOFactory_writeSimulationResult" "', argument " "1"" of type '" "SimulationResult const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IOFactory_writeSimulationResult" "', argument " "1"" of type '" "SimulationResult const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntensityDataIOFactory_writeSimulationResult" "', argument " "1"" of type '" "SimulationResult const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IOFactory_writeSimulationResult" "', argument " "1"" of type '" "SimulationResult const &""'"); } 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 '" "IntensityDataIOFactory_writeSimulationResult" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IOFactory_writeSimulationResult" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntensityDataIOFactory_writeSimulationResult" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IOFactory_writeSimulationResult" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } - IntensityDataIOFactory::writeSimulationResult((SimulationResult const &)*arg1,(std::string const &)*arg2); + IOFactory::writeSimulationResult((SimulationResult const &)*arg1,(std::string const &)*arg2); resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; @@ -45268,33 +45268,33 @@ fail: } -SWIGINTERN PyObject *_wrap_new_IntensityDataIOFactory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_new_IOFactory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - IntensityDataIOFactory *result = 0 ; + IOFactory *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "new_IntensityDataIOFactory", 0, 0, 0)) SWIG_fail; - result = (IntensityDataIOFactory *)new IntensityDataIOFactory(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IntensityDataIOFactory, SWIG_POINTER_NEW | 0 ); + if (!SWIG_Python_UnpackTuple(args, "new_IOFactory", 0, 0, 0)) SWIG_fail; + result = (IOFactory *)new IOFactory(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IOFactory, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_delete_IntensityDataIOFactory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_delete_IOFactory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - IntensityDataIOFactory *arg1 = (IntensityDataIOFactory *) 0 ; + IOFactory *arg1 = (IOFactory *) 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_IntensityDataIOFactory, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IOFactory, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IntensityDataIOFactory" "', argument " "1"" of type '" "IntensityDataIOFactory *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IOFactory" "', argument " "1"" of type '" "IOFactory *""'"); } - arg1 = reinterpret_cast< IntensityDataIOFactory * >(argp1); + arg1 = reinterpret_cast< IOFactory * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; @@ -45303,14 +45303,14 @@ fail: } -SWIGINTERN PyObject *IntensityDataIOFactory_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *IOFactory_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_IntensityDataIOFactory, SWIG_NewClientData(obj)); + SWIG_TypeNewClientData(SWIGTYPE_p_IOFactory, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } -SWIGINTERN PyObject *IntensityDataIOFactory_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *IOFactory_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { return SWIG_Python_InitShadowInstance(args); } @@ -45538,7 +45538,7 @@ fail: SWIGINTERN PyObject *_wrap_new_SimulationResult__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; - OutputData< double > *arg1 = 0 ; + Powerfield< double > *arg1 = 0 ; ICoordSystem *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -45547,14 +45547,14 @@ SWIGINTERN PyObject *_wrap_new_SimulationResult__SWIG_1(PyObject *SWIGUNUSEDPARM SimulationResult *result = 0 ; if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_OutputDataT_double_t, 0 | 0); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_PowerfieldT_double_t, 0 | 0); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SimulationResult" "', argument " "1"" of type '" "OutputData< double > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SimulationResult" "', argument " "1"" of type '" "Powerfield< double > const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SimulationResult" "', argument " "1"" of type '" "OutputData< double > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SimulationResult" "', argument " "1"" of type '" "Powerfield< double > const &""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_ICoordSystem, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SimulationResult" "', argument " "2"" of type '" "ICoordSystem const &""'"); @@ -45563,7 +45563,7 @@ SWIGINTERN PyObject *_wrap_new_SimulationResult__SWIG_1(PyObject *SWIGUNUSEDPARM SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SimulationResult" "', argument " "2"" of type '" "ICoordSystem const &""'"); } arg2 = reinterpret_cast< ICoordSystem * >(argp2); - result = (SimulationResult *)new SimulationResult((OutputData< double > const &)*arg1,(ICoordSystem const &)*arg2); + result = (SimulationResult *)new SimulationResult((Powerfield< double > const &)*arg1,(ICoordSystem const &)*arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SimulationResult, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -45573,7 +45573,7 @@ fail: SWIGINTERN PyObject *_wrap_new_SimulationResult__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; - OutputData< double > *arg1 = 0 ; + Powerfield< double > *arg1 = 0 ; ICoordSystem **arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -45582,14 +45582,14 @@ SWIGINTERN PyObject *_wrap_new_SimulationResult__SWIG_2(PyObject *SWIGUNUSEDPARM SimulationResult *result = 0 ; if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_OutputDataT_double_t, 0 | 0); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_PowerfieldT_double_t, 0 | 0); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SimulationResult" "', argument " "1"" of type '" "OutputData< double > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SimulationResult" "', argument " "1"" of type '" "Powerfield< double > const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SimulationResult" "', argument " "1"" of type '" "OutputData< double > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SimulationResult" "', argument " "1"" of type '" "Powerfield< double > const &""'"); } - arg1 = reinterpret_cast< OutputData< double > * >(argp1); + arg1 = reinterpret_cast< Powerfield< double > * >(argp1); res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_p_ICoordSystem, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SimulationResult" "', argument " "2"" of type '" "ICoordSystem const *&&""'"); @@ -45598,7 +45598,7 @@ SWIGINTERN PyObject *_wrap_new_SimulationResult__SWIG_2(PyObject *SWIGUNUSEDPARM SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SimulationResult" "', argument " "2"" of type '" "ICoordSystem const *&&""'"); } arg2 = reinterpret_cast< ICoordSystem ** >(argp2); - result = (SimulationResult *)new SimulationResult((OutputData< double > const &)*arg1,(ICoordSystem const *&&)*arg2); + result = (SimulationResult *)new SimulationResult((Powerfield< double > const &)*arg1,(ICoordSystem const *&&)*arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SimulationResult, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -45706,7 +45706,7 @@ SWIGINTERN PyObject *_wrap_new_SimulationResult(PyObject *self, PyObject *args) } if (argc == 2) { int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_OutputDataT_double_t, SWIG_POINTER_NO_NULL | 0); + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_PowerfieldT_double_t, SWIG_POINTER_NO_NULL | 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_ICoordSystem, SWIG_POINTER_NO_NULL | 0); @@ -45718,7 +45718,7 @@ SWIGINTERN PyObject *_wrap_new_SimulationResult(PyObject *self, PyObject *args) } if (argc == 2) { int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_OutputDataT_double_t, SWIG_POINTER_NO_NULL | 0); + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_PowerfieldT_double_t, SWIG_POINTER_NO_NULL | 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; @@ -45734,8 +45734,8 @@ fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_SimulationResult'.\n" " Possible C/C++ prototypes are:\n" " SimulationResult::SimulationResult()\n" - " SimulationResult::SimulationResult(OutputData< double > const &,ICoordSystem const &)\n" - " SimulationResult::SimulationResult(OutputData< double > const &,ICoordSystem const *&&)\n" + " SimulationResult::SimulationResult(Powerfield< double > const &,ICoordSystem const &)\n" + " SimulationResult::SimulationResult(Powerfield< double > const &,ICoordSystem const *&&)\n" " SimulationResult::SimulationResult(SimulationResult const &)\n" " SimulationResult::SimulationResult(SimulationResult &&)\n"); return 0; @@ -47176,7 +47176,7 @@ static PyMethodDef SwigMethods[] = { { "vector_R3_size", _wrap_vector_R3_size, METH_O, "vector_R3_size(vector_R3 self) -> std::vector< Vec3< double > >::size_type"}, { "vector_R3_swap", _wrap_vector_R3_swap, METH_VARARGS, "\n" "vector_R3_swap(vector_R3 self, vector_R3 v)\n" - "void swap(OutputDataIterator< TValue, TContainer > &left, OutputDataIterator< TValue, TContainer > &right)\n" + "void swap(PowerfieldIterator< TValue, TContainer > &left, PowerfieldIterator< TValue, TContainer > &right)\n" "\n" "make Swappable \n" "\n" @@ -47268,7 +47268,7 @@ static PyMethodDef SwigMethods[] = { { "vector_C3_size", _wrap_vector_C3_size, METH_O, "vector_C3_size(vector_C3 self) -> std::vector< Vec3< std::complex< double > > >::size_type"}, { "vector_C3_swap", _wrap_vector_C3_swap, METH_VARARGS, "\n" "vector_C3_swap(vector_C3 self, vector_C3 v)\n" - "void swap(OutputDataIterator< TValue, TContainer > &left, OutputDataIterator< TValue, TContainer > &right)\n" + "void swap(PowerfieldIterator< TValue, TContainer > &left, PowerfieldIterator< TValue, TContainer > &right)\n" "\n" "make Swappable \n" "\n" @@ -47310,103 +47310,103 @@ static PyMethodDef SwigMethods[] = { { "new_IntensityData", _wrap_new_IntensityData, METH_VARARGS, "\n" "IntensityData()\n" "new_IntensityData(IntensityData arg1) -> IntensityData\n" - "OutputData< T >::OutputData(OutputData &&)\n" + "Powerfield< T >::Powerfield(Powerfield &&)\n" "\n" ""}, { "delete_IntensityData", _wrap_delete_IntensityData, METH_O, "\n" "delete_IntensityData(IntensityData self)\n" - "OutputData< T >::~OutputData()\n" + "Powerfield< T >::~Powerfield()\n" "\n" ""}, { "IntensityData_clone", _wrap_IntensityData_clone, METH_O, "\n" "IntensityData_clone(IntensityData self) -> IntensityData\n" - "OutputData< T > * OutputData< T >::clone() const\n" + "Powerfield< T > * Powerfield< T >::clone() const\n" "\n" ""}, { "IntensityData_copyFrom", _wrap_IntensityData_copyFrom, METH_VARARGS, "\n" "IntensityData_copyFrom(IntensityData self, IntensityData other)\n" - "void OutputData< T >::copyFrom(const OutputData< T > &other)\n" + "void Powerfield< T >::copyFrom(const Powerfield< T > &other)\n" "\n" ""}, { "IntensityData_meanValues", _wrap_IntensityData_meanValues, METH_O, "\n" "IntensityData_meanValues(IntensityData self) -> IntensityData\n" - "OutputData< double > * OutputData< T >::meanValues() const\n" + "Powerfield< double > * Powerfield< T >::meanValues() const\n" "\n" ""}, { "IntensityData_addAxis", _wrap_IntensityData_addAxis, METH_VARARGS, "\n" "IntensityData_addAxis(IntensityData self, IAxis new_axis)\n" "IntensityData_addAxis(IntensityData self, std::string const & name, size_t size, double start, double end)\n" - "void OutputData< T >::addAxis(const std::string &name, size_t size, double start, double end)\n" + "void Powerfield< T >::addAxis(const std::string &name, size_t size, double start, double end)\n" "\n" ""}, { "IntensityData_axis", _wrap_IntensityData_axis, METH_VARARGS, "\n" "IntensityData_axis(IntensityData self, size_t serial_number) -> IAxis\n" - "const IAxis & OutputData< T >::axis(size_t serial_number) const\n" + "const IAxis & Powerfield< T >::axis(size_t serial_number) const\n" "\n" "Returns axis with given serial number. \n" "\n" ""}, { "IntensityData_rank", _wrap_IntensityData_rank, METH_O, "\n" "IntensityData_rank(IntensityData self) -> size_t\n" - "size_t OutputData< T >::rank() const\n" + "size_t Powerfield< T >::rank() const\n" "\n" "Returns number of dimensions. \n" "\n" ""}, { "IntensityData_getAllocatedSize", _wrap_IntensityData_getAllocatedSize, METH_O, "\n" "IntensityData_getAllocatedSize(IntensityData self) -> size_t\n" - "size_t OutputData< T >::getAllocatedSize() const\n" + "size_t Powerfield< T >::getAllocatedSize() const\n" "\n" "Returns total size of data buffer (product of bin number in every dimension). \n" "\n" ""}, { "IntensityData_getAllSizes", _wrap_IntensityData_getAllSizes, METH_O, "\n" "IntensityData_getAllSizes(IntensityData self) -> std::vector< size_t,std::allocator< size_t > >\n" - "std::vector< size_t > OutputData< T >::getAllSizes() const\n" + "std::vector< size_t > Powerfield< T >::getAllSizes() const\n" "\n" "Returns all sizes of its axes. \n" "\n" ""}, { "IntensityData_getRawDataVector", _wrap_IntensityData_getRawDataVector, METH_O, "\n" "IntensityData_getRawDataVector(IntensityData self) -> vdouble1d_t\n" - "std::vector< T > OutputData< T >::getRawDataVector() const\n" + "std::vector< T > Powerfield< T >::getRawDataVector() const\n" "\n" "Returns copy of raw data vector. \n" "\n" ""}, { "IntensityData_totalSum", _wrap_IntensityData_totalSum, METH_O, "\n" "IntensityData_totalSum(IntensityData self) -> double\n" - "T OutputData< T >::totalSum() const\n" + "T Powerfield< T >::totalSum() const\n" "\n" "Returns sum of all values in the data structure. \n" "\n" ""}, { "IntensityData_max", _wrap_IntensityData_max, METH_O, "\n" "IntensityData_max(IntensityData self) -> double\n" - "T OutputData< T >::max() const\n" + "T Powerfield< T >::max() const\n" "\n" "Returns maximum value in the data structure. \n" "\n" ""}, { "IntensityData_begin", _wrap_IntensityData_begin, METH_VARARGS, "\n" - "IntensityData_begin(IntensityData self) -> OutputData< double >::iterator\n" - "IntensityData_begin(IntensityData self) -> OutputData< double >::const_iterator\n" - "OutputData< T >::const_iterator OutputData< T >::begin() const\n" + "IntensityData_begin(IntensityData self) -> Powerfield< double >::iterator\n" + "IntensityData_begin(IntensityData self) -> Powerfield< double >::const_iterator\n" + "Powerfield< T >::const_iterator Powerfield< T >::begin() const\n" "\n" "Returns read-only iterator that points to the first element. \n" "\n" ""}, { "IntensityData_end", _wrap_IntensityData_end, METH_VARARGS, "\n" - "IntensityData_end(IntensityData self) -> OutputData< double >::iterator\n" - "IntensityData_end(IntensityData self) -> OutputData< double >::const_iterator\n" - "const_iterator OutputData< T >::end() const\n" + "IntensityData_end(IntensityData self) -> Powerfield< double >::iterator\n" + "IntensityData_end(IntensityData self) -> Powerfield< double >::const_iterator\n" + "const_iterator Powerfield< T >::end() const\n" "\n" "Returns read-only iterator that points to the one past last element. \n" "\n" ""}, { "IntensityData_getAxesBinIndices", _wrap_IntensityData_getAxesBinIndices, METH_VARARGS, "\n" "IntensityData_getAxesBinIndices(IntensityData self, size_t global_index) -> vector_integer_t\n" - "std::vector< int > OutputData< T >::getAxesBinIndices(size_t global_index) const\n" + "std::vector< int > Powerfield< T >::getAxesBinIndices(size_t global_index) const\n" "\n" "Returns vector of axes indices for given global index\n" "\n" @@ -47422,7 +47422,7 @@ static PyMethodDef SwigMethods[] = { { "IntensityData_getAxisBinIndex", _wrap_IntensityData_getAxisBinIndex, METH_VARARGS, "\n" "IntensityData_getAxisBinIndex(IntensityData self, size_t global_index, size_t i_selected_axis) -> size_t\n" "IntensityData_getAxisBinIndex(IntensityData self, size_t global_index, std::string const & axis_name) -> size_t\n" - "size_t OutputData< T >::getAxisBinIndex(size_t global_index, const std::string &axis_name) const\n" + "size_t Powerfield< T >::getAxisBinIndex(size_t global_index, const std::string &axis_name) const\n" "\n" "Returns axis bin index for given global index\n" "\n" @@ -47440,7 +47440,7 @@ static PyMethodDef SwigMethods[] = { ""}, { "IntensityData_toGlobalIndex", _wrap_IntensityData_toGlobalIndex, METH_VARARGS, "\n" "IntensityData_toGlobalIndex(IntensityData self, std::vector< unsigned int,std::allocator< unsigned int > > const & axes_indices) -> size_t\n" - "size_t OutputData< T >::toGlobalIndex(const std::vector< unsigned > &axes_indices) const\n" + "size_t Powerfield< T >::toGlobalIndex(const std::vector< unsigned > &axes_indices) const\n" "\n" "Returns global index for specified indices of axes\n" "\n" @@ -47455,7 +47455,7 @@ static PyMethodDef SwigMethods[] = { ""}, { "IntensityData_findGlobalIndex", _wrap_IntensityData_findGlobalIndex, METH_VARARGS, "\n" "IntensityData_findGlobalIndex(IntensityData self, vdouble1d_t coordinates) -> size_t\n" - "size_t OutputData< T >::findGlobalIndex(const std::vector< double > &coordinates) const\n" + "size_t Powerfield< T >::findGlobalIndex(const std::vector< double > &coordinates) const\n" "\n" "Returns global index for specified axes values\n" "\n" @@ -47471,7 +47471,7 @@ static PyMethodDef SwigMethods[] = { { "IntensityData_getAxisValue", _wrap_IntensityData_getAxisValue, METH_VARARGS, "\n" "IntensityData_getAxisValue(IntensityData self, size_t global_index, size_t i_selected_axis) -> double\n" "IntensityData_getAxisValue(IntensityData self, size_t global_index, std::string const & axis_name) -> double\n" - "double OutputData< T >::getAxisValue(size_t global_index, const std::string &axis_name) const\n" + "double Powerfield< T >::getAxisValue(size_t global_index, const std::string &axis_name) const\n" "\n" "Returns the value of selected axis for given global_index.\n" "\n" @@ -47489,7 +47489,7 @@ static PyMethodDef SwigMethods[] = { ""}, { "IntensityData_getAxesValues", _wrap_IntensityData_getAxesValues, METH_VARARGS, "\n" "IntensityData_getAxesValues(IntensityData self, size_t global_index) -> vdouble1d_t\n" - "std::vector< double > OutputData< T >::getAxesValues(size_t global_index) const\n" + "std::vector< double > Powerfield< T >::getAxesValues(size_t global_index) const\n" "\n" "Returns values on all defined axes for given globalbin number\n" "\n" @@ -47505,7 +47505,7 @@ static PyMethodDef SwigMethods[] = { { "IntensityData_getAxisBin", _wrap_IntensityData_getAxisBin, METH_VARARGS, "\n" "IntensityData_getAxisBin(IntensityData self, size_t global_index, size_t i_selected_axis) -> Bin1D\n" "IntensityData_getAxisBin(IntensityData self, size_t global_index, std::string const & axis_name) -> Bin1D\n" - "Bin1D OutputData< T >::getAxisBin(size_t global_index, const std::string &axis_name) const\n" + "Bin1D Powerfield< T >::getAxisBin(size_t global_index, const std::string &axis_name) const\n" "\n" "Returns bin of selected axis for given global_index.\n" "\n" @@ -47523,35 +47523,35 @@ static PyMethodDef SwigMethods[] = { ""}, { "IntensityData_clear", _wrap_IntensityData_clear, METH_O, "\n" "IntensityData_clear(IntensityData self)\n" - "void OutputData< T >::clear()\n" + "void Powerfield< T >::clear()\n" "\n" "Sets object into initial state (no dimensions, data) \n" "\n" ""}, { "IntensityData_setAllTo", _wrap_IntensityData_setAllTo, METH_VARARGS, "\n" "IntensityData_setAllTo(IntensityData self, double const & value)\n" - "void OutputData< T >::setAllTo(const T &value)\n" + "void Powerfield< T >::setAllTo(const T &value)\n" "\n" "Sets content of output data to specific value. \n" "\n" ""}, { "IntensityData_setAxisSizes", _wrap_IntensityData_setAxisSizes, METH_VARARGS, "\n" "IntensityData_setAxisSizes(IntensityData self, size_t rank, int * n_dims)\n" - "void OutputData< T >::setAxisSizes(size_t rank, int *n_dims)\n" + "void Powerfield< T >::setAxisSizes(size_t rank, int *n_dims)\n" "\n" "Adds 'rank' axes with indicated sizes. \n" "\n" ""}, { "IntensityData_setRawDataVector", _wrap_IntensityData_setRawDataVector, METH_VARARGS, "\n" "IntensityData_setRawDataVector(IntensityData self, vdouble1d_t data_vector)\n" - "void OutputData< T >::setRawDataVector(const std::vector< T > &data_vector)\n" + "void Powerfield< T >::setRawDataVector(const std::vector< T > &data_vector)\n" "\n" "Sets new values to raw data vector. \n" "\n" ""}, { "IntensityData_setRawDataArray", _wrap_IntensityData_setRawDataArray, METH_VARARGS, "\n" "IntensityData_setRawDataArray(IntensityData self, double const * source)\n" - "void OutputData< T >::setRawDataArray(const T *source)\n" + "void Powerfield< T >::setRawDataArray(const T *source)\n" "\n" "Sets new values to raw data array. \n" "\n" @@ -47562,33 +47562,33 @@ static PyMethodDef SwigMethods[] = { { "IntensityData___imul__", _wrap_IntensityData___imul__, METH_VARARGS, "IntensityData___imul__(IntensityData self, IntensityData right) -> IntensityData"}, { "IntensityData_getValue", _wrap_IntensityData_getValue, METH_VARARGS, "\n" "IntensityData_getValue(IntensityData self, size_t index) -> double\n" - "double OutputData< double >::getValue(size_t index) const\n" + "double Powerfield< double >::getValue(size_t index) const\n" "\n" ""}, { "IntensityData_getArray", _wrap_IntensityData_getArray, METH_O, "\n" "IntensityData_getArray(IntensityData self) -> PyObject *\n" - "PyObject * OutputData< double >::getArray() const\n" + "PyObject * Powerfield< double >::getArray() const\n" "\n" "Returns data as Python numpy array. \n" "\n" ""}, { "IntensityData_isInitialized", _wrap_IntensityData_isInitialized, METH_O, "\n" "IntensityData_isInitialized(IntensityData self) -> bool\n" - "bool OutputData< T >::isInitialized() const\n" + "bool Powerfield< T >::isInitialized() const\n" "\n" "Returns true if object is correctly initialized. \n" "\n" ""}, { "IntensityData_allocate", _wrap_IntensityData_allocate, METH_O, "\n" "IntensityData_allocate(IntensityData self)\n" - "void OutputData< T >::allocate()\n" + "void Powerfield< T >::allocate()\n" "\n" "Allocates memory for current dimensions configuration. \n" "\n" ""}, { "IntensityData_normalizedToMaximum", _wrap_IntensityData_normalizedToMaximum, METH_O, "\n" "IntensityData_normalizedToMaximum(IntensityData self) -> IntensityData\n" - "const OutputData< double > & OutputData< double >::normalizedToMaximum()\n" + "const Powerfield< double > & Powerfield< double >::normalizedToMaximum()\n" "\n" ""}, { "IntensityData___getitem__", _wrap_IntensityData___getitem__, METH_VARARGS, "IntensityData___getitem__(IntensityData self, unsigned int i) -> double"}, @@ -47597,7 +47597,7 @@ static PyMethodDef SwigMethods[] = { { "IntensityData_swiginit", IntensityData_swiginit, METH_VARARGS, NULL}, { "relativeDataDifference", _wrap_relativeDataDifference, METH_VARARGS, "\n" "relativeDataDifference(IntensityData dat, IntensityData ref) -> double\n" - "double DataUtils::Data::relativeDataDifference(const OutputData< double > &dat, const OutputData< double > &ref)\n" + "double DataUtils::Data::relativeDataDifference(const Powerfield< double > &dat, const Powerfield< double > &ref)\n" "\n" "Returns relative difference between two data sets sum(dat[i] - ref[i])/ref[i]). \n" "\n" @@ -47605,30 +47605,30 @@ static PyMethodDef SwigMethods[] = { { "coordinateToBinf", _wrap_coordinateToBinf, METH_VARARGS, "\n" "coordinateToBinf(double coordinate, IAxis axis) -> double\n" "coordinateToBinf(double & x, double & y, IntensityData data)\n" - "void DataUtils::Data::coordinateToBinf(double &x, double &y, const OutputData< double > &data)\n" + "void DataUtils::Data::coordinateToBinf(double &x, double &y, const Powerfield< double > &data)\n" "\n" - "Transforms x,y coordinate from OutputData axes coordinates to bin-fraction-coordinates. \n" + "Transforms x,y coordinate from Powerfield axes coordinates to bin-fraction-coordinates. \n" "\n" ""}, { "coordinateFromBinf", _wrap_coordinateFromBinf, METH_VARARGS, "\n" "coordinateFromBinf(double value, IAxis axis) -> double\n" "coordinateFromBinf(double & x, double & y, IntensityData data)\n" - "void DataUtils::Data::coordinateFromBinf(double &x, double &y, const OutputData< double > &data)\n" + "void DataUtils::Data::coordinateFromBinf(double &x, double &y, const Powerfield< double > &data)\n" "\n" - "Transforms x,y coordinate from bin-fraction-coordinates to OutputData's axes coordinates. \n" + "Transforms x,y coordinate from bin-fraction-coordinates to Powerfield's axes coordinates. \n" "\n" ""}, - { "create2DArrayfromOutputData", _wrap_create2DArrayfromOutputData, METH_O, "\n" - "create2DArrayfromOutputData(IntensityData data) -> vdouble2d_t\n" - "std::vector< std::vector< double > > DataUtils::Data::create2DArrayfromOutputData(const OutputData< double > &data)\n" + { "create2DArrayfromPowerfield", _wrap_create2DArrayfromPowerfield, METH_O, "\n" + "create2DArrayfromPowerfield(IntensityData data) -> vdouble2d_t\n" + "std::vector< std::vector< double > > DataUtils::Data::create2DArrayfromPowerfield(const Powerfield< double > &data)\n" "\n" - "Creates a vector of vectors of double (2D Array) from OutputData. \n" + "Creates a vector of vectors of double (2D Array) from Powerfield. \n" "\n" ""}, - { "importArrayToOutputData", _wrap_importArrayToOutputData, METH_VARARGS, "\n" - "importArrayToOutputData(vdouble1d_t vec) -> IntensityData\n" - "importArrayToOutputData(vdouble2d_t vec) -> IntensityData\n" - "OutputData< double > * DataUtils::Data::importArrayToOutputData(const std::vector< std::vector< double >> &vec)\n" + { "importArrayToPowerfield", _wrap_importArrayToPowerfield, METH_VARARGS, "\n" + "importArrayToPowerfield(vdouble1d_t vec) -> IntensityData\n" + "importArrayToPowerfield(vdouble2d_t vec) -> IntensityData\n" + "Powerfield< double > * DataUtils::Data::importArrayToPowerfield(const std::vector< std::vector< double >> &vec)\n" "\n" "Reads 2D array of doubles to Python, for use in persistence test. \n" "\n" @@ -48146,7 +48146,7 @@ static PyMethodDef SwigMethods[] = { ""}, { "IDetectorResolution_applyDetectorResolution", _wrap_IDetectorResolution_applyDetectorResolution, METH_VARARGS, "\n" "IDetectorResolution_applyDetectorResolution(IDetectorResolution self, IntensityData p_intensity_map)\n" - "virtual void IDetectorResolution::applyDetectorResolution(OutputData< double > *p_intensity_map) const =0\n" + "virtual void IDetectorResolution::applyDetectorResolution(Powerfield< double > *p_intensity_map) const =0\n" "\n" "Apply the resolution function to the intensity data. \n" "\n" @@ -48258,8 +48258,8 @@ static PyMethodDef SwigMethods[] = { "\n" ""}, { "DetectorMask_getMaskData", _wrap_DetectorMask_getMaskData, METH_O, "\n" - "DetectorMask_getMaskData(DetectorMask self) -> OutputData< bool > const *\n" - "const OutputData<bool>* DetectorMask::getMaskData() const\n" + "DetectorMask_getMaskData(DetectorMask self) -> Powerfield< bool > const *\n" + "const Powerfield<bool>* DetectorMask::getMaskData() const\n" "\n" ""}, { "DetectorMask_createHistogram", _wrap_DetectorMask_createHistogram, METH_O, "\n" @@ -48428,7 +48428,7 @@ static PyMethodDef SwigMethods[] = { ""}, { "IDetector_applyDetectorResolution", _wrap_IDetector_applyDetectorResolution, METH_VARARGS, "\n" "IDetector_applyDetectorResolution(IDetector self, IntensityData p_intensity_map)\n" - "void IDetector::applyDetectorResolution(OutputData< double > *p_intensity_map) const\n" + "void IDetector::applyDetectorResolution(Powerfield< double > *p_intensity_map) const\n" "\n" "Applies the detector resolution to the given intensity maps. \n" "\n" @@ -48442,7 +48442,7 @@ static PyMethodDef SwigMethods[] = { ""}, { "IDetector_createDetectorIntensity", _wrap_IDetector_createDetectorIntensity, METH_VARARGS, "\n" "IDetector_createDetectorIntensity(IDetector self, std::vector< std::unique_ptr< DiffuseElement >,std::allocator< std::unique_ptr< DiffuseElement > > > const & elements) -> IntensityData\n" - "OutputData< double > * IDetector::createDetectorIntensity(const std::vector< std::unique_ptr< DiffuseElement >> &elements) const\n" + "Powerfield< double > * IDetector::createDetectorIntensity(const std::vector< std::unique_ptr< DiffuseElement >> &elements) const\n" "\n" "Returns new intensity map with resolution applied, and cropped to ROI if applicable. \n" "\n" @@ -48546,7 +48546,7 @@ static PyMethodDef SwigMethods[] = { "IDetector2D_createPixel(IDetector2D self, size_t index) -> IPixel *\n" "virtual IPixel* IDetector2D::createPixel(size_t index) const =0\n" "\n" - "Creates an IPixel for the given OutputData object and index. \n" + "Creates an IPixel for the given Powerfield object and index. \n" "\n" ""}, { "IDetector2D_indexOfSpecular", _wrap_IDetector2D_indexOfSpecular, METH_VARARGS, "\n" @@ -48822,7 +48822,7 @@ static PyMethodDef SwigMethods[] = { ""}, { "checkRelativeDifference", _wrap_checkRelativeDifference, METH_VARARGS, "\n" "checkRelativeDifference(IntensityData dat, IntensityData ref, double threshold) -> bool\n" - "bool DataUtils::Histo::checkRelativeDifference(const OutputData< double > &dat, const OutputData< double > &ref, double threshold)\n" + "bool DataUtils::Histo::checkRelativeDifference(const Powerfield< double > &dat, const Powerfield< double > &ref, double threshold)\n" "\n" "Returns true is relative difference is below threshold; prints informative output. \n" "\n" @@ -48964,9 +48964,9 @@ static PyMethodDef SwigMethods[] = { "\n" ""}, { "IHistogram_getData", _wrap_IHistogram_getData, METH_VARARGS, "\n" - "IHistogram_getData(IHistogram self) -> OutputData< CumulativeValue > const\n" - "IHistogram_getData(IHistogram self) -> OutputData< CumulativeValue > &\n" - "OutputData< CumulativeValue > & IHistogram::getData()\n" + "IHistogram_getData(IHistogram self) -> Powerfield< CumulativeValue > const\n" + "IHistogram_getData(IHistogram self) -> Powerfield< CumulativeValue > &\n" + "Powerfield< CumulativeValue > & IHistogram::getData()\n" "\n" ""}, { "IHistogram_binContent", _wrap_IHistogram_binContent, METH_VARARGS, "\n" @@ -49076,13 +49076,13 @@ static PyMethodDef SwigMethods[] = { "IHistogram_createFrom(std::string const & filename) -> IHistogram\n" "IHistogram_createFrom(vdouble2d_t data) -> IHistogram\n" ""}, - { "IHistogram_createOutputData", _wrap_IHistogram_createOutputData, METH_VARARGS, "\n" - "IHistogram_createOutputData(IHistogram self, IHistogram::DataType dataType=DataType::INTEGRAL) -> IntensityData\n" - "OutputData< double > * IHistogram::createOutputData(DataType dataType=DataType::INTEGRAL) const\n" + { "IHistogram_createPowerfield", _wrap_IHistogram_createPowerfield, METH_VARARGS, "\n" + "IHistogram_createPowerfield(IHistogram self, IHistogram::DataType dataType=DataType::INTEGRAL) -> IntensityData\n" + "Powerfield< double > * IHistogram::createPowerfield(DataType dataType=DataType::INTEGRAL) const\n" "\n" - "Creates new OutputData with histogram's shape and values corresponding to DataType.\n" + "Creates new Powerfield with histogram's shape and values corresponding to DataType.\n" "\n" - "creates new OutputData with histogram's shape and put there values corresponding to DataType \n" + "creates new Powerfield with histogram's shape and put there values corresponding to DataType \n" "\n" ""}, { "IHistogram_hasSameShape", _wrap_IHistogram_hasSameShape, METH_VARARGS, "\n" @@ -49127,9 +49127,9 @@ static PyMethodDef SwigMethods[] = { "Histogram1D(int nbinsx, vdouble1d_t xbins)\n" "Histogram1D(IAxis axis)\n" "new_Histogram1D(IntensityData data) -> Histogram1D\n" - "Histogram1D::Histogram1D(const OutputData< double > &data)\n" + "Histogram1D::Histogram1D(const Powerfield< double > &data)\n" "\n" - "Constructor for 1D histograms from basic OutputData object. \n" + "Constructor for 1D histograms from basic Powerfield object. \n" "\n" ""}, { "Histogram1D_clone", _wrap_Histogram1D_clone, METH_O, "\n" @@ -49291,26 +49291,26 @@ static PyMethodDef SwigMethods[] = { { "delete_Histogram2D", _wrap_delete_Histogram2D, METH_O, "delete_Histogram2D(Histogram2D self)"}, { "Histogram2D_swigregister", Histogram2D_swigregister, METH_O, NULL}, { "Histogram2D_swiginit", Histogram2D_swiginit, METH_VARARGS, NULL}, - { "IntensityDataIOFactory_readOutputData", _wrap_IntensityDataIOFactory_readOutputData, METH_VARARGS, "IntensityDataIOFactory_readOutputData(std::string const & file_name, IntensityDataIOFactory::LoaderSelector selector=automatic) -> IntensityData"}, - { "IntensityDataIOFactory_readReflectometryData", _wrap_IntensityDataIOFactory_readReflectometryData, METH_O, "IntensityDataIOFactory_readReflectometryData(std::string const & file_name) -> IntensityData"}, - { "IntensityDataIOFactory_readIntensityData", _wrap_IntensityDataIOFactory_readIntensityData, METH_O, "IntensityDataIOFactory_readIntensityData(std::string const & file_name) -> IHistogram"}, - { "IntensityDataIOFactory_writeOutputData", _wrap_IntensityDataIOFactory_writeOutputData, METH_VARARGS, "IntensityDataIOFactory_writeOutputData(IntensityData data, std::string const & file_name)"}, - { "IntensityDataIOFactory_writeIntensityData", _wrap_IntensityDataIOFactory_writeIntensityData, METH_VARARGS, "IntensityDataIOFactory_writeIntensityData(IHistogram histogram, std::string const & file_name)"}, - { "IntensityDataIOFactory_writeSimulationResult", _wrap_IntensityDataIOFactory_writeSimulationResult, METH_VARARGS, "IntensityDataIOFactory_writeSimulationResult(SimulationResult result, std::string const & file_name)"}, - { "new_IntensityDataIOFactory", _wrap_new_IntensityDataIOFactory, METH_NOARGS, "\n" - "new_IntensityDataIOFactory() -> IntensityDataIOFactory\n" + { "IOFactory_readPowerfield", _wrap_IOFactory_readPowerfield, METH_VARARGS, "IOFactory_readPowerfield(std::string const & file_name, IOFactory::LoaderSelector selector=automatic) -> IntensityData"}, + { "IOFactory_readReflectometryData", _wrap_IOFactory_readReflectometryData, METH_O, "IOFactory_readReflectometryData(std::string const & file_name) -> IntensityData"}, + { "IOFactory_readIntensityData", _wrap_IOFactory_readIntensityData, METH_O, "IOFactory_readIntensityData(std::string const & file_name) -> IHistogram"}, + { "IOFactory_writePowerfield", _wrap_IOFactory_writePowerfield, METH_VARARGS, "IOFactory_writePowerfield(IntensityData data, std::string const & file_name)"}, + { "IOFactory_writeIntensityData", _wrap_IOFactory_writeIntensityData, METH_VARARGS, "IOFactory_writeIntensityData(IHistogram histogram, std::string const & file_name)"}, + { "IOFactory_writeSimulationResult", _wrap_IOFactory_writeSimulationResult, METH_VARARGS, "IOFactory_writeSimulationResult(SimulationResult result, std::string const & file_name)"}, + { "new_IOFactory", _wrap_new_IOFactory, METH_NOARGS, "\n" + "new_IOFactory() -> IOFactory\n" "\n" "\n" "Provides users with possibility to read and write IntensityData from/to files in different format. Type of the file will be deduced from file name. *.txt - ASCII file with 2D array [nrow][ncol], layout as in numpy. *.int - BornAgain internal ASCII format. *.tif - 32-bits tiff file. If file name ends with \"*.gz\" or \"*.bz2\" the file will be zipped on the fly using appropriate algorithm.\n" "\n" "Usage:\n" "\n" - "C++ includes: IntensityDataIOFactory.h\n" + "C++ includes: IOFactory.h\n" "\n" ""}, - { "delete_IntensityDataIOFactory", _wrap_delete_IntensityDataIOFactory, METH_O, "delete_IntensityDataIOFactory(IntensityDataIOFactory self)"}, - { "IntensityDataIOFactory_swigregister", IntensityDataIOFactory_swigregister, METH_O, NULL}, - { "IntensityDataIOFactory_swiginit", IntensityDataIOFactory_swiginit, METH_VARARGS, NULL}, + { "delete_IOFactory", _wrap_delete_IOFactory, METH_O, "delete_IOFactory(IOFactory self)"}, + { "IOFactory_swigregister", IOFactory_swigregister, METH_O, NULL}, + { "IOFactory_swiginit", IOFactory_swiginit, METH_VARARGS, NULL}, { "AxisInfo_m_name_set", _wrap_AxisInfo_m_name_set, METH_VARARGS, "AxisInfo_m_name_set(AxisInfo self, std::string const & m_name)"}, { "AxisInfo_m_name_get", _wrap_AxisInfo_m_name_get, METH_O, "AxisInfo_m_name_get(AxisInfo self) -> std::string const &"}, { "AxisInfo_m_min_set", _wrap_AxisInfo_m_min_set, METH_VARARGS, "AxisInfo_m_min_set(AxisInfo self, double m_min)"}, @@ -49580,21 +49580,21 @@ static swig_type_info _swigt__p_IDetectorResolution = {"_p_IDetectorResolution", static swig_type_info _swigt__p_IFootprintFactor = {"_p_IFootprintFactor", "IFootprintFactor *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_IHistogram = {"_p_IHistogram", "IHistogram *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_INode = {"_p_INode", "INode *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_IOFactory = {"_p_IOFactory", "IOFactory *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_IPixel = {"_p_IPixel", "IPixel *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_IResolutionFunction2D = {"_p_IResolutionFunction2D", "IResolutionFunction2D *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_IShape2D = {"_p_IShape2D", "IShape2D *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Instrument = {"_p_Instrument", "Instrument *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_IntensityDataIOFactory = {"_p_IntensityDataIOFactory", "IntensityDataIOFactory *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Line = {"_p_Line", "Line *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_OutputDataIteratorT_double_OutputDataT_double_t_t = {"_p_OutputDataIteratorT_double_OutputDataT_double_t_t", "OutputData< double >::iterator *|OutputDataIterator< double,OutputData< double > > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_OutputDataIteratorT_double_const_OutputDataT_double_t_const_t = {"_p_OutputDataIteratorT_double_const_OutputDataT_double_t_const_t", "OutputDataIterator< double const,OutputData< double > const > *|OutputData< double >::const_iterator *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_OutputDataT_CumulativeValue_t = {"_p_OutputDataT_CumulativeValue_t", "OutputData< CumulativeValue > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_OutputDataT_bool_t = {"_p_OutputDataT_bool_t", "OutputData< bool > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_OutputDataT_double_t = {"_p_OutputDataT_double_t", "OutputData< double > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_OwningVectorT_IAxis_t = {"_p_OwningVectorT_IAxis_t", "OwningVector< IAxis > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_PolMatrices = {"_p_PolMatrices", "PolMatrices *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Polygon = {"_p_Polygon", "Polygon *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_PolygonPrivate = {"_p_PolygonPrivate", "PolygonPrivate *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_PowerfieldIteratorT_double_PowerfieldT_double_t_t = {"_p_PowerfieldIteratorT_double_PowerfieldT_double_t_t", "Powerfield< double >::iterator *|PowerfieldIterator< double,Powerfield< double > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_PowerfieldIteratorT_double_const_PowerfieldT_double_t_const_t = {"_p_PowerfieldIteratorT_double_const_PowerfieldT_double_t_const_t", "PowerfieldIterator< double const,Powerfield< double > const > *|Powerfield< double >::const_iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_PowerfieldT_CumulativeValue_t = {"_p_PowerfieldT_CumulativeValue_t", "Powerfield< CumulativeValue > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_PowerfieldT_bool_t = {"_p_PowerfieldT_bool_t", "Powerfield< bool > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_PowerfieldT_double_t = {"_p_PowerfieldT_double_t", "Powerfield< double > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_RealLimits = {"_p_RealLimits", "RealLimits *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Rectangle = {"_p_Rectangle", "Rectangle *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_RectangularDetector = {"_p_RectangularDetector", "RectangularDetector *", 0, 0, (void*)0, 0}; @@ -49692,21 +49692,21 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_IFootprintFactor, &_swigt__p_IHistogram, &_swigt__p_INode, + &_swigt__p_IOFactory, &_swigt__p_IPixel, &_swigt__p_IResolutionFunction2D, &_swigt__p_IShape2D, &_swigt__p_Instrument, - &_swigt__p_IntensityDataIOFactory, &_swigt__p_Line, - &_swigt__p_OutputDataIteratorT_double_OutputDataT_double_t_t, - &_swigt__p_OutputDataIteratorT_double_const_OutputDataT_double_t_const_t, - &_swigt__p_OutputDataT_CumulativeValue_t, - &_swigt__p_OutputDataT_bool_t, - &_swigt__p_OutputDataT_double_t, &_swigt__p_OwningVectorT_IAxis_t, &_swigt__p_PolMatrices, &_swigt__p_Polygon, &_swigt__p_PolygonPrivate, + &_swigt__p_PowerfieldIteratorT_double_PowerfieldT_double_t_t, + &_swigt__p_PowerfieldIteratorT_double_const_PowerfieldT_double_t_const_t, + &_swigt__p_PowerfieldT_CumulativeValue_t, + &_swigt__p_PowerfieldT_bool_t, + &_swigt__p_PowerfieldT_double_t, &_swigt__p_RealLimits, &_swigt__p_Rectangle, &_swigt__p_RectangularDetector, @@ -49804,21 +49804,21 @@ static swig_cast_info _swigc__p_IDetectorResolution[] = { {&_swigt__p_IDetector static swig_cast_info _swigc__p_IFootprintFactor[] = { {&_swigt__p_FootprintSquare, _p_FootprintSquareTo_p_IFootprintFactor, 0, 0}, {&_swigt__p_IFootprintFactor, 0, 0, 0}, {&_swigt__p_FootprintGauss, _p_FootprintGaussTo_p_IFootprintFactor, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_IHistogram[] = { {&_swigt__p_IHistogram, 0, 0, 0}, {&_swigt__p_Histogram2D, _p_Histogram2DTo_p_IHistogram, 0, 0}, {&_swigt__p_Histogram1D, _p_Histogram1DTo_p_IHistogram, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_INode[] = { {&_swigt__p_INode, 0, 0, 0}, {&_swigt__p_FootprintSquare, _p_FootprintSquareTo_p_INode, 0, 0}, {&_swigt__p_IDetectorResolution, _p_IDetectorResolutionTo_p_INode, 0, 0}, {&_swigt__p_Instrument, _p_InstrumentTo_p_INode, 0, 0}, {&_swigt__p_IFootprintFactor, _p_IFootprintFactorTo_p_INode, 0, 0}, {&_swigt__p_Beam, _p_BeamTo_p_INode, 0, 0}, {&_swigt__p_IResolutionFunction2D, _p_IResolutionFunction2DTo_p_INode, 0, 0}, {&_swigt__p_ResolutionFunction2DGaussian, _p_ResolutionFunction2DGaussianTo_p_INode, 0, 0}, {&_swigt__p_IDetector, _p_IDetectorTo_p_INode, 0, 0}, {&_swigt__p_RectangularDetector, _p_RectangularDetectorTo_p_INode, 0, 0}, {&_swigt__p_SphericalDetector, _p_SphericalDetectorTo_p_INode, 0, 0}, {&_swigt__p_FootprintGauss, _p_FootprintGaussTo_p_INode, 0, 0}, {&_swigt__p_IDetector2D, _p_IDetector2DTo_p_INode, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_IOFactory[] = { {&_swigt__p_IOFactory, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_IPixel[] = { {&_swigt__p_IPixel, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_IResolutionFunction2D[] = { {&_swigt__p_IResolutionFunction2D, 0, 0, 0}, {&_swigt__p_ResolutionFunction2DGaussian, _p_ResolutionFunction2DGaussianTo_p_IResolutionFunction2D, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_IShape2D[] = { {&_swigt__p_Polygon, _p_PolygonTo_p_IShape2D, 0, 0}, {&_swigt__p_Line, _p_LineTo_p_IShape2D, 0, 0}, {&_swigt__p_VerticalLine, _p_VerticalLineTo_p_IShape2D, 0, 0}, {&_swigt__p_Ellipse, _p_EllipseTo_p_IShape2D, 0, 0}, {&_swigt__p_HorizontalLine, _p_HorizontalLineTo_p_IShape2D, 0, 0}, {&_swigt__p_Rectangle, _p_RectangleTo_p_IShape2D, 0, 0}, {&_swigt__p_IShape2D, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Instrument[] = { {&_swigt__p_Instrument, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_IntensityDataIOFactory[] = { {&_swigt__p_IntensityDataIOFactory, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Line[] = { {&_swigt__p_Line, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_OutputDataIteratorT_double_OutputDataT_double_t_t[] = { {&_swigt__p_OutputDataIteratorT_double_OutputDataT_double_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_OutputDataIteratorT_double_const_OutputDataT_double_t_const_t[] = { {&_swigt__p_OutputDataIteratorT_double_const_OutputDataT_double_t_const_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_OutputDataT_CumulativeValue_t[] = { {&_swigt__p_OutputDataT_CumulativeValue_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_OutputDataT_bool_t[] = { {&_swigt__p_OutputDataT_bool_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_OutputDataT_double_t[] = { {&_swigt__p_OutputDataT_double_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_OwningVectorT_IAxis_t[] = { {&_swigt__p_OwningVectorT_IAxis_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_PolMatrices[] = { {&_swigt__p_PolMatrices, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Polygon[] = { {&_swigt__p_Polygon, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_PolygonPrivate[] = { {&_swigt__p_PolygonPrivate, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_PowerfieldIteratorT_double_PowerfieldT_double_t_t[] = { {&_swigt__p_PowerfieldIteratorT_double_PowerfieldT_double_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_PowerfieldIteratorT_double_const_PowerfieldT_double_t_const_t[] = { {&_swigt__p_PowerfieldIteratorT_double_const_PowerfieldT_double_t_const_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_PowerfieldT_CumulativeValue_t[] = { {&_swigt__p_PowerfieldT_CumulativeValue_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_PowerfieldT_bool_t[] = { {&_swigt__p_PowerfieldT_bool_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_PowerfieldT_double_t[] = { {&_swigt__p_PowerfieldT_double_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_RealLimits[] = { {&_swigt__p_RealLimits, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Rectangle[] = { {&_swigt__p_Rectangle, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_RectangularDetector[] = { {&_swigt__p_RectangularDetector, 0, 0, 0},{0, 0, 0, 0}}; @@ -49916,21 +49916,21 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_IFootprintFactor, _swigc__p_IHistogram, _swigc__p_INode, + _swigc__p_IOFactory, _swigc__p_IPixel, _swigc__p_IResolutionFunction2D, _swigc__p_IShape2D, _swigc__p_Instrument, - _swigc__p_IntensityDataIOFactory, _swigc__p_Line, - _swigc__p_OutputDataIteratorT_double_OutputDataT_double_t_t, - _swigc__p_OutputDataIteratorT_double_const_OutputDataT_double_t_const_t, - _swigc__p_OutputDataT_CumulativeValue_t, - _swigc__p_OutputDataT_bool_t, - _swigc__p_OutputDataT_double_t, _swigc__p_OwningVectorT_IAxis_t, _swigc__p_PolMatrices, _swigc__p_Polygon, _swigc__p_PolygonPrivate, + _swigc__p_PowerfieldIteratorT_double_PowerfieldT_double_t_t, + _swigc__p_PowerfieldIteratorT_double_const_PowerfieldT_double_t_const_t, + _swigc__p_PowerfieldT_CumulativeValue_t, + _swigc__p_PowerfieldT_bool_t, + _swigc__p_PowerfieldT_double_t, _swigc__p_RealLimits, _swigc__p_Rectangle, _swigc__p_RectangularDetector, @@ -50764,10 +50764,10 @@ SWIG_init(void) { SWIG_Python_SetConstant(d, "IHistogram_AVERAGE",SWIG_From_int(static_cast< int >(IHistogram::AVERAGE))); SWIG_Python_SetConstant(d, "IHistogram_STANDARD_ERROR",SWIG_From_int(static_cast< int >(IHistogram::STANDARD_ERROR))); SWIG_Python_SetConstant(d, "IHistogram_NENTRIES",SWIG_From_int(static_cast< int >(IHistogram::NENTRIES))); - SWIG_Python_SetConstant(d, "IntensityDataIOFactory_automatic",SWIG_From_int(static_cast< int >(IntensityDataIOFactory::automatic))); - SWIG_Python_SetConstant(d, "IntensityDataIOFactory_bornagain",SWIG_From_int(static_cast< int >(IntensityDataIOFactory::bornagain))); - SWIG_Python_SetConstant(d, "IntensityDataIOFactory_tiff",SWIG_From_int(static_cast< int >(IntensityDataIOFactory::tiff))); - SWIG_Python_SetConstant(d, "IntensityDataIOFactory_nicos",SWIG_From_int(static_cast< int >(IntensityDataIOFactory::nicos))); + SWIG_Python_SetConstant(d, "IOFactory_automatic",SWIG_From_int(static_cast< int >(IOFactory::automatic))); + SWIG_Python_SetConstant(d, "IOFactory_bornagain",SWIG_From_int(static_cast< int >(IOFactory::bornagain))); + SWIG_Python_SetConstant(d, "IOFactory_tiff",SWIG_From_int(static_cast< int >(IOFactory::tiff))); + SWIG_Python_SetConstant(d, "IOFactory_nicos",SWIG_From_int(static_cast< int >(IOFactory::nicos))); #if PY_VERSION_HEX >= 0x03000000 return m; #else