From d22c75e6ba1a553de50d3b8326cdf571011d5967 Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de>
Date: Sat, 28 May 2022 09:29:39 +0200
Subject: [PATCH] merge IDetector2D into IDetector

---
 Device/Detector/DetectorContext.cpp          |   6 +-
 Device/Detector/DetectorContext.h            |   6 +-
 Device/Detector/IDetector.cpp                |  70 ++-
 Device/Detector/IDetector.h                  |  55 +-
 Device/Detector/IDetector2D.cpp              |  89 ---
 Device/Detector/IDetector2D.h                |  87 ---
 Device/Detector/RectangularDetector.h        |   4 +-
 Device/Detector/SimulationAreaIterator.cpp   |   2 +-
 Device/Detector/SphericalDetector.h          |   4 +-
 GUI/Model/Device/DetectorItems.cpp           |   6 +-
 GUI/Model/Device/DetectorItems.h             |   8 +-
 GUI/Model/Device/Instrument.cpp              |   4 +-
 GUI/Model/Device/Instrument.h                |   8 +-
 GUI/Model/Device/RectangularDetectorItem.cpp |   4 +-
 GUI/Model/Device/RectangularDetectorItem.h   |   2 +-
 GUI/Model/Device/SphericalDetectorItem.cpp   |   2 +-
 GUI/Model/Device/SphericalDetectorItem.h     |   2 +-
 GUI/Model/FromCore/ItemizeSimulation.cpp     |   2 +-
 GUI/Model/Model/JobFunctions.cpp             |   2 +-
 Sim/Export/SimulationToPython.cpp            |  14 +-
 Sim/Simulation/ISimulation2D.cpp             |  31 +-
 Sim/Simulation/ISimulation2D.h               |   5 +-
 Sim/Simulation/OffspecSimulation.cpp         |   4 +-
 Sim/Simulation/OffspecSimulation.h           |   2 +-
 Sim/Simulation/ScatteringSimulation.cpp      |   6 +-
 Sim/Simulation/ScatteringSimulation.h        |   2 +-
 Tests/Unit/GUI/TestDetectorItems.cpp         |   2 +-
 Wrap/Swig/libBornAgainDevice.i               |   1 -
 auto/Wrap/doxygenDevice.i                    |  63 +-
 auto/Wrap/doxygenSim.i                       |   7 +-
 auto/Wrap/libBornAgainDevice.py              | 108 ++--
 auto/Wrap/libBornAgainDevice_wrap.cpp        | 573 ++++++++-----------
 auto/Wrap/libBornAgainSim.py                 |   6 +-
 auto/Wrap/libBornAgainSim_wrap.cpp           | 213 ++++---
 34 files changed, 564 insertions(+), 836 deletions(-)
 delete mode 100644 Device/Detector/IDetector2D.cpp
 delete mode 100644 Device/Detector/IDetector2D.h

diff --git a/Device/Detector/DetectorContext.cpp b/Device/Detector/DetectorContext.cpp
index 579b4c1009f..b7e3fae0ae6 100644
--- a/Device/Detector/DetectorContext.cpp
+++ b/Device/Detector/DetectorContext.cpp
@@ -13,9 +13,9 @@
 //  ************************************************************************************************
 
 #include "Device/Detector/DetectorContext.h"
-#include "Device/Detector/IDetector2D.h"
+#include "Device/Detector/IDetector.h"
 
-DetectorContext::DetectorContext(const IDetector2D* detector)
+DetectorContext::DetectorContext(const IDetector* detector)
 {
     setup_context(detector);
 }
@@ -39,7 +39,7 @@ size_t DetectorContext::detectorIndex(size_t element_index) const
     return m_active_indices[element_index];
 }
 
-void DetectorContext::setup_context(const IDetector2D* detector)
+void DetectorContext::setup_context(const IDetector* detector)
 {
     m_active_indices = detector->active_indices();
     m_analyzer_operator = detector->analyzer().matrix();
diff --git a/Device/Detector/DetectorContext.h b/Device/Detector/DetectorContext.h
index 54b05188992..d7f7f97f5f8 100644
--- a/Device/Detector/DetectorContext.h
+++ b/Device/Detector/DetectorContext.h
@@ -21,14 +21,14 @@
 #include <memory>
 #include <vector>
 
-class IDetector2D;
+class IDetector;
 
 //! Holds precalculated information for faster DiffuseElement generation.
 //! @ingroup detector
 
 class DetectorContext {
 public:
-    DetectorContext(const IDetector2D* detector);
+    DetectorContext(const IDetector* detector);
 
     DetectorContext(const DetectorContext& other) = delete;
     DetectorContext& operator=(const DetectorContext& other) = delete;
@@ -40,7 +40,7 @@ public:
     size_t detectorIndex(size_t element_index) const;
 
 private:
-    void setup_context(const IDetector2D* detector);
+    void setup_context(const IDetector* detector);
 
     SpinMatrix m_analyzer_operator;
     std::vector<std::unique_ptr<IPixel>> m_pixels; //! All unmasked pixels inside ROI.
diff --git a/Device/Detector/IDetector.cpp b/Device/Detector/IDetector.cpp
index ac70dff83c1..187abbcf845 100644
--- a/Device/Detector/IDetector.cpp
+++ b/Device/Detector/IDetector.cpp
@@ -13,8 +13,14 @@
 //  ************************************************************************************************
 
 #include "Device/Detector/IDetector.h"
+#include "Base/Axis/FixedBinAxis.h"
+#include "Base/Axis/IAxis.h"
+#include "Base/Const/Units.h"
 #include "Base/Util/Assert.h"
+#include "Device/Beam/Beam.h"
+#include "Device/Detector/DetectorContext.h"
 #include "Device/Mask/DetectorMask.h"
+#include "Device/Mask/InfinitePlane.h"
 #include "Device/Resolution/ConvolutionDetectorResolution.h"
 #include "Resample/Element/DiffuseElement.h"
 
@@ -32,13 +38,17 @@ inline size_t ycoord(size_t index, size_t sizeY)
 
 } // namespace
 
-IDetector::IDetector() = default;
+IDetector::IDetector()
+    : m_detector_mask(new DetectorMask)
+{
+}
 
 IDetector::IDetector(const IDetector& other)
     : INode()
     , m_explicitROI(other.m_explicitROI)
     , m_axes(other.m_axes)
     , m_polAnalyzer(other.m_polAnalyzer)
+    , m_detector_mask(other.m_detector_mask)
 {
     if (other.m_detector_resolution)
         setDetectorResolution(*other.m_detector_resolution);
@@ -324,3 +334,61 @@ IDetector::RoiOfAxis::RoiOfAxis(const IAxis& axis, double _lower, double _upper)
     detectorSize = axis.size();
     roiSize = upperIndex - lowerIndex + 1;
 }
+
+/* -- from IDetector2D -- */
+
+void IDetector::setDetectorParameters(size_t n_x, double x_min, double x_max, size_t n_y,
+                                        double y_min, double y_max)
+{
+    clear();
+    addDetAxis(FixedBinAxis(axisName(0), n_x, x_min, x_max));
+    addDetAxis(FixedBinAxis(axisName(1), n_y, y_min, y_max));
+}
+
+void IDetector::setRegionOfInterest(double xlow, double ylow, double xup, double yup)
+{
+    ASSERT(rank() == 2);
+
+    m_explicitROI.clear();
+    m_explicitROI.emplace_back(axis(0), xlow, xup);
+    m_explicitROI.emplace_back(axis(1), ylow, yup);
+}
+
+std::vector<size_t> IDetector::active_indices() const
+{
+    std::vector<size_t> result;
+
+    iterateOverNonMaskedPoints([&](const_iterator it) { result.push_back(it.detectorIndex()); });
+
+    return result;
+}
+
+std::unique_ptr<DetectorContext> IDetector::createContext() const
+{
+    return std::make_unique<DetectorContext>(this);
+}
+
+void IDetector::addMask(const IShape2D& shape, bool mask_value)
+{
+    m_detector_mask->addMask(shape, mask_value);
+    m_detector_mask->initMaskData(axis(0), axis(1));
+}
+
+void IDetector::maskAll()
+{
+    if (rank() != 2)
+        return;
+    addMask(InfinitePlane(), true);
+}
+
+const DetectorMask* IDetector::detectorMask() const
+{
+    return m_detector_mask.get();
+}
+
+size_t IDetector::getGlobalIndex(size_t x, size_t y) const
+{
+    if (rank() != 2)
+        return totalSize();
+    return x * axis(1).size() + y;
+}
diff --git a/Device/Detector/IDetector.h b/Device/Detector/IDetector.h
index 2275232999b..b03df0456a2 100644
--- a/Device/Detector/IDetector.h
+++ b/Device/Detector/IDetector.h
@@ -22,12 +22,18 @@
 #include "Device/Pol/PolFilter.h"
 #include <functional>
 
+class Beam;
+class CoordSystem2D;
+class DetectorContext;
 class DetectorMask;
 class DiffuseElement;
 class Direction;
 class IAxis;
+class ICoordSystem;
 class IDetectorResolution;
+class IPixel;
 class IResolutionFunction2D;
+class IShape2D;
 
 template <class T>
 class Powerfield;
@@ -72,9 +78,6 @@ public:
     //! Resets region of interest making whole detector plane available for the simulation.
     void resetRegionOfInterest();
 
-    //! Returns detector masks container
-    virtual const DetectorMask* detectorMask() const = 0;
-
     std::vector<const INode*> nodeChildren() const override;
 
     //! Iterate over all points within "region of interest", no matter whether they are masked or
@@ -219,6 +222,52 @@ private:
     PolFilter m_polAnalyzer;
     std::unique_ptr<IDetectorResolution> m_detector_resolution;
 #endif // SWIG
+
+public:
+    //! Sets detector parameters using angle ranges
+    void setDetectorParameters(size_t n_x, double x_min, double x_max, size_t n_y, double y_min,
+                               double y_max);
+
+    const DetectorMask* detectorMask() const;
+
+    //! Adds mask of given shape to the stack of detector masks. The mask value 'true' means
+    //! that the channel will be excluded from the simulation. The mask which is added last
+    //! has priority.
+    //! @param shape The shape of mask (Rectangle, Polygon, Line, Ellipse)
+    //! @param mask_value The value of mask
+    void addMask(const IShape2D& shape, bool mask_value = true);
+
+    //! Put the mask for all detector channels (i.e. exclude whole detector from the analysis)
+    void maskAll();
+
+    //! Sets rectangular region of interest with lower left and upper right corners defined.
+    void setRegionOfInterest(double xlow, double ylow, double xup, double yup);
+
+    virtual ICoordSystem* offspecCoords(IAxis* beamAxis, const Direction& beamDirection) const = 0;
+    virtual CoordSystem2D* scatteringCoords(const Beam& beam) const = 0;
+
+    //! Returns vector of unmasked detector indices.
+    std::vector<size_t> active_indices() const;
+
+    //! 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.
+    //! If no pixel contains this specular wavevector, the number of pixels is
+    //! returned. This corresponds to an overflow index.
+    virtual size_t indexOfSpecular(const Beam& beam) const = 0;
+
+#ifndef SWIG
+    std::unique_ptr<DetectorContext> createContext() const;
+#endif // SWIG
+
+protected:
+    //! Calculate global index from two axis indices
+    size_t getGlobalIndex(size_t x, size_t y) const;
+
+private:
+    std::shared_ptr<DetectorMask> m_detector_mask;
+
 };
 
 #endif // BORNAGAIN_DEVICE_DETECTOR_IDETECTOR_H
diff --git a/Device/Detector/IDetector2D.cpp b/Device/Detector/IDetector2D.cpp
deleted file mode 100644
index c4196ed6e3c..00000000000
--- a/Device/Detector/IDetector2D.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
-//  ************************************************************************************************
-//
-//  BornAgain: simulate and fit reflection and scattering
-//
-//! @file      Device/Detector/IDetector2D.cpp
-//! @brief     Implements shared functionality of interface IDetector2D.
-//!
-//! @homepage  http://www.bornagainproject.org
-//! @license   GNU General Public License v3 or higher (see COPYING)
-//! @copyright Forschungszentrum Jülich GmbH 2018
-//! @authors   Scientific Computing Group at MLZ (see CITATION, AUTHORS)
-//
-//  ************************************************************************************************
-
-#include "Device/Detector/IDetector2D.h"
-#include "Base/Axis/FixedBinAxis.h"
-#include "Base/Axis/IAxis.h"
-#include "Base/Const/Units.h"
-#include "Base/Util/Assert.h"
-#include "Device/Beam/Beam.h"
-#include "Device/Detector/DetectorContext.h"
-#include "Device/Mask/DetectorMask.h"
-#include "Device/Mask/InfinitePlane.h"
-#include "Resample/Element/DiffuseElement.h"
-
-IDetector2D::IDetector2D()
-    : m_detector_mask(new DetectorMask)
-{
-}
-
-IDetector2D::IDetector2D(const IDetector2D& other) = default;
-
-IDetector2D::~IDetector2D() = default;
-
-void IDetector2D::setDetectorParameters(size_t n_x, double x_min, double x_max, size_t n_y,
-                                        double y_min, double y_max)
-{
-    clear();
-    addDetAxis(FixedBinAxis(axisName(0), n_x, x_min, x_max));
-    addDetAxis(FixedBinAxis(axisName(1), n_y, y_min, y_max));
-}
-
-void IDetector2D::setRegionOfInterest(double xlow, double ylow, double xup, double yup)
-{
-    ASSERT(rank() == 2);
-
-    m_explicitROI.clear();
-    m_explicitROI.emplace_back(axis(0), xlow, xup);
-    m_explicitROI.emplace_back(axis(1), ylow, yup);
-}
-
-std::vector<size_t> IDetector2D::active_indices() const
-{
-    std::vector<size_t> result;
-
-    iterateOverNonMaskedPoints([&](const_iterator it) { result.push_back(it.detectorIndex()); });
-
-    return result;
-}
-
-std::unique_ptr<DetectorContext> IDetector2D::createContext() const
-{
-    return std::make_unique<DetectorContext>(this);
-}
-
-void IDetector2D::addMask(const IShape2D& shape, bool mask_value)
-{
-    m_detector_mask->addMask(shape, mask_value);
-    m_detector_mask->initMaskData(axis(0), axis(1));
-}
-
-void IDetector2D::maskAll()
-{
-    if (rank() != 2)
-        return;
-    addMask(InfinitePlane(), true);
-}
-
-const DetectorMask* IDetector2D::detectorMask() const
-{
-    return m_detector_mask.get();
-}
-
-size_t IDetector2D::getGlobalIndex(size_t x, size_t y) const
-{
-    if (rank() != 2)
-        return totalSize();
-    return x * axis(1).size() + y;
-}
diff --git a/Device/Detector/IDetector2D.h b/Device/Detector/IDetector2D.h
deleted file mode 100644
index 27d85793070..00000000000
--- a/Device/Detector/IDetector2D.h
+++ /dev/null
@@ -1,87 +0,0 @@
-//  ************************************************************************************************
-//
-//  BornAgain: simulate and fit reflection and scattering
-//
-//! @file      Device/Detector/IDetector2D.h
-//! @brief     Defines interface IDetector2D.
-//!
-//! @homepage  http://www.bornagainproject.org
-//! @license   GNU General Public License v3 or higher (see COPYING)
-//! @copyright Forschungszentrum Jülich GmbH 2018
-//! @authors   Scientific Computing Group at MLZ (see CITATION, AUTHORS)
-//
-//  ************************************************************************************************
-
-#ifndef BORNAGAIN_DEVICE_DETECTOR_IDETECTOR2D_H
-#define BORNAGAIN_DEVICE_DETECTOR_IDETECTOR2D_H
-
-#include "Device/Detector/IDetector.h"
-#include <memory>
-
-class Beam;
-class CoordSystem2D;
-class DetectorContext;
-class DetectorMask;
-class ICoordSystem;
-class IPixel;
-class IShape2D;
-
-//! Abstract 2D detector interface.
-//! @ingroup detector
-
-class IDetector2D : public IDetector {
-public:
-    IDetector2D();
-
-    IDetector2D* clone() const override = 0;
-
-    ~IDetector2D() override;
-
-    //! Sets detector parameters using angle ranges
-    void setDetectorParameters(size_t n_x, double x_min, double x_max, size_t n_y, double y_min,
-                               double y_max);
-
-    const DetectorMask* detectorMask() const override;
-
-    //! Adds mask of given shape to the stack of detector masks. The mask value 'true' means
-    //! that the channel will be excluded from the simulation. The mask which is added last
-    //! has priority.
-    //! @param shape The shape of mask (Rectangle, Polygon, Line, Ellipse)
-    //! @param mask_value The value of mask
-    void addMask(const IShape2D& shape, bool mask_value = true);
-
-    //! Put the mask for all detector channels (i.e. exclude whole detector from the analysis)
-    void maskAll();
-
-    //! Sets rectangular region of interest with lower left and upper right corners defined.
-    void setRegionOfInterest(double xlow, double ylow, double xup, double yup);
-
-    virtual ICoordSystem* offspecCoords(IAxis* beamAxis, const Direction& beamDirection) const = 0;
-    virtual CoordSystem2D* scatteringCoords(const Beam& beam) const = 0;
-
-    //! Returns vector of unmasked detector indices.
-    std::vector<size_t> active_indices() const;
-
-    //! 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.
-    //! If no pixel contains this specular wavevector, the number of pixels is
-    //! returned. This corresponds to an overflow index.
-    virtual size_t indexOfSpecular(const Beam& beam) const = 0;
-
-#ifndef SWIG
-    std::unique_ptr<DetectorContext> createContext() const;
-#endif // SWIG
-
-protected:
-    IDetector2D(const IDetector2D& other);
-
-    //! Calculate global index from two axis indices
-    size_t getGlobalIndex(size_t x, size_t y) const;
-
-private:
-    std::shared_ptr<DetectorMask> m_detector_mask;
-};
-
-#endif // BORNAGAIN_DEVICE_DETECTOR_IDETECTOR2D_H
diff --git a/Device/Detector/RectangularDetector.h b/Device/Detector/RectangularDetector.h
index 5c7dc1bc69b..62c7cdbcaa2 100644
--- a/Device/Detector/RectangularDetector.h
+++ b/Device/Detector/RectangularDetector.h
@@ -15,7 +15,7 @@
 #ifndef BORNAGAIN_DEVICE_DETECTOR_RECTANGULARDETECTOR_H
 #define BORNAGAIN_DEVICE_DETECTOR_RECTANGULARDETECTOR_H
 
