diff --git a/Core/InputOutput/IntensityDataIOFactory.cpp b/Core/InputOutput/IntensityDataIOFactory.cpp
index 381598e97da6e31dfd9e72e96e183f7bebcff7ad..d7ead5c0f7238a9400651f7f02f7a0e9b1cac994 100644
--- a/Core/InputOutput/IntensityDataIOFactory.cpp
+++ b/Core/InputOutput/IntensityDataIOFactory.cpp
@@ -19,7 +19,8 @@
 #include "Exceptions.h"
 #include "Utils.h"
 #include "IHistogram.h"
-#include <boost/scoped_ptr.hpp>
+
+#include <memory>
 
 /* ************************************************************************* */
 // reading output data
@@ -27,31 +28,30 @@
 OutputData<double > *IntensityDataIOFactory::readOutputData(
         const std::string& file_name)
 {
-    boost::scoped_ptr<OutputDataReader> P_reader(OutputDataReadFactory::getReader(file_name));
+    std::unique_ptr<OutputDataReader> P_reader(OutputDataReadFactory::getReader(file_name));
     return P_reader->getOutputData();
 }
 
 IHistogram *IntensityDataIOFactory::readIntensityData(const std::string &file_name)
 {
-    boost::scoped_ptr<OutputData<double> > data(readOutputData(file_name));
+    std::unique_ptr<OutputData<double> > data(readOutputData(file_name));
     return IHistogram::createHistogram(*data);
 }
 
 
-
 /* ************************************************************************* */
 // writing output data
 /* ************************************************************************* */
 void IntensityDataIOFactory::writeOutputData(const OutputData<double>& data,
         const std::string& file_name)
 {
-    boost::scoped_ptr<OutputDataWriter> P_writer(OutputDataWriteFactory::getWriter(file_name));
+    std::unique_ptr<OutputDataWriter> P_writer(OutputDataWriteFactory::getWriter(file_name));
     return P_writer->writeOutputData(data);
 }
 
-void IntensityDataIOFactory::writeIntensityData(const IHistogram &histogram, const std::string &file_name)
+void IntensityDataIOFactory::writeIntensityData(const IHistogram &histogram,
+                                                const std::string &file_name)
 {
-    boost::scoped_ptr<OutputData<double> > data(histogram.createOutputData());
+    std::unique_ptr<OutputData<double> > data(histogram.createOutputData());
     writeOutputData(*data, file_name);
 }
-
diff --git a/Core/InputOutput/OutputDataIOHelper.cpp b/Core/InputOutput/OutputDataIOHelper.cpp
index a20f58d67ff1571d9ebf0dc6523e9ae832bc61ba..7160a12a51214413aa90eb89599bffeb2a0e3bfa 100644
--- a/Core/InputOutput/OutputDataIOHelper.cpp
+++ b/Core/InputOutput/OutputDataIOHelper.cpp
@@ -22,6 +22,7 @@
 #include "Utils.h"
 #include "OutputData.h"
 #include "FileSystem.h"
+
 #include <iostream>
 #include <algorithm>
 #include <boost/algorithm/string.hpp>
@@ -152,10 +153,7 @@ IAxis *OutputDataIOHelper::createFixedBinAxis(std::string line)
         throw Exceptions::FormatErrorException("OutputDataIOHelper::createFixedBinAxis() -> Error. Can't parse the string.");
 
     std::vector<double> boundaries;
-    std::string value;
-    while( iss >> value) {
-        boundaries.push_back(std::strtod(value.c_str(), nullptr));
-    }
+    readLineOfDoubles(boundaries, iss);
 
     if(boundaries.size() != 2)
         throw Exceptions::FormatErrorException("OutputDataIOHelper::createFixedBinAxis() -> Error. Can't parse the string at p2.");
@@ -188,44 +186,38 @@ IAxis *OutputDataIOHelper::createVariableBinAxis(std::string line)
     std::istringstream iss(line);
     if( !(iss >> type >> name >> nbins) )
         throw Exceptions::FormatErrorException("OutputDataIOHelper::createVariableBinAxis() -> Error. Can't parse the string.");
-
     std::vector<double> boundaries;
-    std::string value;
-    while( iss >> value) {
-        boundaries.push_back(std::strtod(value.c_str(), nullptr));
-    }
-
+    readLineOfDoubles(boundaries, iss);
     if(boundaries.size() != nbins+1)
         throw Exceptions::FormatErrorException("OutputDataIOHelper::createVariableBinAxis() -> Error. Can't parse the string at p2.");
-
     return new VariableBinAxis(name, nbins, boundaries);
 }
 
-
-
 //! Fills output data raw buffer from input stream
 void OutputDataIOHelper::fillOutputData(OutputData<double> *data, std::istream &input_stream)
 {
     std::string line;
-
     data->setAllTo(0.0);
     OutputData<double>::iterator it = data->begin();
-
     while( std::getline(input_stream, line) )
     {
         if(line.empty() || line[0] == '#') break;
 
         std::istringstream iss(line);
-        std::string svalue;
-        while(iss >> svalue) {
-            *it = std::strtod(svalue.c_str(), nullptr);
+        std::vector<double> buffer;
+        readLineOfDoubles(buffer, iss);
+        for (auto value : buffer) {
+            *it = value;
             ++it;
         }
     }
-
     if(it!= data->end())
         throw Exceptions::FormatErrorException("OutputDataIOHelper::fillOutputData() -> Error while parsing data.");
 }
 
-
-
+void OutputDataIOHelper::readLineOfDoubles(std::vector<double> &buffer, std::istringstream &iss)
+{
+    iss.imbue(std::locale::classic());
+    std::copy(std::istream_iterator<double>(iss),
+              std::istream_iterator<double>(), back_inserter(buffer));
+}
diff --git a/Core/InputOutput/OutputDataIOHelper.h b/Core/InputOutput/OutputDataIOHelper.h
index a71423426ad69824abe0a88866e5e6a119cda7d7..df5bc62f6c435138b14c14d8b2e27680bb82cb5a 100644
--- a/Core/InputOutput/OutputDataIOHelper.h
+++ b/Core/InputOutput/OutputDataIOHelper.h
@@ -20,6 +20,7 @@
 #include "WinDllMacros.h"
 #include <string>
 #include <iostream>
+#include <vector>
 
 class IAxis;
 template <class T> class OutputData;
@@ -69,7 +70,7 @@ BA_CORE_API_ IAxis *createVariableBinAxis(std::string line);
 
 BA_CORE_API_ void fillOutputData(OutputData<double> *data, std::istream &input_stream);
 
+void readLineOfDoubles(std::vector<double> &buffer, std::istringstream &iss);
 }
 
-
 #endif
diff --git a/Core/InputOutput/OutputDataReadFactory.cpp b/Core/InputOutput/OutputDataReadFactory.cpp
index 6a4c66d5d9e50e557ca89e515af9096cc22c1556..ec6c018019936b9b2d88dd256b94e62bc9589b14 100644
--- a/Core/InputOutput/OutputDataReadFactory.cpp
+++ b/Core/InputOutput/OutputDataReadFactory.cpp
@@ -35,22 +35,17 @@ IOutputDataReadStrategy *OutputDataReadFactory::getReadStrategy(const std::strin
     if(OutputDataIOHelper::isIntFile(file_name)) {
         result = new OutputDataReadINTStrategy();
     }
-
     else if(OutputDataIOHelper::isTxtFile(file_name)) {
         result = new OutputDataReadNumpyTXTStrategy();
     }
-
 #ifdef BORNAGAIN_TIFF_SUPPORT
     else if(OutputDataIOHelper::isTiffFile(file_name)) {
        result = new OutputDataReadTiffStrategy();
     }
 #endif // BORNAGAIN_TIFF_SUPPORT
-
     else {
         throw LogicErrorException("OutputDataReadFactory::getReader() -> Error. "
                 "Don't know how to read file '" + file_name+std::string("'"));
     }
-
     return result;
 }
-
diff --git a/Core/InputOutput/OutputDataReadStrategy.cpp b/Core/InputOutput/OutputDataReadStrategy.cpp
index a47b6049897194cf007e7f8e12806d3fb1f2d2cd..c449f6f860a1e935b171e41d42f3c337c4a7edb0 100644
--- a/Core/InputOutput/OutputDataReadStrategy.cpp
+++ b/Core/InputOutput/OutputDataReadStrategy.cpp
@@ -26,7 +26,6 @@
 OutputData<double > *OutputDataReadINTStrategy::readOutputData(std::istream &input_stream)
 {
     OutputData<double > *result = new OutputData<double>;
-
     std::string line;
 
     while( std::getline(input_stream, line) )
@@ -41,7 +40,6 @@ OutputData<double > *OutputDataReadINTStrategy::readOutputData(std::istream &inp
             OutputDataIOHelper::fillOutputData(result, input_stream);
         }
     }
-
     return result;
 }
 
@@ -50,7 +48,6 @@ OutputData<double > *OutputDataReadINTStrategy::readOutputData(std::istream &inp
 OutputData<double> *OutputDataReadNumpyTXTStrategy::readOutputData(std::istream &input_stream)
 {
     std::string line;
-
     std::vector<std::vector<double> > data;
 
     while( std::getline(input_stream, line) )
@@ -60,7 +57,6 @@ OutputData<double> *OutputDataReadNumpyTXTStrategy::readOutputData(std::istream
         vdouble1d_t data_in_row = Utils::String::parse_doubles(line);
         data.push_back(data_in_row);
     }
-
     // validating
     size_t nrows = data.size();
     size_t ncols(0);
@@ -71,7 +67,6 @@ OutputData<double> *OutputDataReadNumpyTXTStrategy::readOutputData(std::istream
                                       "Number of elements is different from row to row.");
         }
     }
