diff --git a/GUI/Model/FromCore/ItemizeSimulation.cpp b/GUI/Model/FromCore/ItemizeSimulation.cpp
index 8da32fdc95eaae447a34c8b6464a9cd52c4556f4..8a1be6ab078045f6e0fa7c89d793866c73cf38e6 100644
--- a/GUI/Model/FromCore/ItemizeSimulation.cpp
+++ b/GUI/Model/FromCore/ItemizeSimulation.cpp
@@ -137,9 +137,9 @@ void setMaskContainer(MaskItems* destMaskItems, const IDetector& detector, doubl
     }
 }
 
-void setDetectorMasks(DetectorItem* detector_item, const ISimulation& simulation)
+void setDetectorMasks(DetectorItem* detector_item, const ISimulation2D& simulation)
 {
-    const IDetector& detector = simulation.detector();
+    const IDetector& detector = simulation.detector2D();
     if ((detector.detectorMask() && detector.detectorMask()->hasMasks())
         || detector.hasExplicitRegionOfInterest()) {
         const double scale = 1.0 / detector_item->axesToCoreUnitsFactor();
@@ -460,10 +460,9 @@ SpecularInstrumentItem* createSpecularInstrumentItem(const SpecularSimulation& s
     auto* result = new SpecularInstrumentItem();
     SpecularBeamItem* beam_item = result->beamItem();
 
-    const Beam& beam = simulation.beam();
     const ISpecularScan* scan = simulation.scan();
 
-    beam_item->setIntensity(beam.intensity());
+    beam_item->setIntensity(1.0);
     beam_item->setWavelength(scan->wavelength());
     beam_item->setInclinationAngle(0.0); // inclination angle is hardcoded
     beam_item->setAzimuthalAngle(0.0);   // azimuthal angle is hardcoded
diff --git a/GUI/Model/ToCore/SimulationToCore.cpp b/GUI/Model/ToCore/SimulationToCore.cpp
index 252b124be9b288374df25a9e3aa4c7db8f472fbf..1ec1f0dbbfed63beb37e1eb8edffad2c53d703b4 100644
--- a/GUI/Model/ToCore/SimulationToCore.cpp
+++ b/GUI/Model/ToCore/SimulationToCore.cpp
@@ -141,7 +141,7 @@ SpecularSimulation* createSpecularSimulation(std::unique_ptr<MultiLayer> sample,
         scan.setAngleResolution(*resolution);
 
     auto* result = new SpecularSimulation(scan, *sample);
-    result->beam().setIntensity(beam_item->intensity());
+    // result->beam().setIntensity(beam_item->intensity());
 
     addBackgroundToSimulation(*item, *result);
 
diff --git a/Sim/Export/SimulationToPython.cpp b/Sim/Export/SimulationToPython.cpp
index 2109515dd6e0434b491f8f8563f3575f364053df..abfda0831c9f92f2305939c5393406b247486dfb 100644
--- a/Sim/Export/SimulationToPython.cpp
+++ b/Sim/Export/SimulationToPython.cpp
@@ -129,13 +129,12 @@ std::string defineQzScan(const QzScan& scan)
     return result.str();
 }
 
-std::string definePolarizationAnalyzer(const ISimulation* simulation, const std::string parent)
+std::string definePolarizationAnalyzer(const PolFilter& analyzer, const std::string parent)
 {
     std::ostringstream result;
-    const IDetector& detector = simulation->detector();
-    R3 analyzer_direction = detector.analyzer().analyzerDirection();
-    double analyzer_efficiency = detector.analyzer().analyzerEfficiency();
-    double analyzer_total_transmission = detector.analyzer().totalTransmission();
+    R3 analyzer_direction = analyzer.analyzerDirection();
+    double analyzer_efficiency = analyzer.analyzerEfficiency();
+    double analyzer_total_transmission = analyzer.totalTransmission();
 
     if (analyzer_direction.mag() > 0.0) {
         std::string direction_name = "analyzer_direction";
@@ -159,7 +158,7 @@ std::string defineScan(const ISpecularScan* scan)
     ASSERT(0);
 }
 
-std::string defineDetector(const ISimulation* simulation)
+std::string defineDetector(const ISimulation2D* simulation)
 {
     const IDetector& detector = simulation->detector();
     if (detector.rank() != 2)
@@ -231,14 +230,13 @@ std::string defineDetector(const ISimulation* simulation)
                << printFunc(detector)(xBounds.second) << ", " << printFunc(detector)(yBounds.second)
                << ")\n";
     }
-    result << definePolarizationAnalyzer(simulation, "detector");
+    result << definePolarizationAnalyzer(detector.analyzer(), "detector");
     return result.str();
 }
 
-std::string defineDetectorResolutionFunction(const ISimulation* simulation)
+std::string defineDetectorResolutionFunction(const IDetector2D& detector)
 {
     std::ostringstream result;
-    const IDetector& detector = simulation->detector();
 
     if (const IDetectorResolution* resfunc = detector.detectorResolution()) {
         if (const auto* convfunc = dynamic_cast<const ConvolutionDetectorResolution*>(resfunc)) {
@@ -322,7 +320,9 @@ std::string defineSpecularScan(const SpecularSimulation& simulation)
         throw std::runtime_error("Error defineSpecularScan: passed simulation "
                                  "does not contain any scan");
     result << defineScan(scan) << "\n";
-    result << definePolarizationAnalyzer(&simulation, "scan");
+    const PolFilter* analyzer = scan->analyzer();
+    if (analyzer)
+        result << definePolarizationAnalyzer(*analyzer, "scan");
     return result.str();
 }
 
@@ -350,12 +350,11 @@ std::string defineParameterDistributions(const ISimulation* simulation)
     return result.str();
 }
 
-std::string defineMasks(const ISimulation* simulation)
+std::string defineMasks(const IDetector2D& detector)
 {
     std::ostringstream result;
     result << std::setprecision(12);
 
-    const IDetector& detector = simulation->detector();
     const DetectorMask* detectorMask = detector.detectorMask();
     if (detectorMask && detectorMask->hasMasks()) {
         result << "\n";
@@ -413,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);
+    result << defineDetectorResolutionFunction(simulation->detector2D());
     result << defineParameterDistributions(simulation);
-    result << defineMasks(simulation);
+    result << defineMasks(simulation->detector2D());
     result << defineSimulationOptions(simulation);
     result << defineBackground(simulation);
     return result.str();
@@ -426,10 +425,10 @@ std::string defineOffspecSimulation(const OffspecSimulation* simulation)
     std::ostringstream result;
     result << indent() << "simulation = ba.OffspecSimulation()\n";
     result << defineDetector(simulation);
-    result << defineDetectorResolutionFunction(simulation);
+    result << defineDetectorResolutionFunction(simulation->detector2D());
     result << defineOffspecBeam(*simulation);
     result << defineParameterDistributions(simulation);
-    result << defineMasks(simulation);
+    result << defineMasks(simulation->detector2D());
     result << defineSimulationOptions(simulation);
     result << defineBackground(simulation);
     return result.str();
@@ -443,7 +442,8 @@ std::string defineSpecularSimulation(const SpecularSimulation* simulation)
     result << defineParameterDistributions(simulation);
     result << defineSimulationOptions(simulation);
     result << defineBackground(simulation);
-    result << defineBeamIntensity(simulation->beam()) << "\n";
+    // result << defineBeamIntensity(simulation->beam());
+    result << "\n";
     return result.str();
 }
 
diff --git a/Sim/Scan/ISpecularScan.h b/Sim/Scan/ISpecularScan.h
index 9bf6e37835c092ce3a6ea09283e8dad250bdf87c..7519064bf80ebe6443a59bde63b944a4ea11800a 100644
--- a/Sim/Scan/ISpecularScan.h
+++ b/Sim/Scan/ISpecularScan.h
@@ -42,6 +42,8 @@ public:
     //! Sets the polarization analyzer characteristics of the detector
     void setAnalyzer(R3 direction, double efficiency, double total_transmission);
 
+    const PolFilter* analyzer() const { return m_polAnalyzer.get(); }
+
     virtual double wavelength() const = 0;
 
 #ifndef SWIG
diff --git a/Sim/Simulation/ISimulation.h b/Sim/Simulation/ISimulation.h
index efea53313ebd10620f4cb1030cdf43100ab627bd..b15bc8b288dc3d50a9e21e2879727ac8a17b42f6 100644
--- a/Sim/Simulation/ISimulation.h
+++ b/Sim/Simulation/ISimulation.h
@@ -68,9 +68,6 @@ public:
 
     void setTerminalProgressMonitor();
 
-    Beam& beam() { return *m_beam; }
-    IDetector& detector() { return *m_detector; }
-
     //! Force polarized computation even in absence of sample magnetization or external fields
     virtual bool force_polarized() const = 0;
 
@@ -81,10 +78,6 @@ public:
 
     const MultiLayer* sample() const;
 
-    const Beam& beam() const { return *m_beam; }
-    const IDetector& detector() const { return *m_detector; }
-    const IDetector* getDetector() const { return m_detector.get(); }
-
     const IBackground* background() const { return m_background.get(); }
 
     const std::vector<ParameterDistribution>& getDistributions() const;
diff --git a/Sim/Simulation/ISimulation2D.h b/Sim/Simulation/ISimulation2D.h
index 8f9a0afdb6ba406acfe17afb6ca7db20a4213b62..eb209f1cf09cf080e174a2d9c36f00c3cf51b364 100644
--- a/Sim/Simulation/ISimulation2D.h
+++ b/Sim/Simulation/ISimulation2D.h
@@ -60,11 +60,18 @@ public:
 
     bool force_polarized() const override;
 
+    Beam& beam() { return *m_beam; }
+    IDetector& detector() { return *m_detector; }
+
 #ifndef SWIG
 
+    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();
-    const IDetector2D& detector2D() const;
 
     //! Put into a clean state for running a simulation
     void prepareSimulation() override;
diff --git a/Tests/Unit/Sim/SpecularSimulationTest.cpp b/Tests/Unit/Sim/SpecularSimulationTest.cpp
index b648c91f1da5df4b31c0b7c53c2b67b41f06d810..fc302c7b9317a50e004a74e65385a832d7ec8637 100644
--- a/Tests/Unit/Sim/SpecularSimulationTest.cpp
+++ b/Tests/Unit/Sim/SpecularSimulationTest.cpp
@@ -47,60 +47,6 @@ std::unique_ptr<SpecularSimulation> SpecularSimulationTest::defaultSimulation()
     return std::make_unique<SpecularSimulation>(scan, sample);
 }
 
-TEST_F(SpecularSimulationTest, SetAngularScan)
-{
-    AlphaScan scan(1.0, std::vector<double>{1.0 * Units::deg, 3.0 * Units::deg});
-    SpecularSimulation sim(scan, sample);
-
-    const auto& beam = sim.beam();
-
-    EXPECT_EQ(2u, sim.coordinateAxis()->size());
-    EXPECT_EQ(1.0 * Units::deg, sim.coordinateAxis()->min());
-    EXPECT_EQ(3.0 * Units::deg, sim.coordinateAxis()->max());
-    EXPECT_EQ(1.0, beam.intensity());
-    EXPECT_EQ(1.0, beam.wavelength());
-    EXPECT_EQ(0.0, beam.direction().alpha());
-    EXPECT_EQ(0.0, beam.direction().phi());
-
-    AlphaScan scan2(1.0, 10, 1.0 * Units::deg, 10.0 * Units::deg);
-    SpecularSimulation sim2(scan2, sample);
-    EXPECT_EQ(10u, sim2.coordinateAxis()->size());
-    EXPECT_EQ(1.0 * Units::deg, sim2.coordinateAxis()->min());
-    EXPECT_EQ(10.0 * Units::deg, sim2.coordinateAxis()->max());
-    EXPECT_EQ(1.0, beam.wavelength());
-    EXPECT_EQ(0.0, beam.direction().alpha());
-    EXPECT_EQ(0.0, beam.direction().phi());
-}
-
-TEST_F(SpecularSimulationTest, SetQScan)
-{
-    QzScan scan(std::vector<double>{1.0, 3.0});
-    SpecularSimulation sim(scan, sample);
-
-    const auto& beam = sim.beam();
-
-    EXPECT_EQ(2u, sim.coordinateAxis()->size());
-    EXPECT_EQ(1.0, sim.coordinateAxis()->min());
-    EXPECT_EQ(3.0, sim.coordinateAxis()->max());
-    EXPECT_EQ(1.0, beam.intensity());
-    EXPECT_EQ(1.0, beam.wavelength());
-    EXPECT_EQ(0.0, beam.direction().alpha());
-    EXPECT_EQ(0.0, beam.direction().phi());
-
-    sim.beam().setIntensity(2.0);
-    EXPECT_EQ(2.0, beam.intensity());
-
-    QzScan scan2(10, 1.0, 10.0);
-    SpecularSimulation sim2(scan2, sample);
-    EXPECT_EQ(10u, sim2.coordinateAxis()->size());
-    EXPECT_EQ(1.0, sim2.coordinateAxis()->min());
-    EXPECT_EQ(10.0, sim2.coordinateAxis()->max());
-    EXPECT_EQ(2.0, beam.intensity());
-    EXPECT_EQ(1.0, beam.wavelength());
-    EXPECT_EQ(0.0, beam.direction().alpha());
-    EXPECT_EQ(0.0, beam.direction().phi());
-}
-
 TEST_F(SpecularSimulationTest, ConstructSimulation)
 {
     auto sim = defaultSimulation();
diff --git a/auto/Wrap/doxygenSim.i b/auto/Wrap/doxygenSim.i
index 2fc3caa6e952616d594d2125e32e38299b5e4fab..673af2e0614056f305dc26c78d932423d1e74354 100644
--- a/auto/Wrap/doxygenSim.i
+++ b/auto/Wrap/doxygenSim.i
@@ -904,12 +904,6 @@ Runs simulation with possible averaging over parameter distributions; returns re
 Initializes a progress monitor that prints to stdout. 
 ";
 
-%feature("docstring")  ISimulation::beam "Beam& ISimulation::beam()
-";
-
-%feature("docstring")  ISimulation::detector "IDetector& ISimulation::detector()
-";
-
 %feature("docstring")  ISimulation::force_polarized "virtual bool ISimulation::force_polarized() const =0
 
 Force polarized computation even in absence of sample magnetization or external fields. 
@@ -924,15 +918,6 @@ Force polarized computation even in absence of sample magnetization or external
 %feature("docstring")  ISimulation::sample "const MultiLayer * ISimulation::sample() const
 ";
 
-%feature("docstring")  ISimulation::beam "const Beam& ISimulation::beam() const
-";
-
-%feature("docstring")  ISimulation::detector "const IDetector& ISimulation::detector() const
-";
-
-%feature("docstring")  ISimulation::getDetector "const IDetector* ISimulation::getDetector() const
-";
-
 %feature("docstring")  ISimulation::background "const IBackground* ISimulation::background() const
 ";
 
@@ -1027,6 +1012,24 @@ Sets rectangular region of interest with lower left and upper right corners defi
 Force polarized computation even in absence of sample magnetization or external fields. 
 ";
 
+%feature("docstring")  ISimulation2D::beam "Beam& ISimulation2D::beam()
+";
+
+%feature("docstring")  ISimulation2D::detector "IDetector& ISimulation2D::detector()
+";
+
+%feature("docstring")  ISimulation2D::beam "const Beam& ISimulation2D::beam() const
+";
+
+%feature("docstring")  ISimulation2D::detector "const IDetector& ISimulation2D::detector() const
+";
+
+%feature("docstring")  ISimulation2D::getDetector "const IDetector* ISimulation2D::getDetector() const
+";
+
+%feature("docstring")  ISimulation2D::detector2D "const IDetector2D & ISimulation2D::detector2D() const
+";
+
 
 // File: classISpecularScan.xml
 %feature("docstring") ISpecularScan "
@@ -1052,6 +1055,9 @@ Sets the polarization density matrix according to the given Bloch vector.
 Sets the polarization analyzer characteristics of the detector. 
 ";
 
+%feature("docstring")  ISpecularScan::analyzer "const PolFilter* ISpecularScan::analyzer() const
+";
+
 %feature("docstring")  ISpecularScan::wavelength "virtual double ISpecularScan::wavelength() const =0
 ";
 
diff --git a/auto/Wrap/libBornAgainSim.py b/auto/Wrap/libBornAgainSim.py
index 541f4ac227209a1a3bc466de1889450670362d40..fac963de747b1c5f80f9f09e9d34a7ac20a76b76 100644
--- a/auto/Wrap/libBornAgainSim.py
+++ b/auto/Wrap/libBornAgainSim.py
@@ -3116,6 +3116,14 @@ class ISpecularScan(libBornAgainBase.ICloneable):
         """
         return _libBornAgainSim.ISpecularScan_setAnalyzer(self, direction, efficiency, total_transmission)
 
+    def analyzer(self):
+        r"""
+        analyzer(ISpecularScan self) -> PolFilter const *
+        const PolFilter* ISpecularScan::analyzer() const
+
+        """
+        return _libBornAgainSim.ISpecularScan_analyzer(self)
+
     def wavelength(self):
         r"""
         wavelength(ISpecularScan self) -> double
@@ -3468,22 +3476,6 @@ class ISimulation(libBornAgainParam.INode):
         """
         return _libBornAgainSim.ISimulation_setTerminalProgressMonitor(self)
 
-    def beam(self):
-        r"""
-        beam(ISimulation self) -> Beam &
-        const Beam& ISimulation::beam() const
-
-        """
-        return _libBornAgainSim.ISimulation_beam(self)
-
-    def detector(self):
-        r"""
-        detector(ISimulation self) -> IDetector &
-        const IDetector& ISimulation::detector() const
-
-        """
-        return _libBornAgainSim.ISimulation_detector(self)
-
     def force_polarized(self):
         r"""
         force_polarized(ISimulation self) -> bool
@@ -3598,6 +3590,22 @@ class ISimulation2D(ISimulation):
         """
         return _libBornAgainSim.ISimulation2D_force_polarized(self)
 
+    def beam(self):
+        r"""
+        beam(ISimulation2D self) -> Beam &
+        const Beam& ISimulation2D::beam() const
+
+        """
+        return _libBornAgainSim.ISimulation2D_beam(self)
+
+    def detector(self):
+        r"""
+        detector(ISimulation2D self) -> IDetector &
+        const IDetector& ISimulation2D::detector() const
+
+        """
+        return _libBornAgainSim.ISimulation2D_detector(self)
+
 # Register ISimulation2D in _libBornAgainSim:
 _libBornAgainSim.ISimulation2D_swigregister(ISimulation2D)
 
diff --git a/auto/Wrap/libBornAgainSim_wrap.cpp b/auto/Wrap/libBornAgainSim_wrap.cpp
index 20080a9d590ac8efb416a7e8d4cad48001bd3b47..532cd2e417f529e7f027cce22bba8410855fac8f 100644
--- a/auto/Wrap/libBornAgainSim_wrap.cpp
+++ b/auto/Wrap/libBornAgainSim_wrap.cpp
@@ -3128,74 +3128,75 @@ namespace Swig {
 #define SWIGTYPE_p_OffspecSimulation swig_types[28]
 #define SWIGTYPE_p_ParameterDistribution swig_types[29]
 #define SWIGTYPE_p_PoissonBackground 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 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 SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
 
@@ -35535,6 +35536,29 @@ fail:
 }
 
 
+SWIGINTERN PyObject *_wrap_ISpecularScan_analyzer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  ISpecularScan *arg1 = (ISpecularScan *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject *swig_obj[1] ;
+  PolFilter *result = 0 ;
+  
+  if (!args) SWIG_fail;
+  swig_obj[0] = args;
+  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ISpecularScan, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ISpecularScan_analyzer" "', argument " "1"" of type '" "ISpecularScan const *""'"); 
+  }
+  arg1 = reinterpret_cast< ISpecularScan * >(argp1);
+  result = (PolFilter *)((ISpecularScan const *)arg1)->analyzer();
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PolFilter, 0 |  0 );
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
 SWIGINTERN PyObject *_wrap_ISpecularScan_wavelength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   ISpecularScan *arg1 = (ISpecularScan *) 0 ;
@@ -37840,52 +37864,6 @@ fail:
 }
 
 
-SWIGINTERN PyObject *_wrap_ISimulation_beam(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  ISimulation *arg1 = (ISimulation *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject *swig_obj[1] ;
-  Beam *result = 0 ;
-  
-  if (!args) SWIG_fail;
-  swig_obj[0] = args;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ISimulation, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ISimulation_beam" "', argument " "1"" of type '" "ISimulation *""'"); 
-  }
-  arg1 = reinterpret_cast< ISimulation * >(argp1);
-  result = (Beam *) &(arg1)->beam();
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Beam, 0 |  0 );
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_ISimulation_detector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  ISimulation *arg1 = (ISimulation *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject *swig_obj[1] ;
-  IDetector *result = 0 ;
-  
-  if (!args) SWIG_fail;
-  swig_obj[0] = args;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ISimulation, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ISimulation_detector" "', argument " "1"" of type '" "ISimulation *""'"); 
-  }
-  arg1 = reinterpret_cast< ISimulation * >(argp1);
-  result = (IDetector *) &(arg1)->detector();
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IDetector, 0 |  0 );
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
 SWIGINTERN PyObject *_wrap_ISimulation_force_polarized(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   ISimulation *arg1 = (ISimulation *) 0 ;
@@ -38225,6 +38203,52 @@ fail:
 }
 
 
+SWIGINTERN PyObject *_wrap_ISimulation2D_beam(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  ISimulation2D *arg1 = (ISimulation2D *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject *swig_obj[1] ;
+  Beam *result = 0 ;
+  
+  if (!args) SWIG_fail;
+  swig_obj[0] = args;
+  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ISimulation2D, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ISimulation2D_beam" "', argument " "1"" of type '" "ISimulation2D *""'"); 
+  }
+  arg1 = reinterpret_cast< ISimulation2D * >(argp1);
+  result = (Beam *) &(arg1)->beam();
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Beam, 0 |  0 );
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_ISimulation2D_detector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  ISimulation2D *arg1 = (ISimulation2D *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject *swig_obj[1] ;
+  IDetector *result = 0 ;
+  
+  if (!args) SWIG_fail;
+  swig_obj[0] = args;
+  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ISimulation2D, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ISimulation2D_detector" "', argument " "1"" of type '" "ISimulation2D *""'"); 
+  }
+  arg1 = reinterpret_cast< ISimulation2D * >(argp1);
+  result = (IDetector *) &(arg1)->detector();
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IDetector, 0 |  0 );
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
 SWIGINTERN PyObject *ISimulation2D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
@@ -41971,6 +41995,11 @@ static PyMethodDef SwigMethods[] = {
 		"Sets the polarization analyzer characteristics of the detector. \n"
 		"\n"
 		""},
+	 { "ISpecularScan_analyzer", _wrap_ISpecularScan_analyzer, METH_O, "\n"
+		"ISpecularScan_analyzer(ISpecularScan self) -> PolFilter const *\n"
+		"const PolFilter* ISpecularScan::analyzer() const\n"
+		"\n"
+		""},
 	 { "ISpecularScan_wavelength", _wrap_ISpecularScan_wavelength, METH_O, "\n"
 		"ISpecularScan_wavelength(ISpecularScan self) -> double\n"
 		"virtual double ISpecularScan::wavelength() const =0\n"
@@ -42172,16 +42201,6 @@ static PyMethodDef SwigMethods[] = {
 		"Initializes a progress monitor that prints to stdout. \n"
 		"\n"
 		""},
-	 { "ISimulation_beam", _wrap_ISimulation_beam, METH_O, "\n"
-		"ISimulation_beam(ISimulation self) -> Beam &\n"
-		"const Beam& ISimulation::beam() const\n"
-		"\n"
-		""},
-	 { "ISimulation_detector", _wrap_ISimulation_detector, METH_O, "\n"
-		"ISimulation_detector(ISimulation self) -> IDetector &\n"
-		"const IDetector& ISimulation::detector() const\n"
-		"\n"
-		""},
 	 { "ISimulation_force_polarized", _wrap_ISimulation_force_polarized, METH_O, "\n"
 		"ISimulation_force_polarized(ISimulation self) -> bool\n"
 		"virtual bool ISimulation::force_polarized() const =0\n"
@@ -42260,6 +42279,16 @@ static PyMethodDef SwigMethods[] = {
 		"Force polarized computation even in absence of sample magnetization or external fields. \n"
 		"\n"
 		""},
+	 { "ISimulation2D_beam", _wrap_ISimulation2D_beam, METH_O, "\n"
+		"ISimulation2D_beam(ISimulation2D self) -> Beam &\n"
+		"const Beam& ISimulation2D::beam() const\n"
+		"\n"
+		""},
+	 { "ISimulation2D_detector", _wrap_ISimulation2D_detector, METH_O, "\n"
+		"ISimulation2D_detector(ISimulation2D self) -> IDetector &\n"
+		"const IDetector& ISimulation2D::detector() const\n"
+		"\n"
+		""},
 	 { "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"
@@ -42856,6 +42885,7 @@ static swig_type_info _swigt__p_MultiLayer = {"_p_MultiLayer", "MultiLayer *", 0
 static swig_type_info _swigt__p_OffspecSimulation = {"_p_OffspecSimulation", "OffspecSimulation *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_ParameterDistribution = {"_p_ParameterDistribution", "ParameterDistribution *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_PoissonBackground = {"_p_PoissonBackground", "PoissonBackground *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_PolFilter = {"_p_PolFilter", "PolFilter *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_PyBuilderCallback = {"_p_PyBuilderCallback", "PyBuilderCallback *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_PyObserverCallback = {"_p_PyObserverCallback", "PyObserverCallback *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_QzScan = {"_p_QzScan", "QzScan *", 0, 0, (void*)0, 0};
@@ -42955,6 +42985,7 @@ static swig_type_info *swig_type_initial[] = {
   &_swigt__p_OffspecSimulation,
   &_swigt__p_ParameterDistribution,
   &_swigt__p_PoissonBackground,
+  &_swigt__p_PolFilter,
   &_swigt__p_PyBuilderCallback,
   &_swigt__p_PyObserverCallback,
   &_swigt__p_QzScan,
@@ -43054,6 +43085,7 @@ static swig_cast_info _swigc__p_MultiLayer[] = {  {&_swigt__p_MultiLayer, 0, 0,
 static swig_cast_info _swigc__p_OffspecSimulation[] = {  {&_swigt__p_OffspecSimulation, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_ParameterDistribution[] = {  {&_swigt__p_ParameterDistribution, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_PoissonBackground[] = {  {&_swigt__p_PoissonBackground, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_PolFilter[] = {  {&_swigt__p_PolFilter, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_PyBuilderCallback[] = {  {&_swigt__p_PyBuilderCallback, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_PyObserverCallback[] = {  {&_swigt__p_PyObserverCallback, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_QzScan[] = {  {&_swigt__p_QzScan, 0, 0, 0},{0, 0, 0, 0}};
@@ -43153,6 +43185,7 @@ static swig_cast_info *swig_cast_initial[] = {
   _swigc__p_OffspecSimulation,
   _swigc__p_ParameterDistribution,
   _swigc__p_PoissonBackground,
+  _swigc__p_PolFilter,
   _swigc__p_PyBuilderCallback,
   _swigc__p_PyObserverCallback,
   _swigc__p_QzScan,