-#include "Device/Detector/IDetector2D.h"
+#include "Device/Detector/IDetector.h"
 
 class IPixel;
 class RectangularPixel;
@@ -23,7 +23,7 @@ class RectangularPixel;
 //! A flat rectangular detector with axes and resolution function.
 //! @ingroup detector
 
-class RectangularDetector : public IDetector2D {
+class RectangularDetector : public IDetector {
 public:
     enum EDetectorArrangement {
         GENERIC,
diff --git a/Device/Detector/SimulationAreaIterator.cpp b/Device/Detector/SimulationAreaIterator.cpp
index 715ff003a82..2501df2d25f 100644
--- a/Device/Detector/SimulationAreaIterator.cpp
+++ b/Device/Detector/SimulationAreaIterator.cpp
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "Device/Detector/IDetector2D.h"
+#include "Device/Detector/IDetector.h"
 #include "Device/Mask/DetectorMask.h"
 
 SimulationAreaIterator::SimulationAreaIterator(const IDetector* detector, Mode mode,
diff --git a/Device/Detector/SphericalDetector.h b/Device/Detector/SphericalDetector.h
index 389a1c087d5..33e2c9c1df2 100644
--- a/Device/Detector/SphericalDetector.h
+++ b/Device/Detector/SphericalDetector.h
@@ -15,14 +15,14 @@
 #ifndef BORNAGAIN_DEVICE_DETECTOR_SPHERICALDETECTOR_H
 #define BORNAGAIN_DEVICE_DETECTOR_SPHERICALDETECTOR_H
 
-#include "Device/Detector/IDetector2D.h"
+#include "Device/Detector/IDetector.h"
 
 class IPixel;
 
 //! A detector with coordinate axes along angles phi and alpha.
 //! @ingroup detector
 
-class SphericalDetector : public IDetector2D {
+class SphericalDetector : public IDetector {
 public:
     SphericalDetector() = default;
 
diff --git a/GUI/Model/Device/DetectorItems.cpp b/GUI/Model/Device/DetectorItems.cpp
index c2ccdbcab76..53c7b61a44d 100644
--- a/GUI/Model/Device/DetectorItems.cpp
+++ b/GUI/Model/Device/DetectorItems.cpp
@@ -13,7 +13,7 @@
 //  ************************************************************************************************
 
 #include "GUI/Model/Device/DetectorItems.h"
-#include "Device/Detector/IDetector2D.h"
+#include "Device/Detector/IDetector.h"
 #include "Device/Mask/IShape2D.h"
 #include "Device/Resolution/ResolutionFunction2DGaussian.h"
 #include "GUI/Model/Device/MaskItems.h"
@@ -23,7 +23,7 @@
 
 DetectorItem::DetectorItem() {}
 
-std::unique_ptr<IDetector2D> DetectorItem::createDetector() const
+std::unique_ptr<IDetector> DetectorItem::createDetector() const
 {
     auto result = createDomainDetector();
     addMasksToCore(result.get());
@@ -59,7 +59,7 @@ std::unique_ptr<IResolutionFunction2D> DetectorItem::createResolutionFunction()
     return m_resolutionFunction->createResolutionFunction(axesToCoreUnitsFactor());
 }
 
-void DetectorItem::addMasksToCore(IDetector2D* detector) const
+void DetectorItem::addMasksToCore(IDetector* detector) const
 {
     const double scale = axesToCoreUnitsFactor();
     const auto maskItems = m_maskItems.maskItems();
diff --git a/GUI/Model/Device/DetectorItems.h b/GUI/Model/Device/DetectorItems.h
index 3ae2b79972d..a0d3a29c119 100644
--- a/GUI/Model/Device/DetectorItems.h
+++ b/GUI/Model/Device/DetectorItems.h
@@ -21,7 +21,7 @@
 #include <heinz/Vectors3D.h>
 
 class MaskContainerItem;
-class IDetector2D;
+class IDetector;
 class IResolutionFunction2D;
 class DetectorItem;
 class ResolutionFunctionItem;
@@ -30,7 +30,7 @@ class DetectorItem {
 public:
     virtual ~DetectorItem() = default;
 
-    std::unique_ptr<IDetector2D> createDetector() const;
+    std::unique_ptr<IDetector> createDetector() const;
     virtual void serialize(Streamer& s) = 0;
 
     //! Returns the size of x-axis of the detector
@@ -59,10 +59,10 @@ public:
 protected:
     DetectorItem();
 
-    virtual std::unique_ptr<IDetector2D> createDomainDetector() const = 0;
+    virtual std::unique_ptr<IDetector> createDomainDetector() const = 0;
     std::unique_ptr<IResolutionFunction2D> createResolutionFunction() const;
 
-    void addMasksToCore(IDetector2D* detector) const;
+    void addMasksToCore(IDetector* detector) const;
 
 protected:
     MaskItems m_maskItems; //!< for creation of domain detector; only filled and relevant in jobs
diff --git a/GUI/Model/Device/Instrument.cpp b/GUI/Model/Device/Instrument.cpp
index 35229cd6889..86d9cc31364 100644
--- a/GUI/Model/Device/Instrument.cpp
+++ b/GUI/Model/Device/Instrument.cpp
@@ -14,9 +14,9 @@
 
 #include "GUI/Model/Device/Instrument.h"
 #include "Device/Beam/Beam.h"
-#include "Device/Detector/IDetector2D.h"
+#include "Device/Detector/IDetector.h"
 
-Instrument::Instrument(const Beam& beam, const IDetector2D& detector)
+Instrument::Instrument(const Beam& beam, const IDetector& detector)
     : m_beam(beam.clone()) // TODO take ownership of pointer arg instead of cloning
     , m_detector(detector.clone())
 {
diff --git a/GUI/Model/Device/Instrument.h b/GUI/Model/Device/Instrument.h
index 12ada5bb769..09f3ec548a1 100644
--- a/GUI/Model/Device/Instrument.h
+++ b/GUI/Model/Device/Instrument.h
@@ -19,21 +19,21 @@
 #include <memory>
 
 class Beam;
-class IDetector2D;
+class IDetector;
 
 //! Assembles beam, detector and their relative positions with respect to the sample.
 
 class Instrument {
 public:
-    Instrument(const Beam& beam, const IDetector2D& detector);
+    Instrument(const Beam& beam, const IDetector& detector);
     ~Instrument();
 
     const Beam& beam() const { return *m_beam; }
-    const IDetector2D& detector() const { return *m_detector; }
+    const IDetector& detector() const { return *m_detector; }
 
 protected:
     std::unique_ptr<Beam> m_beam;
-    std::unique_ptr<IDetector2D> m_detector;
+    std::unique_ptr<IDetector> m_detector;
 };
 
 #endif // BORNAGAIN_GUI_MODEL_DEVICE_INSTRUMENT_H
diff --git a/GUI/Model/Device/RectangularDetectorItem.cpp b/GUI/Model/Device/RectangularDetectorItem.cpp
index 48727a2a20a..4bae528a74f 100644
--- a/GUI/Model/Device/RectangularDetectorItem.cpp
+++ b/GUI/Model/Device/RectangularDetectorItem.cpp
@@ -180,7 +180,7 @@ RectangularDetectorItem::alignmentPropertiesForUI() const
     return {u0(), v0(), distance()};
 }
 
-std::unique_ptr<IDetector2D> RectangularDetectorItem::createDomainDetector() const
+std::unique_ptr<IDetector> RectangularDetectorItem::createDomainDetector() const
 {
     auto result = std::make_unique<RectangularDetector>(xSize(), width(), ySize(), height());
 
@@ -206,7 +206,7 @@ std::unique_ptr<IDetector2D> RectangularDetectorItem::createDomainDetector() con
         break;
     }
 
-    return std::unique_ptr<IDetector2D>(result.release());
+    return std::unique_ptr<IDetector>(result.release());
 }
 
 void RectangularDetectorItem::updateTooltips()
diff --git a/GUI/Model/Device/RectangularDetectorItem.h b/GUI/Model/Device/RectangularDetectorItem.h
index c21c85c1f69..caab7e8dc64 100644
--- a/GUI/Model/Device/RectangularDetectorItem.h
+++ b/GUI/Model/Device/RectangularDetectorItem.h
@@ -63,7 +63,7 @@ public:
     DOUBLE_PROPERTY(distance, Distance);
 
 private:
-    std::unique_ptr<IDetector2D> createDomainDetector() const override;
+    std::unique_ptr<IDetector> createDomainDetector() const override;
     void updateTooltips();
 
 private:
diff --git a/GUI/Model/Device/SphericalDetectorItem.cpp b/GUI/Model/Device/SphericalDetectorItem.cpp
index 858c82dbdd1..023362f9dd6 100644
--- a/GUI/Model/Device/SphericalDetectorItem.cpp
+++ b/GUI/Model/Device/SphericalDetectorItem.cpp
@@ -60,7 +60,7 @@ void SphericalDetectorItem::serialize(Streamer& s)
         m_resolutionFunction->setUnit(Unit::degree);
 }
 
-std::unique_ptr<IDetector2D> SphericalDetectorItem::createDomainDetector() const
+std::unique_ptr<IDetector> SphericalDetectorItem::createDomainDetector() const
 {
     const int n_x = m_phiAxis.nbins();
     const double x_min = Units::deg2rad(m_phiAxis.min());
diff --git a/GUI/Model/Device/SphericalDetectorItem.h b/GUI/Model/Device/SphericalDetectorItem.h
index c0ab0144e55..365b647105e 100644
--- a/GUI/Model/Device/SphericalDetectorItem.h
+++ b/GUI/Model/Device/SphericalDetectorItem.h
@@ -35,7 +35,7 @@ public:
     AXIS_PROPERTY(alphaAxis);
 
 protected:
-    std::unique_ptr<IDetector2D> createDomainDetector() const override;
+    std::unique_ptr<IDetector> createDomainDetector() const override;
 };
 
 #endif // BORNAGAIN_GUI_MODEL_DEVICE_SPHERICALDETECTORITEM_H
diff --git a/GUI/Model/FromCore/ItemizeSimulation.cpp b/GUI/Model/FromCore/ItemizeSimulation.cpp
index c561be38c3d..727e18cb7f0 100644
--- a/GUI/Model/FromCore/ItemizeSimulation.cpp
+++ b/GUI/Model/FromCore/ItemizeSimulation.cpp
@@ -139,7 +139,7 @@ void setMaskContainer(MaskItems* destMaskItems, const IDetector& detector, doubl
 
 void setDetectorMasks(DetectorItem* detector_item, const ISimulation2D& simulation)
 {
-    const IDetector& detector = simulation.detector2D();
+    const IDetector& detector = simulation.detector();
     if ((detector.detectorMask() && detector.detectorMask()->hasMasks())
         || detector.hasExplicitRegionOfInterest()) {
         const double scale = 1.0 / detector_item->axesToCoreUnitsFactor();
diff --git a/GUI/Model/Model/JobFunctions.cpp b/GUI/Model/Model/JobFunctions.cpp
index 24cffe014be..202b7cab0e0 100644
--- a/GUI/Model/Model/JobFunctions.cpp
+++ b/GUI/Model/Model/JobFunctions.cpp
@@ -14,7 +14,7 @@
 
 #include "GUI/Model/Model/JobFunctions.h"
 #include "Base/Util/Assert.h"
-#include "Device/Detector/IDetector2D.h"
+#include "Device/Detector/IDetector.h"
 #include "GUI/Model/Data/Data1DViewItem.h"
 #include "GUI/Model/Data/DataPropertyContainer.h"
 #include "GUI/Model/Data/IntensityDataItem.h"
diff --git a/Sim/Export/SimulationToPython.cpp b/Sim/Export/SimulationToPython.cpp
index abfda0831c9..20943d51c38 100644
--- a/Sim/Export/SimulationToPython.cpp
+++ b/Sim/Export/SimulationToPython.cpp
@@ -52,7 +52,7 @@ std::function<std::string(double)> printFunc(const IDetector& detector)
     throw std::runtime_error("SimulationToPython::defineMasks() -> Error. Unknown detector units.");
 }
 
-bool isQuadraticDetector(const IDetector2D& det)
+bool isQuadraticDetector(const IDetector& det)
 {
     ASSERT(det.rank() == 2);
     if (det.axis(0).size() != det.axis(1).size())
@@ -234,7 +234,7 @@ std::string defineDetector(const ISimulation2D* simulation)
     return result.str();
 }
 
-std::string defineDetectorResolutionFunction(const IDetector2D& detector)
+std::string defineDetectorResolutionFunction(const IDetector& detector)
 {
     std::ostringstream result;
 
@@ -350,7 +350,7 @@ std::string defineParameterDistributions(const ISimulation* simulation)
     return result.str();
 }
 
-std::string defineMasks(const IDetector2D& detector)
+std::string defineMasks(const IDetector& detector)
 {
     std::ostringstream result;
     result << std::setprecision(12);
@@ -412,9 +412,9 @@ std::string defineScatteringSimulation(const ScatteringSimulation* simulation)
     result << defineGISASBeam(*simulation);
     result << defineDetector(simulation);
     result << indent() << "simulation = ba.ScatteringSimulation(beam, sample, detector)\n";
-    result << defineDetectorResolutionFunction(simulation->detector2D());
+    result << defineDetectorResolutionFunction(simulation->detector());
     result << defineParameterDistributions(simulation);
-    result << defineMasks(simulation->detector2D());
+    result << defineMasks(simulation->detector());
     result << defineSimulationOptions(simulation);
     result << defineBackground(simulation);
     return result.str();
@@ -425,10 +425,10 @@ std::string defineOffspecSimulation(const OffspecSimulation* simulation)
     std::ostringstream result;
     result << indent() << "simulation = ba.OffspecSimulation()\n";
     result << defineDetector(simulation);
-    result << defineDetectorResolutionFunction(simulation->detector2D());
+    result << defineDetectorResolutionFunction(simulation->detector());
     result << defineOffspecBeam(*simulation);
     result << defineParameterDistributions(simulation);
-    result << defineMasks(simulation->detector2D());
+    result << defineMasks(simulation->detector());
     result << defineSimulationOptions(simulation);
     result << defineBackground(simulation);
     return result.str();
diff --git a/Sim/Simulation/ISimulation2D.cpp b/Sim/Simulation/ISimulation2D.cpp
index f98ee1b2e75..cd958471a1c 100644
--- a/Sim/Simulation/ISimulation2D.cpp
+++ b/Sim/Simulation/ISimulation2D.cpp
@@ -17,7 +17,7 @@
 #include "Device/Beam/Beam.h"
 #include "Device/Detector/DetectorContext.h"
 #include "Device/Detector/SphericalDetector.h"
-#include "Device/Detector/IDetector2D.h"
+#include "Device/Detector/IDetector.h"
 #include "Resample/Element/DiffuseElement.h"
 #include "Sim/Background/IBackground.h"
 #include "Sim/Computation/DWBAComputation.h"
@@ -39,20 +39,6 @@ ISimulation2D::ISimulation2D(const MultiLayer& sample)
 
 ISimulation2D::~ISimulation2D() = default;
 
-IDetector2D& ISimulation2D::detector2D()
-{
-    auto* p = dynamic_cast<IDetector2D*>(&detector());
-    ASSERT(p);
-    return *p;
-}
-
-const IDetector2D& ISimulation2D::detector2D() const
-{
-    const auto* p = dynamic_cast<const IDetector2D*>(&detector());
-    ASSERT(p);
-    return *p;
-}
-
 std::vector<const INode*> ISimulation2D::nodeChildren() const
 {
     std::vector<const INode*> result = ISimulation::nodeChildren();
@@ -64,22 +50,22 @@ std::vector<const INode*> ISimulation2D::nodeChildren() const
 
 void ISimulation2D::prepareSimulation()
 {
-    m_detector_context = detector2D().createContext();
+    m_detector_context = detector().createContext();
 }
 
 void ISimulation2D::addMask(const IShape2D& shape, bool mask_value)
 {
-    detector2D().addMask(shape, mask_value);
+    detector().addMask(shape, mask_value);
 }
 
 void ISimulation2D::maskAll()
 {
-    detector2D().maskAll();
+    detector().maskAll();
 }
 
 void ISimulation2D::setRegionOfInterest(double xlow, double ylow, double xup, double yup)
 {
-    detector2D().setRegionOfInterest(xlow, ylow, xup, yup);
+    detector().setRegionOfInterest(xlow, ylow, xup, yup);
 }
 
 size_t ISimulation2D::numberOfElements() const
@@ -92,7 +78,7 @@ size_t ISimulation2D::numberOfElements() const
 void ISimulation2D::setDetectorParameters(size_t n_x, double x_min, double x_max, size_t n_y,
                                           double y_min, double y_max)
 {
-    detector2D().setDetectorParameters(n_x, x_min, x_max, n_y, y_min, y_max);
+    detector().setDetectorParameters(n_x, x_min, x_max, n_y, y_min, y_max);
 }
 
 std::unique_ptr<IComputation> ISimulation2D::createComputation(const reSample& re_sample,
@@ -111,9 +97,8 @@ std::vector<std::unique_ptr<DiffuseElement>> ISimulation2D::generateElements(con
     const double phi_i = beam.direction().phi();
     const SpinMatrix beam_polMatrices = beam.polMatrix();
 
-    const IDetector2D& detector = detector2D();
-    const SpinMatrix analyzer_operator = detector.analyzer().matrix();
-    const size_t spec_index = detector.indexOfSpecular(beam);
+    const SpinMatrix analyzer_operator = detector().analyzer().matrix();
+    const size_t spec_index = detector().indexOfSpecular(beam);
 
     const size_t N = m_detector_context->numberOfElements();
 
diff --git a/Sim/Simulation/ISimulation2D.h b/Sim/Simulation/ISimulation2D.h
index 3768c9ec326..72d23e9be95 100644
--- a/Sim/Simulation/ISimulation2D.h
+++ b/Sim/Simulation/ISimulation2D.h
@@ -22,7 +22,7 @@ class Beam;
 class IDetector;
 class DetectorContext;
 class DiffuseElement;
-class IDetector2D;
+class IDetector;
 class IShape2D;
 
 //! Abstract base class of simulations that generate 2D patterns.
@@ -72,11 +72,8 @@ public:
     const Beam& beam() const { return *m_beam; }
     const IDetector& detector() const { return *m_detector; }
     const IDetector* getDetector() const { return m_detector.get(); }
-    const IDetector2D& detector2D() const;
 
 protected:
-    IDetector2D& detector2D();
-
     //! Put into a clean state for running a simulation
     void prepareSimulation() override;
 
diff --git a/Sim/Simulation/OffspecSimulation.cpp b/Sim/Simulation/OffspecSimulation.cpp
index 48722422ade..7cec1cdda5d 100644
--- a/Sim/Simulation/OffspecSimulation.cpp
+++ b/Sim/Simulation/OffspecSimulation.cpp
@@ -26,7 +26,7 @@
 #include "Resample/Element/DiffuseElement.h"
 
 OffspecSimulation::OffspecSimulation(const Beam& beam, const MultiLayer& sample,
-                                     const IDetector2D& detector)
+                                     const IDetector& detector)
     : ISimulation2D(beam, sample, detector)
 {
 }
@@ -83,7 +83,7 @@ const IAxis* OffspecSimulation::beamAxis() const
 ICoordSystem* OffspecSimulation::createCoordSystem() const
 {
     ASSERT(beamAxis());
-    return detector2D().offspecCoords(beamAxis()->clone(), beam().direction());
+    return detector().offspecCoords(beamAxis()->clone(), beam().direction());
 }
 #endif
 
diff --git a/Sim/Simulation/OffspecSimulation.h b/Sim/Simulation/OffspecSimulation.h
index e38f9525fe5..e5d1d57e460 100644
--- a/Sim/Simulation/OffspecSimulation.h
+++ b/Sim/Simulation/OffspecSimulation.h
@@ -30,7 +30,7 @@ class Powerfield;
 
 class OffspecSimulation : public ISimulation2D {
 public:
-    OffspecSimulation(const Beam& beam, const MultiLayer& sample, const IDetector2D& detector);
+    OffspecSimulation(const Beam& beam, const MultiLayer& sample, const IDetector& detector);
     OffspecSimulation(const MultiLayer& sample);
     ~OffspecSimulation() override = default;
 
diff --git a/Sim/Simulation/ScatteringSimulation.cpp b/Sim/Simulation/ScatteringSimulation.cpp
index b7db5d553e0..81016fda8e7 100644
--- a/Sim/Simulation/ScatteringSimulation.cpp
+++ b/Sim/Simulation/ScatteringSimulation.cpp
@@ -15,12 +15,12 @@
 #include "Sim/Simulation/ScatteringSimulation.h"
 #include "Device/Coord/CoordSystem2D.h"
 #include "Device/Data/Powerfield.h"
-#include "Device/Detector/IDetector2D.h"
+#include "Device/Detector/IDetector.h"
 #include "Device/Histo/SimulationResult.h"
 #include "Resample/Element/DiffuseElement.h"
 
 ScatteringSimulation::ScatteringSimulation(const Beam& beam, const MultiLayer& sample,
-                                           const IDetector2D& detector)
+                                           const IDetector& detector)
     : ISimulation2D(beam, sample, detector)
 {
 }
@@ -51,7 +51,7 @@ size_t ScatteringSimulation::intensityMapSize() const
 #ifndef SWIG
 ICoordSystem* ScatteringSimulation::createCoordSystem() const
 {
-    auto* const det2D = dynamic_cast<const IDetector2D*>(getDetector());
+    auto* const det2D = dynamic_cast<const IDetector*>(getDetector());
     ASSERT(det2D);
     return det2D->scatteringCoords(beam());
 }
diff --git a/Sim/Simulation/ScatteringSimulation.h b/Sim/Simulation/ScatteringSimulation.h
index 7f20b83afe3..28bdfff03ae 100644
--- a/Sim/Simulation/ScatteringSimulation.h
+++ b/Sim/Simulation/ScatteringSimulation.h
@@ -27,7 +27,7 @@ class MultiLayer;
 
 class ScatteringSimulation : public ISimulation2D {
 public:
-    ScatteringSimulation(const Beam& beam, const MultiLayer& sample, const IDetector2D& detector);
+    ScatteringSimulation(const Beam& beam, const MultiLayer& sample, const IDetector& detector);
     ~ScatteringSimulation() override = default;
 
     std::string className() const final { return "ScatteringSimulation"; }
diff --git a/Tests/Unit/GUI/TestDetectorItems.cpp b/Tests/Unit/GUI/TestDetectorItems.cpp
index 321cfad47e1..c9651e19bc0 100644
--- a/Tests/Unit/GUI/TestDetectorItems.cpp
+++ b/Tests/Unit/GUI/TestDetectorItems.cpp
@@ -1,5 +1,5 @@
 #include "Base/Const/Units.h"
-#include "Device/Detector/IDetector2D.h"
+#include "Device/Detector/IDetector.h"
 #include "Device/Resolution/ConvolutionDetectorResolution.h"
 #include "Device/Resolution/ResolutionFunction2DGaussian.h"
 #include "GUI/Model/Device/InstrumentCollection.h"
diff --git a/Wrap/Swig/libBornAgainDevice.i b/Wrap/Swig/libBornAgainDevice.i
index 73721b2d447..1d48af80b5e 100644
--- a/Wrap/Swig/libBornAgainDevice.i
+++ b/Wrap/Swig/libBornAgainDevice.i
@@ -83,7 +83,6 @@
 
 %include "Device/Mask/DetectorMask.h"
 %include "Device/Detector/IDetector.h"
-%include "Device/Detector/IDetector2D.h"
 %include "Device/Detector/RectangularDetector.h"
 %include "Device/Detector/SphericalDetector.h"
 
diff --git a/auto/Wrap/doxygenDevice.i b/auto/Wrap/doxygenDevice.i
index e64e28b3571..961c9c40e40 100644
--- a/auto/Wrap/doxygenDevice.i
+++ b/auto/Wrap/doxygenDevice.i
@@ -367,7 +367,7 @@ Holds precalculated information for faster DiffuseElement generation.
 C++ includes: DetectorContext.h
 ";
 
-%feature("docstring")  DetectorContext::DetectorContext "DetectorContext::DetectorContext(const IDetector2D *detector)
+%feature("docstring")  DetectorContext::DetectorContext "DetectorContext::DetectorContext(const IDetector *detector)
 ";
 
 %feature("docstring")  DetectorContext::DetectorContext "DetectorContext::DetectorContext(const DetectorContext &other)=delete
@@ -955,11 +955,6 @@ Sets the detector resolution.
 Resets region of interest making whole detector plane available for the simulation. 
 ";
 
-%feature("docstring")  IDetector::detectorMask "virtual const DetectorMask* IDetector::detectorMask() const =0
-
-Returns detector masks container. 
-";
-
 %feature("docstring")  IDetector::nodeChildren "std::vector< const INode * > IDetector::nodeChildren() const override
 ";
 
@@ -1081,35 +1076,15 @@ Returns number of simulation elements.
 The lower and upper bound of the region of interest. If no region of interest is explicitly defined, then the whole detector is taken as \"region of interest\". 
 ";
 
-
-// File: classIDetector2D.xml
-%feature("docstring") IDetector2D "
-
-Abstract 2D detector interface.
-
-C++ includes: IDetector2D.h
-";
-
-%feature("docstring")  IDetector2D::IDetector2D "IDetector2D::IDetector2D()
-";
-
-%feature("docstring")  IDetector2D::clone "IDetector2D* IDetector2D::clone() const override=0
-";
-
-%feature("docstring")  IDetector2D::~IDetector2D "IDetector2D::~IDetector2D() override
-";
-
-%feature("docstring")  IDetector2D::setDetectorParameters "void IDetector2D::setDetectorParameters(size_t n_x, double x_min, double x_max, size_t n_y, double y_min, double y_max)
+%feature("docstring")  IDetector::setDetectorParameters "void IDetector::setDetectorParameters(size_t n_x, double x_min, double x_max, size_t n_y, double y_min, double y_max)
 
 Sets detector parameters using angle ranges. 
 ";
 
-%feature("docstring")  IDetector2D::detectorMask "const DetectorMask * IDetector2D::detectorMask() const override
-
-Returns detector masks container. 
+%feature("docstring")  IDetector::detectorMask "const DetectorMask * IDetector::detectorMask() const
 ";
 
-%feature("docstring")  IDetector2D::addMask "void IDetector2D::addMask(const IShape2D &shape, bool mask_value=true)
+%feature("docstring")  IDetector::addMask "void IDetector::addMask(const IShape2D &shape, bool mask_value=true)
 
 Adds mask of given shape to the stack of detector masks. The mask value 'true' means that the channel will be excluded from the simulation. The mask which is added last has priority.
 
@@ -1123,38 +1098,38 @@ mask_value:
 The value of mask 
 ";
 
-%feature("docstring")  IDetector2D::maskAll "void IDetector2D::maskAll()
+%feature("docstring")  IDetector::maskAll "void IDetector::maskAll()
 
 Put the mask for all detector channels (i.e. exclude whole detector from the analysis) 
 ";
 
-%feature("docstring")  IDetector2D::setRegionOfInterest "void IDetector2D::setRegionOfInterest(double xlow, double ylow, double xup, double yup)
+%feature("docstring")  IDetector::setRegionOfInterest "void IDetector::setRegionOfInterest(double xlow, double ylow, double xup, double yup)
 
 Sets rectangular region of interest with lower left and upper right corners defined. 
 ";
 
-%feature("docstring")  IDetector2D::offspecCoords "virtual ICoordSystem* IDetector2D::offspecCoords(IAxis *beamAxis, const Direction &beamDirection) const =0
+%feature("docstring")  IDetector::offspecCoords "virtual ICoordSystem* IDetector::offspecCoords(IAxis *beamAxis, const Direction &beamDirection) const =0
 ";
 
-%feature("docstring")  IDetector2D::scatteringCoords "virtual CoordSystem2D* IDetector2D::scatteringCoords(const Beam &beam) const =0
+%feature("docstring")  IDetector::scatteringCoords "virtual CoordSystem2D* IDetector::scatteringCoords(const Beam &beam) const =0
 ";
 
-%feature("docstring")  IDetector2D::active_indices "std::vector< size_t > IDetector2D::active_indices() const
+%feature("docstring")  IDetector::active_indices "std::vector< size_t > IDetector::active_indices() const
 
 Returns vector of unmasked detector indices. 
 ";
 
-%feature("docstring")  IDetector2D::createPixel "virtual IPixel* IDetector2D::createPixel(size_t index) const =0
+%feature("docstring")  IDetector::createPixel "virtual IPixel* IDetector::createPixel(size_t index) const =0
 
 Creates an IPixel for the given  Powerfield object and index. 
 ";
 
-%feature("docstring")  IDetector2D::indexOfSpecular "virtual size_t IDetector2D::indexOfSpecular(const Beam &beam) const =0
+%feature("docstring")  IDetector::indexOfSpecular "virtual size_t IDetector::indexOfSpecular(const Beam &beam) const =0
 
 Returns index of pixel that contains the specular wavevector. If no pixel contains this specular wavevector, the number of pixels is returned. This corresponds to an overflow index. 
 ";
 
-%feature("docstring")  IDetector2D::createContext "std::unique_ptr< DetectorContext > IDetector2D::createContext() const
+%feature("docstring")  IDetector::createContext "std::unique_ptr< DetectorContext > IDetector::createContext() const
 ";
 
 
@@ -2492,16 +2467,16 @@ Returns default units to convert to.
 // File: namespace_0d21.xml
 
 
-// File: namespace_0d31.xml
+// File: namespace_0d29.xml
 
 
-// File: namespace_0d52.xml
+// File: namespace_0d50.xml
 
 
-// File: namespace_0d58.xml
+// File: namespace_0d56.xml
 
 
-// File: namespace_0d60.xml
+// File: namespace_0d58.xml
 
 
 // File: namespaceDataUtils.xml
@@ -2786,12 +2761,6 @@ make Swappable
 // File: IDetector_8h.xml
 
 
-// File: IDetector2D_8cpp.xml
-
-
-// File: IDetector2D_8h.xml
-
-
 // File: RectangularDetector_8cpp.xml
 
 
diff --git a/auto/Wrap/doxygenSim.i b/auto/Wrap/doxygenSim.i
index 03ec48e6170..c96c9138c22 100644
--- a/auto/Wrap/doxygenSim.i
+++ b/auto/Wrap/doxygenSim.i
@@ -1027,9 +1027,6 @@ Force polarized computation even in absence of sample magnetization or external
 %feature("docstring")  ISimulation2D::getDetector "const IDetector* ISimulation2D::getDetector() const
 ";
 
-%feature("docstring")  ISimulation2D::detector2D "const IDetector2D & ISimulation2D::detector2D() const
-";
-
 
 // File: classISpecularScan.xml
 %feature("docstring") ISpecularScan "
@@ -1323,7 +1320,7 @@ Holds an instrument and sample model. Computes reflected and scattered intensity
 C++ includes: OffspecSimulation.h
 ";
 
-%feature("docstring")  OffspecSimulation::OffspecSimulation "OffspecSimulation::OffspecSimulation(const Beam &beam, const MultiLayer &sample, const IDetector2D &detector)
+%feature("docstring")  OffspecSimulation::OffspecSimulation "OffspecSimulation::OffspecSimulation(const Beam &beam, const MultiLayer &sample, const IDetector &detector)
 ";
 
 %feature("docstring")  OffspecSimulation::OffspecSimulation "OffspecSimulation::OffspecSimulation(const MultiLayer &sample)
@@ -1779,7 +1776,7 @@ Holds an instrument and sample model. Computes the scattered intensity as functi
 C++ includes: ScatteringSimulation.h
 ";
 
-%feature("docstring")  ScatteringSimulation::ScatteringSimulation "ScatteringSimulation::ScatteringSimulation(const Beam &beam, const MultiLayer &sample, const IDetector2D &detector)
+%feature("docstring")  ScatteringSimulation::ScatteringSimulation "ScatteringSimulation::ScatteringSimulation(const Beam &beam, const MultiLayer &sample, const IDetector &detector)
 ";
 
 %feature("docstring")  ScatteringSimulation::~ScatteringSimulation "ScatteringSimulation::~ScatteringSimulation() override=default
diff --git a/auto/Wrap/libBornAgainDevice.py b/auto/Wrap/libBornAgainDevice.py
index a441ade9654..57a6292bbf3 100644
--- a/auto/Wrap/libBornAgainDevice.py
+++ b/auto/Wrap/libBornAgainDevice.py
@@ -3583,16 +3583,6 @@ class IDetector(libBornAgainBase.ICloneable, libBornAgainParam.INode):
         """
         return _libBornAgainDevice.IDetector_resetRegionOfInterest(self)
 
-    def detectorMask(self):
-        r"""
-        detectorMask(IDetector self) -> DetectorMask
-        virtual const DetectorMask* IDetector::detectorMask() const =0
-
-        Returns detector masks container. 
-
-        """
-        return _libBornAgainDevice.IDetector_detectorMask(self)
-
     def nodeChildren(self):
         r"""
         nodeChildren(IDetector self) -> std::vector< INode const *,std::allocator< INode const * > >
@@ -3769,58 +3759,28 @@ class IDetector(libBornAgainBase.ICloneable, libBornAgainParam.INode):
         """
         return _libBornAgainDevice.IDetector_regionOfInterestBounds(self, iAxis)
 
-# Register IDetector in _libBornAgainDevice:
-_libBornAgainDevice.IDetector_swigregister(IDetector)
-
-class IDetector2D(IDetector):
-    r"""
-
-
-    Abstract 2D detector interface.
-
-    C++ includes: IDetector2D.h
-
-    """
-
-    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
-
-    def __init__(self, *args, **kwargs):
-        raise AttributeError("No constructor defined - class is abstract")
-    __repr__ = _swig_repr
-
-    def clone(self):
-        r"""
-        clone(IDetector2D self) -> IDetector2D
-        IDetector2D* IDetector2D::clone() const override=0
-
-        """
-        return _libBornAgainDevice.IDetector2D_clone(self)
-    __swig_destroy__ = _libBornAgainDevice.delete_IDetector2D
-
     def setDetectorParameters(self, n_x, x_min, x_max, n_y, y_min, y_max):
         r"""
-        setDetectorParameters(IDetector2D self, size_t n_x, double x_min, double x_max, size_t n_y, double y_min, double y_max)
-        void IDetector2D::setDetectorParameters(size_t n_x, double x_min, double x_max, size_t n_y, double y_min, double y_max)
+        setDetectorParameters(IDetector self, size_t n_x, double x_min, double x_max, size_t n_y, double y_min, double y_max)
+        void IDetector::setDetectorParameters(size_t n_x, double x_min, double x_max, size_t n_y, double y_min, double y_max)
 
         Sets detector parameters using angle ranges. 
 
         """
-        return _libBornAgainDevice.IDetector2D_setDetectorParameters(self, n_x, x_min, x_max, n_y, y_min, y_max)
+        return _libBornAgainDevice.IDetector_setDetectorParameters(self, n_x, x_min, x_max, n_y, y_min, y_max)
 
     def detectorMask(self):
         r"""
-        detectorMask(IDetector2D self) -> DetectorMask
-        const DetectorMask * IDetector2D::detectorMask() const override
-
-        Returns detector masks container. 
+        detectorMask(IDetector self) -> DetectorMask
+        const DetectorMask * IDetector::detectorMask() const
 
         """
-        return _libBornAgainDevice.IDetector2D_detectorMask(self)
+        return _libBornAgainDevice.IDetector_detectorMask(self)
 
     def addMask(self, shape, mask_value=True):
         r"""
-        addMask(IDetector2D self, IShape2D shape, bool mask_value=True)
-        void IDetector2D::addMask(const IShape2D &shape, bool mask_value=true)
+        addMask(IDetector self, IShape2D shape, bool mask_value=True)
+        void IDetector::addMask(const IShape2D &shape, bool mask_value=true)
 
         Adds mask of given shape to the stack of detector masks. The mask value 'true' means that the channel will be excluded from the simulation. The mask which is added last has priority.
 
@@ -3834,78 +3794,78 @@ class IDetector2D(IDetector):
         The value of mask 
 
         """
-        return _libBornAgainDevice.IDetector2D_addMask(self, shape, mask_value)
+        return _libBornAgainDevice.IDetector_addMask(self, shape, mask_value)
 
     def maskAll(self):
         r"""
-        maskAll(IDetector2D self)
-        void IDetector2D::maskAll()
+        maskAll(IDetector self)
+        void IDetector::maskAll()
 
         Put the mask for all detector channels (i.e. exclude whole detector from the analysis) 
 
         """
-        return _libBornAgainDevice.IDetector2D_maskAll(self)
+        return _libBornAgainDevice.IDetector_maskAll(self)
 
     def setRegionOfInterest(self, xlow, ylow, xup, yup):
         r"""
-        setRegionOfInterest(IDetector2D self, double xlow, double ylow, double xup, double yup)
-        void IDetector2D::setRegionOfInterest(double xlow, double ylow, double xup, double yup)
+        setRegionOfInterest(IDetector self, double xlow, double ylow, double xup, double yup)
+        void IDetector::setRegionOfInterest(double xlow, double ylow, double xup, double yup)
 
         Sets rectangular region of interest with lower left and upper right corners defined. 
 
         """
-        return _libBornAgainDevice.IDetector2D_setRegionOfInterest(self, xlow, ylow, xup, yup)
+        return _libBornAgainDevice.IDetector_setRegionOfInterest(self, xlow, ylow, xup, yup)
 
     def offspecCoords(self, beamAxis, beamDirection):
         r"""
-        offspecCoords(IDetector2D self, IAxis beamAxis, Direction const & beamDirection) -> ICoordSystem *
-        virtual ICoordSystem* IDetector2D::offspecCoords(IAxis *beamAxis, const Direction &beamDirection) const =0
+        offspecCoords(IDetector self, IAxis beamAxis, Direction const & beamDirection) -> ICoordSystem *
+        virtual ICoordSystem* IDetector::offspecCoords(IAxis *beamAxis, const Direction &beamDirection) const =0
 
         """
-        return _libBornAgainDevice.IDetector2D_offspecCoords(self, beamAxis, beamDirection)
+        return _libBornAgainDevice.IDetector_offspecCoords(self, beamAxis, beamDirection)
 
     def scatteringCoords(self, beam):
         r"""
-        scatteringCoords(IDetector2D self, Beam beam) -> CoordSystem2D *
-        virtual CoordSystem2D* IDetector2D::scatteringCoords(const Beam &beam) const =0
+        scatteringCoords(IDetector self, Beam beam) -> CoordSystem2D *
+        virtual CoordSystem2D* IDetector::scatteringCoords(const Beam &beam) const =0
 
         """
-        return _libBornAgainDevice.IDetector2D_scatteringCoords(self, beam)
+        return _libBornAgainDevice.IDetector_scatteringCoords(self, beam)
 
     def active_indices(self):
         r"""
-        active_indices(IDetector2D self) -> std::vector< size_t,std::allocator< size_t > >
-        std::vector< size_t > IDetector2D::active_indices() const
+        active_indices(IDetector self) -> std::vector< size_t,std::allocator< size_t > >
+        std::vector< size_t > IDetector::active_indices() const
 
         Returns vector of unmasked detector indices. 
 
         """
-        return _libBornAgainDevice.IDetector2D_active_indices(self)
+        return _libBornAgainDevice.IDetector_active_indices(self)
 
     def createPixel(self, index):
         r"""
-        createPixel(IDetector2D self, size_t index) -> IPixel *
-        virtual IPixel* IDetector2D::createPixel(size_t index) const =0
+        createPixel(IDetector self, size_t index) -> IPixel *
+        virtual IPixel* IDetector::createPixel(size_t index) const =0
 
         Creates an IPixel for the given  Powerfield object and index. 
 
         """
-        return _libBornAgainDevice.IDetector2D_createPixel(self, index)
+        return _libBornAgainDevice.IDetector_createPixel(self, index)
 
     def indexOfSpecular(self, beam):
         r"""
-        indexOfSpecular(IDetector2D self, Beam beam) -> size_t
-        virtual size_t IDetector2D::indexOfSpecular(const Beam &beam) const =0
+        indexOfSpecular(IDetector self, Beam beam) -> size_t
+        virtual size_t IDetector::indexOfSpecular(const Beam &beam) const =0
 
         Returns index of pixel that contains the specular wavevector. If no pixel contains this specular wavevector, the number of pixels is returned. This corresponds to an overflow index. 
 
         """
-        return _libBornAgainDevice.IDetector2D_indexOfSpecular(self, beam)
+        return _libBornAgainDevice.IDetector_indexOfSpecular(self, beam)
 
-# Register IDetector2D in _libBornAgainDevice:
-_libBornAgainDevice.IDetector2D_swigregister(IDetector2D)
+# Register IDetector in _libBornAgainDevice:
+_libBornAgainDevice.IDetector_swigregister(IDetector)
 
-class RectangularDetector(IDetector2D):
+class RectangularDetector(IDetector):
     r"""
 
 
@@ -4137,7 +4097,7 @@ class RectangularDetector(IDetector2D):
 # Register RectangularDetector in _libBornAgainDevice:
 _libBornAgainDevice.RectangularDetector_swigregister(RectangularDetector)
 
-class SphericalDetector(IDetector2D):
+class SphericalDetector(IDetector):
     r"""
 
 
diff --git a/auto/Wrap/libBornAgainDevice_wrap.cpp b/auto/Wrap/libBornAgainDevice_wrap.cpp
index fb06b39cba2..85a951bddde 100644
--- a/auto/Wrap/libBornAgainDevice_wrap.cpp
+++ b/auto/Wrap/libBornAgainDevice_wrap.cpp
@@ -3114,95 +3114,94 @@ namespace Swig {
 #define SWIGTYPE_p_ICloneable swig_types[14]
 #define SWIGTYPE_p_ICoordSystem swig_types[15]
 #define SWIGTYPE_p_IDetector swig_types[16]
-#define SWIGTYPE_p_IDetector2D swig_types[17]
-#define SWIGTYPE_p_IDetectorResolution swig_types[18]
-#define SWIGTYPE_p_IFootprintFactor swig_types[19]
-#define SWIGTYPE_p_IHistogram swig_types[20]
-#define SWIGTYPE_p_INode swig_types[21]
-#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_Line swig_types[26]
-#define SWIGTYPE_p_MaskPattern swig_types[27]
-#define SWIGTYPE_p_OwningVectorT_IAxis_t swig_types[28]
-#define SWIGTYPE_p_Polygon swig_types[29]
-#define SWIGTYPE_p_PolygonPrivate swig_types[30]
-#define SWIGTYPE_p_PowerfieldIteratorT_double_PowerfieldT_double_t_t swig_types[31]
-#define SWIGTYPE_p_PowerfieldIteratorT_double_const_PowerfieldT_double_t_const_t swig_types[32]
-#define SWIGTYPE_p_PowerfieldT_CumulativeValue_t swig_types[33]
-#define SWIGTYPE_p_PowerfieldT_bool_t swig_types[34]
-#define SWIGTYPE_p_PowerfieldT_double_t swig_types[35]
-#define SWIGTYPE_p_RealLimits swig_types[36]
-#define SWIGTYPE_p_Rectangle swig_types[37]
-#define SWIGTYPE_p_RectangularDetector swig_types[38]
-#define SWIGTYPE_p_RectangularPixel swig_types[39]
-#define SWIGTYPE_p_ResolutionFunction2DGaussian swig_types[40]
-#define SWIGTYPE_p_SimulationResult swig_types[41]
-#define SWIGTYPE_p_SphericalDetector swig_types[42]
-#define SWIGTYPE_p_SpinMatrix swig_types[43]
-#define SWIGTYPE_p_Vec3T_double_t swig_types[44]
-#define SWIGTYPE_p_Vec3T_int_t swig_types[45]
-#define SWIGTYPE_p_Vec3T_std__complexT_double_t_t swig_types[46]
-#define SWIGTYPE_p_VerticalLine swig_types[47]
-#define SWIGTYPE_p_allocator_type swig_types[48]
-#define SWIGTYPE_p_char swig_types[49]
-#define SWIGTYPE_p_const_iterator swig_types[50]
-#define SWIGTYPE_p_corr_matrix_t swig_types[51]
-#define SWIGTYPE_p_difference_type swig_types[52]
-#define SWIGTYPE_p_double swig_types[53]
-#define SWIGTYPE_p_first_type swig_types[54]
-#define SWIGTYPE_p_int swig_types[55]
-#define SWIGTYPE_p_iterator swig_types[56]
-#define SWIGTYPE_p_key_type swig_types[57]
-#define SWIGTYPE_p_long_long swig_types[58]
-#define SWIGTYPE_p_mapped_type swig_types[59]
-#define SWIGTYPE_p_p_ICoordSystem swig_types[60]
-#define SWIGTYPE_p_p_PyObject swig_types[61]
-#define SWIGTYPE_p_parameters_t swig_types[62]
-#define SWIGTYPE_p_second_type swig_types[63]
-#define SWIGTYPE_p_short swig_types[64]
-#define SWIGTYPE_p_signed_char swig_types[65]
-#define SWIGTYPE_p_size_type swig_types[66]
-#define SWIGTYPE_p_std__allocatorT_Vec3T_double_t_t swig_types[67]
-#define SWIGTYPE_p_std__allocatorT_double_t swig_types[68]
-#define SWIGTYPE_p_std__allocatorT_int_t swig_types[69]
-#define SWIGTYPE_p_std__allocatorT_std__complexT_double_t_t swig_types[70]
-#define SWIGTYPE_p_std__allocatorT_std__pairT_double_double_t_t swig_types[71]
-#define SWIGTYPE_p_std__allocatorT_std__pairT_std__string_const_double_t_t swig_types[72]
-#define SWIGTYPE_p_std__allocatorT_std__string_t swig_types[73]
-#define SWIGTYPE_p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t swig_types[74]
-#define SWIGTYPE_p_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t swig_types[75]
-#define SWIGTYPE_p_std__allocatorT_unsigned_long_t swig_types[76]
-#define SWIGTYPE_p_std__complexT_double_t swig_types[77]
-#define SWIGTYPE_p_std__functionT_void_fSimulationAreaIterator_const_RF_t swig_types[78]
-#define SWIGTYPE_p_std__invalid_argument swig_types[79]
-#define SWIGTYPE_p_std__lessT_std__string_t swig_types[80]
-#define SWIGTYPE_p_std__mapT_std__string_double_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_double_t_t_t swig_types[81]
-#define SWIGTYPE_p_std__pairT_double_double_t swig_types[82]
-#define SWIGTYPE_p_std__vectorT_AxisInfo_std__allocatorT_AxisInfo_t_t swig_types[83]
-#define SWIGTYPE_p_std__vectorT_IAxis_p_std__allocatorT_IAxis_p_t_t swig_types[84]
-#define SWIGTYPE_p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t swig_types[85]
-#define SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t swig_types[86]
-#define SWIGTYPE_p_std__vectorT_Vec3T_double_t_std__allocatorT_Vec3T_double_t_t_t swig_types[87]
-#define SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t swig_types[88]
-#define SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t swig_types[89]
-#define SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t swig_types[90]
-#define SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t swig_types[91]
-#define SWIGTYPE_p_std__vectorT_std__pairT_double_double_t_std__allocatorT_std__pairT_double_double_t_t_t swig_types[92]
-#define SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t swig_types[93]
-#define SWIGTYPE_p_std__vectorT_std__unique_ptrT_DiffuseElement_t_std__allocatorT_std__unique_ptrT_DiffuseElement_t_t_t swig_types[94]
-#define SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t swig_types[95]
-#define SWIGTYPE_p_std__vectorT_std__vectorT_int_std__allocatorT_int_t_t_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t_t swig_types[96]
-#define SWIGTYPE_p_std__vectorT_unsigned_long_std__allocatorT_unsigned_long_t_t swig_types[97]
-#define SWIGTYPE_p_swig__SwigPyIterator swig_types[98]
-#define SWIGTYPE_p_unsigned_char swig_types[99]
-#define SWIGTYPE_p_unsigned_int swig_types[100]
-#define SWIGTYPE_p_unsigned_long_long swig_types[101]
-#define SWIGTYPE_p_unsigned_short swig_types[102]
-#define SWIGTYPE_p_value_type swig_types[103]
-static swig_type_info *swig_types[105];
-static swig_module_info swig_module = {swig_types, 104, 0, 0, 0, 0};
+#define SWIGTYPE_p_IDetectorResolution swig_types[17]
+#define SWIGTYPE_p_IFootprintFactor swig_types[18]
+#define SWIGTYPE_p_IHistogram swig_types[19]
+#define SWIGTYPE_p_INode swig_types[20]
+#define SWIGTYPE_p_IOFactory 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_Line swig_types[25]
+#define SWIGTYPE_p_MaskPattern swig_types[26]
+#define SWIGTYPE_p_OwningVectorT_IAxis_t swig_types[27]
+#define SWIGTYPE_p_Polygon swig_types[28]
+#define SWIGTYPE_p_PolygonPrivate swig_types[29]
+#define SWIGTYPE_p_PowerfieldIteratorT_double_PowerfieldT_double_t_t swig_types[30]
+#define SWIGTYPE_p_PowerfieldIteratorT_double_const_PowerfieldT_double_t_const_t swig_types[31]
+#define SWIGTYPE_p_PowerfieldT_CumulativeValue_t swig_types[32]
+#define SWIGTYPE_p_PowerfieldT_bool_t swig_types[33]
+#define SWIGTYPE_p_PowerfieldT_double_t swig_types[34]
+#define SWIGTYPE_p_RealLimits swig_types[35]
+#define SWIGTYPE_p_Rectangle swig_types[36]
+#define SWIGTYPE_p_RectangularDetector swig_types[37]
+#define SWIGTYPE_p_RectangularPixel swig_types[38]
+#define SWIGTYPE_p_ResolutionFunction2DGaussian swig_types[39]
+#define SWIGTYPE_p_SimulationResult swig_types[40]
+#define SWIGTYPE_p_SphericalDetector swig_types[41]
+#define SWIGTYPE_p_SpinMatrix swig_types[42]
+#define SWIGTYPE_p_Vec3T_double_t swig_types[43]
+#define SWIGTYPE_p_Vec3T_int_t swig_types[44]
+#define SWIGTYPE_p_Vec3T_std__complexT_double_t_t swig_types[45]
+#define SWIGTYPE_p_VerticalLine swig_types[46]
+#define SWIGTYPE_p_allocator_type swig_types[47]
+#define SWIGTYPE_p_char swig_types[48]
+#define SWIGTYPE_p_const_iterator swig_types[49]
+#define SWIGTYPE_p_corr_matrix_t swig_types[50]
+#define SWIGTYPE_p_difference_type swig_types[51]
+#define SWIGTYPE_p_double swig_types[52]
+#define SWIGTYPE_p_first_type swig_types[53]
+#define SWIGTYPE_p_int swig_types[54]
+#define SWIGTYPE_p_iterator swig_types[55]
+#define SWIGTYPE_p_key_type swig_types[56]
+#define SWIGTYPE_p_long_long swig_types[57]
+#define SWIGTYPE_p_mapped_type swig_types[58]
+#define SWIGTYPE_p_p_ICoordSystem swig_types[59]
+#define SWIGTYPE_p_p_PyObject swig_types[60]
+#define SWIGTYPE_p_parameters_t swig_types[61]
+#define SWIGTYPE_p_second_type swig_types[62]
+#define SWIGTYPE_p_short swig_types[63]
+#define SWIGTYPE_p_signed_char swig_types[64]
+#define SWIGTYPE_p_size_type swig_types[65]
+#define SWIGTYPE_p_std__allocatorT_Vec3T_double_t_t swig_types[66]
+#define SWIGTYPE_p_std__allocatorT_double_t swig_types[67]
+#define SWIGTYPE_p_std__allocatorT_int_t swig_types[68]
+#define SWIGTYPE_p_std__allocatorT_std__complexT_double_t_t swig_types[69]
+#define SWIGTYPE_p_std__allocatorT_std__pairT_double_double_t_t swig_types[70]
+#define SWIGTYPE_p_std__allocatorT_std__pairT_std__string_const_double_t_t swig_types[71]
+#define SWIGTYPE_p_std__allocatorT_std__string_t swig_types[72]
+#define SWIGTYPE_p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t swig_types[73]
+#define SWIGTYPE_p_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t swig_types[74]
+#define SWIGTYPE_p_std__allocatorT_unsigned_long_t swig_types[75]
+#define SWIGTYPE_p_std__complexT_double_t swig_types[76]
+#define SWIGTYPE_p_std__functionT_void_fSimulationAreaIterator_const_RF_t swig_types[77]
+#define SWIGTYPE_p_std__invalid_argument swig_types[78]
+#define SWIGTYPE_p_std__lessT_std__string_t swig_types[79]
+#define SWIGTYPE_p_std__mapT_std__string_double_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_double_t_t_t swig_types[80]
+#define SWIGTYPE_p_std__pairT_double_double_t swig_types[81]
+#define SWIGTYPE_p_std__vectorT_AxisInfo_std__allocatorT_AxisInfo_t_t swig_types[82]
+#define SWIGTYPE_p_std__vectorT_IAxis_p_std__allocatorT_IAxis_p_t_t swig_types[83]
+#define SWIGTYPE_p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t swig_types[84]
+#define SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t swig_types[85]
+#define SWIGTYPE_p_std__vectorT_Vec3T_double_t_std__allocatorT_Vec3T_double_t_t_t swig_types[86]
+#define SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t swig_types[87]
+#define SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t swig_types[88]
+#define SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t swig_types[89]
+#define SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t swig_types[90]
+#define SWIGTYPE_p_std__vectorT_std__pairT_double_double_t_std__allocatorT_std__pairT_double_double_t_t_t swig_types[91]
+#define SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t swig_types[92]
+#define SWIGTYPE_p_std__vectorT_std__unique_ptrT_DiffuseElement_t_std__allocatorT_std__unique_ptrT_DiffuseElement_t_t_t swig_types[93]
+#define SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t swig_types[94]
+#define SWIGTYPE_p_std__vectorT_std__vectorT_int_std__allocatorT_int_t_t_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t_t swig_types[95]
+#define SWIGTYPE_p_std__vectorT_unsigned_long_std__allocatorT_unsigned_long_t_t swig_types[96]
+#define SWIGTYPE_p_swig__SwigPyIterator swig_types[97]
+#define SWIGTYPE_p_unsigned_char swig_types[98]
+#define SWIGTYPE_p_unsigned_int swig_types[99]
+#define SWIGTYPE_p_unsigned_long_long swig_types[100]
+#define SWIGTYPE_p_unsigned_short swig_types[101]
+#define SWIGTYPE_p_value_type swig_types[102]
+static swig_type_info *swig_types[104];
+static swig_module_info swig_module = {swig_types, 103, 0, 0, 0, 0};
 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
 
@@ -33038,29 +33037,6 @@ fail:
 }
 
 
-SWIGINTERN PyObject *_wrap_IDetector_detectorMask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  IDetector *arg1 = (IDetector *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject *swig_obj[1] ;
-  DetectorMask *result = 0 ;
-  
-  if (!args) SWIG_fail;
-  swig_obj[0] = args;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IDetector, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector_detectorMask" "', argument " "1"" of type '" "IDetector const *""'"); 
-  }
-  arg1 = reinterpret_cast< IDetector * >(argp1);
-  result = (DetectorMask *)((IDetector const *)arg1)->detectorMask();
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DetectorMask, 0 |  0 );
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
 SWIGINTERN PyObject *_wrap_IDetector_nodeChildren(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   IDetector *arg1 = (IDetector *) 0 ;
@@ -33562,61 +33538,9 @@ fail:
 }
 
 
-SWIGINTERN PyObject *IDetector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *obj;
-  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
-  SWIG_TypeNewClientData(SWIGTYPE_p_IDetector, SWIG_NewClientData(obj));
-  return SWIG_Py_Void();
-}
-
-SWIGINTERN PyObject *_wrap_IDetector2D_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  IDetector2D *arg1 = (IDetector2D *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject *swig_obj[1] ;
-  IDetector2D *result = 0 ;
-  
-  if (!args) SWIG_fail;
-  swig_obj[0] = args;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IDetector2D, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector2D_clone" "', argument " "1"" of type '" "IDetector2D const *""'"); 
-  }
-  arg1 = reinterpret_cast< IDetector2D * >(argp1);
-  result = (IDetector2D *)((IDetector2D const *)arg1)->clone();
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IDetector2D, 0 |  0 );
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_delete_IDetector2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_IDetector_setDetectorParameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
-  IDetector2D *arg1 = (IDetector2D *) 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_IDetector2D, SWIG_POINTER_DISOWN |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IDetector2D" "', argument " "1"" of type '" "IDetector2D *""'"); 
-  }
-  arg1 = reinterpret_cast< IDetector2D * >(argp1);
-  delete arg1;
-  resultobj = SWIG_Py_Void();
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_IDetector2D_setDetectorParameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  IDetector2D *arg1 = (IDetector2D *) 0 ;
+  IDetector *arg1 = (IDetector *) 0 ;
   size_t arg2 ;
   double arg3 ;
   double arg4 ;
@@ -33639,40 +33563,40 @@ SWIGINTERN PyObject *_wrap_IDetector2D_setDetectorParameters(PyObject *SWIGUNUSE
   int ecode7 = 0 ;
   PyObject *swig_obj[7] ;
   
-  if (!SWIG_Python_UnpackTuple(args, "IDetector2D_setDetectorParameters", 7, 7, swig_obj)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IDetector2D, 0 |  0 );
+  if (!SWIG_Python_UnpackTuple(args, "IDetector_setDetectorParameters", 7, 7, swig_obj)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IDetector, 0 |  0 );
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector2D_setDetectorParameters" "', argument " "1"" of type '" "IDetector2D *""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector_setDetectorParameters" "', argument " "1"" of type '" "IDetector *""'"); 
   }
-  arg1 = reinterpret_cast< IDetector2D * >(argp1);
+  arg1 = reinterpret_cast< IDetector * >(argp1);
   ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2);
   if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IDetector2D_setDetectorParameters" "', argument " "2"" of type '" "size_t""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IDetector_setDetectorParameters" "', argument " "2"" of type '" "size_t""'");
   } 
   arg2 = static_cast< size_t >(val2);
   ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   if (!SWIG_IsOK(ecode3)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IDetector2D_setDetectorParameters" "', argument " "3"" of type '" "double""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IDetector_setDetectorParameters" "', argument " "3"" of type '" "double""'");
   } 
   arg3 = static_cast< double >(val3);
   ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
   if (!SWIG_IsOK(ecode4)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IDetector2D_setDetectorParameters" "', argument " "4"" of type '" "double""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IDetector_setDetectorParameters" "', argument " "4"" of type '" "double""'");
   } 
   arg4 = static_cast< double >(val4);
   ecode5 = SWIG_AsVal_size_t(swig_obj[4], &val5);
   if (!SWIG_IsOK(ecode5)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "IDetector2D_setDetectorParameters" "', argument " "5"" of type '" "size_t""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "IDetector_setDetectorParameters" "', argument " "5"" of type '" "size_t""'");
   } 
   arg5 = static_cast< size_t >(val5);
   ecode6 = SWIG_AsVal_double(swig_obj[5], &val6);
   if (!SWIG_IsOK(ecode6)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "IDetector2D_setDetectorParameters" "', argument " "6"" of type '" "double""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "IDetector_setDetectorParameters" "', argument " "6"" of type '" "double""'");
   } 
   arg6 = static_cast< double >(val6);
   ecode7 = SWIG_AsVal_double(swig_obj[6], &val7);
   if (!SWIG_IsOK(ecode7)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "IDetector2D_setDetectorParameters" "', argument " "7"" of type '" "double""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "IDetector_setDetectorParameters" "', argument " "7"" of type '" "double""'");
   } 
   arg7 = static_cast< double >(val7);
   (arg1)->setDetectorParameters(arg2,arg3,arg4,arg5,arg6,arg7);
@@ -33683,9 +33607,9 @@ fail:
 }
 
 
-SWIGINTERN PyObject *_wrap_IDetector2D_detectorMask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_IDetector_detectorMask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
-  IDetector2D *arg1 = (IDetector2D *) 0 ;
+  IDetector *arg1 = (IDetector *) 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
   PyObject *swig_obj[1] ;
@@ -33693,12 +33617,12 @@ SWIGINTERN PyObject *_wrap_IDetector2D_detectorMask(PyObject *SWIGUNUSEDPARM(sel
   
   if (!args) SWIG_fail;
   swig_obj[0] = args;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IDetector2D, 0 |  0 );
+  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IDetector, 0 |  0 );
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector2D_detectorMask" "', argument " "1"" of type '" "IDetector2D const *""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector_detectorMask" "', argument " "1"" of type '" "IDetector const *""'"); 
   }
-  arg1 = reinterpret_cast< IDetector2D * >(argp1);
-  result = (DetectorMask *)((IDetector2D const *)arg1)->detectorMask();
+  arg1 = reinterpret_cast< IDetector * >(argp1);
+  result = (DetectorMask *)((IDetector const *)arg1)->detectorMask();
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DetectorMask, 0 |  0 );
   return resultobj;
 fail:
@@ -33706,9 +33630,9 @@ fail:
 }
 
 
-SWIGINTERN PyObject *_wrap_IDetector2D_addMask__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
+SWIGINTERN PyObject *_wrap_IDetector_addMask__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
   PyObject *resultobj = 0;
-  IDetector2D *arg1 = (IDetector2D *) 0 ;
+  IDetector *arg1 = (IDetector *) 0 ;
   IShape2D *arg2 = 0 ;
   bool arg3 ;
   void *argp1 = 0 ;
@@ -33719,22 +33643,22 @@ SWIGINTERN PyObject *_wrap_IDetector2D_addMask__SWIG_0(PyObject *SWIGUNUSEDPARM(
   int ecode3 = 0 ;
   
   if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IDetector2D, 0 |  0 );
+  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IDetector, 0 |  0 );
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector2D_addMask" "', argument " "1"" of type '" "IDetector2D *""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector_addMask" "', argument " "1"" of type '" "IDetector *""'"); 
   }
-  arg1 = reinterpret_cast< IDetector2D * >(argp1);
+  arg1 = reinterpret_cast< IDetector * >(argp1);
   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_IShape2D,  0  | 0);
   if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDetector2D_addMask" "', argument " "2"" of type '" "IShape2D const &""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDetector_addMask" "', argument " "2"" of type '" "IShape2D const &""'"); 
   }
   if (!argp2) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDetector2D_addMask" "', argument " "2"" of type '" "IShape2D const &""'"); 
+    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDetector_addMask" "', argument " "2"" of type '" "IShape2D const &""'"); 
   }
   arg2 = reinterpret_cast< IShape2D * >(argp2);
   ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3);
   if (!SWIG_IsOK(ecode3)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IDetector2D_addMask" "', argument " "3"" of type '" "bool""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IDetector_addMask" "', argument " "3"" of type '" "bool""'");
   } 
   arg3 = static_cast< bool >(val3);
   (arg1)->addMask((IShape2D const &)*arg2,arg3);
@@ -33745,9 +33669,9 @@ fail:
 }
 
 
-SWIGINTERN PyObject *_wrap_IDetector2D_addMask__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
+SWIGINTERN PyObject *_wrap_IDetector_addMask__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
   PyObject *resultobj = 0;
-  IDetector2D *arg1 = (IDetector2D *) 0 ;
+  IDetector *arg1 = (IDetector *) 0 ;
   IShape2D *arg2 = 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
@@ -33755,17 +33679,17 @@ SWIGINTERN PyObject *_wrap_IDetector2D_addMask__SWIG_1(PyObject *SWIGUNUSEDPARM(
   int res2 = 0 ;
   
   if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IDetector2D, 0 |  0 );
+  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IDetector, 0 |  0 );
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector2D_addMask" "', argument " "1"" of type '" "IDetector2D *""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector_addMask" "', argument " "1"" of type '" "IDetector *""'"); 
   }
-  arg1 = reinterpret_cast< IDetector2D * >(argp1);
+  arg1 = reinterpret_cast< IDetector * >(argp1);
   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_IShape2D,  0  | 0);
   if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDetector2D_addMask" "', argument " "2"" of type '" "IShape2D const &""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDetector_addMask" "', argument " "2"" of type '" "IShape2D const &""'"); 
   }
   if (!argp2) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDetector2D_addMask" "', argument " "2"" of type '" "IShape2D const &""'"); 
+    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDetector_addMask" "', argument " "2"" of type '" "IShape2D const &""'"); 
   }
   arg2 = reinterpret_cast< IShape2D * >(argp2);
   (arg1)->addMask((IShape2D const &)*arg2);
@@ -33776,31 +33700,31 @@ fail:
 }
 
 
-SWIGINTERN PyObject *_wrap_IDetector2D_addMask(PyObject *self, PyObject *args) {
+SWIGINTERN PyObject *_wrap_IDetector_addMask(PyObject *self, PyObject *args) {
   Py_ssize_t argc;
   PyObject *argv[4] = {
     0
   };
   
-  if (!(argc = SWIG_Python_UnpackTuple(args, "IDetector2D_addMask", 0, 3, argv))) SWIG_fail;
+  if (!(argc = SWIG_Python_UnpackTuple(args, "IDetector_addMask", 0, 3, argv))) SWIG_fail;
   --argc;
   if (argc == 2) {
     int _v;
     void *vptr = 0;
-    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_IDetector2D, 0);
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_IDetector, 0);
     _v = SWIG_CheckState(res);
     if (_v) {
       int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_IShape2D, SWIG_POINTER_NO_NULL | 0);
       _v = SWIG_CheckState(res);
       if (_v) {
-        return _wrap_IDetector2D_addMask__SWIG_1(self, argc, argv);
+        return _wrap_IDetector_addMask__SWIG_1(self, argc, argv);
       }
     }
   }
   if (argc == 3) {
     int _v;
     void *vptr = 0;
-    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_IDetector2D, 0);
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_IDetector, 0);
     _v = SWIG_CheckState(res);
     if (_v) {
       int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_IShape2D, SWIG_POINTER_NO_NULL | 0);
@@ -33811,35 +33735,35 @@ SWIGINTERN PyObject *_wrap_IDetector2D_addMask(PyObject *self, PyObject *args) {
           _v = SWIG_CheckState(res);
         }
         if (_v) {
-          return _wrap_IDetector2D_addMask__SWIG_0(self, argc, argv);
+          return _wrap_IDetector_addMask__SWIG_0(self, argc, argv);
         }
       }
     }
   }
   
 fail:
-  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'IDetector2D_addMask'.\n"
+  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'IDetector_addMask'.\n"
     "  Possible C/C++ prototypes are:\n"
-    "    IDetector2D::addMask(IShape2D const &,bool)\n"
-    "    IDetector2D::addMask(IShape2D const &)\n");
+    "    IDetector::addMask(IShape2D const &,bool)\n"
+    "    IDetector::addMask(IShape2D const &)\n");
   return 0;
 }
 
 
-SWIGINTERN PyObject *_wrap_IDetector2D_maskAll(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_IDetector_maskAll(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
-  IDetector2D *arg1 = (IDetector2D *) 0 ;
+  IDetector *arg1 = (IDetector *) 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_IDetector2D, 0 |  0 );
+  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IDetector, 0 |  0 );
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector2D_maskAll" "', argument " "1"" of type '" "IDetector2D *""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector_maskAll" "', argument " "1"" of type '" "IDetector *""'"); 
   }
-  arg1 = reinterpret_cast< IDetector2D * >(argp1);
+  arg1 = reinterpret_cast< IDetector * >(argp1);
   (arg1)->maskAll();
   resultobj = SWIG_Py_Void();
   return resultobj;
@@ -33848,9 +33772,9 @@ fail:
 }
 
 
-SWIGINTERN PyObject *_wrap_IDetector2D_setRegionOfInterest(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_IDetector_setRegionOfInterest(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
-  IDetector2D *arg1 = (IDetector2D *) 0 ;
+  IDetector *arg1 = (IDetector *) 0 ;
   double arg2 ;
   double arg3 ;
   double arg4 ;
@@ -33867,30 +33791,30 @@ SWIGINTERN PyObject *_wrap_IDetector2D_setRegionOfInterest(PyObject *SWIGUNUSEDP
   int ecode5 = 0 ;
   PyObject *swig_obj[5] ;
   
-  if (!SWIG_Python_UnpackTuple(args, "IDetector2D_setRegionOfInterest", 5, 5, swig_obj)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IDetector2D, 0 |  0 );
+  if (!SWIG_Python_UnpackTuple(args, "IDetector_setRegionOfInterest", 5, 5, swig_obj)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IDetector, 0 |  0 );
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector2D_setRegionOfInterest" "', argument " "1"" of type '" "IDetector2D *""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector_setRegionOfInterest" "', argument " "1"" of type '" "IDetector *""'"); 
   }
-  arg1 = reinterpret_cast< IDetector2D * >(argp1);
+  arg1 = reinterpret_cast< IDetector * >(argp1);
   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IDetector2D_setRegionOfInterest" "', argument " "2"" of type '" "double""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IDetector_setRegionOfInterest" "', argument " "2"" of type '" "double""'");
   } 
   arg2 = static_cast< double >(val2);
   ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   if (!SWIG_IsOK(ecode3)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IDetector2D_setRegionOfInterest" "', argument " "3"" of type '" "double""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IDetector_setRegionOfInterest" "', argument " "3"" of type '" "double""'");
   } 
   arg3 = static_cast< double >(val3);
   ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
   if (!SWIG_IsOK(ecode4)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IDetector2D_setRegionOfInterest" "', argument " "4"" of type '" "double""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IDetector_setRegionOfInterest" "', argument " "4"" of type '" "double""'");
   } 
   arg4 = static_cast< double >(val4);
   ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
   if (!SWIG_IsOK(ecode5)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "IDetector2D_setRegionOfInterest" "', argument " "5"" of type '" "double""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "IDetector_setRegionOfInterest" "', argument " "5"" of type '" "double""'");
   } 
   arg5 = static_cast< double >(val5);
   (arg1)->setRegionOfInterest(arg2,arg3,arg4,arg5);
@@ -33901,9 +33825,9 @@ fail:
 }
 
 
-SWIGINTERN PyObject *_wrap_IDetector2D_offspecCoords(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_IDetector_offspecCoords(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
-  IDetector2D *arg1 = (IDetector2D *) 0 ;
+  IDetector *arg1 = (IDetector *) 0 ;
   IAxis *arg2 = (IAxis *) 0 ;
   Direction *arg3 = 0 ;
   void *argp1 = 0 ;
@@ -33915,26 +33839,26 @@ SWIGINTERN PyObject *_wrap_IDetector2D_offspecCoords(PyObject *SWIGUNUSEDPARM(se
   PyObject *swig_obj[3] ;
   ICoordSystem *result = 0 ;
   
-  if (!SWIG_Python_UnpackTuple(args, "IDetector2D_offspecCoords", 3, 3, swig_obj)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IDetector2D, 0 |  0 );
+  if (!SWIG_Python_UnpackTuple(args, "IDetector_offspecCoords", 3, 3, swig_obj)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IDetector, 0 |  0 );
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector2D_offspecCoords" "', argument " "1"" of type '" "IDetector2D const *""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector_offspecCoords" "', argument " "1"" of type '" "IDetector const *""'"); 
   }
-  arg1 = reinterpret_cast< IDetector2D * >(argp1);
+  arg1 = reinterpret_cast< IDetector * >(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 '" "IDetector2D_offspecCoords" "', argument " "2"" of type '" "IAxis *""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDetector_offspecCoords" "', argument " "2"" of type '" "IAxis *""'"); 
   }
   arg2 = reinterpret_cast< IAxis * >(argp2);
   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_Direction,  0  | 0);
   if (!SWIG_IsOK(res3)) {
-    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IDetector2D_offspecCoords" "', argument " "3"" of type '" "Direction const &""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IDetector_offspecCoords" "', argument " "3"" of type '" "Direction const &""'"); 
   }
   if (!argp3) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDetector2D_offspecCoords" "', argument " "3"" of type '" "Direction const &""'"); 
+    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDetector_offspecCoords" "', argument " "3"" of type '" "Direction const &""'"); 
   }
   arg3 = reinterpret_cast< Direction * >(argp3);
-  result = (ICoordSystem *)((IDetector2D const *)arg1)->offspecCoords(arg2,(Direction const &)*arg3);
+  result = (ICoordSystem *)((IDetector const *)arg1)->offspecCoords(arg2,(Direction const &)*arg3);
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ICoordSystem, 0 |  0 );
   return resultobj;
 fail:
@@ -33942,9 +33866,9 @@ fail:
 }
 
 
-SWIGINTERN PyObject *_wrap_IDetector2D_scatteringCoords(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_IDetector_scatteringCoords(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
-  IDetector2D *arg1 = (IDetector2D *) 0 ;
+  IDetector *arg1 = (IDetector *) 0 ;
   Beam *arg2 = 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
@@ -33953,21 +33877,21 @@ SWIGINTERN PyObject *_wrap_IDetector2D_scatteringCoords(PyObject *SWIGUNUSEDPARM
   PyObject *swig_obj[2] ;
   CoordSystem2D *result = 0 ;
   
-  if (!SWIG_Python_UnpackTuple(args, "IDetector2D_scatteringCoords", 2, 2, swig_obj)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IDetector2D, 0 |  0 );
+  if (!SWIG_Python_UnpackTuple(args, "IDetector_scatteringCoords", 2, 2, swig_obj)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IDetector, 0 |  0 );
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector2D_scatteringCoords" "', argument " "1"" of type '" "IDetector2D const *""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector_scatteringCoords" "', argument " "1"" of type '" "IDetector const *""'"); 
   }
-  arg1 = reinterpret_cast< IDetector2D * >(argp1);
+  arg1 = reinterpret_cast< IDetector * >(argp1);
   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Beam,  0  | 0);
   if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDetector2D_scatteringCoords" "', argument " "2"" of type '" "Beam const &""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDetector_scatteringCoords" "', argument " "2"" of type '" "Beam const &""'"); 
   }
   if (!argp2) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDetector2D_scatteringCoords" "', argument " "2"" of type '" "Beam const &""'"); 
+    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDetector_scatteringCoords" "', argument " "2"" of type '" "Beam const &""'"); 
   }
   arg2 = reinterpret_cast< Beam * >(argp2);
-  result = (CoordSystem2D *)((IDetector2D const *)arg1)->scatteringCoords((Beam const &)*arg2);
+  result = (CoordSystem2D *)((IDetector const *)arg1)->scatteringCoords((Beam const &)*arg2);
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CoordSystem2D, 0 |  0 );
   return resultobj;
 fail:
@@ -33975,9 +33899,9 @@ fail:
 }
 
 
-SWIGINTERN PyObject *_wrap_IDetector2D_active_indices(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_IDetector_active_indices(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
-  IDetector2D *arg1 = (IDetector2D *) 0 ;
+  IDetector *arg1 = (IDetector *) 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
   PyObject *swig_obj[1] ;
@@ -33985,12 +33909,12 @@ SWIGINTERN PyObject *_wrap_IDetector2D_active_indices(PyObject *SWIGUNUSEDPARM(s
   
   if (!args) SWIG_fail;
   swig_obj[0] = args;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IDetector2D, 0 |  0 );
+  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IDetector, 0 |  0 );
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector2D_active_indices" "', argument " "1"" of type '" "IDetector2D const *""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector_active_indices" "', argument " "1"" of type '" "IDetector const *""'"); 
   }
-  arg1 = reinterpret_cast< IDetector2D * >(argp1);
-  result = ((IDetector2D const *)arg1)->active_indices();
+  arg1 = reinterpret_cast< IDetector * >(argp1);
+  result = ((IDetector const *)arg1)->active_indices();
   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:
@@ -33998,9 +33922,9 @@ fail:
 }
 
 
-SWIGINTERN PyObject *_wrap_IDetector2D_createPixel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_IDetector_createPixel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
-  IDetector2D *arg1 = (IDetector2D *) 0 ;
+  IDetector *arg1 = (IDetector *) 0 ;
   size_t arg2 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
@@ -34009,18 +33933,18 @@ SWIGINTERN PyObject *_wrap_IDetector2D_createPixel(PyObject *SWIGUNUSEDPARM(self
   PyObject *swig_obj[2] ;
   IPixel *result = 0 ;
   
-  if (!SWIG_Python_UnpackTuple(args, "IDetector2D_createPixel", 2, 2, swig_obj)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IDetector2D, 0 |  0 );
+  if (!SWIG_Python_UnpackTuple(args, "IDetector_createPixel", 2, 2, swig_obj)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IDetector, 0 |  0 );
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector2D_createPixel" "', argument " "1"" of type '" "IDetector2D const *""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector_createPixel" "', argument " "1"" of type '" "IDetector const *""'"); 
   }
-  arg1 = reinterpret_cast< IDetector2D * >(argp1);
+  arg1 = reinterpret_cast< IDetector * >(argp1);
   ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2);
   if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IDetector2D_createPixel" "', argument " "2"" of type '" "size_t""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IDetector_createPixel" "', argument " "2"" of type '" "size_t""'");
   } 
   arg2 = static_cast< size_t >(val2);
-  result = (IPixel *)((IDetector2D const *)arg1)->createPixel(arg2);
+  result = (IPixel *)((IDetector const *)arg1)->createPixel(arg2);
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IPixel, 0 |  0 );
   return resultobj;
 fail:
@@ -34028,9 +33952,9 @@ fail:
 }
 
 
-SWIGINTERN PyObject *_wrap_IDetector2D_indexOfSpecular(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_IDetector_indexOfSpecular(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
-  IDetector2D *arg1 = (IDetector2D *) 0 ;
+  IDetector *arg1 = (IDetector *) 0 ;
   Beam *arg2 = 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
@@ -34039,21 +33963,21 @@ SWIGINTERN PyObject *_wrap_IDetector2D_indexOfSpecular(PyObject *SWIGUNUSEDPARM(
   PyObject *swig_obj[2] ;
   size_t result;
   
-  if (!SWIG_Python_UnpackTuple(args, "IDetector2D_indexOfSpecular", 2, 2, swig_obj)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IDetector2D, 0 |  0 );
+  if (!SWIG_Python_UnpackTuple(args, "IDetector_indexOfSpecular", 2, 2, swig_obj)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IDetector, 0 |  0 );
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector2D_indexOfSpecular" "', argument " "1"" of type '" "IDetector2D const *""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector_indexOfSpecular" "', argument " "1"" of type '" "IDetector const *""'"); 
   }
-  arg1 = reinterpret_cast< IDetector2D * >(argp1);
+  arg1 = reinterpret_cast< IDetector * >(argp1);
   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Beam,  0  | 0);
   if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDetector2D_indexOfSpecular" "', argument " "2"" of type '" "Beam const &""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDetector_indexOfSpecular" "', argument " "2"" of type '" "Beam const &""'"); 
   }
   if (!argp2) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDetector2D_indexOfSpecular" "', argument " "2"" of type '" "Beam const &""'"); 
+    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDetector_indexOfSpecular" "', argument " "2"" of type '" "Beam const &""'"); 
   }
   arg2 = reinterpret_cast< Beam * >(argp2);
-  result = ((IDetector2D const *)arg1)->indexOfSpecular((Beam const &)*arg2);
+  result = ((IDetector const *)arg1)->indexOfSpecular((Beam const &)*arg2);
   resultobj = SWIG_From_size_t(static_cast< size_t >(result));
   return resultobj;
 fail:
@@ -34061,10 +33985,10 @@ fail:
 }
 
 
-SWIGINTERN PyObject *IDetector2D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *IDetector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
-  SWIG_TypeNewClientData(SWIGTYPE_p_IDetector2D, SWIG_NewClientData(obj));
+  SWIG_TypeNewClientData(SWIGTYPE_p_IDetector, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
 
@@ -42341,13 +42265,6 @@ static PyMethodDef SwigMethods[] = {
 		"Resets region of interest making whole detector plane available for the simulation. \n"
 		"\n"
 		""},
-	 { "IDetector_detectorMask", _wrap_IDetector_detectorMask, METH_O, "\n"
-		"IDetector_detectorMask(IDetector self) -> DetectorMask\n"
-		"virtual const DetectorMask* IDetector::detectorMask() const =0\n"
-		"\n"
-		"Returns detector masks container. \n"
-		"\n"
-		""},
 	 { "IDetector_nodeChildren", _wrap_IDetector_nodeChildren, METH_O, "\n"
 		"IDetector_nodeChildren(IDetector self) -> std::vector< INode const *,std::allocator< INode const * > >\n"
 		"std::vector< const INode * > IDetector::nodeChildren() const override\n"
@@ -42470,34 +42387,21 @@ static PyMethodDef SwigMethods[] = {
 		"The lower and upper bound of the region of interest. If no region of interest is explicitly defined, then the whole detector is taken as \"region of interest\". \n"
 		"\n"
 		""},
-	 { "IDetector_swigregister", IDetector_swigregister, METH_O, NULL},
-	 { "IDetector2D_clone", _wrap_IDetector2D_clone, METH_O, "\n"
-		"IDetector2D_clone(IDetector2D self) -> IDetector2D\n"
-		"IDetector2D* IDetector2D::clone() const override=0\n"
-		"\n"
-		""},
-	 { "delete_IDetector2D", _wrap_delete_IDetector2D, METH_O, "\n"
-		"delete_IDetector2D(IDetector2D self)\n"
-		"IDetector2D::~IDetector2D() override\n"
-		"\n"
-		""},
-	 { "IDetector2D_setDetectorParameters", _wrap_IDetector2D_setDetectorParameters, METH_VARARGS, "\n"
-		"IDetector2D_setDetectorParameters(IDetector2D self, size_t n_x, double x_min, double x_max, size_t n_y, double y_min, double y_max)\n"
-		"void IDetector2D::setDetectorParameters(size_t n_x, double x_min, double x_max, size_t n_y, double y_min, double y_max)\n"
+	 { "IDetector_setDetectorParameters", _wrap_IDetector_setDetectorParameters, METH_VARARGS, "\n"
+		"IDetector_setDetectorParameters(IDetector self, size_t n_x, double x_min, double x_max, size_t n_y, double y_min, double y_max)\n"
+		"void IDetector::setDetectorParameters(size_t n_x, double x_min, double x_max, size_t n_y, double y_min, double y_max)\n"
 		"\n"
 		"Sets detector parameters using angle ranges. \n"
 		"\n"
 		""},
-	 { "IDetector2D_detectorMask", _wrap_IDetector2D_detectorMask, METH_O, "\n"
-		"IDetector2D_detectorMask(IDetector2D self) -> DetectorMask\n"
-		"const DetectorMask * IDetector2D::detectorMask() const override\n"
-		"\n"
-		"Returns detector masks container. \n"
+	 { "IDetector_detectorMask", _wrap_IDetector_detectorMask, METH_O, "\n"
+		"IDetector_detectorMask(IDetector self) -> DetectorMask\n"
+		"const DetectorMask * IDetector::detectorMask() const\n"
 		"\n"
 		""},
-	 { "IDetector2D_addMask", _wrap_IDetector2D_addMask, METH_VARARGS, "\n"
-		"IDetector2D_addMask(IDetector2D self, IShape2D shape, bool mask_value=True)\n"
-		"void IDetector2D::addMask(const IShape2D &shape, bool mask_value=true)\n"
+	 { "IDetector_addMask", _wrap_IDetector_addMask, METH_VARARGS, "\n"
+		"IDetector_addMask(IDetector self, IShape2D shape, bool mask_value=True)\n"
+		"void IDetector::addMask(const IShape2D &shape, bool mask_value=true)\n"
 		"\n"
 		"Adds mask of given shape to the stack of detector masks. The mask value 'true' means that the channel will be excluded from the simulation. The mask which is added last has priority.\n"
 		"\n"
@@ -42511,52 +42415,52 @@ static PyMethodDef SwigMethods[] = {
 		"The value of mask \n"
 		"\n"
 		""},
-	 { "IDetector2D_maskAll", _wrap_IDetector2D_maskAll, METH_O, "\n"
-		"IDetector2D_maskAll(IDetector2D self)\n"
-		"void IDetector2D::maskAll()\n"
+	 { "IDetector_maskAll", _wrap_IDetector_maskAll, METH_O, "\n"
+		"IDetector_maskAll(IDetector self)\n"
+		"void IDetector::maskAll()\n"
 		"\n"
 		"Put the mask for all detector channels (i.e. exclude whole detector from the analysis) \n"
 		"\n"
 		""},
-	 { "IDetector2D_setRegionOfInterest", _wrap_IDetector2D_setRegionOfInterest, METH_VARARGS, "\n"
-		"IDetector2D_setRegionOfInterest(IDetector2D self, double xlow, double ylow, double xup, double yup)\n"
-		"void IDetector2D::setRegionOfInterest(double xlow, double ylow, double xup, double yup)\n"
+	 { "IDetector_setRegionOfInterest", _wrap_IDetector_setRegionOfInterest, METH_VARARGS, "\n"
+		"IDetector_setRegionOfInterest(IDetector self, double xlow, double ylow, double xup, double yup)\n"
+		"void IDetector::setRegionOfInterest(double xlow, double ylow, double xup, double yup)\n"
 		"\n"
 		"Sets rectangular region of interest with lower left and upper right corners defined. \n"
 		"\n"
 		""},
-	 { "IDetector2D_offspecCoords", _wrap_IDetector2D_offspecCoords, METH_VARARGS, "\n"
-		"IDetector2D_offspecCoords(IDetector2D self, IAxis beamAxis, Direction const & beamDirection) -> ICoordSystem *\n"
-		"virtual ICoordSystem* IDetector2D::offspecCoords(IAxis *beamAxis, const Direction &beamDirection) const =0\n"
+	 { "IDetector_offspecCoords", _wrap_IDetector_offspecCoords, METH_VARARGS, "\n"
+		"IDetector_offspecCoords(IDetector self, IAxis beamAxis, Direction const & beamDirection) -> ICoordSystem *\n"
+		"virtual ICoordSystem* IDetector::offspecCoords(IAxis *beamAxis, const Direction &beamDirection) const =0\n"
 		"\n"
 		""},
-	 { "IDetector2D_scatteringCoords", _wrap_IDetector2D_scatteringCoords, METH_VARARGS, "\n"
-		"IDetector2D_scatteringCoords(IDetector2D self, Beam beam) -> CoordSystem2D *\n"
-		"virtual CoordSystem2D* IDetector2D::scatteringCoords(const Beam &beam) const =0\n"
+	 { "IDetector_scatteringCoords", _wrap_IDetector_scatteringCoords, METH_VARARGS, "\n"
+		"IDetector_scatteringCoords(IDetector self, Beam beam) -> CoordSystem2D *\n"
+		"virtual CoordSystem2D* IDetector::scatteringCoords(const Beam &beam) const =0\n"
 		"\n"
 		""},
-	 { "IDetector2D_active_indices", _wrap_IDetector2D_active_indices, METH_O, "\n"
-		"IDetector2D_active_indices(IDetector2D self) -> std::vector< size_t,std::allocator< size_t > >\n"
-		"std::vector< size_t > IDetector2D::active_indices() const\n"
+	 { "IDetector_active_indices", _wrap_IDetector_active_indices, METH_O, "\n"
+		"IDetector_active_indices(IDetector self) -> std::vector< size_t,std::allocator< size_t > >\n"
+		"std::vector< size_t > IDetector::active_indices() const\n"
 		"\n"
 		"Returns vector of unmasked detector indices. \n"
 		"\n"
 		""},
-	 { "IDetector2D_createPixel", _wrap_IDetector2D_createPixel, METH_VARARGS, "\n"
-		"IDetector2D_createPixel(IDetector2D self, size_t index) -> IPixel *\n"
-		"virtual IPixel* IDetector2D::createPixel(size_t index) const =0\n"
+	 { "IDetector_createPixel", _wrap_IDetector_createPixel, METH_VARARGS, "\n"
+		"IDetector_createPixel(IDetector self, size_t index) -> IPixel *\n"
+		"virtual IPixel* IDetector::createPixel(size_t index) const =0\n"
 		"\n"
 		"Creates an IPixel for the given  Powerfield object and index. \n"
 		"\n"
 		""},
-	 { "IDetector2D_indexOfSpecular", _wrap_IDetector2D_indexOfSpecular, METH_VARARGS, "\n"
-		"IDetector2D_indexOfSpecular(IDetector2D self, Beam beam) -> size_t\n"
-		"virtual size_t IDetector2D::indexOfSpecular(const Beam &beam) const =0\n"
+	 { "IDetector_indexOfSpecular", _wrap_IDetector_indexOfSpecular, METH_VARARGS, "\n"
+		"IDetector_indexOfSpecular(IDetector self, Beam beam) -> size_t\n"
+		"virtual size_t IDetector::indexOfSpecular(const Beam &beam) const =0\n"
 		"\n"
 		"Returns index of pixel that contains the specular wavevector. If no pixel contains this specular wavevector, the number of pixels is returned. This corresponds to an overflow index. \n"
 		"\n"
 		""},
-	 { "IDetector2D_swigregister", IDetector2D_swigregister, METH_O, NULL},
+	 { "IDetector_swigregister", IDetector_swigregister, METH_O, NULL},
 	 { "new_RectangularDetector", _wrap_new_RectangularDetector, METH_VARARGS, "\n"
 		"RectangularDetector(size_t nxbins, double width, size_t nybins, double height)\n"
 		"new_RectangularDetector(RectangularDetector other) -> RectangularDetector\n"
@@ -43350,20 +43254,11 @@ static PyMethodDef SwigMethods_proxydocs[] = {
 
 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
 
-static void *_p_RectangularDetectorTo_p_IDetector2D(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((IDetector2D *)  ((RectangularDetector *) x));
-}
-static void *_p_SphericalDetectorTo_p_IDetector2D(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((IDetector2D *)  ((SphericalDetector *) x));
-}
 static void *_p_RectangularDetectorTo_p_IDetector(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((IDetector *) (IDetector2D *) ((RectangularDetector *) x));
+    return (void *)((IDetector *)  ((RectangularDetector *) x));
 }
 static void *_p_SphericalDetectorTo_p_IDetector(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((IDetector *) (IDetector2D *) ((SphericalDetector *) x));
-}
-static void *_p_IDetector2DTo_p_IDetector(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((IDetector *)  ((IDetector2D *) x));
+    return (void *)((IDetector *)  ((SphericalDetector *) x));
 }
 static void *_p_PolygonTo_p_IShape2D(void *x, int *SWIGUNUSEDPARM(newmemory)) {
     return (void *)((IShape2D *)  ((Polygon *) x));
@@ -43417,17 +43312,14 @@ static void *_p_IDetectorTo_p_INode(void *x, int *SWIGUNUSEDPARM(newmemory)) {
     return (void *)((INode *)  ((IDetector *) x));
 }
 static void *_p_RectangularDetectorTo_p_INode(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((INode *) (IDetector *)(IDetector2D *) ((RectangularDetector *) x));
+    return (void *)((INode *) (IDetector *) ((RectangularDetector *) x));
 }
 static void *_p_SphericalDetectorTo_p_INode(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((INode *) (IDetector *)(IDetector2D *) ((SphericalDetector *) x));
+    return (void *)((INode *) (IDetector *) ((SphericalDetector *) x));
 }
 static void *_p_FootprintGaussTo_p_INode(void *x, int *SWIGUNUSEDPARM(newmemory)) {
     return (void *)((INode *) (IFootprintFactor *) ((FootprintGauss *) x));
 }
-static void *_p_IDetector2DTo_p_INode(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((INode *) (IDetector *) ((IDetector2D *) x));
-}
 static void *_p_PowerfieldT_double_tTo_p_Frame(void *x, int *SWIGUNUSEDPARM(newmemory)) {
     return (void *)((Frame *)  ((Powerfield< double > *) x));
 }
@@ -43440,9 +43332,6 @@ static void *_p_FootprintGaussTo_p_ICloneable(void *x, int *SWIGUNUSEDPARM(newme
 static void *_p_IDetectorResolutionTo_p_ICloneable(void *x, int *SWIGUNUSEDPARM(newmemory)) {
     return (void *)((ICloneable *)  ((IDetectorResolution *) x));
 }
-static void *_p_IDetector2DTo_p_ICloneable(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((ICloneable *) (IDetector *) ((IDetector2D *) x));
-}
 static void *_p_RectangleTo_p_ICloneable(void *x, int *SWIGUNUSEDPARM(newmemory)) {
     return (void *)((ICloneable *) (IShape2D *) ((Rectangle *) x));
 }
@@ -43468,10 +43357,10 @@ static void *_p_IDetectorTo_p_ICloneable(void *x, int *SWIGUNUSEDPARM(newmemory)
     return (void *)((ICloneable *)  ((IDetector *) x));
 }
 static void *_p_RectangularDetectorTo_p_ICloneable(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((ICloneable *) (IDetector *)(IDetector2D *) ((RectangularDetector *) x));
+    return (void *)((ICloneable *) (IDetector *) ((RectangularDetector *) x));
 }
 static void *_p_SphericalDetectorTo_p_ICloneable(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((ICloneable *) (IDetector *)(IDetector2D *) ((SphericalDetector *) x));
+    return (void *)((ICloneable *) (IDetector *) ((SphericalDetector *) x));
 }
 static void *_p_PolygonTo_p_ICloneable(void *x, int *SWIGUNUSEDPARM(newmemory)) {
     return (void *)((ICloneable *) (IShape2D *) ((Polygon *) x));
@@ -43502,7 +43391,6 @@ static swig_type_info _swigt__p_IAxis = {"_p_IAxis", "IAxis *", 0, 0, (void*)0,
 static swig_type_info _swigt__p_ICloneable = {"_p_ICloneable", "ICloneable *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_ICoordSystem = {"_p_ICoordSystem", "ICoordSystem *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_IDetector = {"_p_IDetector", "IDetector *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_IDetector2D = {"_p_IDetector2D", "IDetector2D *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_IDetectorResolution = {"_p_IDetectorResolution", "IDetectorResolution *", 0, 0, (void*)0, 0};
 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};
@@ -43608,7 +43496,6 @@ static swig_type_info *swig_type_initial[] = {
   &_swigt__p_ICloneable,
   &_swigt__p_ICoordSystem,
   &_swigt__p_IDetector,
-  &_swigt__p_IDetector2D,
   &_swigt__p_IDetectorResolution,
   &_swigt__p_IFootprintFactor,
   &_swigt__p_IHistogram,
@@ -43711,14 +43598,13 @@ static swig_cast_info _swigc__p_Histogram1D[] = {  {&_swigt__p_Histogram1D, 0, 0
 static swig_cast_info _swigc__p_Histogram2D[] = {  {&_swigt__p_Histogram2D, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_HorizontalLine[] = {  {&_swigt__p_HorizontalLine, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_IAxis[] = {  {&_swigt__p_IAxis, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_ICloneable[] = {  {&_swigt__p_FootprintGauss, _p_FootprintGaussTo_p_ICloneable, 0, 0},  {&_swigt__p_IDetectorResolution, _p_IDetectorResolutionTo_p_ICloneable, 0, 0},  {&_swigt__p_IDetector2D, _p_IDetector2DTo_p_ICloneable, 0, 0},  {&_swigt__p_Line, _p_LineTo_p_ICloneable, 0, 0},  {&_swigt__p_ICloneable, 0, 0, 0},  {&_swigt__p_Rectangle, _p_RectangleTo_p_ICloneable, 0, 0},  {&_swigt__p_ResolutionFunction2DGaussian, _p_ResolutionFunction2DGaussianTo_p_ICloneable, 0, 0},  {&_swigt__p_IFootprintFactor, _p_IFootprintFactorTo_p_ICloneable, 0, 0},  {&_swigt__p_IShape2D, _p_IShape2DTo_p_ICloneable, 0, 0},  {&_swigt__p_Ellipse, _p_EllipseTo_p_ICloneable, 0, 0},  {&_swigt__p_HorizontalLine, _p_HorizontalLineTo_p_ICloneable, 0, 0},  {&_swigt__p_VerticalLine, _p_VerticalLineTo_p_ICloneable, 0, 0},  {&_swigt__p_SphericalDetector, _p_SphericalDetectorTo_p_ICloneable, 0, 0},  {&_swigt__p_RectangularDetector, _p_RectangularDetectorTo_p_ICloneable, 0, 0},  {&_swigt__p_IDetector, _p_IDetectorTo_p_ICloneable, 0, 0},  {&_swigt__p_Polygon, _p_PolygonTo_p_ICloneable, 0, 0},  {&_swigt__p_FootprintSquare, _p_FootprintSquareTo_p_ICloneable, 0, 0},  {&_swigt__p_IResolutionFunction2D, _p_IResolutionFunction2DTo_p_ICloneable, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_ICloneable[] = {  {&_swigt__p_FootprintGauss, _p_FootprintGaussTo_p_ICloneable, 0, 0},  {&_swigt__p_IDetectorResolution, _p_IDetectorResolutionTo_p_ICloneable, 0, 0},  {&_swigt__p_Line, _p_LineTo_p_ICloneable, 0, 0},  {&_swigt__p_ICloneable, 0, 0, 0},  {&_swigt__p_Rectangle, _p_RectangleTo_p_ICloneable, 0, 0},  {&_swigt__p_ResolutionFunction2DGaussian, _p_ResolutionFunction2DGaussianTo_p_ICloneable, 0, 0},  {&_swigt__p_IFootprintFactor, _p_IFootprintFactorTo_p_ICloneable, 0, 0},  {&_swigt__p_IShape2D, _p_IShape2DTo_p_ICloneable, 0, 0},  {&_swigt__p_Ellipse, _p_EllipseTo_p_ICloneable, 0, 0},  {&_swigt__p_HorizontalLine, _p_HorizontalLineTo_p_ICloneable, 0, 0},  {&_swigt__p_VerticalLine, _p_VerticalLineTo_p_ICloneable, 0, 0},  {&_swigt__p_SphericalDetector, _p_SphericalDetectorTo_p_ICloneable, 0, 0},  {&_swigt__p_RectangularDetector, _p_RectangularDetectorTo_p_ICloneable, 0, 0},  {&_swigt__p_IDetector, _p_IDetectorTo_p_ICloneable, 0, 0},  {&_swigt__p_Polygon, _p_PolygonTo_p_ICloneable, 0, 0},  {&_swigt__p_FootprintSquare, _p_FootprintSquareTo_p_ICloneable, 0, 0},  {&_swigt__p_IResolutionFunction2D, _p_IResolutionFunction2DTo_p_ICloneable, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_ICoordSystem[] = {  {&_swigt__p_ICoordSystem, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_IDetector[] = {  {&_swigt__p_IDetector, 0, 0, 0},  {&_swigt__p_RectangularDetector, _p_RectangularDetectorTo_p_IDetector, 0, 0},  {&_swigt__p_SphericalDetector, _p_SphericalDetectorTo_p_IDetector, 0, 0},  {&_swigt__p_IDetector2D, _p_IDetector2DTo_p_IDetector, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_IDetector2D[] = {  {&_swigt__p_RectangularDetector, _p_RectangularDetectorTo_p_IDetector2D, 0, 0},  {&_swigt__p_SphericalDetector, _p_SphericalDetectorTo_p_IDetector2D, 0, 0},  {&_swigt__p_IDetector2D, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_IDetector[] = {  {&_swigt__p_IDetector, 0, 0, 0},  {&_swigt__p_RectangularDetector, _p_RectangularDetectorTo_p_IDetector, 0, 0},  {&_swigt__p_SphericalDetector, _p_SphericalDetectorTo_p_IDetector, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_IDetectorResolution[] = {  {&_swigt__p_IDetectorResolution, 0, 0, 0},{0, 0, 0, 0}};
 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_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_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_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},{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}};
@@ -43820,7 +43706,6 @@ static swig_cast_info *swig_cast_initial[] = {
   _swigc__p_ICloneable,
   _swigc__p_ICoordSystem,
   _swigc__p_IDetector,
-  _swigc__p_IDetector2D,
   _swigc__p_IDetectorResolution,
   _swigc__p_IFootprintFactor,
   _swigc__p_IHistogram,
diff --git a/auto/Wrap/libBornAgainSim.py b/auto/Wrap/libBornAgainSim.py
index 1d2665ec732..b9d170c1314 100644
--- a/auto/Wrap/libBornAgainSim.py
+++ b/auto/Wrap/libBornAgainSim.py
@@ -3634,8 +3634,8 @@ class ScatteringSimulation(ISimulation2D):
 
     def __init__(self, beam, sample, detector):
         r"""
-        __init__(ScatteringSimulation self, Beam const & beam, MultiLayer const & sample, IDetector2D const & detector) -> ScatteringSimulation
-        ScatteringSimulation::ScatteringSimulation(const Beam &beam, const MultiLayer &sample, const IDetector2D &detector)
+        __init__(ScatteringSimulation self, Beam const & beam, MultiLayer const & sample, IDetector const & detector) -> ScatteringSimulation
+        ScatteringSimulation::ScatteringSimulation(const Beam &beam, const MultiLayer &sample, const IDetector &detector)
 
         """
         _libBornAgainSim.ScatteringSimulation_swiginit(self, _libBornAgainSim.new_ScatteringSimulation(beam, sample, detector))
@@ -3830,7 +3830,7 @@ class OffspecSimulation(ISimulation2D):
 
     def __init__(self, *args):
         r"""
-        __init__(OffspecSimulation self, Beam const & beam, MultiLayer const & sample, IDetector2D const & detector) -> OffspecSimulation
+        __init__(OffspecSimulation self, Beam const & beam, MultiLayer const & sample, IDetector const & detector) -> OffspecSimulation
         __init__(OffspecSimulation self, MultiLayer const & sample) -> OffspecSimulation
         OffspecSimulation::OffspecSimulation(const MultiLayer &sample)
 
diff --git a/auto/Wrap/libBornAgainSim_wrap.cpp b/auto/Wrap/libBornAgainSim_wrap.cpp
index da89bd3b51c..20dde23a47f 100644
--- a/auto/Wrap/libBornAgainSim_wrap.cpp
+++ b/auto/Wrap/libBornAgainSim_wrap.cpp
@@ -3109,94 +3109,93 @@ namespace Swig {
 #define SWIGTYPE_p_IChiSquaredModule swig_types[9]
 #define SWIGTYPE_p_ICloneable swig_types[10]
 #define SWIGTYPE_p_IDetector swig_types[11]
-#define SWIGTYPE_p_IDetector2D swig_types[12]
-#define SWIGTYPE_p_IDistribution1D swig_types[13]
-#define SWIGTYPE_p_IFootprintFactor swig_types[14]
-#define SWIGTYPE_p_IIntensityFunction swig_types[15]
-#define SWIGTYPE_p_INode swig_types[16]
-#define SWIGTYPE_p_IRangedDistribution swig_types[17]
-#define SWIGTYPE_p_ISampleNode swig_types[18]
-#define SWIGTYPE_p_IShape2D swig_types[19]
-#define SWIGTYPE_p_ISimulation swig_types[20]
-#define SWIGTYPE_p_ISimulation2D swig_types[21]
-#define SWIGTYPE_p_ISpecularScan swig_types[22]
-#define SWIGTYPE_p_IVarianceFunction swig_types[23]
-#define SWIGTYPE_p_IntensityFunctionLog swig_types[24]
-#define SWIGTYPE_p_IntensityFunctionSqrt swig_types[25]
-#define SWIGTYPE_p_IterationInfo swig_types[26]
-#define SWIGTYPE_p_MultiLayer swig_types[27]
-#define SWIGTYPE_p_OffspecSimulation swig_types[28]
-#define SWIGTYPE_p_ParameterDistribution swig_types[29]
-#define SWIGTYPE_p_PoissonBackground swig_types[30]
-#define SWIGTYPE_p_PolFilter swig_types[31]
-#define SWIGTYPE_p_PyBuilderCallback swig_types[32]
-#define SWIGTYPE_p_PyObserverCallback swig_types[33]
-#define SWIGTYPE_p_QzScan swig_types[34]
-#define SWIGTYPE_p_RealLimits swig_types[35]
-#define SWIGTYPE_p_ScanResolution swig_types[36]
-#define SWIGTYPE_p_ScatteringSimulation swig_types[37]
-#define SWIGTYPE_p_SimulationOptions swig_types[38]
-#define SWIGTYPE_p_SimulationResult swig_types[39]
-#define SWIGTYPE_p_SpecularSimulation swig_types[40]
-#define SWIGTYPE_p_VarianceConstantFunction swig_types[41]
-#define SWIGTYPE_p_VarianceSimFunction swig_types[42]
-#define SWIGTYPE_p_Vec3T_double_t swig_types[43]
-#define SWIGTYPE_p_Vec3T_int_t swig_types[44]
-#define SWIGTYPE_p_Vec3T_std__complexT_double_t_t swig_types[45]
-#define SWIGTYPE_p_allocator_type swig_types[46]
-#define SWIGTYPE_p_char swig_types[47]
-#define SWIGTYPE_p_difference_type swig_types[48]
-#define SWIGTYPE_p_first_type swig_types[49]
-#define SWIGTYPE_p_int swig_types[50]
-#define SWIGTYPE_p_key_type swig_types[51]
-#define SWIGTYPE_p_long_long swig_types[52]
-#define SWIGTYPE_p_mapped_type swig_types[53]
-#define SWIGTYPE_p_mumufit__MinimizerResult swig_types[54]
-#define SWIGTYPE_p_mumufit__Parameters swig_types[55]
-#define SWIGTYPE_p_p_PyObject swig_types[56]
-#define SWIGTYPE_p_second_type swig_types[57]
-#define SWIGTYPE_p_short swig_types[58]
-#define SWIGTYPE_p_signed_char swig_types[59]
-#define SWIGTYPE_p_size_type swig_types[60]
-#define SWIGTYPE_p_std__allocatorT_AxisInfo_t swig_types[61]
-#define SWIGTYPE_p_std__allocatorT_INode_const_p_t swig_types[62]
-#define SWIGTYPE_p_std__allocatorT_INode_p_t swig_types[63]
-#define SWIGTYPE_p_std__allocatorT_Vec3T_double_t_t swig_types[64]
-#define SWIGTYPE_p_std__allocatorT_double_t swig_types[65]
-#define SWIGTYPE_p_std__allocatorT_int_t swig_types[66]
-#define SWIGTYPE_p_std__allocatorT_std__complexT_double_t_t swig_types[67]
-#define SWIGTYPE_p_std__allocatorT_std__pairT_double_double_t_t swig_types[68]
-#define SWIGTYPE_p_std__allocatorT_std__pairT_std__string_const_double_t_t swig_types[69]
-#define SWIGTYPE_p_std__allocatorT_std__string_t swig_types[70]
-#define SWIGTYPE_p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t swig_types[71]
-#define SWIGTYPE_p_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t swig_types[72]
-#define SWIGTYPE_p_std__allocatorT_unsigned_long_t swig_types[73]
-#define SWIGTYPE_p_std__complexT_double_t swig_types[74]
-#define SWIGTYPE_p_std__invalid_argument swig_types[75]
-#define SWIGTYPE_p_std__lessT_std__string_t swig_types[76]
-#define SWIGTYPE_p_std__mapT_std__string_double_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_double_t_t_t swig_types[77]
-#define SWIGTYPE_p_std__pairT_double_double_t swig_types[78]
-#define SWIGTYPE_p_std__vectorT_AxisInfo_std__allocatorT_AxisInfo_t_t swig_types[79]
-#define SWIGTYPE_p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t swig_types[80]
-#define SWIGTYPE_p_std__vectorT_INode_p_std__allocatorT_INode_p_t_t swig_types[81]
-#define SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t swig_types[82]
-#define SWIGTYPE_p_std__vectorT_Vec3T_double_t_std__allocatorT_Vec3T_double_t_t_t swig_types[83]
-#define SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t swig_types[84]
-#define SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t swig_types[85]
-#define SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t swig_types[86]
-#define SWIGTYPE_p_std__vectorT_std__pairT_double_double_t_std__allocatorT_std__pairT_double_double_t_t_t swig_types[87]
-#define SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t swig_types[88]
-#define SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t swig_types[89]
-#define SWIGTYPE_p_std__vectorT_std__vectorT_int_std__allocatorT_int_t_t_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t_t swig_types[90]
-#define SWIGTYPE_p_std__vectorT_unsigned_long_std__allocatorT_unsigned_long_t_t swig_types[91]
-#define SWIGTYPE_p_swig__SwigPyIterator swig_types[92]
-#define SWIGTYPE_p_unsigned_char swig_types[93]
-#define SWIGTYPE_p_unsigned_int swig_types[94]
-#define SWIGTYPE_p_unsigned_long_long swig_types[95]
-#define SWIGTYPE_p_unsigned_short swig_types[96]
-#define SWIGTYPE_p_value_type swig_types[97]
-static swig_type_info *swig_types[99];
-static swig_module_info swig_module = {swig_types, 98, 0, 0, 0, 0};
+#define SWIGTYPE_p_IDistribution1D swig_types[12]
+#define SWIGTYPE_p_IFootprintFactor swig_types[13]
+#define SWIGTYPE_p_IIntensityFunction swig_types[14]
+#define SWIGTYPE_p_INode swig_types[15]
+#define SWIGTYPE_p_IRangedDistribution swig_types[16]
+#define SWIGTYPE_p_ISampleNode swig_types[17]
+#define SWIGTYPE_p_IShape2D swig_types[18]
+#define SWIGTYPE_p_ISimulation swig_types[19]
+#define SWIGTYPE_p_ISimulation2D swig_types[20]
+#define SWIGTYPE_p_ISpecularScan swig_types[21]
+#define SWIGTYPE_p_IVarianceFunction swig_types[22]
+#define SWIGTYPE_p_IntensityFunctionLog swig_types[23]
+#define SWIGTYPE_p_IntensityFunctionSqrt swig_types[24]
+#define SWIGTYPE_p_IterationInfo swig_types[25]
+#define SWIGTYPE_p_MultiLayer swig_types[26]
+#define SWIGTYPE_p_OffspecSimulation swig_types[27]
+#define SWIGTYPE_p_ParameterDistribution swig_types[28]
+#define SWIGTYPE_p_PoissonBackground swig_types[29]
+#define SWIGTYPE_p_PolFilter swig_types[30]
+#define SWIGTYPE_p_PyBuilderCallback swig_types[31]
+#define SWIGTYPE_p_PyObserverCallback swig_types[32]
+#define SWIGTYPE_p_QzScan swig_types[33]
+#define SWIGTYPE_p_RealLimits swig_types[34]
+#define SWIGTYPE_p_ScanResolution swig_types[35]
+#define SWIGTYPE_p_ScatteringSimulation swig_types[36]
+#define SWIGTYPE_p_SimulationOptions swig_types[37]
+#define SWIGTYPE_p_SimulationResult swig_types[38]
+#define SWIGTYPE_p_SpecularSimulation swig_types[39]
+#define SWIGTYPE_p_VarianceConstantFunction swig_types[40]
+#define SWIGTYPE_p_VarianceSimFunction swig_types[41]
+#define SWIGTYPE_p_Vec3T_double_t swig_types[42]
+#define SWIGTYPE_p_Vec3T_int_t swig_types[43]
+#define SWIGTYPE_p_Vec3T_std__complexT_double_t_t swig_types[44]
+#define SWIGTYPE_p_allocator_type swig_types[45]
+#define SWIGTYPE_p_char swig_types[46]
+#define SWIGTYPE_p_difference_type swig_types[47]
+#define SWIGTYPE_p_first_type swig_types[48]
+#define SWIGTYPE_p_int swig_types[49]
+#define SWIGTYPE_p_key_type swig_types[50]
+#define SWIGTYPE_p_long_long swig_types[51]
+#define SWIGTYPE_p_mapped_type swig_types[52]
+#define SWIGTYPE_p_mumufit__MinimizerResult swig_types[53]
+#define SWIGTYPE_p_mumufit__Parameters swig_types[54]
+#define SWIGTYPE_p_p_PyObject swig_types[55]
+#define SWIGTYPE_p_second_type swig_types[56]
+#define SWIGTYPE_p_short swig_types[57]
+#define SWIGTYPE_p_signed_char swig_types[58]
+#define SWIGTYPE_p_size_type swig_types[59]
+#define SWIGTYPE_p_std__allocatorT_AxisInfo_t swig_types[60]
+#define SWIGTYPE_p_std__allocatorT_INode_const_p_t swig_types[61]
+#define SWIGTYPE_p_std__allocatorT_INode_p_t swig_types[62]
+#define SWIGTYPE_p_std__allocatorT_Vec3T_double_t_t swig_types[63]
+#define SWIGTYPE_p_std__allocatorT_double_t swig_types[64]
+#define SWIGTYPE_p_std__allocatorT_int_t swig_types[65]
+#define SWIGTYPE_p_std__allocatorT_std__complexT_double_t_t swig_types[66]
+#define SWIGTYPE_p_std__allocatorT_std__pairT_double_double_t_t swig_types[67]
+#define SWIGTYPE_p_std__allocatorT_std__pairT_std__string_const_double_t_t swig_types[68]
+#define SWIGTYPE_p_std__allocatorT_std__string_t swig_types[69]
+#define SWIGTYPE_p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t swig_types[70]
+#define SWIGTYPE_p_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t swig_types[71]
+#define SWIGTYPE_p_std__allocatorT_unsigned_long_t swig_types[72]
+#define SWIGTYPE_p_std__complexT_double_t swig_types[73]
+#define SWIGTYPE_p_std__invalid_argument swig_types[74]
+#define SWIGTYPE_p_std__lessT_std__string_t swig_types[75]
+#define SWIGTYPE_p_std__mapT_std__string_double_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_double_t_t_t swig_types[76]
+#define SWIGTYPE_p_std__pairT_double_double_t swig_types[77]
+#define SWIGTYPE_p_std__vectorT_AxisInfo_std__allocatorT_AxisInfo_t_t swig_types[78]
+#define SWIGTYPE_p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t swig_types[79]
+#define SWIGTYPE_p_std__vectorT_INode_p_std__allocatorT_INode_p_t_t swig_types[80]
+#define SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t swig_types[81]
+#define SWIGTYPE_p_std__vectorT_Vec3T_double_t_std__allocatorT_Vec3T_double_t_t_t swig_types[82]
+#define SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t swig_types[83]
+#define SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t swig_types[84]
+#define SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t swig_types[85]
+#define SWIGTYPE_p_std__vectorT_std__pairT_double_double_t_std__allocatorT_std__pairT_double_double_t_t_t swig_types[86]
+#define SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t swig_types[87]
+#define SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t swig_types[88]
+#define SWIGTYPE_p_std__vectorT_std__vectorT_int_std__allocatorT_int_t_t_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t_t swig_types[89]
+#define SWIGTYPE_p_std__vectorT_unsigned_long_std__allocatorT_unsigned_long_t_t swig_types[90]
+#define SWIGTYPE_p_swig__SwigPyIterator swig_types[91]
+#define SWIGTYPE_p_unsigned_char swig_types[92]
+#define SWIGTYPE_p_unsigned_int swig_types[93]
+#define SWIGTYPE_p_unsigned_long_long swig_types[94]
+#define SWIGTYPE_p_unsigned_short swig_types[95]
+#define SWIGTYPE_p_value_type swig_types[96]
+static swig_type_info *swig_types[98];
+static swig_module_info swig_module = {swig_types, 97, 0, 0, 0, 0};
 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
 
@@ -38283,7 +38282,7 @@ SWIGINTERN PyObject *_wrap_new_ScatteringSimulation(PyObject *SWIGUNUSEDPARM(sel
   PyObject *resultobj = 0;
   Beam *arg1 = 0 ;
   MultiLayer *arg2 = 0 ;
-  IDetector2D *arg3 = 0 ;
+  IDetector *arg3 = 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
   void *argp2 = 0 ;
@@ -38310,15 +38309,15 @@ SWIGINTERN PyObject *_wrap_new_ScatteringSimulation(PyObject *SWIGUNUSEDPARM(sel
     SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ScatteringSimulation" "', argument " "2"" of type '" "MultiLayer const &""'"); 
   }
   arg2 = reinterpret_cast< MultiLayer * >(argp2);
-  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_IDetector2D,  0  | 0);
+  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_IDetector,  0  | 0);
   if (!SWIG_IsOK(res3)) {
-    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ScatteringSimulation" "', argument " "3"" of type '" "IDetector2D const &""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ScatteringSimulation" "', argument " "3"" of type '" "IDetector const &""'"); 
   }
   if (!argp3) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ScatteringSimulation" "', argument " "3"" of type '" "IDetector2D const &""'"); 
+    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ScatteringSimulation" "', argument " "3"" of type '" "IDetector const &""'"); 
   }
-  arg3 = reinterpret_cast< IDetector2D * >(argp3);
-  result = (ScatteringSimulation *)new ScatteringSimulation((Beam const &)*arg1,(MultiLayer const &)*arg2,(IDetector2D const &)*arg3);
+  arg3 = reinterpret_cast< IDetector * >(argp3);
+  result = (ScatteringSimulation *)new ScatteringSimulation((Beam const &)*arg1,(MultiLayer const &)*arg2,(IDetector const &)*arg3);
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ScatteringSimulation, SWIG_POINTER_NEW |  0 );
   return resultobj;
 fail:
@@ -39029,7 +39028,7 @@ SWIGINTERN PyObject *_wrap_new_OffspecSimulation__SWIG_0(PyObject *SWIGUNUSEDPAR
   PyObject *resultobj = 0;
   Beam *arg1 = 0 ;
   MultiLayer *arg2 = 0 ;
-  IDetector2D *arg3 = 0 ;
+  IDetector *arg3 = 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
   void *argp2 = 0 ;
@@ -39055,15 +39054,15 @@ SWIGINTERN PyObject *_wrap_new_OffspecSimulation__SWIG_0(PyObject *SWIGUNUSEDPAR
     SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OffspecSimulation" "', argument " "2"" of type '" "MultiLayer const &""'"); 
   }
   arg2 = reinterpret_cast< MultiLayer * >(argp2);
-  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_IDetector2D,  0  | 0);
+  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_IDetector,  0  | 0);
   if (!SWIG_IsOK(res3)) {
-    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_OffspecSimulation" "', argument " "3"" of type '" "IDetector2D const &""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_OffspecSimulation" "', argument " "3"" of type '" "IDetector const &""'"); 
   }
   if (!argp3) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OffspecSimulation" "', argument " "3"" of type '" "IDetector2D const &""'"); 
+    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OffspecSimulation" "', argument " "3"" of type '" "IDetector const &""'"); 
   }
-  arg3 = reinterpret_cast< IDetector2D * >(argp3);
-  result = (OffspecSimulation *)new OffspecSimulation((Beam const &)*arg1,(MultiLayer const &)*arg2,(IDetector2D const &)*arg3);
+  arg3 = reinterpret_cast< IDetector * >(argp3);
+  result = (OffspecSimulation *)new OffspecSimulation((Beam const &)*arg1,(MultiLayer const &)*arg2,(IDetector const &)*arg3);
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OffspecSimulation, SWIG_POINTER_NEW |  0 );
   return resultobj;
 fail:
@@ -39119,7 +39118,7 @@ SWIGINTERN PyObject *_wrap_new_OffspecSimulation(PyObject *self, PyObject *args)
       int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_MultiLayer, SWIG_POINTER_NO_NULL | 0);
       _v = SWIG_CheckState(res);
       if (_v) {
-        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_IDetector2D, SWIG_POINTER_NO_NULL | 0);
+        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_IDetector, SWIG_POINTER_NO_NULL | 0);
         _v = SWIG_CheckState(res);
         if (_v) {
           return _wrap_new_OffspecSimulation__SWIG_0(self, argc, argv);
@@ -39131,7 +39130,7 @@ SWIGINTERN PyObject *_wrap_new_OffspecSimulation(PyObject *self, PyObject *args)
 fail:
   SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_OffspecSimulation'.\n"
     "  Possible C/C++ prototypes are:\n"
-    "    OffspecSimulation::OffspecSimulation(Beam const &,MultiLayer const &,IDetector2D const &)\n"
+    "    OffspecSimulation::OffspecSimulation(Beam const &,MultiLayer const &,IDetector const &)\n"
     "    OffspecSimulation::OffspecSimulation(MultiLayer const &)\n");
   return 0;
 }
@@ -42273,8 +42272,8 @@ static PyMethodDef SwigMethods[] = {
 		""},
 	 { "ISimulation2D_swigregister", ISimulation2D_swigregister, METH_O, NULL},
 	 { "new_ScatteringSimulation", _wrap_new_ScatteringSimulation, METH_VARARGS, "\n"
-		"new_ScatteringSimulation(Beam const & beam, MultiLayer const & sample, IDetector2D const & detector) -> ScatteringSimulation\n"
-		"ScatteringSimulation::ScatteringSimulation(const Beam &beam, const MultiLayer &sample, const IDetector2D &detector)\n"
+		"new_ScatteringSimulation(Beam const & beam, MultiLayer const & sample, IDetector const & detector) -> ScatteringSimulation\n"
+		"ScatteringSimulation::ScatteringSimulation(const Beam &beam, const MultiLayer &sample, const IDetector &detector)\n"
 		"\n"
 		""},
 	 { "delete_ScatteringSimulation", _wrap_delete_ScatteringSimulation, METH_O, "\n"
@@ -42388,7 +42387,7 @@ static PyMethodDef SwigMethods[] = {
 	 { "SpecularSimulation_swigregister", SpecularSimulation_swigregister, METH_O, NULL},
 	 { "SpecularSimulation_swiginit", SpecularSimulation_swiginit, METH_VARARGS, NULL},
 	 { "new_OffspecSimulation", _wrap_new_OffspecSimulation, METH_VARARGS, "\n"
-		"OffspecSimulation(Beam const & beam, MultiLayer const & sample, IDetector2D const & detector)\n"
+		"OffspecSimulation(Beam const & beam, MultiLayer const & sample, IDetector const & detector)\n"
 		"new_OffspecSimulation(MultiLayer const & sample) -> OffspecSimulation\n"
 		"OffspecSimulation::OffspecSimulation(const MultiLayer &sample)\n"
 		"\n"
@@ -42835,7 +42834,6 @@ static swig_type_info _swigt__p_IChiSquaredModule = {"_p_IChiSquaredModule", "IC
 static swig_type_info _swigt__p_ICloneable = {"_p_ICloneable", "ICloneable *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_ISampleNode = {"_p_ISampleNode", 0, 0, 0, 0, 0};
 static swig_type_info _swigt__p_IDetector = {"_p_IDetector", "IDetector *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_IDetector2D = {"_p_IDetector2D", "IDetector2D *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_IDistribution1D = {"_p_IDistribution1D", "IDistribution1D *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_IFootprintFactor = {"_p_IFootprintFactor", "IFootprintFactor *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_IIntensityFunction = {"_p_IIntensityFunction", "IIntensityFunction *", 0, 0, (void*)0, 0};
@@ -42934,7 +42932,6 @@ static swig_type_info *swig_type_initial[] = {
   &_swigt__p_IChiSquaredModule,
   &_swigt__p_ICloneable,
   &_swigt__p_IDetector,
-  &_swigt__p_IDetector2D,
   &_swigt__p_IDistribution1D,
   &_swigt__p_IFootprintFactor,
   &_swigt__p_IIntensityFunction,
@@ -43035,7 +43032,6 @@ static swig_cast_info _swigc__p_IChiSquaredModule[] = {  {&_swigt__p_IChiSquared
 static swig_cast_info _swigc__p_ISampleNode[] = {{&_swigt__p_ISampleNode, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_ICloneable[] = {  {&_swigt__p_ScanResolution, _p_ScanResolutionTo_p_ICloneable, 0, 0},  {&_swigt__p_IChiSquaredModule, _p_IChiSquaredModuleTo_p_ICloneable, 0, 0},  {&_swigt__p_ChiSquaredModule, _p_ChiSquaredModuleTo_p_ICloneable, 0, 0},  {&_swigt__p_QzScan, _p_QzScanTo_p_ICloneable, 0, 0},  {&_swigt__p_AlphaScan, _p_AlphaScanTo_p_ICloneable, 0, 0},  {&_swigt__p_IBackground, _p_IBackgroundTo_p_ICloneable, 0, 0},  {&_swigt__p_ConstantBackground, _p_ConstantBackgroundTo_p_ICloneable, 0, 0},  {&_swigt__p_PoissonBackground, _p_PoissonBackgroundTo_p_ICloneable, 0, 0},  {&_swigt__p_ICloneable, 0, 0, 0},  {&_swigt__p_ISampleNode, _p_ISampleNodeTo_p_ICloneable, 0, 0},  {&_swigt__p_ISpecularScan, _p_ISpecularScanTo_p_ICloneable, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_IDetector[] = {  {&_swigt__p_IDetector, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_IDetector2D[] = {  {&_swigt__p_IDetector2D, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_IDistribution1D[] = {  {&_swigt__p_IDistribution1D, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_IFootprintFactor[] = {  {&_swigt__p_IFootprintFactor, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_IIntensityFunction[] = {  {&_swigt__p_IntensityFunctionSqrt, _p_IntensityFunctionSqrtTo_p_IIntensityFunction, 0, 0},  {&_swigt__p_IIntensityFunction, 0, 0, 0},  {&_swigt__p_IntensityFunctionLog, _p_IntensityFunctionLogTo_p_IIntensityFunction, 0, 0},{0, 0, 0, 0}};
@@ -43134,7 +43130,6 @@ static swig_cast_info *swig_cast_initial[] = {
   _swigc__p_IChiSquaredModule,
   _swigc__p_ICloneable,
   _swigc__p_IDetector,
-  _swigc__p_IDetector2D,
   _swigc__p_IDistribution1D,
   _swigc__p_IFootprintFactor,
   _swigc__p_IIntensityFunction,
-- 
GitLab