-
     OutputData<double > *result = new OutputData<double>;
     result->addAxis("x", ncols, 0.0, double(ncols));
     result->addAxis("y", nrows, 0.0, double(nrows));
@@ -84,7 +79,6 @@ OutputData<double> *OutputDataReadNumpyTXTStrategy::readOutputData(std::istream
             (*result)[global_index] = data[row][col];
         }
     }
-
     return result;
 }
 
@@ -95,7 +89,6 @@ OutputData<double> *OutputDataReadNumpyTXTStrategy::readOutputData(std::istream
 OutputDataReadTiffStrategy::OutputDataReadTiffStrategy()
     : m_d(new TiffHandler)
 {
-
 }
 
 OutputDataReadTiffStrategy::~OutputDataReadTiffStrategy()
diff --git a/Core/InputOutput/OutputDataReader.cpp b/Core/InputOutput/OutputDataReader.cpp
index 0176ddfb34df2c6e57ffd676f345efa07e17b04f..e30d678e3da65b9e93118a93c03aeff9e8febb8d 100644
--- a/Core/InputOutput/OutputDataReader.cpp
+++ b/Core/InputOutput/OutputDataReader.cpp
@@ -17,12 +17,12 @@
 #include "OutputDataReadStrategy.h"
 #include "OutputDataIOHelper.h"
 #include "boost_streams.h"
+
 #include <fstream>
 
 OutputDataReader::OutputDataReader(const std::string &file_name)
     : m_file_name(file_name)
 {
-
 }
 
 OutputData<double > *OutputDataReader::getOutputData()
@@ -46,34 +46,28 @@ OutputData<double > *OutputDataReader::getOutputData()
         throw FileIsBadException("OutputDataReader::getOutputData() -> Error! File is not good, "
                                  "probably it is a directory.");
     }
-
     OutputData<double > *result = getFromFilteredStream(fin);
-
-	fin.close();
-
+    fin.close();
     return result;
 }
 
-
 void OutputDataReader::setStrategy(IOutputDataReadStrategy *read_strategy)
 {
     m_read_strategy.reset(read_strategy);
 }
 
-
 OutputData<double > *OutputDataReader::getFromFilteredStream(std::istream &input_stream)
 {
-	boost::iostreams::filtering_streambuf<boost::iostreams::input> input_filtered;
-	if (OutputDataIOHelper::isGZipped(m_file_name)) {
-		input_filtered.push(boost::iostreams::gzip_decompressor());
-	}
-
-	else if (OutputDataIOHelper::isBZipped(m_file_name)) {
-		input_filtered.push(boost::iostreams::bzip2_decompressor());
-	}
-	input_filtered.push(input_stream);
+    boost::iostreams::filtering_streambuf<boost::iostreams::input> input_filtered;
+    if (OutputDataIOHelper::isGZipped(m_file_name)) {
+        input_filtered.push(boost::iostreams::gzip_decompressor());
+    }
+    else if (OutputDataIOHelper::isBZipped(m_file_name)) {
+        input_filtered.push(boost::iostreams::bzip2_decompressor());
+    }
+    input_filtered.push(input_stream);
     // we use stringstream since it provides random access which is important for tiff files
-	std::stringstream strstream;
-	boost::iostreams::copy(input_filtered, strstream);
-	return m_read_strategy->readOutputData(strstream);
+    std::stringstream strstream;
+    boost::iostreams::copy(input_filtered, strstream);
+    return m_read_strategy->readOutputData(strstream);
 }
diff --git a/Core/InputOutput/OutputDataWriteStrategy.cpp b/Core/InputOutput/OutputDataWriteStrategy.cpp
index 09dcdc3ed16a09c66e78c3cba39f4853d9d2d73a..df8b630a1eb5f1ef7824cbefdef0e5e427a00121 100644
--- a/Core/InputOutput/OutputDataWriteStrategy.cpp
+++ b/Core/InputOutput/OutputDataWriteStrategy.cpp
@@ -20,6 +20,33 @@
 #include <iostream>
 #include <iomanip>
 
+static const int precision { 12 };
+
+double IgnoreDenormalized(double value)
+{
+    if (std::abs(value)<std::numeric_limits<double>::min()) {
+        return 0.0;
+    }
+    return value;
+}
+
+void WriteOutputDataDoubles(const OutputData<double> &data, std::ostream &output_stream,
+                            size_t n_columns)
+{
+    OutputData<double>::const_iterator it = data.begin();
+    output_stream.imbue(std::locale::classic());
+    output_stream << std::scientific << std::setprecision(precision);
+    size_t ncol(0);
+    while(it != data.end()) {
+        ncol++;
+        double z_value = *it++;
+        output_stream << IgnoreDenormalized(z_value) << "    ";
+        if(ncol == n_columns) {
+            output_stream << std::endl;
+            ncol = 0;
+        }
+    }
+}
 
 void OutputDataWriteINTStrategy::writeOutputData(const OutputData<double> &data,
                                                std::ostream &output_stream)
@@ -36,19 +63,8 @@ void OutputDataWriteINTStrategy::writeOutputData(const OutputData<double> &data,
 
     output_stream << std::endl;
     output_stream << "# data" << std::endl;
-    OutputData<double>::const_iterator it = data.begin();
-    size_t ncol(0);
-    while(it != data.end()) {
-        ncol++;
-        double z_value = *it++;
-        output_stream << std::scientific << std::setprecision(m_precision) << z_value << "    ";
-        if(ncol == n_columns) {
-            output_stream << std::endl;
-            ncol = 0;
-        }
-    }
+    WriteOutputDataDoubles(data, output_stream, n_columns);
     output_stream << std::endl;
-
 }
 
 // ----------------------------------------------------------------------------
@@ -70,18 +86,7 @@ void OutputDataWriteNumpyTXTStrategy::writeOutputData(const OutputData<double> &
     output_stream << "# [nrows=" << nrows
                   << ", ncols=" << ncols << "]" << std::endl;
 
-    std::vector<int> axes_indices(2);
-    for(size_t row=0; row<nrows; ++row) {
-        for(size_t col=0; col<ncols; ++col) {
-            axes_indices[0] = col;
-            axes_indices[1] = nrows - 1 - row;
-            size_t global_index = data.toGlobalIndex(axes_indices);
-            output_stream << std::scientific << std::setprecision(m_precision)
-                          << data[global_index] << "    ";
-        }
-        output_stream << std::endl;
-    }
-
+    WriteOutputDataDoubles(data,output_stream, ncols);
 }
 
 // ----------------------------------------------------------------------------
@@ -107,6 +112,3 @@ void OutputDataWriteTiffStrategy::writeOutputData(const OutputData<double> &data
 }
 
 #endif
-
-
-
diff --git a/Core/InputOutput/OutputDataWriteStrategy.h b/Core/InputOutput/OutputDataWriteStrategy.h
index cc1dadcca7b2c9b8f9ea800da97ab06204cd459a..c4b2e258f88ce6f6d858956a6304f52606ace5ef 100644
--- a/Core/InputOutput/OutputDataWriteStrategy.h
+++ b/Core/InputOutput/OutputDataWriteStrategy.h
@@ -29,12 +29,10 @@ template <class T> class OutputData;
 class BA_CORE_API_ IOutputDataWriteStrategy
 {
 public:
-    IOutputDataWriteStrategy() : m_precision(12) {}
+    IOutputDataWriteStrategy() {}
     virtual ~IOutputDataWriteStrategy(){}
 
     virtual void writeOutputData(const OutputData<double>& data, std::ostream& output_stream) = 0;
-protected:
-    int m_precision;
 };
 
 //! @class OutputDataWriteINTStrategy
diff --git a/Core/InputOutput/OutputDataWriter.cpp b/Core/InputOutput/OutputDataWriter.cpp
index a8fcc65b97b76b79bb592f59b6ec3c9586a344ed..0498d1516961f7a8560e760adea40bfbed9948d1 100644
--- a/Core/InputOutput/OutputDataWriter.cpp
+++ b/Core/InputOutput/OutputDataWriter.cpp
@@ -23,7 +23,6 @@
 OutputDataWriter::OutputDataWriter(const std::string &file_name)
     : m_file_name(file_name)
 {
-
 }
 
 void OutputDataWriter::writeOutputData(const OutputData<double >& data)
@@ -32,14 +31,11 @@ void OutputDataWriter::writeOutputData(const OutputData<double >& data)
         throw NullPointerException("OutputDataWriter::getOutputData() ->"
                                    " Error! No read strategy defined");
     }
-
     std::ofstream fout;
-
     std::ios_base::openmode openmode = std::ios::out;
     if(OutputDataIOHelper::isBinaryFile(m_file_name)) openmode = std::ios::out | std::ios_base::binary;
 
     fout.open(m_file_name.c_str(), openmode );
-
     if(!fout.is_open()) {
         throw FileNotIsOpenException("OutputDataWriter::writeOutputData() -> Error. "
                                      "Can't open file '"+m_file_name+"' for writing.");
@@ -48,7 +44,6 @@ void OutputDataWriter::writeOutputData(const OutputData<double >& data)
         throw FileIsBadException("OutputDataReader::writeOutputData() -> Error! "
                                  "File is not good, probably it is a directory.");
     }
-
     std::stringstream ss;
     m_write_strategy->writeOutputData(data, ss);
 
