diff --git a/Core/Simulation/ISimulation.cpp b/Core/Simulation/ISimulation.cpp
index de93f9514daa25d8fc4a5c6e6ba09f5adfd33493..f98ee49e9907f497b0352a792eeba8db6469e37d 100644
--- a/Core/Simulation/ISimulation.cpp
+++ b/Core/Simulation/ISimulation.cpp
@@ -14,6 +14,7 @@
 
 #include "Core/Simulation/ISimulation.h"
 #include "Base/Element/PolarizerPair.h"
+#include "Base/Progress/ProgressHandler.h"
 #include "Base/Utils/Assert.h"
 #include "Base/Utils/StringUtils.h"
 #include "Core/Background/IBackground.h"
@@ -108,6 +109,7 @@ void runComputations(std::vector<std::unique_ptr<IComputation>>& computations)
 
 ISimulation::ISimulation(const Beam& beam, const MultiLayer& sample, const IDetector& detector)
     : m_options(std::make_unique<SimulationOptions>())
+    , m_progress(std::make_unique<ProgressHandler>())
     , m_instrument(beam, detector)
 {
     setSample(sample);
@@ -117,6 +119,7 @@ ISimulation::ISimulation(const Beam& beam, const MultiLayer& sample, const IDete
 #ifndef SWIG
 ISimulation::ISimulation(const Beam& beam, const IDetector& detector)
     : m_options(std::make_unique<SimulationOptions>())
+    , m_progress(std::make_unique<ProgressHandler>())
     , m_instrument(beam, detector)
 {
     initialize();
@@ -125,6 +128,7 @@ ISimulation::ISimulation(const Beam& beam, const IDetector& detector)
 
 ISimulation::ISimulation()
     : m_options(std::make_unique<SimulationOptions>())
+    , m_progress(std::make_unique<ProgressHandler>())
 {
     initialize();
 }
@@ -150,10 +154,20 @@ SimulationOptions& ISimulation::options() {
     ASSERT(m_options);
     return *m_options; }
 
+ProgressHandler& ISimulation::progress() {
+    ASSERT(m_progress);
+    return *m_progress;
+}
+
+void ISimulation::subscribe(const std::function<bool(size_t)>& inform) {
+    ASSERT(m_progress);
+    m_progress->subscribe(inform);
+}
+
 //! Initializes a progress monitor that prints to stdout.
 void ISimulation::setTerminalProgressMonitor()
 {
-    m_progress.subscribe([](size_t percentage_done) -> bool {
+    m_progress->subscribe([](size_t percentage_done) -> bool {
         if (percentage_done < 100)
             std::cout << std::setprecision(2) << "\r... " << percentage_done << "%" << std::flush;
         else // wipe out
@@ -185,8 +199,8 @@ void ISimulation::runSimulation()
     const size_t total_size = numberOfElements();
     size_t param_combinations = m_distribution_handler.getTotalNumberOfSamples();
 
-    m_progress.reset();
-    m_progress.setExpectedNTicks(param_combinations * total_size);
+    m_progress->reset();
+    m_progress->setExpectedNTicks(param_combinations * total_size);
 
     // restrict calculation to current batch
     const size_t n_batches = m_options->getNumberOfBatches();
diff --git a/Core/Simulation/ISimulation.h b/Core/Simulation/ISimulation.h
index 519d097062afed972e8fe29bc93c1d97526d188c..c32271bf4f7eddf0928a2678c9b2e12cbaf19d68 100644
--- a/Core/Simulation/ISimulation.h
+++ b/Core/Simulation/ISimulation.h
@@ -16,7 +16,6 @@
 #ifndef BORNAGAIN_CORE_SIMULATION_ISIMULATION_H
 #define BORNAGAIN_CORE_SIMULATION_ISIMULATION_H
 
-#include "Base/Progress/ProgressHandler.h"
 #include "Device/Detector/IDetector2D.h"
 #include "Device/Instrument/Instrument.h"
 #include "Param/Distrib/DistributionHandler.h"
@@ -30,6 +29,7 @@ class ISampleBuilder;
 class MultiLayer;
 class PolarizerPair;
 class ProcessedSample;
+class ProgressHandler;
 class SimulationOptions;
 class SimulationResult;
 
@@ -87,7 +87,7 @@ public:
     const SimulationOptions& options() const;
     SimulationOptions& options();
 
-    void subscribe(ProgressHandler::Callback_t inform) { m_progress.subscribe(inform); }
+    void subscribe(const std::function<bool(size_t)>& inform);
     void setTerminalProgressMonitor();
 
     std::vector<const INode*> getChildren() const;
@@ -117,7 +117,7 @@ protected:
     //! Gets the number of elements this simulation needs to calculate
     virtual size_t numberOfElements() const = 0;
 
-    ProgressHandler& progress() { return m_progress; }
+    ProgressHandler& progress();
 
 private:
     void initialize();
@@ -151,7 +151,7 @@ private:
     virtual void setRawResults(const std::vector<double>& raw_data) = 0;
 
     std::unique_ptr<SimulationOptions> m_options;
-    ProgressHandler m_progress;
+    std::unique_ptr<ProgressHandler> m_progress;
     SampleProvider m_sample_provider;
     DistributionHandler m_distribution_handler;
     Instrument m_instrument;
diff --git a/auto/Wrap/doxygenBase.i b/auto/Wrap/doxygenBase.i
index 128e1c61366004565f1ec757d0ec25db1aa2aee2..1bcd64eb99d0dffff84105b7985ffdf76f71e038 100644
--- a/auto/Wrap/doxygenBase.i
+++ b/auto/Wrap/doxygenBase.i
@@ -434,104 +434,6 @@ Set calculation flag (if it's false, zero intensity is assigned to the element)
 ";
 
 
-// File: classDiffuseElement.xml
-%feature("docstring") DiffuseElement "
-
-Data stucture containing both input and output of a single detector cell.
-
-C++ includes: DiffuseElement.h
-";
-
-%feature("docstring")  DiffuseElement::DiffuseElement "DiffuseElement::DiffuseElement(double wavelength, double alpha_i, double phi_i, std::unique_ptr< IPixel > pixel, const Eigen::Matrix2cd &beam_polpair, const Eigen::Matrix2cd &analyzer, bool isSpecular_, const Fluxes *const fluxes_in=nullptr, const Fluxes *const fluxes_out=nullptr)
-";
-
-%feature("docstring")  DiffuseElement::DiffuseElement "DiffuseElement::DiffuseElement(const DiffuseElement &)=delete
-";
-
-%feature("docstring")  DiffuseElement::DiffuseElement "DiffuseElement::DiffuseElement(DiffuseElement &&)
-";
-
-%feature("docstring")  DiffuseElement::~DiffuseElement "DiffuseElement::~DiffuseElement()
-";
-
-%feature("docstring")  DiffuseElement::setFluxes "void DiffuseElement::setFluxes(const Fluxes *fluxes_in, const Fluxes *fluxes_out)
-";
-
-%feature("docstring")  DiffuseElement::fluxIn "const IFlux * DiffuseElement::fluxIn(size_t i_layer) const
-";
-
-%feature("docstring")  DiffuseElement::fluxOut "const IFlux * DiffuseElement::fluxOut(size_t i_layer) const
-";
-
-%feature("docstring")  DiffuseElement::pointElement "DiffuseElement DiffuseElement::pointElement(double x, double y) const
-
-Returns copy of this  DiffuseElement with k_f given by in-pixel coordinate x,y. 
-";
-
-%feature("docstring")  DiffuseElement::polarizationHandler "const PolarizerPair& DiffuseElement::polarizationHandler() const
-
-Returns assigned  PolarizerPair. 
-";
-
-%feature("docstring")  DiffuseElement::wavelength "double DiffuseElement::wavelength() const
-";
-
-%feature("docstring")  DiffuseElement::getAlphaI "double DiffuseElement::getAlphaI() const
-";
-
-%feature("docstring")  DiffuseElement::getPhiI "double DiffuseElement::getPhiI() const
-";
-
-%feature("docstring")  DiffuseElement::getAlphaMean "double DiffuseElement::getAlphaMean() const
-";
-
-%feature("docstring")  DiffuseElement::getPhiMean "double DiffuseElement::getPhiMean() const
-";
-
-%feature("docstring")  DiffuseElement::setIntensity "void DiffuseElement::setIntensity(double intensity)
-";
-
-%feature("docstring")  DiffuseElement::addIntensity "void DiffuseElement::addIntensity(double intensity)
-";
-
-%feature("docstring")  DiffuseElement::intensity "double DiffuseElement::intensity() const
-";
-
-%feature("docstring")  DiffuseElement::getKi "kvector_t DiffuseElement::getKi() const
-";
-
-%feature("docstring")  DiffuseElement::getMeanKf "kvector_t DiffuseElement::getMeanKf() const
-";
-
-%feature("docstring")  DiffuseElement::meanQ "kvector_t DiffuseElement::meanQ() const
-";
-
-%feature("docstring")  DiffuseElement::getQ "kvector_t DiffuseElement::getQ(double x, double y) const
-
-Returns scattering vector Q, with Kf determined from in-pixel coordinates x,y. In-pixel coordinates take values from 0 to 1. 
-";
-
-%feature("docstring")  DiffuseElement::integrationFactor "double DiffuseElement::integrationFactor(double x, double y) const
-";
-
-%feature("docstring")  DiffuseElement::solidAngle "double DiffuseElement::solidAngle() const
-";
-
-%feature("docstring")  DiffuseElement::getAlpha "double DiffuseElement::getAlpha(double x, double y) const
-";
-
-%feature("docstring")  DiffuseElement::getPhi "double DiffuseElement::getPhi(double x, double y) const
-";
-
-%feature("docstring")  DiffuseElement::wavevectorInfo "WavevectorInfo DiffuseElement::wavevectorInfo() const
-";
-
-%feature("docstring")  DiffuseElement::isSpecular "bool DiffuseElement::isSpecular() const
-
-Tells if simulation element corresponds to a specular peak. 
-";
-
-
 // File: classDirection.xml
 %feature("docstring") Direction "
 
@@ -1385,7 +1287,7 @@ C++ includes: WavevectorInfo.h
 // File: classFourierTransform_1_1Workspace.xml
 
 
-// File: namespace_0d23.xml
+// File: namespace_0d21.xml
 
 
 // File: namespaceBaseUtils.xml
@@ -1870,12 +1772,6 @@ Checks if value is contained in bin: value in [m_lower, m_upper)
 // File: DepthProbeElement_8h.xml
 
 
-// File: DiffuseElement_8cpp.xml
-
-
-// File: DiffuseElement_8h.xml
-
-
 // File: IElement_8h.xml
 
 
diff --git a/auto/Wrap/doxygenCore.i b/auto/Wrap/doxygenCore.i
index 2ceac7cc006f9f49e68b68a8ab71c83d7330ed49..90fc2a33ef8abe056c2e2b1c67dab2a9ef33433b 100644
--- a/auto/Wrap/doxygenCore.i
+++ b/auto/Wrap/doxygenCore.i
@@ -973,7 +973,7 @@ Returns the results of the simulation in a format that supports unit conversion
 %feature("docstring")  ISimulation::options "SimulationOptions & ISimulation::options()
 ";
 
-%feature("docstring")  ISimulation::subscribe "void ISimulation::subscribe(ProgressHandler::Callback_t inform)
+%feature("docstring")  ISimulation::subscribe "void ISimulation::subscribe(const std::function< bool(size_t)> &inform)
 ";
 
 %feature("docstring")  ISimulation::setTerminalProgressMonitor "void ISimulation::setTerminalProgressMonitor()
diff --git a/auto/Wrap/libBornAgainCore.py b/auto/Wrap/libBornAgainCore.py
index d5efed45890b63daef244c9d3146db45db6e8819..718d1b74411046c227daa2b0006d0ee3f96045ea 100644
--- a/auto/Wrap/libBornAgainCore.py
+++ b/auto/Wrap/libBornAgainCore.py
@@ -3606,8 +3606,8 @@ class ISimulation(libBornAgainParam.INode):
 
     def subscribe(self, inform):
         r"""
-        subscribe(ISimulation self, ProgressHandler::Callback_t inform)
-        void ISimulation::subscribe(ProgressHandler::Callback_t inform)
+        subscribe(ISimulation self, std::function< bool (size_t) > const & inform)
+        void ISimulation::subscribe(const std::function< bool(size_t)> &inform)
 
         """
         return _libBornAgainCore.ISimulation_subscribe(self, inform)
diff --git a/auto/Wrap/libBornAgainCore_wrap.cpp b/auto/Wrap/libBornAgainCore_wrap.cpp
index 5fe2f85b14a4c50c07f68354d88f3a6c348a0e30..d2006bd82ea53d5a973ed20d98be4402796ae109 100644
--- a/auto/Wrap/libBornAgainCore_wrap.cpp
+++ b/auto/Wrap/libBornAgainCore_wrap.cpp
@@ -3138,47 +3138,47 @@ namespace Swig {
 #define SWIGTYPE_p_ParameterDistribution swig_types[38]
 #define SWIGTYPE_p_PoissonNoiseBackground swig_types[39]
 #define SWIGTYPE_p_PolarizerPair swig_types[40]
-#define SWIGTYPE_p_ProgressHandler__Callback_t swig_types[41]
-#define SWIGTYPE_p_PyBuilderCallback swig_types[42]
-#define SWIGTYPE_p_PyObserverCallback swig_types[43]
-#define SWIGTYPE_p_QzScan swig_types[44]
-#define SWIGTYPE_p_RealLimits swig_types[45]
-#define SWIGTYPE_p_ScanResolution swig_types[46]
-#define SWIGTYPE_p_SimulationOptions swig_types[47]
-#define SWIGTYPE_p_SimulationResult swig_types[48]
-#define SWIGTYPE_p_SpecularSimulation swig_types[49]
-#define SWIGTYPE_p_VarianceConstantFunction swig_types[50]
-#define SWIGTYPE_p_VarianceSimFunction swig_types[51]
-#define SWIGTYPE_p_allocator_type swig_types[52]
-#define SWIGTYPE_p_char swig_types[53]
-#define SWIGTYPE_p_difference_type swig_types[54]
-#define SWIGTYPE_p_first_type swig_types[55]
-#define SWIGTYPE_p_int 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_mumufit__MinimizerResult swig_types[60]
-#define SWIGTYPE_p_mumufit__Parameters swig_types[61]
-#define SWIGTYPE_p_p_PyObject 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_AxisInfo_t swig_types[67]
-#define SWIGTYPE_p_std__allocatorT_BasicVector3DT_double_t_t swig_types[68]
-#define SWIGTYPE_p_std__allocatorT_BasicVector3DT_std__complexT_double_t_t_t swig_types[69]
-#define SWIGTYPE_p_std__allocatorT_INode_const_p_t swig_types[70]
-#define SWIGTYPE_p_std__allocatorT_INode_p_t swig_types[71]
-#define SWIGTYPE_p_std__allocatorT_double_t swig_types[72]
-#define SWIGTYPE_p_std__allocatorT_int_t swig_types[73]
-#define SWIGTYPE_p_std__allocatorT_std__complexT_double_t_t swig_types[74]
-#define SWIGTYPE_p_std__allocatorT_std__pairT_double_double_t_t swig_types[75]
-#define SWIGTYPE_p_std__allocatorT_std__pairT_std__string_const_double_t_t swig_types[76]
-#define SWIGTYPE_p_std__allocatorT_std__string_t swig_types[77]
-#define SWIGTYPE_p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t swig_types[78]
-#define SWIGTYPE_p_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t swig_types[79]
-#define SWIGTYPE_p_std__allocatorT_unsigned_long_t swig_types[80]
-#define SWIGTYPE_p_std__complexT_double_t swig_types[81]
+#define SWIGTYPE_p_PyBuilderCallback swig_types[41]
+#define SWIGTYPE_p_PyObserverCallback swig_types[42]
+#define SWIGTYPE_p_QzScan swig_types[43]
+#define SWIGTYPE_p_RealLimits swig_types[44]
+#define SWIGTYPE_p_ScanResolution swig_types[45]
+#define SWIGTYPE_p_SimulationOptions swig_types[46]
+#define SWIGTYPE_p_SimulationResult swig_types[47]
+#define SWIGTYPE_p_SpecularSimulation swig_types[48]
+#define SWIGTYPE_p_VarianceConstantFunction swig_types[49]
+#define SWIGTYPE_p_VarianceSimFunction swig_types[50]
+#define SWIGTYPE_p_allocator_type swig_types[51]
+#define SWIGTYPE_p_char swig_types[52]
+#define SWIGTYPE_p_difference_type swig_types[53]
+#define SWIGTYPE_p_first_type swig_types[54]
+#define SWIGTYPE_p_int 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_mumufit__MinimizerResult swig_types[59]
+#define SWIGTYPE_p_mumufit__Parameters swig_types[60]
+#define SWIGTYPE_p_p_PyObject 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_AxisInfo_t swig_types[66]
+#define SWIGTYPE_p_std__allocatorT_BasicVector3DT_double_t_t swig_types[67]
+#define SWIGTYPE_p_std__allocatorT_BasicVector3DT_std__complexT_double_t_t_t swig_types[68]
+#define SWIGTYPE_p_std__allocatorT_INode_const_p_t swig_types[69]
+#define SWIGTYPE_p_std__allocatorT_INode_p_t swig_types[70]
+#define SWIGTYPE_p_std__allocatorT_double_t swig_types[71]
+#define SWIGTYPE_p_std__allocatorT_int_t swig_types[72]
+#define SWIGTYPE_p_std__allocatorT_std__complexT_double_t_t swig_types[73]
+#define SWIGTYPE_p_std__allocatorT_std__pairT_double_double_t_t swig_types[74]
+#define SWIGTYPE_p_std__allocatorT_std__pairT_std__string_const_double_t_t swig_types[75]
+#define SWIGTYPE_p_std__allocatorT_std__string_t swig_types[76]
+#define SWIGTYPE_p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t swig_types[77]
+#define SWIGTYPE_p_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t swig_types[78]
+#define SWIGTYPE_p_std__allocatorT_unsigned_long_t swig_types[79]
+#define SWIGTYPE_p_std__complexT_double_t swig_types[80]
+#define SWIGTYPE_p_std__functionT_bool_fsize_tF_t swig_types[81]
 #define SWIGTYPE_p_std__invalid_argument swig_types[82]
 #define SWIGTYPE_p_std__lessT_std__string_t swig_types[83]
 #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[84]
@@ -39687,10 +39687,10 @@ fail:
 SWIGINTERN PyObject *_wrap_ISimulation_subscribe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   ISimulation *arg1 = (ISimulation *) 0 ;
-  ProgressHandler::Callback_t arg2 ;
+  std::function< bool (size_t) > *arg2 = 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
-  void *argp2 ;
+  void *argp2 = 0 ;
   int res2 = 0 ;
   PyObject *swig_obj[2] ;
   
@@ -39700,20 +39700,15 @@ SWIGINTERN PyObject *_wrap_ISimulation_subscribe(PyObject *SWIGUNUSEDPARM(self),
     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ISimulation_subscribe" "', argument " "1"" of type '" "ISimulation *""'"); 
   }
   arg1 = reinterpret_cast< ISimulation * >(argp1);
-  {
-    res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_ProgressHandler__Callback_t,  0  | 0);
-    if (!SWIG_IsOK(res2)) {
-      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ISimulation_subscribe" "', argument " "2"" of type '" "ProgressHandler::Callback_t""'"); 
-    }  
-    if (!argp2) {
-      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ISimulation_subscribe" "', argument " "2"" of type '" "ProgressHandler::Callback_t""'");
-    } else {
-      ProgressHandler::Callback_t * temp = reinterpret_cast< ProgressHandler::Callback_t * >(argp2);
-      arg2 = *temp;
-      if (SWIG_IsNewObj(res2)) delete temp;
-    }
+  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_std__functionT_bool_fsize_tF_t,  0  | 0);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ISimulation_subscribe" "', argument " "2"" of type '" "std::function< bool (size_t) > const &""'"); 
+  }
+  if (!argp2) {
+    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ISimulation_subscribe" "', argument " "2"" of type '" "std::function< bool (size_t) > const &""'"); 
   }
-  (arg1)->subscribe(arg2);
+  arg2 = reinterpret_cast< std::function< bool (size_t) > * >(argp2);
+  (arg1)->subscribe((std::function< bool (size_t) > const &)*arg2);
   resultobj = SWIG_Py_Void();
   return resultobj;
 fail:
@@ -44315,8 +44310,8 @@ static PyMethodDef SwigMethods[] = {
 		"\n"
 		""},
 	 { "ISimulation_subscribe", _wrap_ISimulation_subscribe, METH_VARARGS, "\n"
-		"ISimulation_subscribe(ISimulation self, ProgressHandler::Callback_t inform)\n"
-		"void ISimulation::subscribe(ProgressHandler::Callback_t inform)\n"
+		"ISimulation_subscribe(ISimulation self, std::function< bool (size_t) > const & inform)\n"
+		"void ISimulation::subscribe(const std::function< bool(size_t)> &inform)\n"
 		"\n"
 		""},
 	 { "ISimulation_setTerminalProgressMonitor", _wrap_ISimulation_setTerminalProgressMonitor, METH_O, "\n"
@@ -45097,7 +45092,6 @@ static swig_type_info _swigt__p_OffSpecularSimulation = {"_p_OffSpecularSimulati
 static swig_type_info _swigt__p_ParameterDistribution = {"_p_ParameterDistribution", "ParameterDistribution *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_PoissonNoiseBackground = {"_p_PoissonNoiseBackground", "PoissonNoiseBackground *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_PolarizerPair = {"_p_PolarizerPair", "PolarizerPair *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_ProgressHandler__Callback_t = {"_p_ProgressHandler__Callback_t", "ProgressHandler::Callback_t *", 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};
@@ -45138,6 +45132,7 @@ static swig_type_info _swigt__p_std__allocatorT_std__vectorT_double_std__allocat
 static swig_type_info _swigt__p_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t = {"_p_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t", "std::vector< std::vector< int > >::allocator_type *|std::allocator< std::vector< int,std::allocator< int > > > *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_std__allocatorT_unsigned_long_t = {"_p_std__allocatorT_unsigned_long_t", "std::vector< unsigned long >::allocator_type *|std::allocator< unsigned long > *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_std__complexT_double_t = {"_p_std__complexT_double_t", "complex_t *|std::complex< double > *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_std__functionT_bool_fsize_tF_t = {"_p_std__functionT_bool_fsize_tF_t", "std::function< bool (size_t) > *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_std__invalid_argument = {"_p_std__invalid_argument", "std::invalid_argument *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_std__lessT_std__string_t = {"_p_std__lessT_std__string_t", "std::less< std::string > *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_std__mapT_std__string_double_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_double_t_t_t = {"_p_std__mapT_std__string_double_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_double_t_t_t", "std::map< std::string,double,std::less< std::string >,std::allocator< std::pair< std::string const,double > > > *|std::map< std::string,double > *", 0, 0, (void*)0, 0};
@@ -45206,7 +45201,6 @@ static swig_type_info *swig_type_initial[] = {
   &_swigt__p_ParameterDistribution,
   &_swigt__p_PoissonNoiseBackground,
   &_swigt__p_PolarizerPair,
-  &_swigt__p_ProgressHandler__Callback_t,
   &_swigt__p_PyBuilderCallback,
   &_swigt__p_PyObserverCallback,
   &_swigt__p_QzScan,
@@ -45247,6 +45241,7 @@ static swig_type_info *swig_type_initial[] = {
   &_swigt__p_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t,
   &_swigt__p_std__allocatorT_unsigned_long_t,
   &_swigt__p_std__complexT_double_t,
+  &_swigt__p_std__functionT_bool_fsize_tF_t,
   &_swigt__p_std__invalid_argument,
   &_swigt__p_std__lessT_std__string_t,
   &_swigt__p_std__mapT_std__string_double_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_double_t_t_t,
@@ -45315,7 +45310,6 @@ static swig_cast_info _swigc__p_OffSpecularSimulation[] = {  {&_swigt__p_OffSpec
 static swig_cast_info _swigc__p_ParameterDistribution[] = {  {&_swigt__p_ParameterDistribution, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_PoissonNoiseBackground[] = {  {&_swigt__p_PoissonNoiseBackground, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_PolarizerPair[] = {  {&_swigt__p_PolarizerPair, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_ProgressHandler__Callback_t[] = {  {&_swigt__p_ProgressHandler__Callback_t, 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}};
@@ -45356,6 +45350,7 @@ static swig_cast_info _swigc__p_std__allocatorT_std__vectorT_double_std__allocat
 static swig_cast_info _swigc__p_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t[] = {  {&_swigt__p_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_std__allocatorT_unsigned_long_t[] = {  {&_swigt__p_std__allocatorT_unsigned_long_t, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_std__complexT_double_t[] = {  {&_swigt__p_std__complexT_double_t, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_std__functionT_bool_fsize_tF_t[] = {  {&_swigt__p_std__functionT_bool_fsize_tF_t, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_std__invalid_argument[] = {  {&_swigt__p_std__invalid_argument, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_std__lessT_std__string_t[] = {  {&_swigt__p_std__lessT_std__string_t, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_std__mapT_std__string_double_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_double_t_t_t[] = {  {&_swigt__p_std__mapT_std__string_double_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_double_t_t_t, 0, 0, 0},{0, 0, 0, 0}};
@@ -45424,7 +45419,6 @@ static swig_cast_info *swig_cast_initial[] = {
   _swigc__p_ParameterDistribution,
   _swigc__p_PoissonNoiseBackground,
   _swigc__p_PolarizerPair,
-  _swigc__p_ProgressHandler__Callback_t,
   _swigc__p_PyBuilderCallback,
   _swigc__p_PyObserverCallback,
   _swigc__p_QzScan,
@@ -45465,6 +45459,7 @@ static swig_cast_info *swig_cast_initial[] = {
   _swigc__p_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t,
   _swigc__p_std__allocatorT_unsigned_long_t,
   _swigc__p_std__complexT_double_t,
+  _swigc__p_std__functionT_bool_fsize_tF_t,
   _swigc__p_std__invalid_argument,
   _swigc__p_std__lessT_std__string_t,
   _swigc__p_std__mapT_std__string_double_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_double_t_t_t,