@@ -63,7 +58,6 @@ void OutputDataWriter::writeOutputData(const OutputData<double >& data)
 
     boost::iostreams::copy(input_filtered, fout);
 
-
     fout.close();
 }
 
@@ -72,6 +66,3 @@ void OutputDataWriter::setStrategy(IOutputDataWriteStrategy *write_strategy)
 {
     m_write_strategy.reset(write_strategy);
 }
-
-
-
diff --git a/Core/Tools/src/FixedBinAxis.cpp b/Core/Tools/src/FixedBinAxis.cpp
index 49e6d0d1ea8aaf4840d3a395c7db553d2f69db91..feb6debf684c766198fd310a8eeba65e85ff0445 100644
--- a/Core/Tools/src/FixedBinAxis.cpp
+++ b/Core/Tools/src/FixedBinAxis.cpp
@@ -19,28 +19,21 @@
 
 
 FixedBinAxis::FixedBinAxis(const std::string &name, size_t nbins, double start, double end)
-    : IAxis(name)
-    , m_nbins(nbins)
-    , m_start(start)
-    , m_end(end)
+    : IAxis(name), m_nbins(nbins), m_start(start), m_end(end)
 {
-
 }
 
-
 FixedBinAxis *FixedBinAxis::clone() const
 {
     FixedBinAxis *result = new FixedBinAxis(getName(), m_nbins, m_start, m_end);
     return result;
 }
 
-
 size_t FixedBinAxis::getSize() const
 {
     return m_nbins;
 }
 
-
 double FixedBinAxis::operator[](size_t index) const
 {
     if(index >= m_nbins)
@@ -50,7 +43,6 @@ double FixedBinAxis::operator[](size_t index) const
     return m_start + (index + 0.5)*step;
 }
 
-
 Bin1D FixedBinAxis::getBin(size_t index) const
 {
     if(index >= m_nbins)
@@ -61,13 +53,11 @@ Bin1D FixedBinAxis::getBin(size_t index) const
     return result;
 }
 
-
 double FixedBinAxis::getMin() const
 {
     return m_start;
 }
 
-
 double FixedBinAxis::getMax() const
 {
     return m_end;
@@ -78,15 +68,8 @@ double FixedBinAxis::getBinCenter(size_t index) const
     return (*this)[index];
 }
 
-
 size_t FixedBinAxis::findClosestIndex(double value) const
 {
-//    if (value < getMin() || value >= getMax()) {
-//        std::ostringstream ostr;
-//        ostr << "FixedBinAxis::findClosestIndex() -> Error! Given value not in any bin. ";
-//        ostr << "value:" << value << " name:" << getName() << " min:" << getMin() << " max:" << getMax();
-//        throw OutOfBoundsException(ostr.str());
-//    }
     if( value < getMin()) {
         return 0;
     } else if(value >= getMax()) {
@@ -132,13 +115,13 @@ FixedBinAxis *FixedBinAxis::createClippedAxis(double left, double right) const
     return new FixedBinAxis(getName(), nbin2-nbin1+1, getBin(nbin1).m_lower, getBin(nbin2).m_upper );
 }
 
-
 void FixedBinAxis::print(std::ostream& ostr) const
 {
-    ostr << "FixedBinAxis(\"" << m_name << "\", " << getSize() << ", " << std::setprecision(std::numeric_limits<double>::digits10+2) << getMin() << ", " << getMax() << ")";
+    ostr << "FixedBinAxis(\"" << m_name << "\", " << getSize() << ", "
+         << std::setprecision(std::numeric_limits<double>::digits10+2) << getMin() << ", "
+         << getMax() << ")";
 }
 
-
 bool FixedBinAxis::equals(const IAxis& other) const
 {
     if (!IAxis::equals(other)) return false;
@@ -150,6 +133,3 @@ bool FixedBinAxis::equals(const IAxis& other) const
     }
     return false;
 }
-
-
-
diff --git a/Core/Tools/src/Utils.cpp b/Core/Tools/src/Utils.cpp
index f09c987eee5a9a0864fa72da0a7080228aa8ac71..f949b98fa4da40e86efe9d19a0916bc2ed0510b7 100644
--- a/Core/Tools/src/Utils.cpp
+++ b/Core/Tools/src/Utils.cpp
@@ -15,6 +15,8 @@
 
 #include "Utils.h"
 #include "Exceptions.h"
+#include "OutputDataIOHelper.h"
+
 #include <iostream>
 #include <iomanip>
 #include <boost/regex.hpp>
@@ -25,6 +27,7 @@
 #include <boost/date_time/c_local_time_adjustor.hpp>
 #include <string>
 #include <thread>
+#include <locale>
 
 #include "Macros.h"
 
@@ -44,13 +47,7 @@ vdouble1d_t Utils::String::parse_doubles(const std::string& str)
 {
     vdouble1d_t buff_1d;
     std::istringstream iss(str);
-    std::string svalue;
-    while(iss >> svalue) {
-        buff_1d.push_back(std::strtod(svalue.c_str(), nullptr));
-    }
-// approach below doesnt work under mac 10.6 for doubles like 4.3882628771e-313
-//    std::copy(std::istream_iterator<double>(iss),
-//              std::istream_iterator<double>(), back_inserter(buff_1d));
+    OutputDataIOHelper::readLineOfDoubles(buff_1d, iss);
     if( buff_1d.empty() ) {
         std::cout << "Utils::String::parse_doubles -> "
             "Warning! No parsed values in 1d vector of doubles." << std::endl;
diff --git a/Doc/UserManual/fig/ff2/bornplot.py b/Doc/UserManual/fig/ff2/bornplot.py
index bc4fc096d205f2223faaf2b731d4a6e77fdea91c..f12ec87a0fea7e49b371f8c52371fffe509d191d 100644
--- a/Doc/UserManual/fig/ff2/bornplot.py
+++ b/Doc/UserManual/fig/ff2/bornplot.py
@@ -13,60 +13,66 @@ class BinRange:
         self.vmin = vmin
         self.vmax = vmax
         self.n = n
+
     def central_index(self):
-        return int( (0.-self.vmin)/(self.vmax-self.vmin)*(self.n-1)+.5 )
+        return int((0.-self.vmin)/(self.vmax-self.vmin)*self.n)
         
 
 class Detector:
     def __init__(self, bins_per_dimension, phi_min, phi_max, alpha_min, alpha_max):
-        self.phi = BinRange( phi_min, phi_max, bins_per_dimension )
-        self.alpha = BinRange( alpha_min, alpha_max, bins_per_dimension )
+        self.phi = BinRange(phi_min, phi_max, bins_per_dimension)
+        self.alpha = BinRange(alpha_min, alpha_max, bins_per_dimension)
+
     def rectangle(self):
-        return (self.phi.vmin, self.phi.vmax, self.alpha.vmin, self.alpha.vmax)
+        return self.phi.vmin, self.phi.vmax, self.alpha.vmin, self.alpha.vmax
 
 
 class Result:
-    def __init__(self, idx, data, title="" ):
+    def __init__(self, idx, data, title=""):
         self.idx = idx
         self.data = data
         self.title = title
 
 
-def make_plot( results, det, name, nrow=1 ):
-    '''
-    Make a plot consisting of one detector image for each Result in results,
+def make_plot(results, det, name, nrow=1):
+    """Make a plot consisting of one detector image for each Result in results,
     plus one common color scale.
-    '''
+
+    :param results: List of simulation results
+    :param det: Detector limits
+    :param name: Filename for plot during save
+    :param nrow: Number of rows for different plots
+    """
     mpl.rcParams['image.interpolation'] = 'none'
     n = len(results)
     ncol = 1+(n-1)//nrow
     # Parameters as fraction of subfig size.
-    yskip      = 0.2 #+ncol*0.02
+    yskip = 0.2  # +ncol*0.02
     bottomskip = yskip
-    topskip    = yskip/2
-    xskip      = 0.18
-    leftskip   = xskip
-    rightskip  = 0.28+ncol*0.03
+    topskip = yskip/2
+    xskip = 0.18
+    leftskip = xskip
+    rightskip = 0.28+ncol*0.03
     xtot = ncol*1.0 + (ncol-1)*xskip + leftskip + rightskip
     ytot = nrow*1.0 + (nrow-1)*yskip + bottomskip + topskip
     # We need parameters as fraction of total fig size.
-    xskip      /= xtot
-    leftskip   /= xtot
-    rightskip  /= xtot
-    yskip      /= ytot
+    xskip /= xtot
+    leftskip /= xtot
+    rightskip /= xtot
+    yskip /= ytot
     bottomskip /= ytot
-    topskip    /= ytot
+    topskip /= ytot
     # Set total figure dimensions.
     ftot = 5
     fontsize = 18+36.0/(ncol+2)
     # Create the figure 'fig' and its subplots axes ('tmp'->'axes').
-    fig,tmp = plt.subplots(nrow, ncol, figsize=(ftot*xtot, ftot*ytot))
-    if n>1:
+    fig, tmp = plt.subplots(nrow, ncol, figsize=(ftot*xtot, ftot*ytot))
+    if n > 1:
         axes = tmp.flat
     else:
         axes = [tmp]
     # Always the same color scale, to facilitate comparisons between figures.
-    norm = mpl.colors.LogNorm(1e-10,1)
+    norm = mpl.colors.LogNorm(1e-10, 1)
     # Plot the subfigures.
     for res in results:
         ax = axes[res.idx]
@@ -75,29 +81,31 @@ def make_plot( results, det, name, nrow=1 ):
                        extent=det.rectangle(),
                        aspect=1)
         ax.set_xlabel(r'$\phi_{\rm f} (^{\circ})$', fontsize=fontsize)
-        if res.idx%ncol==0:
+        if res.idx % ncol == 0:
             ax.set_ylabel(r'$\alpha_{\rm f} (^{\circ})$', fontsize=fontsize)
-        if res.title!="":
+        if res.title != "":
             ax.set_title(res.title, fontsize=fontsize)
         ax.tick_params(axis='both', which='major', labelsize=fontsize*21/24)
     # Adjust whitespace around and between subfigures.
     plt.subplots_adjust(wspace=xskip, hspace=yskip,
                         left=leftskip, right=1-rightskip,
-                        bottom=bottomskip, top=1-topskip )
+                        bottom=bottomskip, top=1-topskip)
     # Plot the color scale.
     cbar_ax = fig.add_axes([1-rightskip+0.4*xskip, bottomskip,
                             0.25*xskip, 1-bottomskip-topskip])
     cb = fig.colorbar(im, cax=cbar_ax)
     cb.set_label(r'$\left|F(q)\right|^2/V^{\,2}$', fontsize=fontsize)
     # Output to file or display.
-    plt.savefig( name+".pdf", format="pdf", bbox_inches = 'tight')
+    plt.savefig(name+".pdf", format="pdf", bbox_inches='tight')
     plt.show()
 
 
-def get_sample(ff,trafo):
-    """
-    Build and return a sample consisting of uncorrelated particles with given
+def get_sample(ff, trafo):
+    """Build and return a sample consisting of uncorrelated particles with given
     form factor and transformation operator
+
+    :param ff: Form factor
+    :param trafo: Optional rotation
     """
     # defining materials
     m_ambience = ba.HomogeneousMaterial("Air", 0.0, 0.0)
@@ -107,7 +115,8 @@ def get_sample(ff,trafo):
     particle = ba.Particle(m_particle, ff)
     particle_layout = ba.ParticleLayout()
     if trafo is not None:
-        particle_layout.addParticle(particle, trafo)
+        particle.setRotation(trafo)
+        particle_layout.addParticle(particle)
     else:
         particle_layout.addParticle(particle)
 
@@ -120,8 +129,9 @@ def get_sample(ff,trafo):
 
 
 def get_simulation(det):
-    """
-    Create and return GISAXS simulation with beam and det defined
+    """Create and return GISAXS simulation with beam and detector defined
+
+    :param det: Detector limits
     """
     simulation = ba.GISASSimulation()
     simulation.setDetectorParameters(
@@ -131,18 +141,21 @@ def get_simulation(det):
     return simulation
 
 
-def run_simulation(det,ff,trafo=None):
-    """
-    Run simulation and plot results
+def run_simulation(det, ff, trafo=None):
+    """Run simulation and plot results
+
+    :param det: Detector limits
+    :param ff: Form factor
+    :param trafo: Optional rotation
     """
-    zero = ba.cvector_t(0,0,0)
-    V = abs(ff.evaluate_for_q(zero))
-    print( "Volume: %g" % V )
-    sample = get_sample(ff,trafo)
+    zero = ba.cvector_t(0, 0, 0)
+    volume = abs(ff.evaluate_for_q(zero))
+    print("Volume: %g" % volume)
+    sample = get_sample(ff, trafo)
     simulation = get_simulation(det)
     simulation.setSample(sample)
     simulation.runSimulation()
     data = simulation.getIntensityData().getArray()
-    nor = data[det.alpha.central_index(),det.phi.central_index()]
+    nor = data[det.alpha.n - det.alpha.central_index() - 1, det.phi.central_index()]
     data /= nor
     return data + 1e-80  # for log scale
diff --git a/Doc/UserManual/fig/ff2/sim_Box.py b/Doc/UserManual/fig/ff2/sim_Box.py
index b7d77d1d956721e470ad224ff253a3b0abe7c85f..4390624dc1e42b280094f21081d099f4a417c34a 100644
--- a/Doc/UserManual/fig/ff2/sim_Box.py
+++ b/Doc/UserManual/fig/ff2/sim_Box.py
@@ -5,15 +5,15 @@ import bornagain as ba
 from   bornagain import nanometer, degree
 import bornplot as bp
 
-det = bp.Detector( 200, 0, 5, 0, 5 )
-n    = 4
+det = bp.Detector(200, 0, 5, 0, 5)
+n = 4
 results = []
 for i in range(n):
-    omega=90*i/(n-1)
+    omega = 90*i/(n-1)
     title = r'$\omega=%d^\circ$' % omega
-    ff = ba.FormFactorBox(18*nanometer, 4.6*nanometer, 3*nanometer )
+    ff = ba.FormFactorBox(18*nanometer, 4.6*nanometer, 3*nanometer)
     trafo = ba.RotationZ(omega*degree)
-    data = bp.run_simulation(det,ff,trafo)
-    results.append( bp.Result(i, data, title) )
+    data = bp.run_simulation(det, ff, trafo)
+    results.append(bp.Result(i, data, title))
     
-bp.make_plot( results, det, "ff_Box" )
+bp.make_plot(results, det, "ff_Box")
diff --git a/Examples/python/fitting/ex10_FitGALAXIData/FitGALAXIData.py b/Examples/python/fitting/ex10_FitGALAXIData/FitGALAXIData.py
index 2d7949cb712c4a8054682f658d064b6b31e3cc40..c8191e83de24e69519ebe97aeac5acca1d0f660d 100644
--- a/Examples/python/fitting/ex10_FitGALAXIData/FitGALAXIData.py
+++ b/Examples/python/fitting/ex10_FitGALAXIData/FitGALAXIData.py
@@ -10,7 +10,7 @@ import bornagain as ba
 from SampleBuilder import MySampleBuilder
 
 wavelength = 1.34*ba.angstrom
-alpha_i = 0.46*ba.degree
+alpha_i = 0.463*ba.degree
 
 
 
@@ -58,7 +58,7 @@ def create_simulation():
     simulation = ba.GISASSimulation()
     simulation.setDetector(create_detector())
     simulation.setBeamParameters(wavelength, alpha_i, 0.0)
-    simulation.setBeamIntensity(1e9)
+    simulation.setBeamIntensity(1.2e7)
     return simulation
 
 
@@ -89,9 +89,9 @@ def run_fitting():
     fit_suite.addSimulationAndRealData(simulation, real_data)
 
     # setting fitting parameters with starting values
-    fit_suite.addFitParameter("*radius", 5.5*ba.nanometer, ba.AttLimits.limited(4.0, 12.0), 0.1*ba.nanometer)
-    fit_suite.addFitParameter("*sigma", 0.28, ba.AttLimits.limited(0.1, 1.5), 0.01*ba.nanometer)
-    fit_suite.addFitParameter("*distance", 30.*ba.nanometer, ba.AttLimits.limited(20, 70), 0.1*ba.nanometer)
+    fit_suite.addFitParameter("*radius", 5.5*ba.nanometer, ba.AttLimits.limited(4.0, 10.0), 0.1*ba.nanometer)
+    fit_suite.addFitParameter("*sigma", 0.4, ba.AttLimits.limited(0.1, 0.7), 0.01*ba.nanometer)
+    fit_suite.addFitParameter("*distance", 53.*ba.nanometer, ba.AttLimits.limited(20, 70), 0.1*ba.nanometer)
 
     # strategy1 = ba.FitStrategyAdjustMinimizer("Genetic")
     # strategy1.getMinimizerOptions().setMaxIterations(10)
@@ -107,7 +107,7 @@ def run_fitting():
 
 
 
-    plot_as_colormap(real_data)
+    plot_as_colormap(real_data, zmax=5e3)
     plt.show()
 
 if __name__ == '__main__':
diff --git a/Examples/python/fitting/ex10_FitGALAXIData/SampleBuilder.py b/Examples/python/fitting/ex10_FitGALAXIData/SampleBuilder.py
index bae5ee9f9f3e1b4c22e97e92cecadc24994268a7..d1bc39d5ce9ba0f09da1ba1caba5a8e3f60d2a0b 100644
--- a/Examples/python/fitting/ex10_FitGALAXIData/SampleBuilder.py
+++ b/Examples/python/fitting/ex10_FitGALAXIData/SampleBuilder.py
@@ -13,13 +13,15 @@ class MySampleBuilder(ba.ISampleBuilder):
         ba.ISampleBuilder.__init__(self)
         self.sample = None
         # parameters describing the sample
-        self.radius = ctypes.c_double(5.5*ba.nanometer)
-        self.sigma = ctypes.c_double(0.15)
-        self.distance = ctypes.c_double(63.1*ba.nanometer)
-        self.disorder = ctypes.c_double(2.4*ba.nanometer)
-        self.kappa = ctypes.c_double(8.5)
-        self.tptfe = ctypes.c_double(29.0*ba.nanometer)
-        self.thmdso = ctypes.c_double(23.9*ba.nanometer)
+        self.radius = ctypes.c_double(5.75*ba.nanometer)
+        self.sigma = ctypes.c_double(0.4)
+        self.distance = ctypes.c_double(53.6*ba.nanometer)
+        self.disorder = ctypes.c_double(8.5*ba.nanometer)
+        self.kappa = ctypes.c_double(17.5)
+        #self.tptfe = ctypes.c_double(29.0*ba.nanometer)
+        self.tptfe = ctypes.c_double(22.1*ba.nanometer)
+        #self.thmdso = ctypes.c_double(23.9*ba.nanometer)
+        self.thmdso = ctypes.c_double(18.5*ba.nanometer)
         # register parameters
         self.registerParameter("radius", ctypes.addressof(self.radius))
         self.registerParameter("sigma", ctypes.addressof(self.sigma))
@@ -39,15 +41,15 @@ class MySampleBuilder(ba.ISampleBuilder):
         m_HMDSO = ba.HomogeneousMaterial("HMDSO", 2.0888308E-6, 1.32605651E-8)
 
         # collection of particles
-        nparticles = 3
+        nparticles = 10
         nfwhm = 2.0
         sphere_ff = ba.FormFactorFullSphere(self.radius.value)
         sphere = ba.Particle(m_Ag, sphere_ff)
         position = ba.kvector_t(0*ba.nanometer, 0*ba.nanometer, -1.0*self.thmdso.value)
         sphere.setPosition(position)
 
-        gauss_distr = ba.DistributionLogNormal(self.radius.value, self.sigma.value)
-        par_distr = ba.ParameterDistribution("/Particle/FullSphere/Radius", gauss_distr, nparticles, nfwhm)
+        ln_distr = ba.DistributionLogNormal(self.radius.value, self.sigma.value)
+        par_distr = ba.ParameterDistribution("/Particle/FullSphere/Radius", ln_distr, nparticles, nfwhm)
 
         part_coll = ba.ParticleDistribution(sphere, par_distr)
 
@@ -66,15 +68,15 @@ class MySampleBuilder(ba.ISampleBuilder):
         particle_layout.setTotalParticleSurfaceDensity(1)
 
         # roughness
-        r_ptfe = ba.LayerRoughness()
-        r_ptfe.setSigma(2.3*ba.nanometer)
-        r_ptfe.setHurstParameter(0.3)
-        r_ptfe.setLatteralCorrLength(5.0*ba.nanometer)
+        #r_ptfe = ba.LayerRoughness()
+        #r_ptfe.setSigma(2.3*ba.nanometer)
+        #r_ptfe.setHurstParameter(0.3)
+        #r_ptfe.setLatteralCorrLength(5.0*ba.nanometer)
 
-        r_hmdso = ba.LayerRoughness()
-        r_hmdso.setSigma(1.1*ba.nanometer)
-        r_hmdso.setHurstParameter(0.3)
-        r_hmdso.setLatteralCorrLength(5.0*ba.nanometer)
+        #r_hmdso = ba.LayerRoughness()
+        #r_hmdso.setSigma(1.1*ba.nanometer)
+        #r_hmdso.setHurstParameter(0.3)
+        #r_hmdso.setLatteralCorrLength(5.0*ba.nanometer)
 
         # sample configuratuion
         # air layer with particles and substrate forms multilayer
@@ -88,8 +90,10 @@ class MySampleBuilder(ba.ISampleBuilder):
         # it is importamt to start from the top layer down to the bottom one
         multi_layer = ba.MultiLayer()
         multi_layer.addLayer(air_layer)
-        multi_layer.addLayerWithTopRoughness(hmdso_layer, r_hmdso)
-        multi_layer.addLayerWithTopRoughness(ptfe_layer, r_ptfe)
+        #multi_layer.addLayerWithTopRoughness(hmdso_layer, r_hmdso)
+        multi_layer.addLayer(hmdso_layer)
+        #multi_layer.addLayerWithTopRoughness(ptfe_layer, r_ptfe)
+        multi_layer.addLayer(ptfe_layer)
         multi_layer.addLayer(substrate_layer)
 
         self.sample = multi_layer
diff --git a/Tests/ReferenceData/BornAgain/customformfactor_reference.int.gz b/Tests/ReferenceData/BornAgain/customformfactor_reference.int.gz
index 677ccadd7fdb82f2c30bc03f65f0b32a41dd1e83..d0b60c8719e9b3b622d039c5fbf0d62b75224f35 100644
Binary files a/Tests/ReferenceData/BornAgain/customformfactor_reference.int.gz and b/Tests/ReferenceData/BornAgain/customformfactor_reference.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ffba_anisopyramid_reference.int.gz b/Tests/ReferenceData/BornAgain/ffba_anisopyramid_reference.int.gz
index 8a5a99ef943ae38e190ec0f483d7c71e29ba6516..9df89ab40f1c6bd5446afbc95eb46a7e70e37948 100644
Binary files a/Tests/ReferenceData/BornAgain/ffba_anisopyramid_reference.int.gz and b/Tests/ReferenceData/BornAgain/ffba_anisopyramid_reference.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ffba_box_reference.int.gz b/Tests/ReferenceData/BornAgain/ffba_box_reference.int.gz
index 755d669cf4864cbe7fdfe3bd5ecfb7eca5361df2..1283729d03a5d8820ea5872274548d0d8505918c 100644
Binary files a/Tests/ReferenceData/BornAgain/ffba_box_reference.int.gz and b/Tests/ReferenceData/BornAgain/ffba_box_reference.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ffba_cone6_reference.int.gz b/Tests/ReferenceData/BornAgain/ffba_cone6_reference.int.gz
index 4c4f3b15705fd5c33c00f49c92cb186462909f77..0109bd6e07a091797475a5fae609360420160d10 100644
Binary files a/Tests/ReferenceData/BornAgain/ffba_cone6_reference.int.gz and b/Tests/ReferenceData/BornAgain/ffba_cone6_reference.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ffba_cone_reference.int.gz b/Tests/ReferenceData/BornAgain/ffba_cone_reference.int.gz
index 7c6bcece7b567b9aa0681cc2059d8f55d3ad3a48..f0bb5426d406eb38e4b401fbc0a5657e1289c089 100644
Binary files a/Tests/ReferenceData/BornAgain/ffba_cone_reference.int.gz and b/Tests/ReferenceData/BornAgain/ffba_cone_reference.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ffba_cuboctahedron_reference.int.gz b/Tests/ReferenceData/BornAgain/ffba_cuboctahedron_reference.int.gz
index 3a3b6c15d4af4dfa27ffd196c37021b892be0b4c..bdec4b67098ea85daee9ccf9d3c2ece895ec831b 100644
Binary files a/Tests/ReferenceData/BornAgain/ffba_cuboctahedron_reference.int.gz and b/Tests/ReferenceData/BornAgain/ffba_cuboctahedron_reference.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ffba_cylinder_reference.int.gz b/Tests/ReferenceData/BornAgain/ffba_cylinder_reference.int.gz
index 41f85752d52f486875429dc9e71dd08432ac15f2..7f820043bfcb69ac0363bc4dc76e93b3da4310a3 100644
Binary files a/Tests/ReferenceData/BornAgain/ffba_cylinder_reference.int.gz and b/Tests/ReferenceData/BornAgain/ffba_cylinder_reference.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ffba_ellipscylinder_reference.int.gz b/Tests/ReferenceData/BornAgain/ffba_ellipscylinder_reference.int.gz
index c51e0b0a00c2ce9ba89ad045db6a49d58cbed037..6c04968bc438ef80b166d7c8c845dce5eff07692 100644
Binary files a/Tests/ReferenceData/BornAgain/ffba_ellipscylinder_reference.int.gz and b/Tests/ReferenceData/BornAgain/ffba_ellipscylinder_reference.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ffba_fullsphere_reference.int.gz b/Tests/ReferenceData/BornAgain/ffba_fullsphere_reference.int.gz
index 7c644ae41d97483ef6cb95fea69468d87d5b99ce..b90acd340c8221fb3846d7c9c08b4d35889b5197 100644
Binary files a/Tests/ReferenceData/BornAgain/ffba_fullsphere_reference.int.gz and b/Tests/ReferenceData/BornAgain/ffba_fullsphere_reference.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ffba_fullspheroid_reference.int.gz b/Tests/ReferenceData/BornAgain/ffba_fullspheroid_reference.int.gz
index 9697ba4429ea66e934051f761a542c0be5bb9260..4822f910c5c3cbf493b6a21d9ae91c95f181a339 100644
Binary files a/Tests/ReferenceData/BornAgain/ffba_fullspheroid_reference.int.gz and b/Tests/ReferenceData/BornAgain/ffba_fullspheroid_reference.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ffba_hemiellipsoid_reference.int.gz b/Tests/ReferenceData/BornAgain/ffba_hemiellipsoid_reference.int.gz
index 52a1f0a2e5a6a3bcb1d9ef3941d4935a1b2dce87..769b669b46392d407eaf7f50cd97cb48a2faf5a8 100644
Binary files a/Tests/ReferenceData/BornAgain/ffba_hemiellipsoid_reference.int.gz and b/Tests/ReferenceData/BornAgain/ffba_hemiellipsoid_reference.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ffba_prism3_reference.int.gz b/Tests/ReferenceData/BornAgain/ffba_prism3_reference.int.gz
index 27dc4205f230101cfca99fd4f22ecf4363b7b07b..2063820716fb5f0ddbfd597da7e3c61d8fc470f9 100644
Binary files a/Tests/ReferenceData/BornAgain/ffba_prism3_reference.int.gz and b/Tests/ReferenceData/BornAgain/ffba_prism3_reference.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ffba_prism6_reference.int.gz b/Tests/ReferenceData/BornAgain/ffba_prism6_reference.int.gz
index c5de31ea0eb344d6441d1b71b93bd2a2da735686..6fa0417bef0914897f26aa5163b94fea5f57f18b 100644
Binary files a/Tests/ReferenceData/BornAgain/ffba_prism6_reference.int.gz and b/Tests/ReferenceData/BornAgain/ffba_prism6_reference.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ffba_pyramid_reference.int.gz b/Tests/ReferenceData/BornAgain/ffba_pyramid_reference.int.gz
index daf5b2b9df91ffb2b33902ae1fc6209371ea1e01..e99c774fd6e0d716fffa543ea1e8c1773db498db 100644
Binary files a/Tests/ReferenceData/BornAgain/ffba_pyramid_reference.int.gz and b/Tests/ReferenceData/BornAgain/ffba_pyramid_reference.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ffba_sphere_reference.int.gz b/Tests/ReferenceData/BornAgain/ffba_sphere_reference.int.gz
index e612130069b37f12f539097813f4b8adc2b3a2ad..0c4fd4abc3d2494a54d34d58bee02b99cd53a1c6 100644
Binary files a/Tests/ReferenceData/BornAgain/ffba_sphere_reference.int.gz and b/Tests/ReferenceData/BornAgain/ffba_sphere_reference.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ffba_spheroid_reference.int.gz b/Tests/ReferenceData/BornAgain/ffba_spheroid_reference.int.gz
index 8fbede5f60e70e6c7a88526fd0f7fb712427975e..0c4fd4abc3d2494a54d34d58bee02b99cd53a1c6 100644
Binary files a/Tests/ReferenceData/BornAgain/ffba_spheroid_reference.int.gz and b/Tests/ReferenceData/BornAgain/ffba_spheroid_reference.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ffba_tetrahedron_reference.int.gz b/Tests/ReferenceData/BornAgain/ffba_tetrahedron_reference.int.gz
index d00a6b30585c29c2a5cb88f1046cb74b6aa536ab..6427e7a10f0efa7f82969b275c1360c0135ec5f7 100644
Binary files a/Tests/ReferenceData/BornAgain/ffba_tetrahedron_reference.int.gz and b/Tests/ReferenceData/BornAgain/ffba_tetrahedron_reference.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ffba_truncatedcube_reference.int.gz b/Tests/ReferenceData/BornAgain/ffba_truncatedcube_reference.int.gz
index 1dcf4166003e9969bb1754eec16f3ac48885f767..4b6acf4ec3a383992bba22c09f1f1badcb9b6ac5 100644
Binary files a/Tests/ReferenceData/BornAgain/ffba_truncatedcube_reference.int.gz and b/Tests/ReferenceData/BornAgain/ffba_truncatedcube_reference.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/isgisaxs03_reference_BA.int.gz b/Tests/ReferenceData/BornAgain/isgisaxs03_reference_BA.int.gz
index cf974d841acfc1a5d1cabbd1f46faa423280c4cd..2b611860b38faae0e51c1177e017594e1c94c32d 100644
Binary files a/Tests/ReferenceData/BornAgain/isgisaxs03_reference_BA.int.gz and b/Tests/ReferenceData/BornAgain/isgisaxs03_reference_BA.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/isgisaxs03_reference_BA_size.int.gz b/Tests/ReferenceData/BornAgain/isgisaxs03_reference_BA_size.int.gz
index db021acb4d911e61863f563970b02c458c60cd50..c395789306d2ff7f87da376086c6d22a2c1fe6b2 100644
Binary files a/Tests/ReferenceData/BornAgain/isgisaxs03_reference_BA_size.int.gz and b/Tests/ReferenceData/BornAgain/isgisaxs03_reference_BA_size.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/isgisaxs03_reference_DWBA.int.gz b/Tests/ReferenceData/BornAgain/isgisaxs03_reference_DWBA.int.gz
index 3920bf8288097d7468f43ec7fcb4a0e5c666e6c8..c7e020a2d304c2f62ef927961f44dfa6340ced0f 100644
Binary files a/Tests/ReferenceData/BornAgain/isgisaxs03_reference_DWBA.int.gz and b/Tests/ReferenceData/BornAgain/isgisaxs03_reference_DWBA.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/mesocrystal01_reference.int.gz b/Tests/ReferenceData/BornAgain/mesocrystal01_reference.int.gz
index a6258f19e7c4c2df147770e9ae807932e4b0859e..df5bd1e074a0484bd517390febfd565277acc6d1 100644
Binary files a/Tests/ReferenceData/BornAgain/mesocrystal01_reference.int.gz and b/Tests/ReferenceData/BornAgain/mesocrystal01_reference.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/montecarlo_integration.int.gz b/Tests/ReferenceData/BornAgain/montecarlo_integration.int.gz
index b0d37185abc861fa102da415f30d2c92fd2cf901..64864c5eb0014719c9ce594fba9a80c5c7000016 100644
Binary files a/Tests/ReferenceData/BornAgain/montecarlo_integration.int.gz and b/Tests/ReferenceData/BornAgain/montecarlo_integration.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/polmagcylinders1_reference.int.gz b/Tests/ReferenceData/BornAgain/polmagcylinders1_reference.int.gz
index 52d78f7ea3013f7d4ee09798c07e285298349ecd..04a33f41d5ae972af72c757bd20f93e652b7ea37 100644
Binary files a/Tests/ReferenceData/BornAgain/polmagcylinders1_reference.int.gz and b/Tests/ReferenceData/BornAgain/polmagcylinders1_reference.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/polmagcylinders2_reference_00.int.gz b/Tests/ReferenceData/BornAgain/polmagcylinders2_reference_00.int.gz
index 9212d5c2d9a295068838de89f38a3fad2a27a549..6308dbf958ac7d0a81586878651085e37d579f7f 100644
Binary files a/Tests/ReferenceData/BornAgain/polmagcylinders2_reference_00.int.gz and b/Tests/ReferenceData/BornAgain/polmagcylinders2_reference_00.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/polmagcylinders2_reference_01.int.gz b/Tests/ReferenceData/BornAgain/polmagcylinders2_reference_01.int.gz
index 8bfd53588c5cb37232c0e8de4c1157d5fe0f4879..b8adb9c461a7e31c23bdc839af3e6b52ad156593 100644
Binary files a/Tests/ReferenceData/BornAgain/polmagcylinders2_reference_01.int.gz and b/Tests/ReferenceData/BornAgain/polmagcylinders2_reference_01.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/polmagcylinders2_reference_10.int.gz b/Tests/ReferenceData/BornAgain/polmagcylinders2_reference_10.int.gz
index cb317d853ccd748f2ffa4269c0b95ffe08cdfb7f..b8adb9c461a7e31c23bdc839af3e6b52ad156593 100644
Binary files a/Tests/ReferenceData/BornAgain/polmagcylinders2_reference_10.int.gz and b/Tests/ReferenceData/BornAgain/polmagcylinders2_reference_10.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/polmagcylinders2_reference_11.int.gz b/Tests/ReferenceData/BornAgain/polmagcylinders2_reference_11.int.gz
index a6689acb70a682ebe86461942bf29d4bd20f1f3f..6308dbf958ac7d0a81586878651085e37d579f7f 100644
Binary files a/Tests/ReferenceData/BornAgain/polmagcylinders2_reference_11.int.gz and b/Tests/ReferenceData/BornAgain/polmagcylinders2_reference_11.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ref_ApproximationDA.int.gz b/Tests/ReferenceData/BornAgain/ref_ApproximationDA.int.gz
index c7006a6c50327e23d57f46a7416ce33bfab59d6f..bf2fdff30312b1707040dc1c17a734a386add111 100644
Binary files a/Tests/ReferenceData/BornAgain/ref_ApproximationDA.int.gz and b/Tests/ReferenceData/BornAgain/ref_ApproximationDA.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ref_ApproximationLMA.int.gz b/Tests/ReferenceData/BornAgain/ref_ApproximationLMA.int.gz
index c221c6156523edf81016e83ed80face881a11ea7..47efc662e17a20c20175d8425eb1c8c5a1d9bba0 100644
Binary files a/Tests/ReferenceData/BornAgain/ref_ApproximationLMA.int.gz and b/Tests/ReferenceData/BornAgain/ref_ApproximationLMA.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ref_ApproximationSSCA.int.gz b/Tests/ReferenceData/BornAgain/ref_ApproximationSSCA.int.gz
index 2c2de0da5a9cd0cabc7f69304afb07a4f5c4fb73..f296c3b137dc77ba4ff99b80bf6d46e92d57b345 100644
Binary files a/Tests/ReferenceData/BornAgain/ref_ApproximationSSCA.int.gz and b/Tests/ReferenceData/BornAgain/ref_ApproximationSSCA.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ref_BeamDivergence.int.gz b/Tests/ReferenceData/BornAgain/ref_BeamDivergence.int.gz
index baaad01314c5b3527552da4ff436aefcd0ab0653..f849ce3f6ccff6894f2a333b7c72d3f8359d4638 100644
Binary files a/Tests/ReferenceData/BornAgain/ref_BeamDivergence.int.gz and b/Tests/ReferenceData/BornAgain/ref_BeamDivergence.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ref_BoxCompositionRotateX.int.gz b/Tests/ReferenceData/BornAgain/ref_BoxCompositionRotateX.int.gz
index 37a7196fb358a2d46754135ae925b49a4aa062b1..de4bc5d3002d4a6d67e03b0af10a6cd2411ab6cf 100644
Binary files a/Tests/ReferenceData/BornAgain/ref_BoxCompositionRotateX.int.gz and b/Tests/ReferenceData/BornAgain/ref_BoxCompositionRotateX.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ref_BoxCompositionRotateY.int.gz b/Tests/ReferenceData/BornAgain/ref_BoxCompositionRotateY.int.gz
index 100190d578516c5eee03d0cfdf6b32130da9ec12..de465574d819a8951a1a22e1b6b127d95c1db205 100644
Binary files a/Tests/ReferenceData/BornAgain/ref_BoxCompositionRotateY.int.gz and b/Tests/ReferenceData/BornAgain/ref_BoxCompositionRotateY.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ref_BoxCompositionRotateZ.int.gz b/Tests/ReferenceData/BornAgain/ref_BoxCompositionRotateZ.int.gz
index 6088a43e531bc1618169b0193bf927fad14ee4b1..bb0b713916d614ea5d70bef73bdb67d99f49038c 100644
Binary files a/Tests/ReferenceData/BornAgain/ref_BoxCompositionRotateZ.int.gz and b/Tests/ReferenceData/BornAgain/ref_BoxCompositionRotateZ.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ref_BoxCompositionRotateZandY.int.gz b/Tests/ReferenceData/BornAgain/ref_BoxCompositionRotateZandY.int.gz
index 95d843b4c08538dd965d7945597b3fb90e231dc0..0994ac0cf953d07d5516162e16c6e0f05c0198a5 100644
Binary files a/Tests/ReferenceData/BornAgain/ref_BoxCompositionRotateZandY.int.gz and b/Tests/ReferenceData/BornAgain/ref_BoxCompositionRotateZandY.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ref_BoxStackComposition.int.gz b/Tests/ReferenceData/BornAgain/ref_BoxStackComposition.int.gz
index 7d21c000b4acbca4044f8e793be41bec73cea9b4..a61fc57aa4dc498daa9b1dc0d08f0b46ef3b5e35 100644
Binary files a/Tests/ReferenceData/BornAgain/ref_BoxStackComposition.int.gz and b/Tests/ReferenceData/BornAgain/ref_BoxStackComposition.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ref_CoreShellBoxRotateZandY.int.gz b/Tests/ReferenceData/BornAgain/ref_CoreShellBoxRotateZandY.int.gz
index 2a484f2a5cf89ce935febc459f930a585f06aac6..584110716c4ff7049edc4ae45c8e9599837a83b8 100644
Binary files a/Tests/ReferenceData/BornAgain/ref_CoreShellBoxRotateZandY.int.gz and b/Tests/ReferenceData/BornAgain/ref_CoreShellBoxRotateZandY.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ref_CoreShellParticle.int.gz b/Tests/ReferenceData/BornAgain/ref_CoreShellParticle.int.gz
index 5d93c5022cb85a3084ab2ed8c0643ab6086d4e60..240fd3ff22b6ea4c084a1202cbd6afe655630c6d 100644
Binary files a/Tests/ReferenceData/BornAgain/ref_CoreShellParticle.int.gz and b/Tests/ReferenceData/BornAgain/ref_CoreShellParticle.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ref_CosineRipple.int.gz b/Tests/ReferenceData/BornAgain/ref_CosineRipple.int.gz
index aeab273d0da73f444bdbc6502a96b22c6cc96a1f..8e399d1f7c9215941c5339aa8ebc6493bb601448 100644
Binary files a/Tests/ReferenceData/BornAgain/ref_CosineRipple.int.gz and b/Tests/ReferenceData/BornAgain/ref_CosineRipple.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ref_CylindersAndPrisms.int.gz b/Tests/ReferenceData/BornAgain/ref_CylindersAndPrisms.int.gz
index e87af9519f7627081d943ee23bb2653a81a5b428..993c3edbe5cf9b0358279916bb90738c74241b66 100644
Binary files a/Tests/ReferenceData/BornAgain/ref_CylindersAndPrisms.int.gz and b/Tests/ReferenceData/BornAgain/ref_CylindersAndPrisms.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ref_CylindersInSSCA.int.gz b/Tests/ReferenceData/BornAgain/ref_CylindersInSSCA.int.gz
index 0f7442b560d4f007bc95595648bfd559d5d0357e..5bfd5708675cea026ace0d1cab41482fa7215dd6 100644
Binary files a/Tests/ReferenceData/BornAgain/ref_CylindersInSSCA.int.gz and b/Tests/ReferenceData/BornAgain/ref_CylindersInSSCA.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ref_CylindersWithSizeDistribution.int.gz b/Tests/ReferenceData/BornAgain/ref_CylindersWithSizeDistribution.int.gz
index e8dac2f69872cff32844a664d0f58c68555d8fa3..8ebf0f10c76bae08327dd9ef15cebbe1fe605fb5 100644
Binary files a/Tests/ReferenceData/BornAgain/ref_CylindersWithSizeDistribution.int.gz and b/Tests/ReferenceData/BornAgain/ref_CylindersWithSizeDistribution.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ref_DetectorResolution.int.gz b/Tests/ReferenceData/BornAgain/ref_DetectorResolution.int.gz
index 059f1bc7e032f59a7158166d716f49a8b4a9d35e..bdcaf0f9e961b65a9f14a51aff994baa422b7599 100644
Binary files a/Tests/ReferenceData/BornAgain/ref_DetectorResolution.int.gz and b/Tests/ReferenceData/BornAgain/ref_DetectorResolution.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ref_FormFactors_AnisoPyramid.int.gz b/Tests/ReferenceData/BornAgain/ref_FormFactors_AnisoPyramid.int.gz
index 60c83f93e05c259a778a2999912e02b4257a1db4..7f7352411763342b22c2fbfe0a991ade36756b53 100644
Binary files a/Tests/ReferenceData/BornAgain/ref_FormFactors_AnisoPyramid.int.gz and b/Tests/ReferenceData/BornAgain/ref_FormFactors_AnisoPyramid.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ref_FormFactors_Box.int.gz b/Tests/ReferenceData/BornAgain/ref_FormFactors_Box.int.gz
index 24d1ba6ed6e067881c35ce237dcbaa4807c282d7..2ae620752521553b18f6b26af273893f46eeb2ef 100644
Binary files a/Tests/ReferenceData/BornAgain/ref_FormFactors_Box.int.gz and b/Tests/ReferenceData/BornAgain/ref_FormFactors_Box.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ref_FormFactors_Cone.int.gz b/Tests/ReferenceData/BornAgain/ref_FormFactors_Cone.int.gz
index b512da2c0a64accb289ad4a9b430fe78a3206628..b53468c5d1925245dff97d43cb3e4464011d3741 100644
Binary files a/Tests/ReferenceData/BornAgain/ref_FormFactors_Cone.int.gz and b/Tests/ReferenceData/BornAgain/ref_FormFactors_Cone.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ref_FormFactors_Cone6.int.gz b/Tests/ReferenceData/BornAgain/ref_FormFactors_Cone6.int.gz
index 9170cb0e9d3e084a46f8fc84cd6c32429f579481..9234e79cfdf13239431af5767ef6f7832bc1e36f 100644
Binary files a/Tests/ReferenceData/BornAgain/ref_FormFactors_Cone6.int.gz and b/Tests/ReferenceData/BornAgain/ref_FormFactors_Cone6.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ref_FormFactors_Cuboctahedron.int.gz b/Tests/ReferenceData/BornAgain/ref_FormFactors_Cuboctahedron.int.gz
index b1780b44913ecd6dff214e759fb1fc660e532755..d2ac93049a0cca325990a1d1ba02b9a4123f74dc 100644
Binary files a/Tests/ReferenceData/BornAgain/ref_FormFactors_Cuboctahedron.int.gz and b/Tests/ReferenceData/BornAgain/ref_FormFactors_Cuboctahedron.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ref_FormFactors_Cylinder.int.gz b/Tests/ReferenceData/BornAgain/ref_FormFactors_Cylinder.int.gz
index b94ded5c695d06e0b2056a0d298990ced9442990..0752ff9b41e98986d4e2fba6376bc85b50300b79 100644
Binary files a/Tests/ReferenceData/BornAgain/ref_FormFactors_Cylinder.int.gz and b/Tests/ReferenceData/BornAgain/ref_FormFactors_Cylinder.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ref_FormFactors_EllipsoidalCylinder.int.gz b/Tests/ReferenceData/BornAgain/ref_FormFactors_EllipsoidalCylinder.int.gz
index 4f322349fc95252fe8e9ed4b37efe3117de4899c..257e4fddbb0bc1011ec08e0776bae7c1ad601a67 100644
Binary files a/Tests/ReferenceData/BornAgain/ref_FormFactors_EllipsoidalCylinder.int.gz and b/Tests/ReferenceData/BornAgain/ref_FormFactors_EllipsoidalCylinder.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ref_FormFactors_FullSphere.int.gz b/Tests/ReferenceData/BornAgain/ref_FormFactors_FullSphere.int.gz
index 962538445b9bf162858374995c88e352ac22a63f..27b1dc85a823257324fa0741a431287cf94eb1de 100644
Binary files a/Tests/ReferenceData/BornAgain/ref_FormFactors_FullSphere.int.gz and b/Tests/ReferenceData/BornAgain/ref_FormFactors_FullSphere.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ref_FormFactors_FullSpheroid.int.gz b/Tests/ReferenceData/BornAgain/ref_FormFactors_FullSpheroid.int.gz
index 3b783c32508cd019af794af590bf937e1451e8c0..47ad7e4a676d86ff2e2298eca2525b21d241c7df 100644
Binary files a/Tests/ReferenceData/BornAgain/ref_FormFactors_FullSpheroid.int.gz and b/Tests/ReferenceData/BornAgain/ref_FormFactors_FullSpheroid.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ref_FormFactors_HemiEllipsoid.int.gz b/Tests/ReferenceData/BornAgain/ref_FormFactors_HemiEllipsoid.int.gz
index 429d031b764ee2837bbaa9d8f9f0bb33b176ffce..d728c95bd21c88f005210e25201e546e9b05662e 100644
Binary files a/Tests/ReferenceData/BornAgain/ref_FormFactors_HemiEllipsoid.int.gz and b/Tests/ReferenceData/BornAgain/ref_FormFactors_HemiEllipsoid.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ref_FormFactors_Prism3.int.gz b/Tests/ReferenceData/BornAgain/ref_FormFactors_Prism3.int.gz
index 6e202d01824e48a058b2ff6ae473bef15a1cb7dc..c88e1174183ad2d3e0b6aaf8fdff9e28eb9e44ec 100644
Binary files a/Tests/ReferenceData/BornAgain/ref_FormFactors_Prism3.int.gz and b/Tests/ReferenceData/BornAgain/ref_FormFactors_Prism3.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ref_FormFactors_Pyramid.int.gz b/Tests/ReferenceData/BornAgain/ref_FormFactors_Pyramid.int.gz
index d4afe0f31ca042820d0a4ecd8057b9788117c861..2dbc5c6038298ef03963f853d2f53c218e24084a 100644
Binary files a/Tests/ReferenceData/BornAgain/ref_FormFactors_Pyramid.int.gz and b/Tests/ReferenceData/BornAgain/ref_FormFactors_Pyramid.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ref_FormFactors_Ripple1.int.gz b/Tests/ReferenceData/BornAgain/ref_FormFactors_Ripple1.int.gz
index 314b1ece24f7587fbc439207e429a56c5998a188..9efb1876bef521b6f35af7764ee5258888749d1c 100644
Binary files a/Tests/ReferenceData/BornAgain/ref_FormFactors_Ripple1.int.gz and b/Tests/ReferenceData/BornAgain/ref_FormFactors_Ripple1.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ref_FormFactors_Ripple2.int.gz b/Tests/ReferenceData/BornAgain/ref_FormFactors_Ripple2.int.gz
index f7b05e74466d9815280c1a625600270ada0b3fb1..8c15d6a45bd25efb2f42b5a0bdd236e4d4d8d082 100644
Binary files a/Tests/ReferenceData/BornAgain/ref_FormFactors_Ripple2.int.gz and b/Tests/ReferenceData/BornAgain/ref_FormFactors_Ripple2.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ref_FormFactors_TruncatedSphere.int.gz b/Tests/ReferenceData/BornAgain/ref_FormFactors_TruncatedSphere.int.gz
index 396278d096c2be83aad941f587a4572bdfa47e4b..bd113cb86c86b3a3d76fd5eaebd70ab93e028dde 100644
Binary files a/Tests/ReferenceData/BornAgain/ref_FormFactors_TruncatedSphere.int.gz and b/Tests/ReferenceData/BornAgain/ref_FormFactors_TruncatedSphere.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ref_FormFactors_TruncatedSpheroid.int.gz b/Tests/ReferenceData/BornAgain/ref_FormFactors_TruncatedSpheroid.int.gz
index 4f4b54ad608d4bf48538d0b678c903f50821a7e7..bd113cb86c86b3a3d76fd5eaebd70ab93e028dde 100644
Binary files a/Tests/ReferenceData/BornAgain/ref_FormFactors_TruncatedSpheroid.int.gz and b/Tests/ReferenceData/BornAgain/ref_FormFactors_TruncatedSpheroid.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ref_MagneticParticleZeroField.int.gz b/Tests/ReferenceData/BornAgain/ref_MagneticParticleZeroField.int.gz
index 2956821dfc13e77950ce45d1a69d446855ac69ad..019b8daddaea3c7658dd61619c56af4044003064 100644
Binary files a/Tests/ReferenceData/BornAgain/ref_MagneticParticleZeroField.int.gz and b/Tests/ReferenceData/BornAgain/ref_MagneticParticleZeroField.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ref_MesoCrystal.int.gz b/Tests/ReferenceData/BornAgain/ref_MesoCrystal.int.gz
index 4205a44d43eab3ede1cb57b8625e4102f3d12dbc..8b652535207a579ec9d4e916a9d214938f927226 100644
Binary files a/Tests/ReferenceData/BornAgain/ref_MesoCrystal.int.gz and b/Tests/ReferenceData/BornAgain/ref_MesoCrystal.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ref_MultiLayerWithRoughness.int.gz b/Tests/ReferenceData/BornAgain/ref_MultiLayerWithRoughness.int.gz
index 9af05d80375c8b4a05ad0f89461874efb50ebd8d..c89c9b634fc744a470bb39bb78894990b75cc7a5 100644
Binary files a/Tests/ReferenceData/BornAgain/ref_MultiLayerWithRoughness.int.gz and b/Tests/ReferenceData/BornAgain/ref_MultiLayerWithRoughness.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ref_MultipleLayout.int.gz b/Tests/ReferenceData/BornAgain/ref_MultipleLayout.int.gz
index 3d6b5e0db857b380a6e62e7d8ecb2b9cb5337472..993c3edbe5cf9b0358279916bb90738c74241b66 100644
Binary files a/Tests/ReferenceData/BornAgain/ref_MultipleLayout.int.gz and b/Tests/ReferenceData/BornAgain/ref_MultipleLayout.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ref_RadialParaCrystal.int.gz b/Tests/ReferenceData/BornAgain/ref_RadialParaCrystal.int.gz
index 8f9d6eeeddb64ff95c1b9edf33b2d018772a4fd7..b6eb5731901850d523cbb904c2daec3152cf0a59 100644
Binary files a/Tests/ReferenceData/BornAgain/ref_RadialParaCrystal.int.gz and b/Tests/ReferenceData/BornAgain/ref_RadialParaCrystal.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ref_RotatedPyramids.int.gz b/Tests/ReferenceData/BornAgain/ref_RotatedPyramids.int.gz
index d1bb28cae8f5ef9f9f109be38d2d08eba9bf9f97..8a69d4ef04feb4a5d962e96d9f9a2d0b4f53466c 100644
Binary files a/Tests/ReferenceData/BornAgain/ref_RotatedPyramids.int.gz and b/Tests/ReferenceData/BornAgain/ref_RotatedPyramids.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ref_TransformBox.int.gz b/Tests/ReferenceData/BornAgain/ref_TransformBox.int.gz
index d593276a5a007a8b9860159f57cf7a8529c53aa8..e2609b9db2d2ec225cb7be974265fa9e0ceb0f5c 100644
Binary files a/Tests/ReferenceData/BornAgain/ref_TransformBox.int.gz and b/Tests/ReferenceData/BornAgain/ref_TransformBox.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ref_TriangularRipple.int.gz b/Tests/ReferenceData/BornAgain/ref_TriangularRipple.int.gz
index bf4ceb921d01b149bad312703798c7d214ebaf24..38adadaa67fc7a4292e2a4790cf3f412531e437d 100644
Binary files a/Tests/ReferenceData/BornAgain/ref_TriangularRipple.int.gz and b/Tests/ReferenceData/BornAgain/ref_TriangularRipple.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ref_TwoTypesCylindersDistribution.int.gz b/Tests/ReferenceData/BornAgain/ref_TwoTypesCylindersDistribution.int.gz
index 3cb04fe4d68c92ec4faf6b93dfb43843af3daf6d..92b376021971e2db825220066e84cb8f37f32d4d 100644
Binary files a/Tests/ReferenceData/BornAgain/ref_TwoTypesCylindersDistribution.int.gz and b/Tests/ReferenceData/BornAgain/ref_TwoTypesCylindersDistribution.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/resolutionfunction_reference.int.gz b/Tests/ReferenceData/BornAgain/resolutionfunction_reference.int.gz
index 201774b69921f2bc19016b1b22d41153085321af..f225b03230d0cbc608ac511232a5227b28210a3f 100644
Binary files a/Tests/ReferenceData/BornAgain/resolutionfunction_reference.int.gz and b/Tests/ReferenceData/BornAgain/resolutionfunction_reference.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ripple1_reference.int.gz b/Tests/ReferenceData/BornAgain/ripple1_reference.int.gz
index 21016d2fd1241332ccd9a2fabcf9312857d2ab78..f41fa077368f3acf8938377b4cd8daf3518b84c7 100644
Binary files a/Tests/ReferenceData/BornAgain/ripple1_reference.int.gz and b/Tests/ReferenceData/BornAgain/ripple1_reference.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ripple2_asym_reference.int.gz b/Tests/ReferenceData/BornAgain/ripple2_asym_reference.int.gz
index 5696c3531ed538238c88581ca05beb8257225941..05d77164dac0b3ca4a4a4545bbfcbcb72525432e 100644
Binary files a/Tests/ReferenceData/BornAgain/ripple2_asym_reference.int.gz and b/Tests/ReferenceData/BornAgain/ripple2_asym_reference.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/ripple2_sym_reference.int.gz b/Tests/ReferenceData/BornAgain/ripple2_sym_reference.int.gz
index e62387caf13a40d944094f0c88dc53c7f3b9c728..031c22f0b689162cb2b5bffc5bcd826ae4ea7967 100644
Binary files a/Tests/ReferenceData/BornAgain/ripple2_sym_reference.int.gz and b/Tests/ReferenceData/BornAgain/ripple2_sym_reference.int.gz differ
diff --git a/Tests/ReferenceData/BornAgain/roughness01_reference.int.gz b/Tests/ReferenceData/BornAgain/roughness01_reference.int.gz
index 636ac70ea4613357cc2ab2315853d1150eee9254..ab8a2f46ba6f9601af6e20f78e2709a987febb6e 100644
Binary files a/Tests/ReferenceData/BornAgain/roughness01_reference.int.gz and b/Tests/ReferenceData/BornAgain/roughness01_reference.int.gz differ