diff --git a/hugo/config.toml b/hugo/config.toml
index fc9f689c2ac48d5277d3031a2f9bef7a3f394f3c..bbfbb85511816ad911751409a1237e6f135e9bbf 100644
--- a/hugo/config.toml
+++ b/hugo/config.toml
@@ -21,6 +21,8 @@ PygmentsStyle = "vs"
   url_userapi = "https://bornagainproject.org/ext/api/git-main/user-API"
   version_mm = "git-main"
   version_mmp = "1.19.0"
+  version_repo = "main"
+  url_blob = "https://jugit.fz-juelich.de/mlz/bornagain/-/blob"
   manual_version = "1.7.2"
   recommended_python_major = "3"
   recommended_python_minor = "9"
diff --git a/hugo/content/py/fitting/advanced/find-background/index.md b/hugo/content/py/fitting/advanced/find-background/index.md
index b8d2a3a6190ea95bcf720a7c7c87e0446d209b7c..615281f8c20e5e86067dc04acec1d5a9c1edfa82 100644
--- a/hugo/content/py/fitting/advanced/find-background/index.md
+++ b/hugo/content/py/fitting/advanced/find-background/index.md
@@ -16,4 +16,4 @@ Here we are simulating cylinders on top of a substrate without interference. The
 The radius and height of the cylinders are passed to the function constructing the multi layer
 while the scale and background values are used to initialize the instrument.
 
-{{< highlightfile file="/static/files/python/fitting/ex02_AdvancedExamples/find_background.py" language="python" >}}
+{{< highlightfile file="Examples/fit52_Advanced/find_background.py" >}}
diff --git a/hugo/content/py/fitting/advanced/fit-along-slices/index.md b/hugo/content/py/fitting/advanced/fit-along-slices/index.md
index 0d154824cdd101908e82665733e88e7a8c4e4874..7589d7e5303026bb9703e4a14ab239ea87cacde0 100644
--- a/hugo/content/py/fitting/advanced/fit-along-slices/index.md
+++ b/hugo/content/py/fitting/advanced/fit-along-slices/index.md
@@ -19,4 +19,4 @@ Technically, the idea is to mask the whole detector except thin lines, one verti
 {{< figscg src="fit_along_slices.png" width="600px" caption="Fit window">}}
 {{< /galleryscg >}}
 
-{{< highlightfile file="/static/files/python/fitting/ex02_AdvancedExamples/fit_along_slices.py" language="python" >}}
+{{< highlightfile file="Examples/fit52_Advanced/fit_along_slices.py" >}}
diff --git a/hugo/content/py/fitting/advanced/fit-with-masks/index.md b/hugo/content/py/fitting/advanced/fit-with-masks/index.md
index 773dd347dc23a554774b21e5dd2713dbad9168d0..a0e766d7a6210751eca993e70dbcf7e865c671fa 100644
--- a/hugo/content/py/fitting/advanced/fit-with-masks/index.md
+++ b/hugo/content/py/fitting/advanced/fit-with-masks/index.md
@@ -22,4 +22,4 @@ where `Rectangle` is related to the shape of the mask in detector coordinates, `
 {{< figscg src="fit_with_masks.png" width="600px" caption="Fit window">}}
 {{< /galleryscg >}}
 
-{{< highlightfile file="/static/files/python/fitting/ex02_AdvancedExamples/fit_with_masks.py" language="python" >}}
+{{< highlightfile file="Examples/fit52_Advanced/fit_with_masks.py" >}}
diff --git a/hugo/content/py/fitting/advanced/multiple-datasets/index.md b/hugo/content/py/fitting/advanced/multiple-datasets/index.md
index 01cd60ca736a7110b295f6d074ae2e2dd4aaa034..0fa22e2b6e0b498eba651dad5b166bf239e6f459 100644
--- a/hugo/content/py/fitting/advanced/multiple-datasets/index.md
+++ b/hugo/content/py/fitting/advanced/multiple-datasets/index.md
@@ -21,4 +21,4 @@ To do this, we define one dataset (a pair of real data and corresponding simulat
 {{< figscg src="multiple_datasets.png" width="600px" caption="Fit window">}}
 {{< /galleryscg >}}
 
-{{< highlightfile file="/static/files/python/fitting/ex02_AdvancedExamples/multiple_datasets.py" language="python" >}}
+{{< highlightfile file="Examples/fit52_Advanced/multiple_datasets.py" >}}
diff --git a/hugo/content/py/fitting/basic/consecutive-fitting/index.md b/hugo/content/py/fitting/basic/consecutive-fitting/index.md
index 256ceb34aefeef88039bcb5f911fb5a79b77323f..982736fb2997a36b07454bd3bb8d1fa69e54591a 100644
--- a/hugo/content/py/fitting/basic/consecutive-fitting/index.md
+++ b/hugo/content/py/fitting/basic/consecutive-fitting/index.md
@@ -11,4 +11,4 @@ This example demonstrates how to run two fits one after the other using differen
 * During the first (started at line 101) fit we are setting the initial values of the fit parameters to be quite far from the expected values and use a genetic minimizer to explore a large parameter space.
 * The second fit at line 112 starts from the best parameter values found in the previous step and uses one of the gradient descent algorithms to find the precise location of the minimum.
 
-{{< highlightfile file="/static/files/python/fitting/ex01_BasicExamples/consecutive_fitting.py" language="python" >}}
+{{< highlightfile file="Examples/fit51_Basic/consecutive_fitting.py" >}}
diff --git a/hugo/content/py/fitting/basic/minimizer-settings/index.md b/hugo/content/py/fitting/basic/minimizer-settings/index.md
index 2dc6f1060a1bd69361d1431af23c55c930691b58..4a272616ca4eade18a9d40c4f48fed84728a5d82 100644
--- a/hugo/content/py/fitting/basic/minimizer-settings/index.md
+++ b/hugo/content/py/fitting/basic/minimizer-settings/index.md
@@ -24,4 +24,4 @@ print(ba.MinimizerFactory().catalogueDetailsToString())
 For more information, see the
 [minimizer settings tutorial]({{% ref-py "fitting/minimizers/index.md" %}}).
 
-{{< highlightfile file="/static/files/python/fitting/ex01_BasicExamples/minimizer_settings.py" language="python" >}}
+{{< highlightfile file="Examples/fit51_Basic/minimizer_settings.py" >}}
diff --git a/hugo/content/py/fitting/extended/custom-objective-function/index.md b/hugo/content/py/fitting/extended/custom-objective-function/index.md
index 35ce0b522eba6d82f85e3596e429638b4e6fdc73..1f0437d398699d01bbae5fe00e2bcd1e6bbe7494 100644
--- a/hugo/content/py/fitting/extended/custom-objective-function/index.md
+++ b/hugo/content/py/fitting/extended/custom-objective-function/index.md
@@ -20,4 +20,4 @@ This is done by defining our own `MyObjective` class at line 14. It is derived f
 
 Later in the code, the `MyObjective.evaluate_residual` function is used to setup a custom objective function for the minimizer (line 116).
 
-{{< highlightfile file="/static/files/python/fitting/ex03_ExtendedExamples/custom_objective_function/custom_objective_function.py" language="python" >}}
+{{< highlightfile file="Examples/fit53_CustomObjective/custom_objective_function.py" >}}
diff --git a/hugo/content/py/fitting/extended/experiment-at-galaxi/index.md b/hugo/content/py/fitting/extended/experiment-at-galaxi/index.md
index 5a0604001713a217b1f022f898b1a42c20c1bdfe..d04d685d600974874e23a6bce9b536262901d056 100644
--- a/hugo/content/py/fitting/extended/experiment-at-galaxi/index.md
+++ b/hugo/content/py/fitting/extended/experiment-at-galaxi/index.md
@@ -5,7 +5,7 @@ weight = 30
 
 ## Experiment at GALAXI
 
-This is an example of a real data fit. We use our own measurements performed at the laboratory diffractometer [GALAXI](http://www.fz-juelich.de/jcns/jcns-2//DE/Leistungen/GALAXI/_node.html) in Forschungszentrum Jülich. 
+This is an example of a real data fit. We use our own measurements performed at the laboratory diffractometer [GALAXI](http://www.fz-juelich.de/jcns/jcns-2//DE/Leistungen/GALAXI/_node.html) in Forschungszentrum Jülich.
 
 {{< galleryscg >}}
 {{< figscg src="FitGALAXIData_setup.jpg" width="350px" caption="Real-space model">}}
@@ -17,7 +17,7 @@ This is an example of a real data fit. We use our own measurements performed at
 * The sample is generated with the help of a `SampleBuilder`, which is able to create samples depending on parameters defined in the constructor and passed through to the `create_sample` method.
 * The nanoparticles have a broad log-normal size distribution.
 
-{{< highlightfile file="/static/files/python/fitting/ex03_ExtendedExamples/experiment_at_galaxi/sample_builder.py" language="python" >}}
+{{< highlightfile file="Examples/fit61_Galaxi/sample_builder.py" >}}
 
 <hr>
 
@@ -27,4 +27,4 @@ This is an example of a real data fit. We use our own measurements performed at
 * The real data is loaded from a tiff file into a histogram representing the detector's channels.
 * The `run_fitting()` function contains the initialization of the fitting kernel: loading experimental data, assignment of fit pair, fit parameters selection (line 62).
 
-{{< highlightfile file="/static/files/python/fitting/ex03_ExtendedExamples/experiment_at_galaxi/fit_galaxi_data.py" language="python" >}}
+{{< highlightfile file="Examples/fit61_Galaxi/fit_galaxi_data.py" >}}
diff --git a/hugo/content/py/fitting/extended/external-minimizer-with-plotting/index.md b/hugo/content/py/fitting/extended/external-minimizer-with-plotting/index.md
index 01e956c42d18e0a2fab9a0d4365866386952c8a5..1fce3b0d66bee2a5887be54efb92827b3242744f 100644
--- a/hugo/content/py/fitting/extended/external-minimizer-with-plotting/index.md
+++ b/hugo/content/py/fitting/extended/external-minimizer-with-plotting/index.md
@@ -37,4 +37,4 @@ The complete script to plot the fitting progress and the image produced by it ar
 
 
 
-{{< highlightfile file="/static/files/python/fitting/ex03_ExtendedExamples/external_minimizer/lmfit_with_plotting.py" language="python" >}}
+{{< highlightfile file="Examples/fit54_ExternalMinimizer/lmfit_with_plotting.py" >}}
diff --git a/hugo/content/py/fitting/extended/external-minimizer/index.md b/hugo/content/py/fitting/extended/external-minimizer/index.md
index f7e1b1062bbd0c65552b0f419a009eeb22a055af..97d62ec58753cb97561e8b1b2d6fa6bea32df9b7 100644
--- a/hugo/content/py/fitting/extended/external-minimizer/index.md
+++ b/hugo/content/py/fitting/extended/external-minimizer/index.md
@@ -42,4 +42,4 @@ print(result.params.pretty_print())
 
 The complete script for the `lmfit` based fitting is shown below.
 
-{{< highlightfile file="/static/files/python/fitting/ex03_ExtendedExamples/external_minimizer/lmfit_basics.py" language="python" >}}
+{{< highlightfile file="Examples/fit54_ExternalMinimizer/lmfit_basics.py" >}}
diff --git a/hugo/content/py/fitting/extended/fit-specular-data/index.md b/hugo/content/py/fitting/extended/fit-specular-data/index.md
index 497300a2fd2ad41c18de2a8e60bfdd20e97cb5f1..7707e2d975b7173ef0c19ba2a6a81d72f1a71152 100644
--- a/hugo/content/py/fitting/extended/fit-specular-data/index.md
+++ b/hugo/content/py/fitting/extended/fit-specular-data/index.md
@@ -44,6 +44,6 @@ in the BornAgain directory.
 
 ### Complete script and data
 
-{{< highlightfile file="/static/files/python/fitting/ex03_ExtendedExamples/specular/FitSpecularBasics.py" language="python" >}}
+{{< highlightfile file="Examples/fit55_SpecularBasic/FitSpecularBasics.py" >}}
 
 {{% filelink file="/static/files/python/fitting/ex03_ExtendedExamples/specular/genx_interchanging_layers.dat.gz" name="Reference data" %}}
diff --git a/hugo/content/py/fitting/extended/fit-with-uncertainties/index.md b/hugo/content/py/fitting/extended/fit-with-uncertainties/index.md
index 7aa5ee28e38fcf02fbfc4d47b3a950712789d69f..2527c265e76fb3271ae9cf40663a159020bb87d3 100644
--- a/hugo/content/py/fitting/extended/fit-with-uncertainties/index.md
+++ b/hugo/content/py/fitting/extended/fit-with-uncertainties/index.md
@@ -20,6 +20,6 @@ This example follows closely the tutorial on [Fitting reflectometry data](/py/fi
 
 {{% figure src="FitWithUncertainties.png" command="Resize" options="450x" caption="Fitting with uncertainties plot. Notice the $RQ^4$ scale of the Intensity axis" class="center" %}}
 
-{{< highlightfile file="/static/files/python/fitting/ex03_ExtendedExamples/specular/FitWithUncertainties.py" language="python" >}}
+{{< highlightfile file="Examples/fit55_SpecularBasic/FitWithUncertainties.py" >}}
 
 {{% filelink file="/static/files/python/fitting/ex03_ExtendedExamples/specular/genx_interchanging_layers.dat.gz" name="Reference data" %}}
diff --git a/hugo/content/py/fitting/extended/polarized-spinasymmetry-fit/index.md b/hugo/content/py/fitting/extended/polarized-spinasymmetry-fit/index.md
index 4753323f6d72f4867ad6e9d217cbec700e7f6df1..d36e4d14c86f17cf98750934b3980af8faac757b 100644
--- a/hugo/content/py/fitting/extended/polarized-spinasymmetry-fit/index.md
+++ b/hugo/content/py/fitting/extended/polarized-spinasymmetry-fit/index.md
@@ -97,4 +97,4 @@ python3 PolarizedSpinAsymmetryFit.py
 
 Here is the complete example:
 
-{{< highlightfile file="src/Examples/fit55_SpecularBasic/PolarizedSpinAsymmetryFit.py"  language="python" >}}
+{{< highlightfile file="Examples/fit55_SpecularBasic/PolarizedSpinAsymmetryFit.py" >}}
diff --git a/hugo/content/py/fitting/extended/real-life-reflectometry/index.md b/hugo/content/py/fitting/extended/real-life-reflectometry/index.md
index 5a37d336cd60cbaa7e052ef0e2ce2a536d28571f..d903c97591c049ee043ec18320f78f728966c066 100644
--- a/hugo/content/py/fitting/extended/real-life-reflectometry/index.md
+++ b/hugo/content/py/fitting/extended/real-life-reflectometry/index.md
@@ -26,7 +26,6 @@ Be patient, since it takes some time to run.
 {{% figure src="Figure.png" command="Resize" options="450x" caption="Figure obtained after running the script below" class="center" %}}
 
 
-{{< highlightfile file="/static/files/python/fitting/ex03_ExtendedExamples/specular/RealLifeReflectometryFitting.py" language="python" >}}
+{{< highlightfile file="Examples/fit55_SpecularBasic/RealLifeReflectometryFitting.py" >}}
 
 {{% filelink file="/static/files/python/fitting/ex03_ExtendedExamples/specular/mg6a_Merged.txt.gz" name="Reference data" %}}
-
diff --git a/hugo/content/py/fitting/extended/reflectometry-honeycomb/index.md b/hugo/content/py/fitting/extended/reflectometry-honeycomb/index.md
index df6a32f603c398543547d97f9d834219e68f2282..91e6cce732fa2f5ae7b3a60a52a1780a3b4315df 100644
--- a/hugo/content/py/fitting/extended/reflectometry-honeycomb/index.md
+++ b/hugo/content/py/fitting/extended/reflectometry-honeycomb/index.md
@@ -8,7 +8,7 @@ weight = 60
 
 In this example, we want to demonstrate how to fit a more complex sample.
 For this purpose, we utilize the reflectometry data of an
-artificial magnetic honeycomb lattice published by A.&nbsp;Glavic et al., in 
+artificial magnetic honeycomb lattice published by A.&nbsp;Glavic et al., in
 [this paper](https://doi.org/10.1002/advs.201700856)
 
 The experiment was performed with polarized neutrons, but without polarization analysis.
@@ -24,21 +24,21 @@ The experimental data consists of four datasets that should be fitted simultaneo
 These datasets arise from the two polarization channels for up and down polarization of the incoming beam
 and both of these channels are measured at two temperatures (300K and 150K).
 
-All of this is measured on the same sample, so all parameters are assumed to be the same, 
+All of this is measured on the same sample, so all parameters are assumed to be the same,
 except the magnetization being temperature dependent.
-Therefore, we introduce a scaling parameter for the magnetization as the ratio of the 
+Therefore, we introduce a scaling parameter for the magnetization as the ratio of the
 magnetizations at 150K and 300K: $M_{s150} = M_{150K} / M_{300K}$.
 
 
 #### Magnetization model
 
-To model a magnetic material, one can assign a magnetization vector to any material, as is demonstrated 
+To model a magnetic material, one can assign a magnetization vector to any material, as is demonstrated
 in the [basic polarized reflectometry tutorial]({{% ref-py "instr/polarized/basic-polarized-reflectometry" %}}).
 When a non-vanishing magnetization vector is specified for at least one layer in a sample,
 BornAgain will automatically utilize the polarized computational engine.
 This leads to lower performance as the computations are more invovled.
 
-In this example, the magnetization is (anti)parallel to the neutron spin and hence we instead parametrize 
+In this example, the magnetization is (anti)parallel to the neutron spin and hence we instead parametrize
 the magnetic layers with an effective SLD that is the sum/difference of the nuclear and their magnetic SLD:
 
 $$\rho_\pm = \rho_{\text{N}} \pm \rho_{\text{M}}$$
@@ -55,21 +55,21 @@ The SLDs of these three layers are taken from the literature and kept constant.
 
 Then we model the lattice structure with a three-layer model: two layers to account for density fluctuations
 in $z$-direction and another oxide layer on top.
-This lattice structure is assumed to be magnetic and we fit all of their SLDs, magnetic SLDs, 
+This lattice structure is assumed to be magnetic and we fit all of their SLDs, magnetic SLDs,
 thicknesses and roughnesses.
 The magnetic SLD depends on the temperature of the dataset, according to the scaling described above, where
 the $M_{s150}$ parameter is fitted.
 
 
 All layers are modeled without absorption, i.e. no imaginary part of the SLD.
-Ferthermore, we apply a resolution correction as described in [this tutorial]({{% ref-py "simulation/reflectometry/tofr-with-resolution" %}}) 
+Ferthermore, we apply a resolution correction as described in [this tutorial]({{% ref-py "simulation/reflectometry/tofr-with-resolution" %}})
 with a fixed value for $\Delta Q / Q = 0.018$.
 The experimental data is normalized to unity, but we still fit the intensity, as is necessary due to the resolution correction.
 
 
 #### Running a computation
 
-In order to run a computation, we define some functions to utilize a common simulation function 
+In order to run a computation, we define some functions to utilize a common simulation function
 for the two spin channels and both temperatures:
 
 {{< highlight python>}}
@@ -88,7 +88,7 @@ def run_Simulation_150_m( qzs, params ):
 
 Here, the given arguments specify whether we want to simulate a spin-up beam (`sign = 1`)
 and whether the scaling of the magnetization should be applied (`ms150=True`).
-For the latter, `true` means that a dataset at 150K is simulated while `false` 
+For the latter, `true` means that a dataset at 150K is simulated while `false`
 corresponds to 300K and the scaling parameter is set to unity.
 
 All four reflectivity curves are then computed using:
@@ -101,7 +101,7 @@ q_150_p, r_150_p = qr( run_Simulation_150_p( qzs, paramsInitial ) )
 q_150_m, r_150_m = qr( run_Simulation_150_m( qzs, paramsInitial ) )
 {{< /highlight >}}
 
-We choose some sensible initial parameters and these yield the following 
+We choose some sensible initial parameters and these yield the following
 simulation result
 
 {{< galleryscg >}}
@@ -120,9 +120,9 @@ As a measure for the goodness of the fit, we use the relative difference:
 
 $$\Delta = \sum_{j = 1}^4 \frac{1}{N_j} \sum_{i = 1}^N \left( \frac{d_{ji} - s_{ji}}{d_{ji} + s_{ji}} \right)^2$$
 
-Here the sum over $i$ sums up the fitting error at every data point as usual and 
+Here the sum over $i$ sums up the fitting error at every data point as usual and
 the sum over $j$ adds the contributions from all four datasets.
-This is implemented in the `FitObjective::__call__` function and 
+This is implemented in the `FitObjective::__call__` function and
 the `FitObjective` object holds all four datasets, and also performs the corresponding simulations.
 In the function `run_fit_differential_evolution` this is dispatched to the differential evolution algorithm.
 
@@ -146,7 +146,6 @@ On a four-core workstation, the fitting procedure takes roughly 45 minutes to co
 
 As can be seen from the plot of the SLDs, the magnetization is indeed larger for the measurement at lower temperature, exactly as expected.
 
-{{< highlightfile file="/static/files/python/fitting/ex03_ExtendedExamples/honeycomb/Honeycomb_fit.py" language="python" >}}
+{{< highlightfile file="Examples/fit56_SpecularAdvanced/Honeycomb_fit.py" >}}
 
 {{% filelink file="/static/files/python/fitting/ex03_ExtendedExamples/honeycomb/honeycomb_data.zip" name="Reference data" %}}
-
diff --git a/hugo/content/py/fitting/extended/reflectometry-pt-layer/index.md b/hugo/content/py/fitting/extended/reflectometry-pt-layer/index.md
index 3441a5ff12339cc0a7cb6b10f85e47d4100ee83e..fb6539e5a20eb66851789b5ee93f0be87c333689 100644
--- a/hugo/content/py/fitting/extended/reflectometry-pt-layer/index.md
+++ b/hugo/content/py/fitting/extended/reflectometry-pt-layer/index.md
@@ -98,6 +98,6 @@ python3 Pt_layer_fit.py
 a simulation is performed with our fit results and one should obtain the result shown above.
 
 
-{{< highlightfile file="/static/files/python/fitting/ex03_ExtendedExamples/pt-layer/Pt_layer_fit.py" language="python" >}}
+{{< highlightfile file="Examples/fit56_SpecularAdvanced/Pt_layer_fit.py" >}}
 
 {{% filelink file="/static/files/python/fitting/ex03_ExtendedExamples/pt-layer/RvsQ_36563_36662.txt.gz" name="Reference data" %}}
diff --git a/hugo/content/py/fitting/gisas-fit2d/index.md b/hugo/content/py/fitting/gisas-fit2d/index.md
index d563440bde4fe3af5f88631dceb35a9bd2e19e7c..089edf771117462b85929ed3de3aa206e6750902 100644
--- a/hugo/content/py/fitting/gisas-fit2d/index.md
+++ b/hugo/content/py/fitting/gisas-fit2d/index.md
@@ -40,7 +40,7 @@ and terminates with the following result:
 
 ### Parametric sample and simulation model
 
-{{< highlightfile file="/static/files/python/fitting/gisas2d/gisas_model1.py" language="python" >}}
+{{< highlightfile file="Examples/fit/gisas2d/gisas_model1.py" >}}
 
 
 ### Explanation
@@ -62,7 +62,7 @@ in order to facilitate the benchmarking of different fith methods.
 
 ### Main fit script
 
-{{< highlightfile file="/static/files/python/fitting/gisas2d/fit_gisas.py" language="python" >}}
+{{< highlightfile file="Examples/fit/gisas2d/fit_gisas.py" >}}
 <p>
 
 ### Explanation
diff --git a/hugo/content/py/fitting/minimizers/index.md b/hugo/content/py/fitting/minimizers/index.md
index 0e56521e47e2220c87291416a87500355040cc7b..baea24db919a9de01cf745996beb93730d52fb68 100644
--- a/hugo/content/py/fitting/minimizers/index.md
+++ b/hugo/content/py/fitting/minimizers/index.md
@@ -16,7 +16,7 @@ so the BornAgain setup looks very similar.
 In the code snippet below we give an example of finding the minimum of the [Rosenbrock function](https://en.wikipedia.org/wiki/Rosenbrock_function)
 using the BornAgain minimizer with default settings.
 
-{{< highlightfile file="/static/files/python/fitting/algo/fit_rosenbrock.py" language="python" >}}
+{{< highlightfile file="Examples/fit/algo/fit_rosenbrock.py" >}}
 <p>
 
 The rest of the page gives additional details on
diff --git a/hugo/content/py/instr/beam/angular-divergence/index.md b/hugo/content/py/instr/beam/angular-divergence/index.md
index 43c7c49f7a495a59ae1f8c2216e0fdf205be3955..d389342809e792c1b89fcf49d811104ccf207087 100644
--- a/hugo/content/py/instr/beam/angular-divergence/index.md
+++ b/hugo/content/py/instr/beam/angular-divergence/index.md
@@ -18,6 +18,6 @@ The observed reflectometry signal can be affected either by a spread in the beam
 
 In this example, a Gaussian distribution is used to spread the incident angle, with a standard deviation of $\sigma_{\alpha} = 0.01^{\circ}$.
 
-{{< highlightfile file="src/Examples/specular/BeamAngularDivergence.py"  language="python" >}}
+{{< highlightfile file="Examples/specular/BeamAngularDivergence.py" >}}
 
-{{% filelink file="src/Examples/scatter2d/genx_angular_divergence.dat.gz" name="Reference data" %}}
+{{% filelink file="Examples/scatter2d/genx_angular_divergence.dat.gz" name="Reference data" %}}
diff --git a/hugo/content/py/instr/beam/divergence/index.md b/hugo/content/py/instr/beam/divergence/index.md
index 4f21d761f1f99a8f4bac868f227a20a5563e2640..152ac1cafef99d9d2a42e54b93833ec7b7c4d3cb 100644
--- a/hugo/content/py/instr/beam/divergence/index.md
+++ b/hugo/content/py/instr/beam/divergence/index.md
@@ -22,4 +22,4 @@ The DWBA simulation is shown for a standard sample model:
 {{< figscg src="/files/simulated/BeamDivergence.png" width="350px" caption="Intensity image">}}
 {{< /galleryscg >}}
 
-{{< highlightfile file="src/Examples/scatter2d/BeamDivergence.py" language="python" >}}
+{{< highlightfile file="Examples/scatter2d/BeamDivergence.py" >}}
diff --git a/hugo/content/py/instr/beam/footprint/index.md b/hugo/content/py/instr/beam/footprint/index.md
index 00b08c7a26da0ca1845014ef33eccc82ad0862ac..53d8b406ef4990041b5af098ac4a85541ec13bd5 100644
--- a/hugo/content/py/instr/beam/footprint/index.md
+++ b/hugo/content/py/instr/beam/footprint/index.md
@@ -54,4 +54,4 @@ the footprint impact at small incident angles.
 In other respects this example exactly matches the
 [reflectometry simulation tutorial]({{% ref-py "simulation/reflectometry/_index.md" %}}).
 
-{{< highlightfile file="src/Examples/varia/FootprintCorrection.py"  language="python" >}}
+{{< highlightfile file="Examples/varia/FootprintCorrection.py" >}}
diff --git a/hugo/content/py/instr/beam/full-divergence/index.md b/hugo/content/py/instr/beam/full-divergence/index.md
index e363838c72b06569c8f9651d22f068d56dd7e4a2..001d73bda1a3ee1343b0c6b1e391bbe1f790e711 100644
--- a/hugo/content/py/instr/beam/full-divergence/index.md
+++ b/hugo/content/py/instr/beam/full-divergence/index.md
@@ -37,4 +37,4 @@ terminate called after throwing an instance of 'std::runtime_error'
   what():  Error in SpecularSimulation: parameter distribution of beam inclination angle should have zero mean.
 ```
 
-{{< highlightfile file="src/Examples/specular/BeamFullDivergence.py"  language="python" >}}
+{{< highlightfile file="Examples/specular/BeamFullDivergence.py" >}}
diff --git a/hugo/content/py/instr/detectors/constant-background/index.md b/hugo/content/py/instr/detectors/constant-background/index.md
index c50be6c58472e007f98ca28bc6c1ae5f8e1a4c4e..0569c959ba9b99c022d027848ae7e1cd3a65101d 100644
--- a/hugo/content/py/instr/detectors/constant-background/index.md
+++ b/hugo/content/py/instr/detectors/constant-background/index.md
@@ -19,4 +19,4 @@ simulation.setBackground(bg)
 
 The script below shows how to add a constant background in the context of a GISAXS simulation of an air-substrate bilayer with cylindrical particles embedded.
 
-{{< highlightfile file="src/Examples/scatter2d/ConstantBackground.py" language="python" >}}
+{{< highlightfile file="Examples/scatter2d/ConstantBackground.py" >}}
diff --git a/hugo/content/py/instr/detectors/resolution/index.md b/hugo/content/py/instr/detectors/resolution/index.md
index 0c674c52cc45cb107fba7cd07f48f7bd7103c643..6acadb86e1c264a889fff505aa172f4253b6148f 100644
--- a/hugo/content/py/instr/detectors/resolution/index.md
+++ b/hugo/content/py/instr/detectors/resolution/index.md
@@ -23,4 +23,4 @@ Besides this, the example is a DWBA simulation for our standard sample model,
 {{< figscg src="/files/simulated/DetectorResolutionFunction.png" width="350px" caption="Intensity image">}}
 {{< /galleryscg >}}
 
-{{< highlightfile file="src/Examples/scatter2d/DetectorResolutionFunction.py" language="python" >}}
+{{< highlightfile file="Examples/scatter2d/DetectorResolutionFunction.py" >}}
diff --git a/hugo/content/py/instr/polarized/basic-polarized-reflectometry/index.md b/hugo/content/py/instr/polarized/basic-polarized-reflectometry/index.md
index 8e59c93e07a1986fb8f52669a11679e6d2ff5d45..d82dc462acff5d093448802db98009f3c1c20648 100644
--- a/hugo/content/py/instr/polarized/basic-polarized-reflectometry/index.md
+++ b/hugo/content/py/instr/polarized/basic-polarized-reflectometry/index.md
@@ -72,4 +72,4 @@ It is a good exercise to verify this claim by a short computation.
 
 Here is the complete example:
 
-{{< highlightfile file="src/Examples/varia/BasicPolarizedReflectometry.py"  language="python" >}}
+{{< highlightfile file="Examples/varia/BasicPolarizedReflectometry.py" >}}
diff --git a/hugo/content/py/instr/polarized/no-analyzer/index.md b/hugo/content/py/instr/polarized/no-analyzer/index.md
index dd60671eb7273d3b9d19d932200040b776e65620..9a4b450167e868de262a7ef382245649c22fbcc6 100644
--- a/hugo/content/py/instr/polarized/no-analyzer/index.md
+++ b/hugo/content/py/instr/polarized/no-analyzer/index.md
@@ -70,4 +70,4 @@ This is the resulting plot that shows the computed reflectivity for up and down
 
 Here is the complete example:
 
-{{< highlightfile file="src/Examples/varia/PolarizedNoAnalyzer.py"  language="python" >}}
+{{< highlightfile file="Examples/varia/PolarizedNoAnalyzer.py" >}}
diff --git a/hugo/content/py/instr/polarized/polarized-non-perfect-ap/index.md b/hugo/content/py/instr/polarized/polarized-non-perfect-ap/index.md
index 0efd7d72e3fa2f9086364540c6844ac16de593ed..7cc3ff474f175214d2c76f0882fe20feee0ebd1b 100644
--- a/hugo/content/py/instr/polarized/polarized-non-perfect-ap/index.md
+++ b/hugo/content/py/instr/polarized/polarized-non-perfect-ap/index.md
@@ -76,4 +76,4 @@ simulations presented by [Devishvili et al.](https://doi.org/10.1063/1.4790717)
 
 Here is the complete example:
 
-{{< highlightfile file="src/Examples/varia/PolarizedNonperfectAnalyzerPolarizer.py"  language="python" >}}
+{{< highlightfile file="Examples/varia/PolarizedNonperfectAnalyzerPolarizer.py" >}}
diff --git a/hugo/content/py/instr/polarized/polarized-spin-flip/index.md b/hugo/content/py/instr/polarized/polarized-spin-flip/index.md
index 817d391ab29642cdf075b51774775babe922b263..691ca7f6acd365fd4761c618d989949fb060e441 100644
--- a/hugo/content/py/instr/polarized/polarized-spin-flip/index.md
+++ b/hugo/content/py/instr/polarized/polarized-spin-flip/index.md
@@ -40,4 +40,4 @@ As expected, both spin-flip channels are identical.
 
 Here is the complete example:
 
-{{< highlightfile file="src/Examples/varia/PolarizedSpinFlip.py"  language="python" >}}
+{{< highlightfile file="Examples/varia/PolarizedSpinFlip.py" >}}
diff --git a/hugo/content/py/instr/polarized/polarized-spinasymmetry/index.md b/hugo/content/py/instr/polarized/polarized-spinasymmetry/index.md
index 501e96e2557a6ca9bd76a6026343d5815e9fc751..62499a04ae2782450690a248df6da824c1596e9e 100644
--- a/hugo/content/py/instr/polarized/polarized-spinasymmetry/index.md
+++ b/hugo/content/py/instr/polarized/polarized-spinasymmetry/index.md
@@ -69,4 +69,4 @@ Furthermore, the reflectivity data is scaled such that its maximum is unity.
 
 Here is the complete example:
 
-{{< highlightfile file="src/Examples/varia/PolarizedSpinAsymmetry.py"  language="python" >}}
+{{< highlightfile file="Examples/varia/PolarizedSpinAsymmetry.py" >}}
diff --git a/hugo/content/py/result/export/axes-in-different-units/index.md b/hugo/content/py/result/export/axes-in-different-units/index.md
index e5c7d177997ac54a72bb91c75c03cec948b38119..0f1257c87194b48561103ba3b82af6f0b1acb5a5 100644
--- a/hugo/content/py/result/export/axes-in-different-units/index.md
+++ b/hugo/content/py/result/export/axes-in-different-units/index.md
@@ -18,4 +18,4 @@ sample is used to setup the simulation.
 {{< figscg src="/files/simulated/AxesInDifferentUnits.png" width="670px" caption="Intensity images">}}
 {{< /galleryscg >}}
 
-{{< highlightfile file="src/Examples/varia/AxesInDifferentUnits.py" language="python" >}}
+{{< highlightfile file="Examples/varia/AxesInDifferentUnits.py" >}}
diff --git a/hugo/content/py/result/export/more.md b/hugo/content/py/result/export/more.md
index ad9dc15a79fd697867f19de3410f844e19ab56b0..087071882e254d6bf5115905710ae1d7dfcbda26 100644
--- a/hugo/content/py/result/export/more.md
+++ b/hugo/content/py/result/export/more.md
@@ -16,4 +16,4 @@ is used for running the simulation.
 {{< figscg src="/files/simulated/AccessingSimulationResults.png" width="670px" caption="Intensity images">}}
 {{< /galleryscg >}}
 
-{{< highlightfile file="src/Examples/varia/AccessingSimulationResults.py" language="python" >}}
+{{< highlightfile file="Examples/varia/AccessingSimulationResults.py" >}}
diff --git a/hugo/content/py/result/find-peaks/index.md b/hugo/content/py/result/find-peaks/index.md
index 4cf76239224f4fd67085adee01984026a63b67f9..5808f03ff00d443e543cd6be8d9b24f8cca00ed5 100644
--- a/hugo/content/py/result/find-peaks/index.md
+++ b/hugo/content/py/result/find-peaks/index.md
@@ -20,4 +20,4 @@ To find the intensity peaks from a GISAXS simulation, the result must be casted
 
 The following script offers a complete example in which the peaks are found after carrying on a GISAXS simulation. This particular example uses as a sample a grating of long boxes distributed along a 1D lattice.
 
-{{< highlightfile file="src/Examples/varia/FindPeaks.py" language="python" >}}
+{{< highlightfile file="Examples/varia/FindPeaks.py" >}}
diff --git a/hugo/content/py/result/material-profile/material-profile-with-particles/index.md b/hugo/content/py/result/material-profile/material-profile-with-particles/index.md
index da03a61279d36b4278de29d1c7e761885027e3e4..0e9d69393fad08003c08e75541775dec4e42e544 100644
--- a/hugo/content/py/result/material-profile/material-profile-with-particles/index.md
+++ b/hugo/content/py/result/material-profile/material-profile-with-particles/index.md
@@ -15,4 +15,4 @@ In the figure above, the embeded cone particles in the top layer create a stairl
 
 To refine the number of steps obtained in the plot above (and for the calculations carried on in an eventual simulation), the number of slices needs to be set (In the present example, it is set to 20: `ambient_layer.setNumberOfSlices(20)`).
 
-{{< highlightfile file="src/Examples/varia/MaterialProfileWithParticles.py"  language="python" >}}
+{{< highlightfile file="Examples/varia/MaterialProfileWithParticles.py" >}}
diff --git a/hugo/content/py/result/material-profile/material-profile/index.md b/hugo/content/py/result/material-profile/material-profile/index.md
index 1e847db75396ae9f96480c82c523efa83980891b..68873650fd4cc12df4bf7841572a2f8fa101a8d1 100644
--- a/hugo/content/py/result/material-profile/material-profile/index.md
+++ b/hugo/content/py/result/material-profile/material-profile/index.md
@@ -17,4 +17,4 @@ To obtain the figure above, one must run the script below, which is basically ab
  [defining a sample with interfacial roughness]({{% ref-py "sample/roughness/specular" %}})
  and plotting right away its sld profile.
 
-{{< highlightfile file="src/Examples/varia/MaterialProfile.py"  language="python" >}}
+{{< highlightfile file="Examples/varia/MaterialProfile.py" >}}
diff --git a/hugo/content/py/sample/avge/cylinders-in-average-layer/index.md b/hugo/content/py/sample/avge/cylinders-in-average-layer/index.md
index a65a4448d38138bd3de6eb04c07f0c1afa3f30fa..d6376feb4b1e9f249c620e3aa642114720fdf1af 100644
--- a/hugo/content/py/sample/avge/cylinders-in-average-layer/index.md
+++ b/hugo/content/py/sample/avge/cylinders-in-average-layer/index.md
@@ -15,4 +15,4 @@ simulation.getOptions().setUseAvgMaterials(True)
 
 The script below shows how to average materials when simulating scattering from a square lattice of cylinders inside a finite layer.
 
-{{< highlightfile file="src/Examples/scatter2d/CylindersInAverageLayer.py" language="python" >}}
+{{< highlightfile file="Examples/scatter2d/CylindersInAverageLayer.py" >}}
diff --git a/hugo/content/py/sample/avge/half-spheres-in-average-top-layer/index.md b/hugo/content/py/sample/avge/half-spheres-in-average-top-layer/index.md
index 74ace9ce97780a0a7ef35ba916a4e6be76f429e0..79bdfe0517e4bcab8bfd4b14e86d3d0b99338800 100644
--- a/hugo/content/py/sample/avge/half-spheres-in-average-top-layer/index.md
+++ b/hugo/content/py/sample/avge/half-spheres-in-average-top-layer/index.md
@@ -15,4 +15,4 @@ simulation.getOptions().setUseAvgMaterials(True)
 
 The script below shows how to average materials when simulating scattering from a square lattice of hemispheres on a substrate.
 
-{{< highlightfile file="src/Examples/scatter2d/HalfSpheresInAverageTopLayer.py" language="python" >}}
+{{< highlightfile file="Examples/scatter2d/HalfSpheresInAverageTopLayer.py" >}}
diff --git a/hugo/content/py/sample/interference/3d-nanoparticle-arrangements/meso-crystal/index.md b/hugo/content/py/sample/interference/3d-nanoparticle-arrangements/meso-crystal/index.md
index c94ac97f1d2a7961392e444fafe685e89b58144b..e0780b8b683f2f17a218c6ac8b75279fc3057a61 100644
--- a/hugo/content/py/sample/interference/3d-nanoparticle-arrangements/meso-crystal/index.md
+++ b/hugo/content/py/sample/interference/3d-nanoparticle-arrangements/meso-crystal/index.md
@@ -15,4 +15,4 @@ The basis vectors of the base crystal are $5 \, {\rm nm}$ each, the sperical par
 {{< figscg src="/files/simulated/MesoCrystal.png" width="450px" caption="Intensity image">}}
 {{< /galleryscg >}}
 
-{{< highlightfile file="src/Examples/scatter2d/MesoCrystal.py" language="python" >}}
+{{< highlightfile file="Examples/scatter2d/MesoCrystal.py" >}}
diff --git a/hugo/content/py/sample/interference/grating/cosine-ripples-at-rect-lattice/index.md b/hugo/content/py/sample/interference/grating/cosine-ripples-at-rect-lattice/index.md
index 71c894fc55853ccef252bd505897d8e1709f8772..f7cda0893b592d58e4de458fda465ed99d25a3d2 100644
--- a/hugo/content/py/sample/interference/grating/cosine-ripples-at-rect-lattice/index.md
+++ b/hugo/content/py/sample/interference/grating/cosine-ripples-at-rect-lattice/index.md
@@ -19,4 +19,4 @@ Scattering from elongated particles positioned in a two-dimensional rectangular
 {{< figscg src="/files/simulated/CosineRipplesAtRectLattice.png" width="350px" caption="Intensity image">}}
 {{< /galleryscg >}}
 
-{{< highlightfile file="src/Examples/scatter2d/CosineRipplesAtRectLattice.py" language="python" >}}
+{{< highlightfile file="Examples/scatter2d/CosineRipplesAtRectLattice.py" >}}
diff --git a/hugo/content/py/sample/interference/grating/lattice1d/index.md b/hugo/content/py/sample/interference/grating/lattice1d/index.md
index d0033f01a09c5de406dc9de843583f054f21443c..acca44b611747d887993a07c08ddbf6ceac0cdc4 100644
--- a/hugo/content/py/sample/interference/grating/lattice1d/index.md
+++ b/hugo/content/py/sample/interference/grating/lattice1d/index.md
@@ -20,7 +20,7 @@ In this example we simulate the scattering from infinite 1D repetition of rectan
 {{< figscg src="/files/simulated/Interference1DLattice.png" width="200px" caption="Intensity image">}}
 {{< /galleryscg >}}
 
-{{< highlightfile file="src/Examples/varia/Interference1DLattice.py" language="python" >}}
+{{< highlightfile file="Examples/varia/Interference1DLattice.py" >}}
 
 
 ## Explanation
diff --git a/hugo/content/py/sample/interference/grating/rectangular-grating/index.md b/hugo/content/py/sample/interference/grating/rectangular-grating/index.md
index d6439e2e287d7102ffe755e997309a6718d74b2f..64118c11691546796077ce8894a7d3121342456d 100644
--- a/hugo/content/py/sample/interference/grating/rectangular-grating/index.md
+++ b/hugo/content/py/sample/interference/grating/rectangular-grating/index.md
@@ -11,7 +11,7 @@ This example demonstrates how to perform a simulation of a grating using very lo
 {{< figscg src="/files/simulated/RectangularGrating.png" width="4500px" caption="Intensity image">}}
 {{< /galleryscg >}}
 
-{{< highlightfile file="src/Examples/scatter2d/RectangularGrating.py" language="python" >}}
+{{< highlightfile file="Examples/scatter2d/RectangularGrating.py" >}}
 
 To get rid of oscillation arising from large-particle form factors, Monte-carlo integration is used.
 
@@ -19,4 +19,4 @@ To get rid of oscillation arising from large-particle form factors, Monte-carlo
 {{< figscg src="/files/simulated/GratingMC.png" width="4500px" caption="Intensity image">}}
 {{< /galleryscg >}}
 
-{{< highlightfile file="src/Examples/varia/GratingMC.py" language="python" >}}
+{{< highlightfile file="Examples/varia/GratingMC.py" >}}
diff --git a/hugo/content/py/sample/interference/grating/triangular-ripples/index.md b/hugo/content/py/sample/interference/grating/triangular-ripples/index.md
index f8b0744ac3def5636f05cfa76a7807be6a737ea8..2b6286a92f88321bee54d784fd7abead224dde87 100644
--- a/hugo/content/py/sample/interference/grating/triangular-ripples/index.md
+++ b/hugo/content/py/sample/interference/grating/triangular-ripples/index.md
@@ -20,4 +20,4 @@ View the example on [Cosine Ripples on a Rectangular Lattice]({{% ref-py "sample
 {{< figscg src="/files/simulated/TriangularRipple.png" width="4500px" caption="Intensity image">}}
 {{< /galleryscg >}}
 
-{{< highlightfile file="src/Examples/scatter2d/TriangularRipple.py" language="python" >}}
+{{< highlightfile file="Examples/scatter2d/TriangularRipple.py" >}}
diff --git a/hugo/content/py/sample/interference/incoherent-ex/index.md b/hugo/content/py/sample/interference/incoherent-ex/index.md
index 1276a016594155d3bbf8cad5c01ed6f1e6ebef95..3aa0fb0cc706afe15f38bcf383375e4724c9bdeb 100644
--- a/hugo/content/py/sample/interference/incoherent-ex/index.md
+++ b/hugo/content/py/sample/interference/incoherent-ex/index.md
@@ -22,4 +22,4 @@ Scattering from a mixture of cylinders and prisms without interference.
 {{< figscg src="/files/simulated/CylindersAndPrisms.png" width="350px" caption="Intensity image">}}
 {{< /galleryscg >}}
 
-{{< highlightfile file="src/Examples/scatter2d/CylindersAndPrisms.py" language="python" >}}
+{{< highlightfile file="Examples/scatter2d/CylindersAndPrisms.py" >}}
diff --git a/hugo/content/py/sample/interference/lattice2d/hexagonal-lattice-with-basis/index.md b/hugo/content/py/sample/interference/lattice2d/hexagonal-lattice-with-basis/index.md
index 417244f1ee982d227bf0c1fdbef50452ac77578f..dbf3671b429a0529f87c5e7743c6f6e925a3f5d9 100644
--- a/hugo/content/py/sample/interference/lattice2d/hexagonal-lattice-with-basis/index.md
+++ b/hugo/content/py/sample/interference/lattice2d/hexagonal-lattice-with-basis/index.md
@@ -20,4 +20,4 @@ Scattering from two hexagonal close packed layers of spheres.
 {{< figscg src="/files/simulated/HexagonalLatticesWithBasis.png" width="350px" caption="Intensity image">}}
 {{< /galleryscg >}}
 
-{{< highlightfile file="src/Examples/scatter2d/HexagonalLatticesWithBasis.py" language="python" >}}
+{{< highlightfile file="Examples/scatter2d/HexagonalLatticesWithBasis.py" >}}
diff --git a/hugo/content/py/sample/interference/lattice2d/interference-2d-lattice-sum-of-rotated/index.md b/hugo/content/py/sample/interference/lattice2d/interference-2d-lattice-sum-of-rotated/index.md
index d7c7f803241ec26c91a6f13b53aee472d18472ed..fa7efdef416c266732d04cad3fe1a3fd390dafad 100644
--- a/hugo/content/py/sample/interference/lattice2d/interference-2d-lattice-sum-of-rotated/index.md
+++ b/hugo/content/py/sample/interference/lattice2d/interference-2d-lattice-sum-of-rotated/index.md
@@ -14,4 +14,4 @@ This example is similar to [Interference of a rotated square lattice]({{% ref-py
 {{< figscg src="/files/simulated/Interference2DLatticeSumOfRotated.png" width="4500px" caption="Intensity image">}}
 {{< /galleryscg >}}
 
-{{< highlightfile file="src/Examples/scatter2d/disabled/Interference2DLatticeSumOfRotated.py" language="python" >}}
+{{< highlightfile file="Examples/scatter2d/disabled/Interference2DLatticeSumOfRotated.py" >}}
diff --git a/hugo/content/py/sample/interference/lattice2d/interference-2d-rotated-square-lattice/index.md b/hugo/content/py/sample/interference/lattice2d/interference-2d-rotated-square-lattice/index.md
index a0fa9e469074289b4054cb819b0502e2de3c0d4b..b6a1a816c7e6a977a8287b64e61c4d493298a105 100644
--- a/hugo/content/py/sample/interference/lattice2d/interference-2d-rotated-square-lattice/index.md
+++ b/hugo/content/py/sample/interference/lattice2d/interference-2d-rotated-square-lattice/index.md
@@ -14,4 +14,4 @@ whose main axes are rotated with respect to the reference cartesian frame.
 {{< figscg src="/files/simulated/Interference2DRotatedSquareLattice.png" width="350px" caption="Intensity image">}}
 {{< /galleryscg >}}
 
-{{< highlightfile file="src/Examples/scatter2d/Interference2DRotatedSquareLattice.py" language="python" >}}
+{{< highlightfile file="Examples/scatter2d/Interference2DRotatedSquareLattice.py" >}}
diff --git a/hugo/content/py/sample/interference/lattice2d/interference-2d-square-finite-lattice/index.md b/hugo/content/py/sample/interference/lattice2d/interference-2d-square-finite-lattice/index.md
index f2d4afffee4d6ca5e551832a4a86d65e77007257..71a80ecbf72b572620590dcf9722d31abdd9ab52 100644
--- a/hugo/content/py/sample/interference/lattice2d/interference-2d-square-finite-lattice/index.md
+++ b/hugo/content/py/sample/interference/lattice2d/interference-2d-square-finite-lattice/index.md
@@ -14,4 +14,4 @@ This example is similar to [Interference of a rotated square lattice]({{% ref-py
 {{< figscg src="/files/simulated/Interference2DSquareFiniteLattice.png" width="4500px" caption="Intensity image">}}
 {{< /galleryscg >}}
 
-{{< highlightfile file="src/Examples/scatter2d/Interference2DSquareFiniteLattice.py" language="python" >}}
+{{< highlightfile file="Examples/scatter2d/Interference2DSquareFiniteLattice.py" >}}
diff --git a/hugo/content/py/sample/interference/lattice2d/position-variance/index.md b/hugo/content/py/sample/interference/lattice2d/position-variance/index.md
index ba0bd523bd00a01cd0dadbbefd3265dc16c0aa90..875b4ecd2fd8232d2f7434ed5b1c7482068bf9b2 100644
--- a/hugo/content/py/sample/interference/lattice2d/position-variance/index.md
+++ b/hugo/content/py/sample/interference/lattice2d/position-variance/index.md
@@ -21,4 +21,4 @@ A square lattice of hemispheres on a substrate, for different lattice orientatio
 
 {{< figscg src="/files/simulated/PositionVariance.png">}}
 
-{{< highlightfile file="src/Examples/scatter2d/PositionVariance.py" language="python" >}}
+{{< highlightfile file="Examples/scatter2d/PositionVariance.py" >}}
diff --git a/hugo/content/py/sample/interference/lattice2d/spheres-at-hex-lattice/index.md b/hugo/content/py/sample/interference/lattice2d/spheres-at-hex-lattice/index.md
index 89215f2ed7bae8599566759f10d1e2ba25049041..cc0d06ece869a6811464242e6542c1369da495c4 100644
--- a/hugo/content/py/sample/interference/lattice2d/spheres-at-hex-lattice/index.md
+++ b/hugo/content/py/sample/interference/lattice2d/spheres-at-hex-lattice/index.md
@@ -18,4 +18,4 @@ and positioned in a hexagonal lattice.
 {{< figscg src="/files/simulated/SpheresAtHexLattice.png" width="350px" caption="Intensity image">}}
 {{< /galleryscg >}}
 
-{{< highlightfile file="src/Examples/scatter2d/SpheresAtHexLattice.py" language="python" >}}
+{{< highlightfile file="Examples/scatter2d/SpheresAtHexLattice.py" >}}
diff --git a/hugo/content/py/sample/interference/lattice2d/with-basis/index.md b/hugo/content/py/sample/interference/lattice2d/with-basis/index.md
index 5978bdab55b0afc0d7355e9d12d1c70915eac670..2fdf25579aab764f3ede6d7c32bd922506124a9f 100644
--- a/hugo/content/py/sample/interference/lattice2d/with-basis/index.md
+++ b/hugo/content/py/sample/interference/lattice2d/with-basis/index.md
@@ -20,4 +20,4 @@ Scattering from cylinders positioned in a squared centered lattice.
 {{< figscg src="/files/simulated/Interference2DCenteredSquareLattice.png" width="350px" caption="Intensity image">}}
 {{< /galleryscg >}}
 
-{{< highlightfile file="src/Examples/scatter2d/Interference2DCenteredSquareLattice.py" language="python" >}}
+{{< highlightfile file="Examples/scatter2d/Interference2DCenteredSquareLattice.py" >}}
diff --git a/hugo/content/py/sample/interference/other/approximation-da/index.md b/hugo/content/py/sample/interference/other/approximation-da/index.md
index 7d40520c20a6553fce8b50873e29977760a54471..d0672fff0d8867b0ba445c1096c4afa1db5f0826 100644
--- a/hugo/content/py/sample/interference/other/approximation-da/index.md
+++ b/hugo/content/py/sample/interference/other/approximation-da/index.md
@@ -19,4 +19,4 @@ Scattering from a distribution of cylinders of two different sizes using the Dec
 {{< figscg src="/files/simulated/ApproximationDA.png" width="350px" caption="Intensity image">}}
 {{< /galleryscg >}}
 
-{{< highlightfile file="src/Examples/scatter2d/ApproximationDA.py" language="python" >}}
+{{< highlightfile file="Examples/scatter2d/ApproximationDA.py" >}}
diff --git a/hugo/content/py/sample/interference/other/approximation-lma/index.md b/hugo/content/py/sample/interference/other/approximation-lma/index.md
index ad457ce1895661e6992dc14d85b8695271bb200f..741870ae8159a2602af73e91e9272e39c9853b01 100644
--- a/hugo/content/py/sample/interference/other/approximation-lma/index.md
+++ b/hugo/content/py/sample/interference/other/approximation-lma/index.md
@@ -20,4 +20,4 @@ Scattering from cylinders of two different sizes using the Local Monodisperse Ap
 {{< figscg src="/files/simulated/ApproximationLMA.png" width="350px" caption="Intensity image">}}
 {{< /galleryscg >}}
 
-{{< highlightfile file="src/Examples/scatter2d/ApproximationLMA.py" language="python" >}}
+{{< highlightfile file="Examples/scatter2d/ApproximationLMA.py" >}}
diff --git a/hugo/content/py/sample/interference/other/approximation-ssca/index.md b/hugo/content/py/sample/interference/other/approximation-ssca/index.md
index ca26408bf94a8a9110a76c00843064772bf908aa..d95570cc4a17ea9b4c6eae525a4b810d0fd6e05d 100644
--- a/hugo/content/py/sample/interference/other/approximation-ssca/index.md
+++ b/hugo/content/py/sample/interference/other/approximation-ssca/index.md
@@ -22,4 +22,4 @@ Scattering from cylinders of two different sizes using the Size-Spacing Coupling
 {{< /galleryscg >}}
 
 {{< highlightfile
-file="src/Examples/scatter2d/ApproximationSSCA.py" language="python" >}}
+file="Examples/scatter2d/ApproximationSSCA.py" >}}
diff --git a/hugo/content/py/sample/interference/para2d/index.md b/hugo/content/py/sample/interference/para2d/index.md
index 002dea4c0b68d68bb5af714eba070a8653f4e94e..8a5658bdc01b6a9a0407eb6777ef284beacbe60e 100644
--- a/hugo/content/py/sample/interference/para2d/index.md
+++ b/hugo/content/py/sample/interference/para2d/index.md
@@ -23,7 +23,7 @@ A damping length is used to introduce finite size effects by applying a multipli
 {{< figscg src="/files/simulated/Interference2DParaCrystal.png" width="350px" caption="Intensity image">}}
 {{< /galleryscg >}}
 
-{{< highlightfile file="src/Examples/scatter2d/Interference2DParaCrystal.py" language="python" >}}
+{{< highlightfile file="Examples/scatter2d/Interference2DParaCrystal.py" >}}
 <p>
 
 ## Explanation
diff --git a/hugo/content/py/sample/interference/para_radial/index.md b/hugo/content/py/sample/interference/para_radial/index.md
index 476ea78440cb2c9f84639dfe02246b8f8555e52c..0076968d4c3af259a31bb63ec00771c520247f8e 100644
--- a/hugo/content/py/sample/interference/para_radial/index.md
+++ b/hugo/content/py/sample/interference/para_radial/index.md
@@ -22,7 +22,7 @@ $exp \left(-\frac{peak\\_distance}{damping\\_length}\right)$ to the Fourier tran
 {{< figscg src="/files/simulated/Interference1DRadialParaCrystal.png" width="350px" caption="Intensity image">}}
 {{< /galleryscg >}}
 
-{{< highlightfile file="src/Examples/scatter2d/Interference1DRadialParaCrystal.py" language="python" >}}
+{{< highlightfile file="Examples/scatter2d/Interference1DRadialParaCrystal.py" >}}
 
 
 ## Explanation
diff --git a/hugo/content/py/sample/particles/all-formfactors/index.md b/hugo/content/py/sample/particles/all-formfactors/index.md
index f6556acc34353eb324ca539917ad50ed8d304b90..fd476dc45ce85ffa820ca3b79c0ae40d0306475d 100644
--- a/hugo/content/py/sample/particles/all-formfactors/index.md
+++ b/hugo/content/py/sample/particles/all-formfactors/index.md
@@ -19,4 +19,4 @@ The dimensions of the object are chosen only in order to get a characteristic si
 {{< figscg src="/files/simulated/AllFormFactorsAvailable.png" width="350px" caption="Intensity images">}}
 {{< /galleryscg >}}
 
-{{< highlightfile file="src/Examples/varia/AllFormFactorsAvailable.py" language="python" >}}
+{{< highlightfile file="Examples/varia/AllFormFactorsAvailable.py" >}}
diff --git a/hugo/content/py/sample/particles/composition/core-shell/index.md b/hugo/content/py/sample/particles/composition/core-shell/index.md
index c62ffb643f0a9780b3524f1fdecd101cdb8d9cba..daa7181ad6ee0e8355129b36f803dfe9f6a79c12 100644
--- a/hugo/content/py/sample/particles/composition/core-shell/index.md
+++ b/hugo/content/py/sample/particles/composition/core-shell/index.md
@@ -19,4 +19,4 @@ Scattering from cuboidal core-shell particles.
 {{< figscg src="/files/simulated/CoreShellNanoparticles.png" width="350px" caption="Intensity image">}}
 {{< /galleryscg >}}
 
-{{< highlightfile file="src/Examples/scatter2d/CoreShellNanoparticles.py" language="python" >}}
+{{< highlightfile file="Examples/scatter2d/CoreShellNanoparticles.py" >}}
diff --git a/hugo/content/py/sample/particles/composition/example/index.md b/hugo/content/py/sample/particles/composition/example/index.md
index 6f17ec1466665f3af5ec65c9152369db68760fe9..704c3c386d601adc581dc4575d3c3cdf2a84ba47 100644
--- a/hugo/content/py/sample/particles/composition/example/index.md
+++ b/hugo/content/py/sample/particles/composition/example/index.md
@@ -12,4 +12,4 @@ Cylindrical particles made of two materials are added to the air layer and their
 {{< figscg src="/files/simulated/BiMaterialCylinders.png" width="450px" caption="Intensity image">}}
 {{< /galleryscg >}}
 
-{{< highlightfile file="src/Examples/scatter2d/BiMaterialCylinders.py" language="python" >}}
+{{< highlightfile file="Examples/scatter2d/BiMaterialCylinders.py" >}}
diff --git a/hugo/content/py/sample/particles/custom-formfactor/index.md b/hugo/content/py/sample/particles/custom-formfactor/index.md
index f4b50ef781d1ce536281dc439c587b96be55e090..4f97c70e6dbc4e4bc6f0d5bee9146a2af914626c 100644
--- a/hugo/content/py/sample/particles/custom-formfactor/index.md
+++ b/hugo/content/py/sample/particles/custom-formfactor/index.md
@@ -19,4 +19,4 @@ Scattering from a monodisperse distribution of particles, whose form factor is d
 {{< figscg src="/files/simulated/CustomFormFactor.png" width="350px" caption="Intensity image">}}
 {{< /galleryscg >}}
 
-{{< highlightfile file="src/Examples/varia/CustomFormFactor.py" language="python" >}}
+{{< highlightfile file="Examples/varia/CustomFormFactor.py" >}}
diff --git a/hugo/content/py/sample/particles/distribution/distribution-ex1/index.md b/hugo/content/py/sample/particles/distribution/distribution-ex1/index.md
index e894b76a76984d640f1b0e157398d9614a9a3db8..5d3c65c70dc79e0add70de45807bb88b7b14a6b4 100644
--- a/hugo/content/py/sample/particles/distribution/distribution-ex1/index.md
+++ b/hugo/content/py/sample/particles/distribution/distribution-ex1/index.md
@@ -19,4 +19,4 @@ Scattering from a polydisperse distribution of cylinders in Born Approximation.
 {{< figscg src="/files/simulated/CylindersWithSizeDistribution.png" width="350px" caption="Intensity image">}}
 {{< /galleryscg >}}
 
-{{< highlightfile file="src/Examples/scatter2d/disabled/CylindersWithSizeDistribution.py" language="python" >}}
+{{< highlightfile file="Examples/scatter2d/disabled/CylindersWithSizeDistribution.py" >}}
diff --git a/hugo/content/py/sample/particles/distribution/distribution-ex2/index.md b/hugo/content/py/sample/particles/distribution/distribution-ex2/index.md
index 201fd681aa638d80848f40781fa751db4d3f58ce..c3eaa4f7b394b574d73586f992322499d7a7db6f 100644
--- a/hugo/content/py/sample/particles/distribution/distribution-ex2/index.md
+++ b/hugo/content/py/sample/particles/distribution/distribution-ex2/index.md
@@ -20,4 +20,4 @@ Scattering of a polydisperse distribution of two types of cylinders.
 {{< figscg src="/files/simulated/TwoTypesOfCylindersWithSizeDistribution.png" width="350px" caption="Intensity image">}}
 {{< /galleryscg >}}
 
-{{< highlightfile file="src/Examples/scatter2d/disabled/TwoTypesOfCylindersWithSizeDistribution.py" language="python" >}}
+{{< highlightfile file="Examples/scatter2d/disabled/TwoTypesOfCylindersWithSizeDistribution.py" >}}
diff --git a/hugo/content/py/sample/particles/large/index.md b/hugo/content/py/sample/particles/large/index.md
index e4b45446e2202bc58a97b299ada73b9f63f5600d..cc181610f1128648e505bb4f1ac82718431c20e4 100644
--- a/hugo/content/py/sample/particles/large/index.md
+++ b/hugo/content/py/sample/particles/large/index.md
@@ -19,4 +19,4 @@ The simulation generates four plots using different sizes of the particles, (rad
 {{< figscg src="/files/simulated/LargeParticlesFormFactor.png" width="350px" caption="Intensity image">}}
 {{< /galleryscg >}}
 
-{{< highlightfile file="src/Examples/varia/LargeParticlesFormFactor.py" language="python" >}}
+{{< highlightfile file="Examples/varia/LargeParticlesFormFactor.py" >}}
diff --git a/hugo/content/py/sample/particles/magnetic/_index.md b/hugo/content/py/sample/particles/magnetic/_index.md
index d49be6550c53eb9ff11501325737b3b3c475b254..d4ed38133b4668325504866dfb7bcc2ef01567b1 100644
--- a/hugo/content/py/sample/particles/magnetic/_index.md
+++ b/hugo/content/py/sample/particles/magnetic/_index.md
@@ -66,4 +66,4 @@ The full example embeds the previously defined spherical particle inside the sub
 
 {{< figscg src="/files/simulated/MagneticSpheres.png" width="500px" class="center" caption="The figure shows the intensity map produced by the script below." >}}
 
-{{< highlightfile file="src/Examples/scatter2d/MagneticSpheres.py" language="python" >}}
+{{< highlightfile file="Examples/scatter2d/MagneticSpheres.py" >}}
diff --git a/hugo/content/py/sample/particles/positioning/interface-crossing/index.md b/hugo/content/py/sample/particles/positioning/interface-crossing/index.md
index 8da66d59d529aa267f981ddab8bd751dec7fa227..c37a651522bf925d1e4801ec8a35d83c95bface1 100644
--- a/hugo/content/py/sample/particles/positioning/interface-crossing/index.md
+++ b/hugo/content/py/sample/particles/positioning/interface-crossing/index.md
@@ -16,4 +16,4 @@ The script below models a air-substrate bilayer in which cylindrical particles m
 {{< figscg src="/files/simulated/ParticlesCrossingInterface.png" width="450px" caption="Intensity image">}}
 {{< /galleryscg >}}
 
-{{< highlightfile file="src/Examples/scatter2d/ParticlesCrossingInterface.py" language="python" >}}
+{{< highlightfile file="Examples/scatter2d/ParticlesCrossingInterface.py" >}}
diff --git a/hugo/content/py/sample/particles/positioning/positioning-ex/index.md b/hugo/content/py/sample/particles/positioning/positioning-ex/index.md
index 7bd2e77425b3427a1c2c8cd53b4decfb759abaff..7807fec5713282a18d4db4c707ee314fd835c5a7 100644
--- a/hugo/content/py/sample/particles/positioning/positioning-ex/index.md
+++ b/hugo/content/py/sample/particles/positioning/positioning-ex/index.md
@@ -19,4 +19,4 @@ Scattering from a sample containing spherical embedded particles.
 {{< figscg src="/files/simulated/BuriedParticles.png" width="350px" caption="Intensity image">}}
 {{< /galleryscg >}}
 
-{{< highlightfile file="src/Examples/scatter2d/BuriedParticles.py" language="python" >}}
+{{< highlightfile file="Examples/scatter2d/BuriedParticles.py" >}}
diff --git a/hugo/content/py/sample/particles/rotation/rotation-ex/index.md b/hugo/content/py/sample/particles/rotation/rotation-ex/index.md
index efae2ce7cf9f3f39d491216eb4a8242167f6edaf..80a904ea49d2701213f629dcf90bdd6235828491 100644
--- a/hugo/content/py/sample/particles/rotation/rotation-ex/index.md
+++ b/hugo/content/py/sample/particles/rotation/rotation-ex/index.md
@@ -21,4 +21,4 @@ This example illustrates how the in-plane rotation of non-radially symmetric par
 {{< figscg src="/files/simulated/RotatedPyramids.png" width="350px" caption="Intensity image">}}
 {{< /galleryscg >}}
 
-{{< highlightfile file="src/Examples/scatter2d/RotatedPyramids.py" language="python" >}}
+{{< highlightfile file="Examples/scatter2d/RotatedPyramids.py" >}}
diff --git a/hugo/content/py/sample/roughness/profiles/index.md b/hugo/content/py/sample/roughness/profiles/index.md
index 7bad5e03290407d3a8cbdbb031ca40c22ed2b971..8b1b3480422df876d55ba02cf9b46f55b385a8d6 100644
--- a/hugo/content/py/sample/roughness/profiles/index.md
+++ b/hugo/content/py/sample/roughness/profiles/index.md
@@ -28,4 +28,4 @@ GISAS computations, we recommend to always use the default ($tanh$) for those si
 {{< /notice >}}
 
 
-{{< highlightfile file="src/Examples/varia/RoughnessModel.py"  language="python" >}}
+{{< highlightfile file="Examples/varia/RoughnessModel.py" >}}
diff --git a/hugo/content/py/sample/roughness/scattering/index.md b/hugo/content/py/sample/roughness/scattering/index.md
index c4d916b21c32f989cb05826fd62081059404d65d..41e85b91fbed8d1e8457fdf4fcc492131e6ae41d 100644
--- a/hugo/content/py/sample/roughness/scattering/index.md
+++ b/hugo/content/py/sample/roughness/scattering/index.md
@@ -33,4 +33,4 @@ The roughness profile is described by a normally-distributed random function. Th
 {{< figscg src="/files/simulated/CorrelatedRoughness.png" width="350px" caption="Intensity image">}}
 {{< /galleryscg >}}
 
-{{< highlightfile file="src/Examples/scatter2d/CorrelatedRoughness.py" language="python" >}}
+{{< highlightfile file="Examples/scatter2d/CorrelatedRoughness.py" >}}
diff --git a/hugo/content/py/sample/roughness/specular/index.md b/hugo/content/py/sample/roughness/specular/index.md
index 3ec808e24960c31b3c2535327c756543f9d0057f..2c8c688b4ed7736caa8be8febcbfe0ec49574fff 100644
--- a/hugo/content/py/sample/roughness/specular/index.md
+++ b/hugo/content/py/sample/roughness/specular/index.md
@@ -30,4 +30,4 @@ do not affect the result of the simulation. The computation model takes into acc
 rms-deviation from the mean surface position.
 {{< /notice >}}
 
-{{< highlightfile file="src/Examples/varia/SpecularSimulationWithRoughness.py"  language="python" >}}
+{{< highlightfile file="Examples/varia/SpecularSimulationWithRoughness.py" >}}
diff --git a/hugo/content/py/simulation/depth-probe/index.md b/hugo/content/py/simulation/depth-probe/index.md
index 223a279dbfaddd44980a0b62b7988b09ac687491..7515aa3dc691b517fe6d66f6e504107814cf0460 100644
--- a/hugo/content/py/simulation/depth-probe/index.md
+++ b/hugo/content/py/simulation/depth-probe/index.md
@@ -27,4 +27,4 @@ as function of depth and incident angle $\alpha_i$.
 
 ## Script
 
-{{< highlightfile file="src/Examples/varia/DepthProbe.py" language="python" >}}
+{{< highlightfile file="Examples/varia/DepthProbe.py" >}}
diff --git a/hugo/content/py/simulation/gisas/_index.md b/hugo/content/py/simulation/gisas/_index.md
index 4b7b1c954fa3271c13f07bdd94057cfb43516425..34ece8da5cb47e29e8d00eec18bc3820a336f2a3 100644
--- a/hugo/content/py/simulation/gisas/_index.md
+++ b/hugo/content/py/simulation/gisas/_index.md
@@ -18,7 +18,7 @@ we consider a dilute random assembly of monodisperse cylindrical disks on a subs
 {{< figscg src="/files/simulated/Cylinders.png" width="350px" caption="Intensity image">}}
 {{< /galleryscg >}}
 
-{{< highlightfile file="src/Examples/scatter2d/Cylinders.py" language="python" >}}
+{{< highlightfile file="Examples/scatter2d/Cylinders.py" >}}
 <p>
 
 ### Explanation
diff --git a/hugo/content/py/simulation/gisas/gisas-with-specular/index.md b/hugo/content/py/simulation/gisas/gisas-with-specular/index.md
index c55e71de34a378220f2086f02685f7193add2df2..481f74847290c3691e500e83744aca7a96dfffc2 100644
--- a/hugo/content/py/simulation/gisas/gisas-with-specular/index.md
+++ b/hugo/content/py/simulation/gisas/gisas-with-specular/index.md
@@ -15,4 +15,4 @@ simulation.getOptions().setIncludeSpecular(True)
 
 The script below shows how to include the specular peak when simulating a square lattice of boxes on a substrate.
 
-{{< highlightfile file="src/Examples/scatter2d/BoxesWithSpecularPeak.py" language="python" >}}
+{{< highlightfile file="Examples/scatter2d/BoxesWithSpecularPeak.py" >}}
diff --git a/hugo/content/py/simulation/gisas/no-reflection/index.md b/hugo/content/py/simulation/gisas/no-reflection/index.md
index de3c5b47bb7514feecdd61f4b05a7c12199d4f30..28ee57979d3ce1cb6e816526eea34a39604dd4bf 100644
--- a/hugo/content/py/simulation/gisas/no-reflection/index.md
+++ b/hugo/content/py/simulation/gisas/no-reflection/index.md
@@ -19,4 +19,4 @@ and therefore the DWBA boils down to the ordinary Born approximation.
 {{< figscg src="/files/simulated/CylindersInBA.png" width="350px" caption="Intensity image">}}
 {{< /galleryscg >}}
 
-{{< highlightfile file="src/Examples/scatter2d/CylindersInBA.py" language="python" >}}
+{{< highlightfile file="Examples/scatter2d/CylindersInBA.py" >}}
diff --git a/hugo/content/py/simulation/offspec/index.md b/hugo/content/py/simulation/offspec/index.md
index 08adb166e778ecd8fe7523aaa5f12599b7c41e89..805446e8a422c69e3bfc97d3ea680a40108939c8 100644
--- a/hugo/content/py/simulation/offspec/index.md
+++ b/hugo/content/py/simulation/offspec/index.md
@@ -22,4 +22,4 @@ Off-specular scattering from a monodisperse distribution of long boxes.
 {{< figscg src="/files/simulated/OffSpecularSimulation.png" width="350px" caption="Intensity image">}}
 {{< /galleryscg >}}
 
-{{< highlightfile file="src/Examples/varia/OffSpecularSimulation.py" language="python" >}}
+{{< highlightfile file="Examples/varia/OffSpecularSimulation.py" >}}
diff --git a/hugo/content/py/simulation/reflectometry/_index.md b/hugo/content/py/simulation/reflectometry/_index.md
index fb98fc63b7eb24f7f979806a42fcc38e19ac8e3a..505bb22650e2659e581c98fee095a16d0c829468 100644
--- a/hugo/content/py/simulation/reflectometry/_index.md
+++ b/hugo/content/py/simulation/reflectometry/_index.md
@@ -21,7 +21,7 @@ To generate this image
 
 run this script:
 
-{{< highlightfile file="src/Examples/specular/AlternatingLayers.py">}}
+{{< highlightfile file="Examples/specular/AlternatingLayers.py">}}
 
 
 ### Explanation
diff --git a/hugo/content/py/simulation/reflectometry/time-of-flight/index.md b/hugo/content/py/simulation/reflectometry/time-of-flight/index.md
index a2c89dea263047e50608c2ace7ff35d302416ce6..190590388f5434e834a7abea61628bc8efa7dda4 100644
--- a/hugo/content/py/simulation/reflectometry/time-of-flight/index.md
+++ b/hugo/content/py/simulation/reflectometry/time-of-flight/index.md
@@ -22,4 +22,4 @@ spanned by the $q_z$ vector, rather than the range spanned by the angle $\theta$
 {{< figscg src="/files/simulated/TimeOfFlightReflectometry.png" width="500px" caption="This figure shows the reflectometry signal obtained after running the TOF simulation of the script below." >}}
 {{< /galleryscg >}}
 
-{{< highlightfile file="src/Examples/specular/TimeOfFlightReflectometry.py"  language="python" >}}
+{{< highlightfile file="Examples/specular/TimeOfFlightReflectometry.py" >}}
diff --git a/hugo/content/py/simulation/reflectometry/tofr-with-resolution/index.md b/hugo/content/py/simulation/reflectometry/tofr-with-resolution/index.md
index dcaba56c210b803d5472b9d425f0833d5c3f53ed..13621b3385eb94d2b75f0fbb02e5ba7fc518ed36 100644
--- a/hugo/content/py/simulation/reflectometry/tofr-with-resolution/index.md
+++ b/hugo/content/py/simulation/reflectometry/tofr-with-resolution/index.md
@@ -39,4 +39,4 @@ In the snippet above, a Gaussian distribution has been used, but there are sever
 {{< /galleryscg >}}
 
 
-{{< highlightfile file="src/Examples/specular/TOFRWithResolution.py"  language="python" >}}
+{{< highlightfile file="Examples/specular/TOFRWithResolution.py" >}}
diff --git a/hugo/content/py/simulation/sas/_index.md b/hugo/content/py/simulation/sas/_index.md
index 716576d837cd760fe7853c41b5966ba3cf965cb3..76cd8d542f9e7832f4aa3a9d4ba94f64cf0eb12a 100644
--- a/hugo/content/py/simulation/sas/_index.md
+++ b/hugo/content/py/simulation/sas/_index.md
@@ -35,4 +35,4 @@ scattering from a dilute random assembly of monodisperse, oriented dodecahedra.
 {{< figscg src="/files/simulated/DodecahedraSAS.png" width="500px" caption="Intensity image">}}
 {{< /galleryscg >}}
 
-{{< highlightfile file="src/Examples/scatter2d/DodecahedraSAS.py" language="python" >}}
+{{< highlightfile file="Examples/scatter2d/DodecahedraSAS.py" >}}
diff --git a/hugo/content/py/simulation/sas/polarized/index.md b/hugo/content/py/simulation/sas/polarized/index.md
index 301a0f28f0d24d42efd4318cc5cf3bb14c1f2d22..23bd41dd6c258cf8a05d42ee8cf92c9cdc41fa5f 100644
--- a/hugo/content/py/simulation/sas/polarized/index.md
+++ b/hugo/content/py/simulation/sas/polarized/index.md
@@ -26,4 +26,4 @@ result of this simulation is plotted as usual.
 {{< figscg src="/files/simulated/PolarizedSANS.png" width="600px" caption="Intensity images">}}
 {{< /galleryscg >}}
 
-{{< highlightfile file="src/Examples/scatter2d/PolarizedSANS.py" language="python" >}}
+{{< highlightfile file="Examples/scatter2d/PolarizedSANS.py" >}}
diff --git a/hugo/content/py/start/run.md b/hugo/content/py/start/run.md
index 3594f5b3b98e9abcf38883c2c413a56f9a4d87be..8adbb7d9e3d89c83b32a87971a23387d94323fd2 100644
--- a/hugo/content/py/start/run.md
+++ b/hugo/content/py/start/run.md
@@ -42,7 +42,7 @@ Alternatively, all example scripts can also be found in the BornAgain distributi
   </div>
 </div>
 
-{{< highlightfile file="src/Examples/specular/AlternatingLayers.py">}}
+{{< highlightfile file="Examples/specular/AlternatingLayers.py">}}
 <p>
 
 For a discussion of the content of this script,
diff --git a/hugo/content/py/start/syntax.md b/hugo/content/py/start/syntax.md
index 1ec5f6396c73db8d0eef611b980e72b115e262ac..caf150481ae850be6a408f595fcd3e334d97669b 100644
--- a/hugo/content/py/start/syntax.md
+++ b/hugo/content/py/start/syntax.md
@@ -11,7 +11,7 @@ to explain some Python syntax used in BornAgain scripts.
 
 For easy reference, here again the full script:
 
-{{< highlightfile file="src/Examples/specular/AlternatingLayers.py">}}
+{{< highlightfile file="Examples/specular/AlternatingLayers.py">}}
 <p>
 
 We shall now explain the code section by section.
diff --git a/hugo/layouts/shortcodes/highlightfile.html b/hugo/layouts/shortcodes/highlightfile.html
index 6e12910442238b2f27dadf17a525915f65eb2bdf..56e6927d2a0ddadca7da9bd0407f4c6fd077d8df 100644
--- a/hugo/layouts/shortcodes/highlightfile.html
+++ b/hugo/layouts/shortcodes/highlightfile.html
@@ -1,33 +1,15 @@
 <!--
 Highlights file and provides download link.
-File should be located either in the same directory or full path should be specified.
+Argument 1 = File path below /src/
 -->
 
 {{- $src := (.Get "file") -}}
 {{- $lang := .Get "language" | default ("python") }}
 {{- $opt := .Get "opt" | default ("linenos=table") }}
 
-{{- if in $src "/" -}}
-  {{$file := $src | readFile}}
-  {{ highlight (print $file) $lang $opt}}
+{{ $path := (printf "/src/%s" $src) }}
+{{ $file := $path | readFile }}
+{{ highlight (print $file) $lang $opt}}
 
-  {{ $filelink := (replaceRE "^[/]+static" "" $src) }}
-  {{ $justTheSplit := split $filelink "/" }}
-  {{ $lastPartOnly := index (last 1 $justTheSplit) 0}}
-
-  {{ .Scratch.Set "link" $filelink }}
-  {{ .Scratch.Set "linkname" $lastPartOnly }}
-
-{{- else -}}
-  {{ $file := (printf "%s%s" $.Page.File.Dir $src) }}
-  {{ highlight (readFile (printf "content/%s" $file)) $lang $opt}}
-
-  {{ .Scratch.Set "link" $file }}
-  {{ .Scratch.Set "linkname" $src }}
-{{- end -}}
-
-{{ $link := .Scratch.Get "link" }}
-{{ $linkname := .Scratch.Get "linkname" }}
-<a class="linktofile" href="{{ .Site.BaseURL }}{{ $link }}"/>
-    {{ $linkname }}
-</a>
+<a class="linktofile"
+   href="{{.Site.Params.url_blob}}/{{.Site.Params.version_repo}}/{{(printf $src)}}"/>{{$src}}</a>
diff --git a/hugo/static/files/code_snippet.py b/hugo/static/files/code_snippet.py
deleted file mode 100644
index 35283f91cd461f4175215d4f5b8857e44810a144..0000000000000000000000000000000000000000
--- a/hugo/static/files/code_snippet.py
+++ /dev/null
@@ -1,27 +0,0 @@
-import sys
-import numpy
-
-
-class Base:
-    """
-    Base class
-    """
-    def __init__(self):
-        self.x = None
-        self.y = numpy.sin(numpy.pi/2.0)
-
-    def value(self):
-        return self.y
-
-
-def say_hello():
-    """
-    Prints 'Hello World' message
-    """
-    b = Base()
-    print("Hello World", b.value())
-
-
-if __name__ == '__main__':
-    say_hello()
-
diff --git a/hugo/static/files/python/fitting/algo/fit_rosenbrock.py b/hugo/static/files/python/fitting/algo/fit_rosenbrock.py
deleted file mode 100755
index a0889c6e601d51fbb9eca274dd62fd0a2866bbff..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/fitting/algo/fit_rosenbrock.py
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/env python3
-
-import bornagain as ba
-
-def rosenbrock(params):
-    x = params["x"].value
-    y = params["y"].value
-    tmp1 = y - x * x
-    tmp2 = 1 - x
-    return 100 * tmp1 * tmp1 + tmp2 * tmp2
-
-params = ba.Parameters()
-params.add("x", value=-1.2, min=-5.0, max=5.0, step=0.01)
-params.add("y", value=1.0, min=-5.0, max=5.0, step=0.01)
-
-minimizer = ba.Minimizer()
-result = minimizer.minimize(rosenbrock, params)
-print(result.toString())
diff --git a/hugo/static/files/python/fitting/ex01_BasicExamples/consecutive_fitting.py b/hugo/static/files/python/fitting/ex01_BasicExamples/consecutive_fitting.py
deleted file mode 100644
index 8cea4c6a79fcdfcdce36a8b63fdf9330d3926c7f..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/fitting/ex01_BasicExamples/consecutive_fitting.py
+++ /dev/null
@@ -1,116 +0,0 @@
-#!/usr/bin/env python3
-"""
-Fitting example: running one fit after another using different minimizers.
-
-During the first fit Genetic minimizer will be used to scan large parameter
-space and roughly find local minimum. The second Minuit2 minimizer will continue
-after that to find precise minimum location.
-"""
-
-import numpy as np
-from matplotlib import pyplot as plt
-import bornagain as ba
-from bornagain import deg, angstrom, nm
-
-
-def get_sample(params):
-    """
-    Returns a sample with uncorrelated cylinders and pyramids on a substrate.
-    """
-    radius = params["radius"]
-    height = params["height"]
-
-    m_vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-    m_substrate = ba.HomogeneousMaterial("Substrate", 6e-6, 2e-8)
-    m_particle = ba.HomogeneousMaterial("Particle", 6e-4, 2e-8)
-
-    cylinder_ff = ba.FormFactorCylinder(radius, height)
-    cylinder = ba.Particle(m_particle, cylinder_ff)
-
-    layout = ba.ParticleLayout()
-    layout.addParticle(cylinder)
-
-    vacuum_layer = ba.Layer(m_vacuum)
-    vacuum_layer.addLayout(layout)
-
-    substrate_layer = ba.Layer(m_substrate, 0)
-    multi_layer = ba.MultiLayer()
-    multi_layer.addLayer(vacuum_layer)
-    multi_layer.addLayer(substrate_layer)
-    return multi_layer
-
-
-def get_simulation(params):
-    """
-    Returns a GISAXS simulation with beam and detector defined.
-    """
-    simulation = ba.ScatteringSimulation()
-    simulation.setDetectorParameters(100, 0, 2*deg, 100, 0, 2*deg)
-    simulation.setBeamParameters(1*angstrom, 0.2*deg, 0)
-    simulation.beam().setIntensity(1e+08)
-    simulation.setSample(get_sample(params))
-    return simulation
-
-
-def create_real_data():
-    """
-    Generating "real" data by adding noise to the simulated data.
-    """
-    params = {'radius': 5*nm, 'height': 5*nm}
-
-    simulation = get_simulation(params)
-    simulation.runSimulation()
-
-    # retrieving simulated data in the form of numpy array
-    real_data = simulation.result().array()
-
-    # spoiling simulated data with the noise to produce "real" data
-    noise_factor = 0.1
-    noisy = np.random.normal(real_data, noise_factor*np.sqrt(real_data))
-    noisy[noisy < 0.1] = 0.1
-    return noisy
-
-
-def run_fitting():
-    """
-    main function to run fitting
-    """
-    real_data = create_real_data()
-
-    fit_objective = ba.FitObjective()
-    fit_objective.addSimulationAndData(get_simulation, real_data, 1)
-    fit_objective.initPrint(10)
-    fit_objective.initPlot(10)
-    """
-    Setting fitting parameters with starting values.
-    Here we select starting values being quite far from true values
-    to puzzle our minimizer's as much as possible.
-    """
-    params = ba.Parameters()
-    params.add("height", 1.*nm, min=0.01, max=30, step=0.05*nm)
-    params.add("radius", 20.*nm, min=0.01, max=30, step=0.05*nm)
-    """
-    Now we run first minimization round using the Genetic minimizer.
-    The Genetic minimizer is able to explore large parameter space
-    without being trapped by some local minimum.
-    """
-    minimizer = ba.Minimizer()
-    minimizer.setMinimizer("Genetic", "", "MaxIterations=2;RandomSeed=1")
-    result = minimizer.minimize(fit_objective.evaluate, params)
-    fit_objective.finalize(result)
-
-    best_params_so_far = result.parameters()
-    """
-    Second fit will use another minimizer.
-    It starts from best parameters found in previous minimization
-    and then continues until fit converges.
-    """
-    minimizer.setMinimizer("Minuit2", "Migrad")
-    result = minimizer.minimize(fit_objective.evaluate, best_params_so_far)
-
-    fit_objective.finalize(result)
-
-
-if __name__ == '__main__':
-    run_fitting()
-    plt.show()
diff --git a/hugo/static/files/python/fitting/ex01_BasicExamples/minimizer_settings.py b/hugo/static/files/python/fitting/ex01_BasicExamples/minimizer_settings.py
deleted file mode 100644
index a0d72845afd9692908f1af1c8fe942c0a3f8dcbd..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/fitting/ex01_BasicExamples/minimizer_settings.py
+++ /dev/null
@@ -1,130 +0,0 @@
-#!/usr/bin/env python3
-"""
-Fitting example: running same fit using various minimizer and their settings.
-"""
-import bornagain as ba
-from bornagain import deg, angstrom, nm
-
-
-def get_sample(params):
-    """
-    Returns a sample with uncorrelated cylinders and prisms on a substrate.
-    """
-    cylinder_height = params["cylinder_height"]
-    cylinder_radius = params["cylinder_radius"]
-    prism_height = params["prism_height"]
-    prism_base_edge = params["prism_base_edge"]
-
-    # defining materials
-    m_vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-    m_substrate = ba.HomogeneousMaterial("Substrate", 6e-6, 2e-8)
-    m_particle = ba.HomogeneousMaterial("Particle", 6e-4, 2e-8)
-
-    # collection of particles
-    cylinder_ff = ba.FormFactorCylinder(cylinder_radius, cylinder_height)
-    cylinder = ba.Particle(m_particle, cylinder_ff)
-    prism_ff = ba.FormFactorPrism3(prism_base_edge, prism_height)
-    prism = ba.Particle(m_particle, prism_ff)
-    layout = ba.ParticleLayout()
-    layout.addParticle(cylinder, 0.5)
-    layout.addParticle(prism, 0.5)
-    interference = ba.InterferenceFunctionNone()
-    layout.setInterferenceFunction(interference)
-
-    # vacuum layer with particles and substrate form multi layer
-    vacuum_layer = ba.Layer(m_vacuum)
-    vacuum_layer.addLayout(layout)
-    substrate_layer = ba.Layer(m_substrate, 0)
-    multi_layer = ba.MultiLayer()
-    multi_layer.addLayer(vacuum_layer)
-    multi_layer.addLayer(substrate_layer)
-    return multi_layer
-
-
-def get_simulation(params):
-    """
-    Returns a GISAXS simulation with beam and detector defined
-    """
-    simulation = ba.ScatteringSimulation()
-    simulation.setDetectorParameters(100, -1*deg, 1*deg, 100, 0, 2*deg)
-    simulation.setBeamParameters(1*angstrom, 0.2*deg, 0)
-    simulation.beam().setIntensity(1e+08)
-    simulation.setSample(get_sample(params))
-    return simulation
-
-
-def create_real_data():
-    """
-    Generating "real" data from simulated image with default parameters.
-    """
-
-    params = {
-        'cylinder_height': 5*nm,
-        'cylinder_radius': 5*nm,
-        'prism_height': 5*nm,
-        'prism_base_edge': 5*nm
-    }
-
-    simulation = get_simulation(params)
-    simulation.runSimulation()
-
-    return simulation.result().array()
-
-
-def run_fitting():
-    """
-    main function to run fitting
-    """
-
-    real_data = create_real_data()
-
-    # prints info about available minimizers
-    print(ba.MinimizerFactory().catalogToString())
-
-    # prints detailed info about available minimizers and their options
-    print(ba.MinimizerFactory().catalogDetailsToString())
-
-    fit_objective = ba.FitObjective()
-    fit_objective.addSimulationAndData(get_simulation, real_data, 1)
-    fit_objective.initPrint(10)
-
-    params = ba.Parameters()
-    params.add("cylinder_height", 4.*nm, min=0.01)
-    params.add("cylinder_radius", 6.*nm, min=0.01)
-    params.add("prism_height", 4.*nm, min=0.01)
-    params.add("prism_base_edge", 12.*nm, min=0.01)
-
-    minimizer = ba.Minimizer()
-
-    # Uncomment one of the line below to adjust minimizer settings
-    """
-    Setting Minuit2 minimizer with Migrad algorithm, limiting number of iterations.
-    Minimization will try to respect MaxFunctionCalls value.
-    """
-    # minimizer.setMinimizer("Minuit2", "Migrad", "MaxFunctionCalls=50")
-    """
-    Setting two options at once.
-    Strategy=2 promises more accurate fit.    
-    """
-    # minimizer.setMinimizer("Minuit2", "Migrad", "MaxFunctionCalls=500;Strategy=2")
-    """
-    Setting Minuit2 minimizer with Fumili algorithm.
-    """
-    # minimizer.setMinimizer("Minuit2", "Fumili")
-    """
-    Setting Levenberg-Marquardt algorithm.
-    """
-    # minimizer.setMinimizer("GSLLMA")
-
-    result = minimizer.minimize(fit_objective.evaluate_residuals, params)
-
-    fit_objective.finalize(result)
-
-    print("Fitting completed.")
-    print("chi2:", result.minValue())
-    for fitPar in result.parameters():
-        print(fitPar.name(), fitPar.value, fitPar.error)
-
-
-if __name__ == '__main__':
-    run_fitting()
diff --git a/hugo/static/files/python/fitting/ex02_AdvancedExamples/find_background.py b/hugo/static/files/python/fitting/ex02_AdvancedExamples/find_background.py
deleted file mode 100644
index 6478ddb9a5b2939a1c3ef03912c0799715450cd7..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/fitting/ex02_AdvancedExamples/find_background.py
+++ /dev/null
@@ -1,108 +0,0 @@
-#!/usr/bin/env python3
-"""
-Fitting example: looking for background and scale factors.
-
-Real data contains some "unknown" background and scale factor.
-In the fit we are trying to find cylinder radius and height,
-scale and background factors.
-"""
-
-import numpy as np
-from matplotlib import pyplot as plt
-import bornagain as ba
-from bornagain import deg, angstrom, nm
-
-
-def get_sample(params):
-    """
-    Build the sample representing cylinders on top of substrate without interference.
-    """
-    radius = params["radius"]
-    height = params["height"]
-
-    m_vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-    m_substrate = ba.HomogeneousMaterial("Substrate", 6e-6, 2e-8)
-    m_particle = ba.HomogeneousMaterial("Particle", 6e-4, 2e-8)
-
-    cylinder_ff = ba.FormFactorCylinder(radius, height)
-    cylinder = ba.Particle(m_particle, cylinder_ff)
-
-    layout = ba.ParticleLayout()
-    layout.addParticle(cylinder)
-
-    vacuum_layer = ba.Layer(m_vacuum)
-    vacuum_layer.addLayout(layout)
-
-    substrate_layer = ba.Layer(m_substrate, 0)
-    multi_layer = ba.MultiLayer()
-    multi_layer.addLayer(vacuum_layer)
-    multi_layer.addLayer(substrate_layer)
-    return multi_layer
-
-
-def get_simulation(params):
-    """
-    Create and return GISAXS simulation with beam and detector defined
-    """
-    background = params["background"]
-    scale = params["scale"]
-
-    simulation = ba.ScatteringSimulation()
-    simulation.setDetectorParameters(100, -1*deg, 1*deg, 100, 0, 2*deg)
-    simulation.setBeamParameters(1*angstrom, 0.2*deg, 0)
-    simulation.beam().setIntensity(1e12*scale)
-    simulation.setBackground(ba.ConstantBackground(background))
-    simulation.setSample(get_sample(params))
-
-    return simulation
-
-
-def create_real_data():
-    """
-    Generating "real" data by adding noise, background and scale
-    to the simulated data.
-    Cylinder radius is set to 5nm, cylinder height to 10nm.
-    During the fit we will try to find cylinder height and radius and
-    scale, background factors.
-    """
-
-    params = {
-        'radius': 5*nm,
-        'height': 10*nm,
-        'scale': 2,
-        'background': 1000
-    }
-
-    simulation = get_simulation(params)
-    simulation.runSimulation()
-
-    # retrieving simulated data in the form of numpy array
-    return simulation.result().array()
-
-
-def run_fitting():
-    """
-    main function to run fitting
-    """
-    real_data = create_real_data()
-
-    fit_objective = ba.FitObjective()
-    fit_objective.addSimulationAndData(get_simulation, real_data, 1)
-
-    fit_objective.initPrint(10)
-    fit_objective.initPlot(10)
-
-    params = ba.Parameters()
-    params.add("radius", 5.*nm, vary=False)
-    params.add("height", 9.*nm, min=8.*nm, max=12.*nm)
-    params.add("scale", 1.5, min=1, max=3)
-    params.add("background", 200, min=100, max=2000, step=100)
-
-    minimizer = ba.Minimizer()
-    result = minimizer.minimize(fit_objective.evaluate, params)
-    fit_objective.finalize(result)
-
-
-if __name__ == '__main__':
-    run_fitting()
-    plt.show()
diff --git a/hugo/static/files/python/fitting/ex02_AdvancedExamples/fit_along_slices.py b/hugo/static/files/python/fitting/ex02_AdvancedExamples/fit_along_slices.py
deleted file mode 100644
index f45810a8564ff1a325d9fe0a6abf50db717bde29..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/fitting/ex02_AdvancedExamples/fit_along_slices.py
+++ /dev/null
@@ -1,209 +0,0 @@
-#!/usr/bin/env python3
-"""
-Fitting example: fit along slices
-"""
-
-from matplotlib import pyplot as plt
-import bornagain as ba
-from bornagain import deg, angstrom, nm, ba_plot
-
-phi_slice_value = 0.0  # position of vertical slice in deg
-alpha_slice_value = 0.2  # position of horizontal slice in deg
-
-
-def get_sample(params):
-    """
-    Returns a sample with uncorrelated cylinders on a substrate.
-    """
-    radius = params["radius"]
-    height = params["height"]
-
-    m_vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-    m_substrate = ba.HomogeneousMaterial("Substrate", 6e-6, 2e-8)
-    m_particle = ba.HomogeneousMaterial("Particle", 6e-4, 2e-8)
-
-    cylinder_ff = ba.FormFactorCylinder(radius, height)
-    cylinder = ba.Particle(m_particle, cylinder_ff)
-
-    layout = ba.ParticleLayout()
-    layout.addParticle(cylinder)
-
-    vacuum_layer = ba.Layer(m_vacuum)
-    vacuum_layer.addLayout(layout)
-
-    substrate_layer = ba.Layer(m_substrate, 0)
-    multi_layer = ba.MultiLayer()
-    multi_layer.addLayer(vacuum_layer)
-    multi_layer.addLayer(substrate_layer)
-    return multi_layer
-
-
-def get_simulation(params, add_masks=True):
-    """
-    Create and return GISAXS simulation with beam and detector defined
-    """
-    simulation = ba.ScatteringSimulation()
-    simulation.setDetectorParameters(100, -1*deg, 1*deg, 100, 0, 2*deg)
-    simulation.setBeamParameters(1*angstrom, 0.2*deg, 0)
-    simulation.beam().setIntensity(1e+08)
-    simulation.setSample(get_sample(params))
-    if add_masks:
-        """
-        At this point we mask all the detector and then unmask two areas
-        corresponding to the vertical and horizontal lines. This will make
-        simulation/fitting to be performed along slices only.
-        """
-        simulation.maskAll()
-        simulation.addMask(ba.HorizontalLine(alpha_slice_value*deg), False)
-        simulation.addMask(ba.VerticalLine(phi_slice_value*deg), False)
-    return simulation
-
-
-def create_real_data():
-    """
-    Generating "real" data by adding noise to the simulated data.
-    """
-    # initial values which we will have to find later during the fit
-    params = {'radius': 5*nm, 'height': 10*nm}
-
-    # retrieving simulated data in the form of numpy array
-    simulation = get_simulation(params, add_masks=False)
-    simulation.setBackground(ba.PoissonBackground())
-    simulation.runSimulation()
-
-    return simulation.result().array()
-
-
-class PlotObserver:
-    """
-    Draws fit progress every nth iteration. Here we plot slices along real
-    and simulated images to see fit progress.
-    """
-    def __init__(self):
-        self.fig = plt.figure(figsize=(10.25, 7.69))
-        self.fig.canvas.draw()
-
-    def __call__(self, fit_objective):
-        self.update(fit_objective)
-
-    @staticmethod
-    def plot_real_data(data):
-        """
-        Plot experimental data as colormap with horizontal/vertical lines
-        representing slices on top.
-        """
-        plt.subplots_adjust(wspace=0.2, hspace=0.2)
-        ba_plot.plot_histogram(data, title="Experimental data")
-        # line representing vertical slice
-        plt.plot([phi_slice_value, phi_slice_value],
-                 [data.getYmin(), data.getYmax()],
-                 color='gray',
-                 linestyle='-',
-                 linewidth=1)
-        # line representing horizontal slice
-        plt.plot([data.getXmin(), data.getXmax()],
-                 [alpha_slice_value, alpha_slice_value],
-                 color='gray',
-                 linestyle='-',
-                 linewidth=1)
-
-    @staticmethod
-    def plot_slices(slices, title):
-        """
-        Plots vertical and horizontal projections.
-        """
-        plt.subplots_adjust(wspace=0.2, hspace=0.3)
-        for label, slice in slices:
-            plt.semilogy(slice.binCenters(),
-                         slice.binValues(),
-                         label=label)
-            plt.xlim(slice.getXmin(), slice.getXmax())
-            plt.ylim(1, slice.getMaximum()*10)
-        plt.legend(loc='upper right')
-        plt.title(title)
-
-    @staticmethod
-    def display_fit_parameters(fit_objective):
-        """
-        Displays fit parameters, chi and iteration number.
-        """
-        plt.title('Parameters')
-        plt.axis('off')
-
-        iteration_info = fit_objective.iterationInfo()
-
-        plt.text(
-            0.01, 0.85, "Iterations  " +
-            '{:d}'.format(iteration_info.iterationCount()))
-        plt.text(0.01, 0.75,
-                 "Chi2       " + '{:8.4f}'.format(iteration_info.chi2()))
-        for index, params in enumerate(iteration_info.parameters()):
-            plt.text(
-                0.01, 0.55 - index*0.1,
-                '{:30.30s}: {:6.3f}'.format(params.name(), params.value))
-
-        plt.tight_layout()
-        plt.draw()
-        plt.pause(0.01)
-
-    def update(self, fit_objective):
-        """
-        Callback to access fit_objective on every n'th iteration.
-        """
-        self.fig.clf()
-
-        real_data = fit_objective.experimentalData().histogram2d()
-        simul_data = fit_objective.simulationResult().histogram2d()
-
-        # plot real data
-        plt.subplot(2, 2, 1)
-        self.plot_real_data(real_data)
-
-        # horizontal slices
-        slices = [("real", real_data.projectionX(alpha_slice_value)),
-                  ("simul", simul_data.projectionX(alpha_slice_value))]
-        title = ("Horizontal slice at alpha =" +
-                 '{:3.1f}'.format(alpha_slice_value))
-        plt.subplot(2, 2, 2)
-        self.plot_slices(slices, title)
-
-        # vertical slices
-        slices = [("real", real_data.projectionY(phi_slice_value)),
-                  ("simul", simul_data.projectionY(phi_slice_value))]
-        title = "Vertical slice at phi =" + '{:3.1f}'.format(
-            phi_slice_value)
-        plt.subplot(2, 2, 3)
-        self.plot_slices(slices, title)
-
-        # display fit parameters
-        plt.subplot(2, 2, 4)
-        self.display_fit_parameters(fit_objective)
-
-
-def run_fitting():
-    """
-    main function to run fitting
-    """
-
-    real_data = create_real_data()
-
-    fit_objective = ba.FitObjective()
-    fit_objective.addSimulationAndData(get_simulation, real_data, 1)
-    fit_objective.initPrint(10)
-
-    # creating custom observer which will draw fit progress
-    plotter = PlotObserver()
-    fit_objective.initPlot(10, plotter)
-
-    params = ba.Parameters()
-    params.add("radius", 6.*nm, min=4, max=8)
-    params.add("height", 9.*nm, min=8, max=12)
-
-    minimizer = ba.Minimizer()
-    result = minimizer.minimize(fit_objective.evaluate, params)
-    fit_objective.finalize(result)
-
-
-if __name__ == '__main__':
-    run_fitting()
-    plt.show()
diff --git a/hugo/static/files/python/fitting/ex02_AdvancedExamples/fit_with_masks.py b/hugo/static/files/python/fitting/ex02_AdvancedExamples/fit_with_masks.py
deleted file mode 100644
index e0b46c03966d0580a943c9560fb91d09c14edcc0..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/fitting/ex02_AdvancedExamples/fit_with_masks.py
+++ /dev/null
@@ -1,134 +0,0 @@
-#!/usr/bin/env python3
-"""
-Fitting example: fit with masks
-"""
-
-import numpy as np
-from matplotlib import pyplot as plt
-import bornagain as ba
-from bornagain import deg, angstrom, nm
-
-
-def get_sample(params):
-    """
-    Build the sample representing cylinders on top of
-    substrate without interference.
-    """
-    radius = params["radius"]
-    height = params["height"]
-
-    m_vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-    m_substrate = ba.HomogeneousMaterial("Substrate", 6e-6, 2e-8)
-    m_particle = ba.HomogeneousMaterial("Particle", 6e-4, 2e-8)
-
-    cylinder_ff = ba.FormFactorCylinder(radius, height)
-    cylinder = ba.Particle(m_particle, cylinder_ff)
-
-    layout = ba.ParticleLayout()
-    layout.addParticle(cylinder)
-
-    vacuum_layer = ba.Layer(m_vacuum)
-    vacuum_layer.addLayout(layout)
-
-    substrate_layer = ba.Layer(m_substrate, 0)
-    multi_layer = ba.MultiLayer()
-    multi_layer.addLayer(vacuum_layer)
-    multi_layer.addLayer(substrate_layer)
-    return multi_layer
-
-
-def get_simulation(params, add_masks=True):
-    """
-    Create and return GISAXS simulation with beam and detector defined
-    """
-    simulation = ba.ScatteringSimulation()
-    simulation.setDetectorParameters(100, -1*deg, 1*deg, 100, 0, 2*deg)
-    simulation.setBeamParameters(1*angstrom, 0.2*deg, 0)
-    simulation.beam().setIntensity(1e+08)
-    simulation.setSample(get_sample(params))
-
-    if add_masks:
-        add_mask_to_simulation(simulation)
-
-    return simulation
-
-
-def create_real_data():
-    """
-    Generating "real" data by adding noise to the simulated data.
-    """
-    params = {'radius': 5*nm, 'height': 10*nm}
-
-    # retrieving simulated data in the form of numpy array
-    simulation = get_simulation(params, add_masks=False)
-    simulation.runSimulation()
-    real_data = simulation.result().array()
-
-    # spoiling simulated data with the noise to produce "real" data
-    noise_factor = 0.1
-    noisy = np.random.normal(real_data, noise_factor*np.sqrt(real_data))
-    noisy[noisy < 0.1] = 0.1
-    return noisy
-
-
-def add_mask_to_simulation(simulation):
-    """
-    Here we demonstrate how to add masks to the simulation.
-    Only unmasked areas will be simulated and then used during the fit.
-
-    Masks can have different geometrical shapes (ba.Rectangle, ba.Ellipse, Line)
-    with the mask value either "True" (detector bin is excluded from the simulation)
-    or False (will be simulated).
-
-    Every subsequent mask overrides previously defined mask in this area.
-
-    In the code below we put masks in such way that simulated image will look like
-    a Pac-Man from ancient arcade game.
-    """
-    # mask all detector (put mask=True to all detector channels)
-    simulation.maskAll()
-
-    # set mask to simulate pacman's head
-    simulation.addMask(ba.Ellipse(0, 1*deg, 0.5*deg, 0.5*deg), False)
-
-    # set mask for pacman's eye
-    simulation.addMask(ba.Ellipse(0.11*deg, 1.25*deg, 0.05*deg, 0.05*deg),
-                       True)
-
-    # set mask for pacman's mouth
-    points = [[0*deg, 1*deg], [0.5*deg, 1.2*deg], [0.5*deg, 0.8*deg],
-              [0*deg, 1*deg]]
-    simulation.addMask(ba.Polygon(points), True)
-
-    # giving pacman something to eat
-    simulation.addMask(
-        ba.Rectangle(0.45*deg, 0.95*deg, 0.55*deg, 1.05*deg), False)
-    simulation.addMask(
-        ba.Rectangle(0.61*deg, 0.95*deg, 0.71*deg, 1.05*deg), False)
-    simulation.addMask(
-        ba.Rectangle(0.75*deg, 0.95*deg, 0.85*deg, 1.05*deg), False)
-
-
-def run_fitting():
-    """
-    main function to run fitting
-    """
-    real_data = create_real_data()
-
-    fit_objective = ba.FitObjective()
-    fit_objective.addSimulationAndData(get_simulation, real_data, 1)
-    fit_objective.initPrint(10)
-    fit_objective.initPlot(10)
-
-    params = ba.Parameters()
-    params.add("radius", 6.*nm, min=4, max=8)
-    params.add("height", 9.*nm, min=8, max=12)
-
-    minimizer = ba.Minimizer()
-    result = minimizer.minimize(fit_objective.evaluate, params)
-    fit_objective.finalize(result)
-
-
-if __name__ == '__main__':
-    run_fitting()
-    plt.show()
diff --git a/hugo/static/files/python/fitting/ex02_AdvancedExamples/multiple_datasets.py b/hugo/static/files/python/fitting/ex02_AdvancedExamples/multiple_datasets.py
deleted file mode 100644
index 4c3d83701bc31b18e75acba34df10553bfad59c7..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/fitting/ex02_AdvancedExamples/multiple_datasets.py
+++ /dev/null
@@ -1,218 +0,0 @@
-#!/usr/bin/env python3
-"""
-Fitting example: simultaneous fit of two datasets
-"""
-
-import numpy as np
-import matplotlib
-from matplotlib import pyplot as plt
-import bornagain as ba
-from bornagain import deg, angstrom, nm
-
-
-def get_sample(params):
-    """
-    Returns a sample with uncorrelated cylinders and pyramids.
-    """
-    radius_a = params["radius_a"]
-    radius_b = params["radius_b"]
-    height = params["height"]
-
-    m_vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-    m_substrate = ba.HomogeneousMaterial("Substrate", 6e-6, 2e-8)
-    m_particle = ba.HomogeneousMaterial("Particle", 6e-4, 2e-8)
-
-    formfactor = ba.FormFactorHemiEllipsoid(radius_a, radius_b, height)
-    particle = ba.Particle(m_particle, formfactor)
-
-    layout = ba.ParticleLayout()
-    layout.addParticle(particle)
-
-    vacuum_layer = ba.Layer(m_vacuum)
-    vacuum_layer.addLayout(layout)
-
-    substrate_layer = ba.Layer(m_substrate)
-    multi_layer = ba.MultiLayer()
-    multi_layer.addLayer(vacuum_layer)
-    multi_layer.addLayer(substrate_layer)
-    return multi_layer
-
-
-def get_simulation(params):
-    """
-    Returns a GISAXS simulation with beam and detector defined.
-    """
-    incident_angle = params["incident_angle"]
-
-    simulation = ba.ScatteringSimulation()
-    simulation.setDetectorParameters(50, -1.5*deg, 1.5*deg, 50, 0, 2*deg)
-    simulation.setBeamParameters(1*angstrom, incident_angle, 0)
-    simulation.beam().setIntensity(1e+08)
-    simulation.setSample(get_sample(params))
-    return simulation
-
-
-def simulation1(params):
-    params["incident_angle"] = 0.1*deg
-    return get_simulation(params)
-
-
-def simulation2(params):
-    params["incident_angle"] = 0.4*deg
-    return get_simulation(params)
-
-
-def create_real_data(incident_alpha):
-    """
-    Generating "real" data by adding noise to the simulated data.
-    """
-    params = {
-        'radius_a': 5*nm,
-        'radius_b': 6*nm,
-        'height': 8*nm,
-        "incident_angle": incident_alpha
-    }
-
-    simulation = get_simulation(params)
-    simulation.runSimulation()
-
-    # retrieving simulated data in the form of numpy array
-    real_data = simulation.result().array()
-
-    # spoiling simulated data with the noise to produce "real" data
-    noise_factor = 0.1
-    noisy = np.random.normal(real_data, noise_factor*np.sqrt(real_data))
-    noisy[noisy < 0.1] = 0.1
-    return noisy
-
-
-class PlotObserver():
-    """
-    Draws fit progress every nth iteration. Real data, simulated data
-    and chi2 map will be shown for both datasets.
-    """
-    def __init__(self):
-        self.fig = plt.figure(figsize=(12.8, 10.24))
-        self.fig.canvas.draw()
-
-    def __call__(self, fit_objective):
-        self.update(fit_objective)
-
-    @staticmethod
-    def plot_dataset(fit_objective, canvas):
-        for i_dataset in range(0, fit_objective.fitObjectCount()):
-            real_data = fit_objective.experimentalData(i_dataset)
-            simul_data = fit_objective.simulationResult(i_dataset)
-            chi2_map = fit_objective.relativeDifference(i_dataset)
-
-            zmax = real_data.histogram2d().getMaximum()
-
-            plt.subplot(canvas[i_dataset*3])
-            ba.plot_colormap(real_data,
-                             title="\"Real\" data - #" +
-                             str(i_dataset + 1),
-                             zmin=1,
-                             zmax=zmax,
-                             zlabel="")
-            plt.subplot(canvas[1 + i_dataset*3])
-            ba.plot_colormap(simul_data,
-                             title="Simulated data - #" +
-                             str(i_dataset + 1),
-                             zmin=1,
-                             zmax=zmax,
-                             zlabel="")
-            plt.subplot(canvas[2 + i_dataset*3])
-            ba.plot_colormap(chi2_map,
-                             title="Chi2 map - #" + str(i_dataset + 1),
-                             zmin=0.001,
-                             zmax=10,
-                             zlabel="")
-
-    @staticmethod
-    def display_fit_parameters(fit_objective):
-        """
-        Displays fit parameters, chi and iteration number.
-        """
-        plt.title('Parameters')
-        plt.axis('off')
-
-        iteration_info = fit_objective.iterationInfo()
-
-        plt.text(
-            0.01, 0.85, "Iterations  " +
-            '{:d}'.format(iteration_info.iterationCount()))
-        plt.text(0.01, 0.75,
-                 "Chi2       " + '{:8.4f}'.format(iteration_info.chi2()))
-        for index, params in enumerate(iteration_info.parameters()):
-            plt.text(
-                0.01, 0.55 - index*0.1,
-                '{:30.30s}: {:6.3f}'.format(params.name(), params.value))
-
-    @staticmethod
-    def plot_fit_parameters(fit_objective):
-        """
-        Displays fit parameters, chi and iteration number.
-        """
-        plt.axis('off')
-
-        iteration_info = fit_objective.iterationInfo()
-
-        plt.text(
-            0.01, 0.95, "Iterations  " +
-            '{:d}'.format(iteration_info.iterationCount()))
-        plt.text(0.01, 0.70,
-                 "Chi2       " + '{:8.4f}'.format(iteration_info.chi2()))
-        for index, params in enumerate(iteration_info.parameters()):
-            plt.text(
-                0.01, 0.30 - index*0.3,
-                '{:30.30s}: {:6.3f}'.format(params.name(), params.value))
-
-    def update(self, fit_objective):
-        self.fig.clf()
-
-        # we divide figure to have 3x3 subplots, with two first rows occupying
-        # most of the space
-        canvas = matplotlib.gridspec.GridSpec(3,
-                                              3,
-                                              width_ratios=[1, 1, 1],
-                                              height_ratios=[4, 4, 1])
-        canvas.update(left=0.05, right=0.95, hspace=0.5, wspace=0.2)
-
-        self.plot_dataset(fit_objective, canvas)
-        plt.subplot(canvas[6:])
-        self.plot_fit_parameters(fit_objective)
-
-        plt.draw()
-        plt.pause(0.01)
-
-
-def run_fitting():
-    """
-    main function to run fitting
-    """
-
-    data1 = create_real_data(0.1*deg)
-    data2 = create_real_data(0.4*deg)
-
-    fit_objective = ba.FitObjective()
-    fit_objective.addSimulationAndData(simulation1, data1, 1)
-    fit_objective.addSimulationAndData(simulation2, data2, 1)
-    fit_objective.initPrint(10)
-
-    # creating custom observer which will draw fit progress
-    plotter = PlotObserver()
-    fit_objective.initPlot(10, plotter.update)
-
-    params = ba.Parameters()
-    params.add("radius_a", 4.*nm, min=2, max=10)
-    params.add("radius_b", 6.*nm, vary=False)
-    params.add("height", 4.*nm, min=2, max=10)
-
-    minimizer = ba.Minimizer()
-    result = minimizer.minimize(fit_objective.evaluate, params)
-    fit_objective.finalize(result)
-
-
-if __name__ == '__main__':
-    run_fitting()
-    plt.show()
diff --git a/hugo/static/files/python/fitting/ex03_ExtendedExamples/custom_objective_function/custom_objective_function.py b/hugo/static/files/python/fitting/ex03_ExtendedExamples/custom_objective_function/custom_objective_function.py
deleted file mode 100644
index 825ebbb28b9564ec41c7952d9529efb6f4b86859..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/fitting/ex03_ExtendedExamples/custom_objective_function/custom_objective_function.py
+++ /dev/null
@@ -1,123 +0,0 @@
-#!/usr/bin/env python3
-"""
-Using custom objective function to fit GISAS data.
-
-In this example objective function returns vector of residuals computed from
-the data and simulation after applying sqrt() to intensity values.
-"""
-
-import numpy as np
-from matplotlib import pyplot as plt
-import bornagain as ba
-from bornagain import deg, angstrom, nm
-
-
-class MyObjective(ba.FitObjective):
-    """
-    FitObjective extension for custom fitting metric.
-    """
-    def __init__(self):
-        super(MyObjective, self).__init__()
-
-    def evaluate_residuals(self, params):
-        """
-        Provides custom calculation of vector of residuals
-        """
-        # calling parent's evaluate functions to run simulations
-        super(MyObjective, self).evaluate(params)
-
-        # accessing simulated and experimental data as flat numpy arrays
-        # applying sqrt to every element
-        sim = np.sqrt(np.asarray(self.simulation_array()))
-        exp = np.sqrt(np.asarray(self.experimental_array()))
-
-        # return vector of residuals
-        return sim - exp
-
-
-def get_sample(params):
-    """
-    Returns a sample with cylinders and pyramids on a substrate,
-    forming a hexagonal lattice.
-    """
-    radius = params['radius']
-    lattice_length = params['length']
-
-    m_vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-    m_substrate = ba.HomogeneousMaterial("Substrate", 6e-6, 2e-8)
-    m_particle = ba.HomogeneousMaterial("Particle", 6e-4, 2e-8)
-
-    sphere_ff = ba.FormFactorFullSphere(radius)
-    sphere = ba.Particle(m_particle, sphere_ff)
-    particle_layout = ba.ParticleLayout()
-    particle_layout.addParticle(sphere)
-
-    interference = ba.InterferenceFunction2DLattice(
-        ba.HexagonalLattice2D(lattice_length))
-    pdf = ba.FTDecayFunction2DCauchy(10*nm, 10*nm, 0)
-    interference.setDecayFunction(pdf)
-
-    particle_layout.setInterferenceFunction(interference)
-
-    vacuum_layer = ba.Layer(m_vacuum)
-    vacuum_layer.addLayout(particle_layout)
-    substrate_layer = ba.Layer(m_substrate, 0)
-    multi_layer = ba.MultiLayer()
-    multi_layer.addLayer(vacuum_layer)
-    multi_layer.addLayer(substrate_layer)
-    return multi_layer
-
-
-def get_simulation(params):
-    """
-    Create and return GISAXS simulation with beam and detector defined.
-    """
-    simulation = ba.ScatteringSimulation()
-    simulation.setDetectorParameters(100, -1*deg, 1*deg, 100, 0, 2*deg)
-    simulation.setBeamParameters(1*angstrom, 0.2*deg, 0)
-    simulation.beam().setIntensity(1e+08)
-    simulation.setSample(get_sample(params))
-    return simulation
-
-
-def create_real_data():
-    """
-    Generating "real" data by adding noise to the simulated data.
-    """
-    params = {'radius': 6*nm, 'length': 12*nm}
-    simulation = get_simulation(params)
-    simulation.runSimulation()
-
-    # retrieving simulated data in the form of numpy array
-    real_data = simulation.result().array()
-
-    # spoiling simulated data with noise to produce "real" data
-    np.random.seed(0)
-    noise_factor = 0.1
-    noisy = np.random.normal(real_data, noise_factor*np.sqrt(real_data))
-    noisy[noisy < 0.1] = 0.1
-    return noisy
-
-
-def run_fitting():
-    """
-    Runs fitting.
-    """
-    real_data = create_real_data()
-
-    objective = MyObjective()
-    objective.addSimulationAndData(get_simulation, real_data, 1)
-    objective.initPrint(10)
-
-    params = ba.Parameters()
-    params.add('radius', value=7*nm, min=5*nm, max=8*nm)
-    params.add('length', value=10*nm, min=8*nm, max=14*nm)
-
-    minimizer = ba.Minimizer()
-    result = minimizer.minimize(objective.evaluate_residuals, params)
-    objective.finalize(result)
-
-
-if __name__ == '__main__':
-    run_fitting()
-    plt.show()
diff --git a/hugo/static/files/python/fitting/ex03_ExtendedExamples/experiment_at_galaxi/fit_galaxi_data.py b/hugo/static/files/python/fitting/ex03_ExtendedExamples/experiment_at_galaxi/fit_galaxi_data.py
deleted file mode 100644
index aa2a48e40d0c58a6866d8d941acd8014c0481d80..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/fitting/ex03_ExtendedExamples/experiment_at_galaxi/fit_galaxi_data.py
+++ /dev/null
@@ -1,79 +0,0 @@
-#!/usr/bin/env python3
-"""
-Fitting experimental data: spherical nanoparticles with size distribution
-in 3 layers system (experiment at GALAXI).
-"""
-import bornagain as ba
-from bornagain import nm as nm
-from sample_builder import SampleBuilder
-
-wavelength = 1.34*ba.angstrom
-alpha_i = 0.463*ba.deg
-
-# detector setup as given from instrument responsible
-pilatus_npx, pilatus_npy = 981, 1043
-pilatus_pixel_size = 0.172  # in mm
-detector_distance = 1730.0  # in mm
-beam_xpos, beam_ypos = 597.1, 323.4  # in pixels
-
-
-def create_detector():
-    """
-    Returns a model of the GALAXY detector
-    """
-    u0 = beam_xpos*pilatus_pixel_size  # in mm
-    v0 = beam_ypos*pilatus_pixel_size  # in mm
-    detector = ba.RectangularDetector(pilatus_npx,
-                                      pilatus_npx*pilatus_pixel_size,
-                                      pilatus_npy,
-                                      pilatus_npy*pilatus_pixel_size)
-    detector.setPerpendicularToDirectBeam(detector_distance, u0, v0)
-    return detector
-
-
-def create_simulation(params):
-    """
-    Creates and returns GISAS simulation with beam and detector defined
-    """
-    simulation = ba.ScatteringSimulation()
-    simulation.setDetector(create_detector())
-    simulation.setBeamParameters(wavelength, alpha_i, 0)
-    simulation.beam().setIntensity(1.2e7)
-    simulation.setRegionOfInterest(85, 70, 120, 92.)
-    simulation.addMask(ba.Rectangle(101.9, 82.1, 103.7, 85.2),
-                       True)  # beamstop
-
-    sample_builder = SampleBuilder()
-    sample = sample_builder.create_sample(params)
-    simulation.setSample(sample)
-
-    return simulation
-
-
-def load_real_data(filename="galaxi_data.tif.gz"):
-    """
-    Loads experimental data and returns numpy array.
-    """
-    return ba.IntensityDataIOFactory.readIntensityData(filename).array()
-
-
-def run_fitting():
-    real_data = load_real_data()
-
-    fit_objective = ba.FitObjective()
-    fit_objective.addSimulationAndData(create_simulation, real_data, 1)
-    fit_objective.initPrint(10)
-    fit_objective.initPlot(10)
-
-    params = ba.Parameters()
-    params.add("radius", 5.*nm, min=4, max=6, step=0.1*nm)
-    params.add("sigma", 0.55, min=0.2, max=0.8, step=0.01)
-    params.add("distance", 27.*nm, min=20, max=70)
-
-    minimizer = ba.Minimizer()
-    result = minimizer.minimize(fit_objective.evaluate, params)
-    fit_objective.finalize(result)
-
-
-if __name__ == '__main__':
-    run_fitting()
diff --git a/hugo/static/files/python/fitting/ex03_ExtendedExamples/experiment_at_galaxi/galaxi_data.tif.gz b/hugo/static/files/python/fitting/ex03_ExtendedExamples/experiment_at_galaxi/galaxi_data.tif.gz
deleted file mode 100644
index 807360b89d18b1894f13f52d23103bf699d08ba7..0000000000000000000000000000000000000000
Binary files a/hugo/static/files/python/fitting/ex03_ExtendedExamples/experiment_at_galaxi/galaxi_data.tif.gz and /dev/null differ
diff --git a/hugo/static/files/python/fitting/ex03_ExtendedExamples/experiment_at_galaxi/sample_builder.py b/hugo/static/files/python/fitting/ex03_ExtendedExamples/experiment_at_galaxi/sample_builder.py
deleted file mode 100644
index 2682dca5326a0b1247576de6fa8c36ae8deee464..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/fitting/ex03_ExtendedExamples/experiment_at_galaxi/sample_builder.py
+++ /dev/null
@@ -1,98 +0,0 @@
-#!/usr/bin/env python3
-"""
-3 layers system (substrate, teflon, air).
-Vacuum layer is populated with spheres with size distribution.
-"""
-import bornagain as ba
-
-
-class SampleBuilder:
-    """
-    Builds complex sample from set of parameters.
-    """
-    def __init__(self):
-        """
-        Init SampleBuilder with default sample parameters.
-        """
-        self.radius = 5.75*ba.nm
-        self.sigma = 0.4
-        self.distance = 53.6*ba.nm
-        self.disorder = 10.5*ba.nm
-        self.kappa = 17.5
-        self.ptfe_thickness = 22.1*ba.nm
-        self.hmdso_thickness = 18.5*ba.nm
-
-    def create_sample(self, params):
-        """
-        Create sample from given set of parameters.
-
-        Args:
-            params: A dictionary containing parameter map.
-
-        Returns:
-            A multi layer.
-        """
-        self.radius = params["radius"]
-        self.sigma = params["sigma"]
-        self.distance = params["distance"]
-        return self.multilayer()
-
-    def multilayer(self):
-        """
-        Constructs the sample from current parameter values.
-        """
-
-        # defining materials
-        m_vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-        m_Si = ba.HomogeneousMaterial("Si", 5.7816e-6, 1.0229e-7)
-        m_Ag = ba.HomogeneousMaterial("Ag", 2.2475e-5, 1.6152e-6)
-        m_PTFE = ba.HomogeneousMaterial("PTFE", 5.20509e-6, 1.9694e-8)
-        m_HMDSO = ba.HomogeneousMaterial("HMDSO", 2.0888e-6, 1.3261e-8)
-
-        # collection of particles with size distribution
-        nparticles = 20
-        nfwhm = 2.0
-        sphere_ff = ba.FormFactorFullSphere(self.radius)
-
-        sphere = ba.Particle(m_Ag, sphere_ff)
-        position = ba.kvector_t(0, 0, -1*self.hmdso_thickness)
-        sphere.setPosition(position)
-        ln_distr = ba.DistributionLogNormal(self.radius, self.sigma)
-        par_distr = ba.ParameterDistribution(
-            "/Particle/FullSphere/Radius", ln_distr, nparticles, nfwhm,
-            ba.RealLimits.limited(0, self.hmdso_thickness/2))
-        part_coll = ba.ParticleDistribution(sphere, par_distr)
-
-        # interference function
-        interference = ba.InterferenceFunctionRadialParaCrystal(
-            self.distance, 1e6*ba.nm)
-        interference.setKappa(self.kappa)
-        interference.setDomainSize(2e4*nm)
-        pdf = ba.FTDistribution1DGauss(self.disorder)
-        interference.setProbabilityDistribution(pdf)
-
-        # assembling particle layout
-        layout = ba.ParticleLayout()
-        layout.addParticle(part_coll, 1)
-        layout.setInterferenceFunction(interference)
-        layout.setTotalParticleSurfaceDensity(1)
-
-        # roughness
-        r_ptfe = ba.LayerRoughness(2.3*ba.nm, 0.3, 5*ba.nm)
-        r_hmdso = ba.LayerRoughness(1.1*ba.nm, 0.3, 5*ba.nm)
-
-        # layers
-        vacuum_layer = ba.Layer(m_vacuum)
-        hmdso_layer = ba.Layer(m_HMDSO, self.hmdso_thickness)
-        hmdso_layer.addLayout(layout)
-        ptfe_layer = ba.Layer(m_PTFE, self.ptfe_thickness)
-        substrate_layer = ba.Layer(m_Si)
-
-        # assembling multilayer
-        multi_layer = ba.MultiLayer()
-        multi_layer.addLayer(vacuum_layer)
-        multi_layer.addLayerWithTopRoughness(hmdso_layer, r_hmdso)
-        multi_layer.addLayerWithTopRoughness(ptfe_layer, r_ptfe)
-        multi_layer.addLayer(substrate_layer)
-
-        return multi_layer
diff --git a/hugo/static/files/python/fitting/ex03_ExtendedExamples/external_minimizer/lmfit_basics.py b/hugo/static/files/python/fitting/ex03_ExtendedExamples/external_minimizer/lmfit_basics.py
deleted file mode 100644
index 5c77da6ba2fba8295193bf5ec4eaa763fbd812ff..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/fitting/ex03_ExtendedExamples/external_minimizer/lmfit_basics.py
+++ /dev/null
@@ -1,99 +0,0 @@
-#!/usr/bin/env python3
-"""
-External minimize: using lmfit minimizers for BornAgain fits.
-"""
-import numpy as np
-from matplotlib import pyplot as plt
-import bornagain as ba
-from bornagain import deg, angstrom, nm
-import lmfit
-
-
-def get_sample(params):
-    """
-    Returns a sample with cylinders and pyramids on a substrate,
-    forming a hexagonal lattice.
-    """
-    radius = params['radius']
-    lattice_length = params['length']
-
-    m_vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-    m_substrate = ba.HomogeneousMaterial("Substrate", 6e-6, 2e-8)
-    m_particle = ba.HomogeneousMaterial("Particle", 6e-4, 2e-8)
-
-    sphere_ff = ba.FormFactorFullSphere(radius)
-    sphere = ba.Particle(m_particle, sphere_ff)
-    particle_layout = ba.ParticleLayout()
-    particle_layout.addParticle(sphere)
-
-    interference = ba.InterferenceFunction2DLattice(
-        ba.HexagonalLattice2D(lattice_length))
-    pdf = ba.FTDecayFunction2DCauchy(10*nm, 10*nm, 0)
-    interference.setDecayFunction(pdf)
-
-    particle_layout.setInterferenceFunction(interference)
-
-    vacuum_layer = ba.Layer(m_vacuum)
-    vacuum_layer.addLayout(particle_layout)
-    substrate_layer = ba.Layer(m_substrate, 0)
-    multi_layer = ba.MultiLayer()
-    multi_layer.addLayer(vacuum_layer)
-    multi_layer.addLayer(substrate_layer)
-    return multi_layer
-
-
-def get_simulation(params):
-    """
-    Create and return GISAXS simulation with beam and detector defined
-    """
-    simulation = ba.ScatteringSimulation()
-    simulation.setDetectorParameters(100, -1*deg, 1*deg, 100, 0, 2*deg)
-    simulation.setBeamParameters(1*angstrom, 0.2*deg, 0)
-    simulation.beam().setIntensity(1e+08)
-    simulation.setSample(get_sample(params))
-    return simulation
-
-
-def create_real_data():
-    """
-    Generating "real" data by adding noise to the simulated data.
-    """
-    params = {'radius': 6*nm, 'length': 12*nm}
-    simulation = get_simulation(params)
-    simulation.runSimulation()
-
-    # retrieving simulated data in the form of numpy array
-    real_data = simulation.result().array()
-
-    # spoiling simulated data with noise to produce "real" data
-    np.random.seed(0)
-    noise_factor = 0.1
-    noisy = np.random.normal(real_data, noise_factor*np.sqrt(real_data))
-    noisy[noisy < 0.1] = 0.1
-    return noisy
-
-
-def run_fitting():
-    """
-    main function to run fitting
-    """
-    real_data = create_real_data()
-
-    fit_objective = ba.FitObjective()
-    fit_objective.addSimulationAndData(get_simulation, real_data, 1)
-    fit_objective.initPrint(10)
-
-    params = lmfit.Parameters()
-    params.add('radius', value=7*nm, min=5*nm, max=8*nm)
-    params.add('length', value=10*nm, min=8*nm, max=14*nm)
-
-    result = lmfit.minimize(fit_objective.evaluate_residuals, params)
-    fit_objective.finalize(result)
-
-    print(result.params.pretty_print())
-    print(lmfit.fit_report(result))
-
-
-if __name__ == '__main__':
-    run_fitting()
-    plt.show()
diff --git a/hugo/static/files/python/fitting/ex03_ExtendedExamples/external_minimizer/lmfit_with_plotting.py b/hugo/static/files/python/fitting/ex03_ExtendedExamples/external_minimizer/lmfit_with_plotting.py
deleted file mode 100644
index ab5aa339d8aa99c0ddf9b6ac745452b1a44296a6..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/fitting/ex03_ExtendedExamples/external_minimizer/lmfit_with_plotting.py
+++ /dev/null
@@ -1,117 +0,0 @@
-#!/usr/bin/env python3
-"""
-External minimize: using lmfit minimizers for BornAgain fits.
-Fit progress is plotted using lmfit iteration calbback function.
-"""
-import numpy as np
-from matplotlib import pyplot as plt
-import bornagain as ba
-from bornagain import deg, angstrom, nm
-import lmfit
-
-
-def get_sample(params):
-    """
-    Returns a sample with cylinders and pyramids on a substrate,
-    forming a hexagonal lattice.
-    """
-    radius = params['radius']
-    lattice_length = params['length']
-
-    m_vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-    m_substrate = ba.HomogeneousMaterial("Substrate", 6e-6, 2e-8)
-    m_particle = ba.HomogeneousMaterial("Particle", 6e-4, 2e-8)
-
-    sphere_ff = ba.FormFactorFullSphere(radius)
-    sphere = ba.Particle(m_particle, sphere_ff)
-    particle_layout = ba.ParticleLayout()
-    particle_layout.addParticle(sphere)
-
-    interference = ba.InterferenceFunction2DLattice(
-        ba.HexagonalLattice2D(lattice_length, 0))
-    pdf = ba.FTDecayFunction2DCauchy(10*nm, 10*nm, 0)
-    interference.setDecayFunction(pdf)
-
-    particle_layout.setInterferenceFunction(interference)
-
-    vacuum_layer = ba.Layer(m_vacuum)
-    vacuum_layer.addLayout(particle_layout)
-    substrate_layer = ba.Layer(m_substrate, 0)
-    multi_layer = ba.MultiLayer()
-    multi_layer.addLayer(vacuum_layer)
-    multi_layer.addLayer(substrate_layer)
-    return multi_layer
-
-
-def get_simulation(params):
-    """
-    Create and return GISAXS simulation with beam and detector defined
-    """
-    simulation = ba.ScatteringSimulation()
-    simulation.setDetectorParameters(100, -1*deg, 1*deg, 100, 0, 2*deg)
-    simulation.setBeamParameters(1*angstrom, 0.2*deg, 0)
-    simulation.beam().setIntensity(1e+08)
-    simulation.setSample(get_sample(params))
-    return simulation
-
-
-def create_real_data():
-    """
-    Generating "real" data by adding noise to the simulated data.
-    """
-    params = {'radius': 6*nm, 'length': 12*nm}
-    simulation = get_simulation(params)
-    simulation.runSimulation()
-
-    # retrieving simulated data in the form of numpy array
-    real_data = simulation.result().array()
-
-    # spoiling simulated data with noise to produce "real" data
-    np.random.seed(0)
-    noise_factor = 0.1
-    noisy = np.random.normal(real_data, noise_factor*np.sqrt(real_data))
-    noisy[noisy < 0.1] = 0.1
-    return noisy
-
-
-class LMFITPlotter:
-    """
-    Adapts standard plotter for lmfit minimizer.
-    """
-    def __init__(self, fit_objective, every_nth=10):
-        self.fit_objective = fit_objective
-        self.plotter_gisas = ba_fitmonitor.PlotterGISAS()
-        self.every_nth = every_nth
-
-    def __call__(self, params, iter, resid):
-        if iter % self.every_nth == 0:
-            self.plotter_gisas.plot(self.fit_objective)
-
-
-def run_fitting():
-    """
-    main function to run fitting
-    """
-    real_data = create_real_data()
-
-    fit_objective = ba.FitObjective()
-    fit_objective.addSimulationAndData(get_simulation, real_data, 1)
-    fit_objective.initPrint(10)
-
-    params = lmfit.Parameters()
-    params.add('radius', value=7*nm, min=5*nm, max=8*nm)
-    params.add('length', value=10*nm, min=8*nm, max=14*nm)
-
-    plotter = LMFITPlotter(fit_objective)
-    result = lmfit.minimize(fit_objective.evaluate_residuals,
-                            params,
-                            iter_cb=plotter)
-    fit_objective.finalize(result)
-
-    result.params.pretty_print()
-    print(lmfit.fit_report(result))
-
-
-if __name__ == '__main__':
-    run_fitting()
-    plt.show()
diff --git a/hugo/static/files/python/fitting/ex03_ExtendedExamples/honeycomb/Honeycomb_fit.py b/hugo/static/files/python/fitting/ex03_ExtendedExamples/honeycomb/Honeycomb_fit.py
deleted file mode 100644
index de7bc5854462dc87dc3583fee733dd837b3cc7c6..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/fitting/ex03_ExtendedExamples/honeycomb/Honeycomb_fit.py
+++ /dev/null
@@ -1,449 +0,0 @@
-#!/usr/bin/env python3
-"""
-This example demonstrates how to fit a complex experimental setup using BornAgain.
-It is based on real data published in  https://doi.org/10.1002/advs.201700856
-by A. Glavic et al.
-In this example we utilize the scalar reflectometry  engine to fit polarized 
-data without spin-flip for performance reasons.
-"""
-
-import sys
-import numpy
-import matplotlib.pyplot as plt
-
-from scipy.optimize import differential_evolution
-
-import bornagain as ba
-from bornagain import angstrom
-
-from zipfile import ZipFile
-
-# number of points on which the computed result is plotted
-scan_size = 1500
-
-# restrict the Q-range of the data used for fitting
-qmin = 0.08
-qmax = 1.4
-
-####################################################################
-#                  Create Sample and Simulation                    #
-####################################################################
-
-
-def get_sample(parameters, sign, ms150=1):
-
-    m_Air = ba.MaterialBySLD("Air", 0, 0)
-    m_PyOx  = ba.MaterialBySLD("PyOx",
-                               (parameters["sld_PyOx_real"] + \
-                                 sign * ms150 * parameters["msld_PyOx"] )* 1e-6,
-                               parameters["sld_PyOx_imag"] * 1e-6)
-    m_Py2   = ba.MaterialBySLD("Py2",
-                               ( parameters["sld_Py2_real"] + \
-                                 sign * ms150 * parameters["msld_Py2"] ) * 1e-6,
-                               parameters["sld_Py2_imag"] * 1e-6)
-    m_Py1   = ba.MaterialBySLD("Py1",
-                               ( parameters["sld_Py1_real"] + \
-                                 sign * ms150 * parameters["msld_Py1"] ) * 1e-6,
-                               parameters["sld_Py1_imag"] * 1e-6)
-    m_SiO2 = ba.MaterialBySLD("SiO2", parameters["sld_SiO2_real"]*1e-6,
-                              parameters["sld_SiO2_imag"]*1e-6)
-    m_Si = ba.MaterialBySLD("Substrate", parameters["sld_Si_real"]*1e-6,
-                            parameters["sld_Si_imag"]*1e-6)
-
-    l_Air = ba.Layer(m_Air)
-    l_PyOx = ba.Layer(m_PyOx, parameters["t_PyOx"]*angstrom)
-    l_Py2 = ba.Layer(m_Py2, parameters["t_Py2"]*angstrom)
-    l_Py1 = ba.Layer(m_Py1, parameters["t_Py1"]*angstrom)
-    l_SiO2 = ba.Layer(m_SiO2, parameters["t_SiO2"]*angstrom)
-    l_Si = ba.Layer(m_Si)
-
-    r_PyOx = ba.LayerRoughness()
-    r_Py2 = ba.LayerRoughness()
-    r_Py1 = ba.LayerRoughness()
-    r_SiO2 = ba.LayerRoughness()
-    r_Si = ba.LayerRoughness()
-
-    r_PyOx.setSigma(parameters["r_PyOx"]*angstrom)
-    r_Py2.setSigma(parameters["r_Py2"]*angstrom)
-    r_Py1.setSigma(parameters["r_Py1"]*angstrom)
-    r_SiO2.setSigma(parameters["r_SiO2"]*angstrom)
-    r_Si.setSigma(parameters["r_Si"]*angstrom)
-
-    sample = ba.MultiLayer()
-
-    sample.addLayer(l_Air)
-    sample.addLayerWithTopRoughness(l_PyOx, r_PyOx)
-    sample.addLayerWithTopRoughness(l_Py2, r_Py2)
-    sample.addLayerWithTopRoughness(l_Py1, r_Py1)
-    sample.addLayerWithTopRoughness(l_SiO2, r_SiO2)
-    sample.addLayerWithTopRoughness(l_Si, r_Si)
-
-    sample.setRoughnessModel(ba.RoughnessModel.NEVOT_CROCE)
-
-    return sample
-
-
-def get_simulation(q_axis, fitParams, sign, ms150=False):
-
-    n_points = 25
-    n_sig = 3.0
-
-    parameters = dict(fitParams, **fixedParams)
-
-    q_distr = ba.RangedDistributionGaussian(n_points, n_sig)
-
-    dq = parameters["dq"]*q_axis
-    scan = ba.QSpecScan(q_axis)
-    scan.setAbsoluteQResolution(q_distr, dq)
-
-    simulation = ba.SpecularSimulation()
-    simulation.setScan(scan)
-    simulation.beam().setIntensity(parameters["intensity"])
-
-    if ms150:
-        sample = get_sample(parameters=parameters,
-                            sign=sign,
-                            ms150=parameters["ms150"])
-    else:
-        sample = get_sample(parameters=parameters, sign=sign, ms150=1)
-
-    simulation.setSample(sample)
-    simulation.setBackground(ba.ConstantBackground(5e-7))
-
-    return simulation
-
-
-def run_simulation(q_axis, fitParams, *, sign, ms150=False):
-    simulation = get_simulation(q_axis, fitParams, sign, ms150)
-    simulation.runSimulation()
-
-    return simulation
-
-
-def qr(result):
-    """
-    Returns two arrays that hold the q-values as well as the
-    reflectivity from a given simulation result
-    """
-    q = numpy.array(result.result().axis(ba.Axes.QSPACE))
-    r = numpy.array(result.result().array(ba.Axes.QSPACE))
-
-    return q, r
-
-
-####################################################################
-#                         Plot Handling                            #
-####################################################################
-
-
-def plot(qs, rs, exps, shifts, labels, filename):
-    """
-    Plot the simulated result together with the experimental data
-    """
-    fig = plt.figure()
-    ax = fig.add_subplot(111)
-
-    for q, r, exp, shift, l in zip(qs, rs, exps, shifts, labels):
-
-        ax.errorbar(exp[0],
-                    exp[1]/shift,
-                    yerr=exp[2]/shift,
-                    fmt='.',
-                    markersize=0.75,
-                    linewidth=0.5)
-
-        ax.plot(q, r/shift, label=l)
-
-    ax.set_yscale('log')
-    plt.legend()
-
-    plt.xlabel("Q [nm${}^{-1}$]")
-    plt.ylabel("R")
-
-    plt.tight_layout()
-    plt.savefig(filename)
-
-
-def plot_sld_profile(fitParams, filename):
-
-    plt.figure()
-    parameters = dict(fitParams, **fixedParams)
-
-    z_300_p, sld_300_p = ba.MaterialProfile(get_sample(parameters, 1))
-    z_300_m, sld_300_m = ba.MaterialProfile(get_sample(parameters, -1))
-
-    z_150_p, sld_150_p = ba.MaterialProfile(
-        get_sample(parameters, 1, ms150=parameters["ms150"]))
-    z_150_m, sld_150_m = ba.MaterialProfile(
-        get_sample(parameters, -1, ms150=parameters["ms150"]))
-
-    plt.figure()
-    nsld = plt.plot(z_300_p, numpy.real(sld_300_p)*1e6, label=r"300K $+$")
-    nsld = plt.plot(z_300_m, numpy.real(sld_300_m)*1e6, label=r"300K $-$")
-
-    nsld = plt.plot(z_150_p, numpy.real(sld_150_p)*1e6, label=r"150K $+$")
-    nsld = plt.plot(z_150_m, numpy.real(sld_150_m)*1e6, label=r"150K $-$")
-
-    plt.xlabel(r"$z$ [A]")
-    plt.ylabel(r"$\delta(z) \cdot 10^6$")
-
-    plt.legend()
-    plt.tight_layout()
-    plt.savefig(filename)
-    plt.close()
-
-
-####################################################################
-#                          Data Handling                           #
-####################################################################
-
-
-def normalizeData(data):
-    """
-    Removes duplicate q values from the input data,
-    normalizes it such that the maximum of the reflectivity is
-    unity and rescales the q-axis to inverse nm
-    """
-    # delete repeated data
-    r0 = numpy.where(data[0] - numpy.roll(data[0], 1) == 0)
-    data = numpy.delete(data, r0, 1)
-
-    data[0] = data[0]/angstrom
-    norm = numpy.max(data[1])
-    data[1] = data[1]/norm
-    data[2] = data[2]/norm
-
-    # sort by q axis
-    so = numpy.argsort(data[0])
-    data = data[:, so]
-
-    return data
-
-
-def get_Experimental_data(filename, qmin, qmax):
-
-    if not hasattr(get_Experimental_data, "zipfile"):
-        get_Experimental_data.zipfile = ZipFile("honeycomb_data.zip")
-
-    input_Data = numpy.genfromtxt(
-        get_Experimental_data.zipfile.open(filename),
-        unpack=True,
-        usecols=(0, 2, 3))
-    data = normalizeData(input_Data)
-
-    minIndex = numpy.argmin(numpy.abs(data[0] - qmin))
-    maxIndex = numpy.argmin(numpy.abs(data[0] - qmax))
-
-    return data[:, minIndex:maxIndex + 1]
-
-
-####################################################################
-#                          Fit Function                            #
-####################################################################
-
-
-def relative_difference(sim, exp):
-    result = (exp - sim)/(exp + sim)
-    return numpy.sum(result*result)/len(sim)
-
-
-def create_Parameter_dictionary(parameterNames, *args):
-    return {name: value for name, value in zip(parameterNames, *args)}
-
-
-class FitObjective:
-    def __init__(self, q_axis, rdata, simulationFactory, parameterNames):
-        if isinstance(q_axis, list) and isinstance(rdata, list) and \
-                                    isinstance(simulationFactory, list):
-            self._q = q_axis
-            self._r = rdata
-            self._simulationFactory = simulationFactory
-
-        elif not isinstance(q_axis, list) and not isinstance(rdata, list) \
-                              and not isinstance(simulationFactory, list):
-            self._q = [q_axis]
-            self._r = [rdata]
-            self._simulationFactory = [simulationFactory]
-
-        else:
-            raise Exception("Inconsistent parameters")
-
-        self._parameterNames = parameterNames
-
-    def __call__(self, *args):
-        fitParameters = create_Parameter_dictionary(self._parameterNames,
-                                                    *args)
-        print(f"FitParamters = {fitParameters}")
-
-        result_metric = 0
-
-        for q, r, sim in zip(self._q, self._r, self._simulationFactory):
-            sim_result = sim(q, fitParameters).result().array()
-            result_metric += relative_difference(sim_result, r)
-
-        return result_metric
-
-
-def run_fit_differential_evolution(q_axis, rdata, simulationFactory,
-                                   startParams):
-
-    bounds = [(par[1], par[2]) for n, par in startParams.items()]
-    parameters = [par[0] for n, par in startParams.items()]
-    parameterNames = [n for n, par in startParams.items()]
-    print(f"Bounds = {bounds}")
-
-    objective = FitObjective(q_axis, rdata, simulationFactory,
-                             parameterNames)
-
-    chi2_initial = objective(parameters)
-
-    result = differential_evolution(objective,
-                                    bounds,
-                                    maxiter=200,
-                                    popsize=len(bounds)*10,
-                                    mutation=(0.5, 1.5),
-                                    disp=True,
-                                    tol=1e-2)
-
-    resultParameters = create_Parameter_dictionary(parameterNames,
-                                                   result.x)
-    chi2_final = objective(resultParameters.values())
-
-    print(f"Initial chi2: {chi2_initial}")
-    print(f"Final chi2: {chi2_final}")
-    return resultParameters
-
-
-####################################################################
-#                          Main Function                           #
-####################################################################
-
-if __name__ == '__main__':
-
-    fixedParams = {
-        "sld_PyOx_imag": (0, 0, 0),
-        "sld_Py2_imag": (0, 0, 0),
-        "sld_Py1_imag": (0, 0, 0),
-        "sld_SiO2_imag": (0, 0, 0),
-        "sld_Si_imag": (0, 0, 0),
-        "sld_SiO2_real": (3.47, 3, 4),
-        "sld_Si_real": (2.0704, 2, 3),
-        "dq": (0.018, 0, 0.1),
-    }
-
-    if len(sys.argv) > 1 and sys.argv[1] == "fit":
-
-        # some sensible start parameters for fitting
-        startParams = {
-            "intensity": (1.04, 0, 3),
-            "t_PyOx": (77, 60, 100),
-            "t_Py2": (56, 40, 70),
-            "t_Py1": (64, 50, 80),
-            "t_SiO2": (16, 10, 30),
-            "sld_PyOx_real": (1.915, 1.6, 2.2),
-            "sld_Py2_real": (5, 3, 6),
-            "sld_Py1_real": (4.62, 3, 6),
-            "r_PyOx": (27, 5, 35),
-            "r_Py2": (12, 5, 20),
-            "r_Py1": (12, 5, 20),
-            "r_SiO2": (17, 2, 25),
-            "r_Si": (18, 2, 25),
-            "msld_PyOx": (0.25, 0, 1),
-            "msld_Py2": (0.63, 0, 1),
-            "msld_Py1": (0.64, 0, 1),
-            "ms150": (1, 0.9, 1.1),
-        }
-
-        fit = True
-
-    else:
-        # result from our own fitting
-        startParams = {
-            'intensity': 0.9482344993285265,
-            't_PyOx': 74.97056190221168,
-            't_Py2': 61.75823766477464,
-            't_Py1': 54.058310970786316,
-            't_SiO2': 23.127048588278402,
-            'sld_PyOx_real': 2.199791584033569,
-            'sld_Py2_real': 4.980316982224387,
-            'sld_Py1_real': 4.612135848532186,
-            'r_PyOx': 31.323366207013787,
-            'r_Py2': 9.083768897940645,
-            'r_Py1': 5,
-            'r_SiO2': 14.43455709065263,
-            'r_Si': 14.948233893986075,
-            'msld_PyOx': 0.292684104601585,
-            'msld_Py2': 0.5979447434271339,
-            'msld_Py1': 0.56376339230351,
-            'ms150': 1.083311702077648
-        }
-
-        startParams = {d: (v, ) for d, v in startParams.items()}
-        fit = False
-
-    fixedParams = {d: v[0] for d, v in fixedParams.items()}
-    paramsInitial = {d: v[0] for d, v in startParams.items()}
-
-    def run_Simulation_300_p(qzs, params):
-        return run_simulation(qzs, params, sign=1)
-
-    def run_Simulation_300_m(qzs, params):
-        return run_simulation(qzs, params, sign=-1)
-
-    def run_Simulation_150_p(qzs, params):
-        return run_simulation(qzs, params, sign=1, ms150=True)
-
-    def run_Simulation_150_m(qzs, params):
-        return run_simulation(qzs, params, sign=-1, ms150=True)
-
-    qzs = numpy.linspace(qmin, qmax, scan_size)
-    q_300_p, r_300_p = qr(run_Simulation_300_p(qzs, paramsInitial))
-    q_300_m, r_300_m = qr(run_Simulation_300_m(qzs, paramsInitial))
-
-    q_150_p, r_150_p = qr(run_Simulation_150_p(qzs, paramsInitial))
-    q_150_m, r_150_m = qr(run_Simulation_150_m(qzs, paramsInitial))
-
-    data_300_p = get_Experimental_data("honeycomb_300_p.dat", qmin, qmax)
-    data_300_m = get_Experimental_data("honeycomb_300_m.dat", qmin, qmax)
-
-    data_150_p = get_Experimental_data("honeycomb_150_p.dat", qmin, qmax)
-    data_150_m = get_Experimental_data("honeycomb_150_m.dat", qmin, qmax)
-
-    plot_sld_profile(paramsInitial,
-                     f"Honeycomb_Fit_sld_profile_initial.pdf")
-    plot([q_300_p, q_300_m, q_150_p, q_150_m],
-         [r_300_p, r_300_m, r_150_p, r_150_m],
-         [data_300_p, data_300_m, data_150_p, data_150_m], [1, 1, 10, 10],
-         ["300K $+$", "300K $-$", "150K $+$", "150K $-$"],
-         f"Honeycomb_Fit_reflectivity_initial.pdf")
-
-    # fit and plot fit
-    if fit:
-        dataSimTuple = [[
-            data_300_p[0], data_300_m[0], data_150_p[0], data_150_m[0]
-        ], [data_300_p[1], data_300_m[1], data_150_p[1], data_150_m[1]],
-                        [
-                            run_Simulation_300_p, run_Simulation_300_m,
-                            run_Simulation_150_p, run_Simulation_150_m
-                        ]]
-
-        fitResult = run_fit_differential_evolution(*dataSimTuple,
-                                                   startParams)
-
-        print("Fit Result:")
-        print(fitResult)
-
-        q_300_p, r_300_p = qr(run_Simulation_300_p(qzs, fitResult))
-        q_300_m, r_300_m = qr(run_Simulation_300_m(qzs, fitResult))
-
-        q_150_p, r_150_p = qr(run_Simulation_150_p(qzs, fitResult))
-        q_150_m, r_150_m = qr(run_Simulation_150_m(qzs, fitResult))
-
-        plot([q_300_p, q_300_m, q_150_p, q_150_m],
-             [r_300_p, r_300_m, r_150_p, r_150_m],
-             [data_300_p, data_300_m, data_150_p, data_150_m],
-             [1, 1, 10, 10],
-             ["300K $+$", "300K $-$", "150K $+$", "150K $-$"],
-             f"Honeycomb_Fit_reflectivity_fit.pdf")
-
-        plot_sld_profile(fitResult, f"Honeycomb_Fit_sld_profile_fit.pdf")
diff --git a/hugo/static/files/python/fitting/ex03_ExtendedExamples/honeycomb/honeycomb_data.zip b/hugo/static/files/python/fitting/ex03_ExtendedExamples/honeycomb/honeycomb_data.zip
deleted file mode 100644
index 9231ee309c2b21ce6b695cee52b5334f3cebfa8a..0000000000000000000000000000000000000000
Binary files a/hugo/static/files/python/fitting/ex03_ExtendedExamples/honeycomb/honeycomb_data.zip and /dev/null differ
diff --git a/hugo/static/files/python/fitting/ex03_ExtendedExamples/pt-layer/Pt_layer_fit.py b/hugo/static/files/python/fitting/ex03_ExtendedExamples/pt-layer/Pt_layer_fit.py
deleted file mode 100644
index a82dc971a4550e7d84293f51ee010710943065ae..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/fitting/ex03_ExtendedExamples/pt-layer/Pt_layer_fit.py
+++ /dev/null
@@ -1,252 +0,0 @@
-#!/usr/bin/env python3
-"""
-This example demonstrates how to fit actual experimental data
-by M. Fitzsimmons et al. that is published in 
-https://doi.org/10.5281/zenodo.4072376
-"""
-
-import numpy
-import matplotlib.pyplot as plt
-from sys import argv
-
-import bornagain as ba
-from bornagain import angstrom
-
-# filename of the experimental data to be loaded
-filename = 'RvsQ_36563_36662.txt.gz'
-
-# restrict the Q-range of the data used for fitting
-qmin = 0.18
-qmax = 2.4
-
-# number of points on which the computed result is plotted
-scan_size = 1500
-
-# Use fixed values for the SLD of the substrate and Pt layer
-sldPt = (6.3568e-06, 1.8967e-09)
-sldSi = (2.0728e-06, 2.3747e-11)
-
-####################################################################
-#                  Create Sample and Simulation                    #
-####################################################################
-
-
-def get_sample(params):
-
-    mat_ambient = ba.MaterialBySLD("Ambient", 0, 0)
-    mat_layer = ba.MaterialBySLD("Pt", *sldPt)
-    mat_substrate = ba.MaterialBySLD("Si", *sldSi)
-
-    ambient_layer = ba.Layer(mat_ambient)
-    layer = ba.Layer(mat_layer, params["t_pt/nm"])
-    substrate_layer = ba.Layer(mat_substrate)
-
-    r_si = ba.LayerRoughness()
-    r_si.setSigma(params["r_si/nm"])
-
-    r_pt = ba.LayerRoughness()
-    r_pt.setSigma(params["r_pt/nm"])
-
-    multi_layer = ba.MultiLayer()
-    multi_layer.addLayer(ambient_layer)
-    multi_layer.addLayerWithTopRoughness(layer, r_pt)
-
-    multi_layer.addLayerWithTopRoughness(substrate_layer, r_si)
-
-    return multi_layer
-
-
-def get_simulation(q_axis, parameters):
-
-    scan = ba.QSpecScan(q_axis)
-    scan.setOffset(parameters["q_offset"])
-
-    n_sig = 4.0
-    n_samples = 25
-
-    distr = ba.RangedDistributionGaussian(n_samples, n_sig)
-    scan.setAbsoluteQResolution(distr, parameters["q_res/q"])
-
-    simulation = ba.SpecularSimulation()
-    simulation.beam().setIntensity(parameters["intensity"])
-
-    simulation.setScan(scan)
-    return simulation
-
-
-def run_simulation(q_axis, fitParams):
-    parameters = dict(fitParams, **fixedParams)
-
-    sample = get_sample(parameters)
-    simulation = get_simulation(q_axis, parameters)
-
-    simulation.setSample(sample)
-    simulation.runSimulation()
-    return simulation  #.result()
-
-
-def qr(result):
-    """
-    helper function to return the q axis and 
-    reflectivity from simulation result
-    """
-    q = numpy.array(result.result().axis(ba.Axes.QSPACE))
-    r = numpy.array(result.result().array(ba.Axes.QSPACE))
-
-    return q, r
-
-
-####################################################################
-#                         Plot Handling                            #
-####################################################################
-
-
-def plot(q, r, exp, filename, params=None):
-    """
-    helper function to plot a result
-    """
-    fig = plt.figure()
-    ax = fig.add_subplot(111)
-
-    ax.errorbar(exp[0],
-                exp[1],
-                xerr=exp[3],
-                yerr=exp[2],
-                label="R",
-                fmt='.',
-                markersize=1.,
-                linewidth=0.6,
-                color='r')
-
-    ax.plot(q, r, label="Simulation", color='C0', linewidth=0.5)
-
-    ax.set_yscale('log')
-
-    ax.set_xlabel("Q [nm$^{^-1}$]")
-    ax.set_ylabel("R")
-
-    y = 0.5
-    if params is not None:
-        for n, v in params.items():
-            plt.text(0.7, y, f"{n} = {v:.3g}", transform=ax.transAxes)
-            y += 0.05
-
-    plt.tight_layout()
-    plt.savefig(filename)
-
-
-####################################################################
-#                          Data Handling                           #
-####################################################################
-
-
-def get_Experimental_data(qmin, qmax):
-    """
-    read experimental data, remove some duplicate q-values
-    recalculate q axis to inverse nm
-    """
-    data = numpy.genfromtxt(filename, unpack=True)
-
-    r0 = numpy.where(data[0] - numpy.roll(data[0], 1) == 0)
-    data = numpy.delete(data, r0, 1)
-
-    data[0] = data[0]/angstrom
-    data[3] = data[3]/angstrom
-
-    data[1] = data[1]
-    data[2] = data[2]
-
-    so = numpy.argsort(data[0])
-
-    data = data[:, so]
-
-    minIndex = numpy.argmin(numpy.abs(data[0] - qmin))
-    maxIndex = numpy.argmin(numpy.abs(data[0] - qmax))
-
-    return data[:, minIndex:maxIndex + 1]
-
-
-####################################################################
-#                          Fit Function                            #
-####################################################################
-
-
-def run_fit_ba(q_axis, r_data, r_uncertainty, simulationFactory,
-               startParams):
-
-    fit_objective = ba.FitObjective()
-    fit_objective.setObjectiveMetric("chi2")
-
-    fit_objective.addSimulationAndData(
-        lambda params: simulationFactory(q_axis, params), r_data,
-        r_uncertainty, 1)
-
-    fit_objective.initPrint(10)
-
-    params = ba.Parameters()
-    for name, p in startParams.items():
-        params.add(name, p[0], min=p[1], max=p[2])
-
-    minimizer = ba.Minimizer()
-
-    result = minimizer.minimize(fit_objective.evaluate, params)
-    fit_objective.finalize(result)
-
-    return {r.name(): r.value for r in result.parameters()}
-
-
-####################################################################
-#                          Main Function                           #
-####################################################################
-
-if __name__ == '__main__':
-
-    if len(argv) > 1 and argv[1] == "fit":
-        fixedParams = {
-            # parameters can be moved here to keep them fixed
-        }
-        fixedParams = {d: v[0] for d, v in fixedParams.items()}
-
-        startParams = {
-            # own starting values
-            "q_offset": (0, -0.02, 0.02),
-            "q_res/q": (0, 0, 0.02),
-            "t_pt/nm": (53, 40, 60),
-            "r_si/nm": (1.22, 0, 5),
-            "r_pt/nm": (0.25, 0, 5),
-            "intensity": (1, 0, 2),
-        }
-        fit = True
-
-    else:
-        startParams = {}
-        fixedParams = {
-            # parameters from our own fit run
-            'q_offset': 0.015085985992837999,
-            'q_res/q': 0.010156450689003465,
-            't_pt/nm': 48.564838355355405,
-            'r_si/nm': 1.2857515425763575,
-            'r_pt/nm': 0.2868252673771518,
-            'intensity': 1.3156374978332654
-        }
-        fit = False
-
-    paramsInitial = {d: v[0] for d, v in startParams.items()}
-
-    qzs = numpy.linspace(qmin, qmax, scan_size)
-    q, r = qr(run_simulation(qzs, paramsInitial))
-    data = get_Experimental_data(qmin, qmax)
-
-    plot(q, r, data, f'PtLayerFit_initial.pdf',
-         dict(paramsInitial, **fixedParams))
-
-    if fit:
-        fitResult = run_fit_ba(data[0], data[1], data[2], run_simulation,
-                               startParams)
-
-        print("Fit Result:")
-        print(fitResult)
-
-        q, r = qr(run_simulation(qzs, fitParams=fitResult))
-        plot(q, r, data, f'PtLayerFit_fit.pdf',
-             dict(fitResult, **fixedParams))
diff --git a/hugo/static/files/python/fitting/ex03_ExtendedExamples/pt-layer/RvsQ_36563_36662.txt.gz b/hugo/static/files/python/fitting/ex03_ExtendedExamples/pt-layer/RvsQ_36563_36662.txt.gz
deleted file mode 100644
index 6ed764e1ab3ebb6b08959215677bda705fa7bd9e..0000000000000000000000000000000000000000
Binary files a/hugo/static/files/python/fitting/ex03_ExtendedExamples/pt-layer/RvsQ_36563_36662.txt.gz and /dev/null differ
diff --git a/hugo/static/files/python/fitting/ex03_ExtendedExamples/specular/FitSpecularBasics.py b/hugo/static/files/python/fitting/ex03_ExtendedExamples/specular/FitSpecularBasics.py
deleted file mode 100644
index 54bb986cd05abb9167c02904b1db08538416ab2f..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/fitting/ex03_ExtendedExamples/specular/FitSpecularBasics.py
+++ /dev/null
@@ -1,134 +0,0 @@
-#!/usr/bin/env python3
-"""
-Example demonstrates how to fit specular data.
-Our sample represents twenty interchanging layers of Ti and Ni. We will fit
-thicknesses of all Ti layers, assuming them being equal.
-
-Reference data was generated with GENX for ti layers' thicknesses equal to 3 nm
-"""
-
-import numpy as np
-import bornagain as ba
-from bornagain import ba_fitmonitor
-from matplotlib import pyplot as plt
-from os import path
-
-
-def get_sample(params):
-    """
-    Creates a sample and returns it
-    :param params: a dictionary of optimization parameters
-    :return: the sample defined
-    """
-
-    # substrate (Si)
-    si_sld_real = 2.0704e-06  # \AA^{-2}
-    density_si = 0.0499/ba.angstrom**3  # Si atomic number density
-
-    # layers' parameters
-    n_repetitions = 10
-    # Ni
-    ni_sld_real = 9.4245e-06  # \AA^{-2}
-    ni_thickness = 70*ba.angstrom
-    # Ti
-    ti_sld_real = -1.9493e-06  # \AA^{-2}
-    ti_thickness = params["ti_thickness"]
-
-    # defining materials
-    m_vacuum = ba.MaterialBySLD()
-    m_ni = ba.MaterialBySLD("Ni", ni_sld_real, 0)
-    m_ti = ba.MaterialBySLD("Ti", ti_sld_real, 0)
-    m_substrate = ba.MaterialBySLD("SiSubstrate", si_sld_real, 0)
-
-    # vacuum layer and substrate form multi layer
-    vacuum_layer = ba.Layer(m_vacuum)
-    ni_layer = ba.Layer(m_ni, ni_thickness)
-    ti_layer = ba.Layer(m_ti, ti_thickness)
-    substrate_layer = ba.Layer(m_substrate)
-    multi_layer = ba.MultiLayer()
-    multi_layer.addLayer(vacuum_layer)
-    for i in range(n_repetitions):
-        multi_layer.addLayer(ti_layer)
-        multi_layer.addLayer(ni_layer)
-    multi_layer.addLayer(substrate_layer)
-    return multi_layer
-
-
-def get_real_data():
-    """
-    Loading data from genx_interchanging_layers.dat
-    Returns a Nx2 array (N - the number of experimental data entries)
-    with first column being coordinates,
-    second one being values.
-    """
-    if not hasattr(get_real_data, "data"):
-        filename = "genx_interchanging_layers.dat.gz"
-        filepath = path.join(path.dirname(path.realpath(__file__)),
-                             filename)
-        real_data = np.loadtxt(filepath, usecols=(0, 1), skiprows=3)
-
-        # translating axis values from double incident angle (degs)
-        # to incident angle (radians)
-        real_data[:, 0] *= np.pi/360
-        get_real_data.data = real_data
-    return get_real_data.data.copy()
-
-
-def get_real_data_axis():
-    """
-    Get axis coordinates of the experimental data
-    :return: 1D array with axis coordinates
-    """
-    return get_real_data()[:, 0]
-
-
-def get_real_data_values():
-    """
-    Get experimental data values as a 1D array
-    :return: 1D array with experimental data values
-    """
-    return get_real_data()[:, 1]
-
-
-def get_simulation(params):
-    """
-    Create and return specular simulation with its instrument defined
-    """
-    wavelength = 1.54*ba.angstrom  # beam wavelength
-
-    simulation = ba.SpecularSimulation()
-    scan = ba.AngularSpecScan(wavelength, get_real_data_axis())
-    simulation.setScan(scan)
-    simulation.setSample(get_sample(params))
-    return simulation
-
-
-def run_fitting():
-    """
-    Setup simulation and fit
-    """
-
-    real_data = get_real_data_values()
-
-    fit_objective = ba.FitObjective()
-    fit_objective.addSimulationAndData(get_simulation, real_data, 1)
-
-    plot_observer = ba_fitmonitor.PlotterSpecular()
-    fit_objective.initPrint(10)
-    fit_objective.initPlot(10, plot_observer)
-
-    params = ba.Parameters()
-    params.add("ti_thickness",
-               50*ba.angstrom,
-               min=10*ba.angstrom,
-               max=60*ba.angstrom)
-
-    minimizer = ba.Minimizer()
-    result = minimizer.minimize(fit_objective.evaluate, params)
-
-    fit_objective.finalize(result)
-
-
-if __name__ == '__main__':
-    run_fitting()
-    plt.show()
diff --git a/hugo/static/files/python/fitting/ex03_ExtendedExamples/specular/FitWithUncertainties.py b/hugo/static/files/python/fitting/ex03_ExtendedExamples/specular/FitWithUncertainties.py
deleted file mode 100644
index 186bf12ccaa459ddf2fcdaf3e595f506ef69feba..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/fitting/ex03_ExtendedExamples/specular/FitWithUncertainties.py
+++ /dev/null
@@ -1,144 +0,0 @@
-#!/usr/bin/env python3
-"""
-Example demonstrates how to fit specular data.
-Our sample represents twenty interchanging layers of Ti and Ni. We will fit
-thicknesses of all Ti layers, assuming them being equal.
-
-Reference data was generated with GENX for ti layers' thicknesses equal to 3 nm
-
-This example uses exactly the same data as in FitSpecularBasics. However this
-time we will add artificial uncertainties and use RQ^4 view.
-Besides we will set Chi squared with L1-normalization as the objective metric
-and use genetic algorithm as the minimizer.
-"""
-
-import numpy as np
-import bornagain as ba
-from matplotlib import pyplot as plt
-from os import path
-
-
-def get_sample(params):
-    """
-    Creates a sample and returns it
-    :param params: a dictionary of optimization parameters
-    :return: the sample defined
-    """
-
-    # substrate (Si)
-    si_sld_real = 2.0704e-06  # \AA^{-2}
-    density_si = 0.0499/ba.angstrom**3  # Si atomic number density
-
-    # layers' parameters
-    n_repetitions = 10
-    # Ni
-    ni_sld_real = 9.4245e-06  # \AA^{-2}
-    ni_thickness = 70*ba.angstrom
-    # Ti
-    ti_sld_real = -1.9493e-06  # \AA^{-2}
-    ti_thickness = params["ti_thickness"]
-
-    # defining materials
-    m_vacuum = ba.MaterialBySLD()
-    m_ni = ba.MaterialBySLD("Ni", ni_sld_real, 0)
-    m_ti = ba.MaterialBySLD("Ti", ti_sld_real, 0)
-    m_substrate = ba.MaterialBySLD("SiSubstrate", si_sld_real, 0)
-
-    # vacuum layer and substrate form multi layer
-    vacuum_layer = ba.Layer(m_vacuum)
-    ni_layer = ba.Layer(m_ni, ni_thickness)
-    ti_layer = ba.Layer(m_ti, ti_thickness)
-    substrate_layer = ba.Layer(m_substrate)
-    multi_layer = ba.MultiLayer()
-    multi_layer.addLayer(vacuum_layer)
-    for i in range(n_repetitions):
-        multi_layer.addLayer(ti_layer)
-        multi_layer.addLayer(ni_layer)
-    multi_layer.addLayer(substrate_layer)
-    return multi_layer
-
-
-def get_real_data():
-    """
-    Loading data from genx_interchanging_layers.dat
-    Returns a Nx2 array (N - the number of experimental data entries)
-    with first column being coordinates,
-    second one being values.
-    """
-    if not hasattr(get_real_data, "data"):
-        filename = "genx_interchanging_layers.dat.gz"
-        filepath = path.join(path.dirname(path.realpath(__file__)),
-                             filename)
-        real_data = np.loadtxt(filepath, usecols=(0, 1), skiprows=3)
-
-        # translating axis values from double incident angle (degs)
-        # to incident angle (radians)
-        real_data[:, 0] *= np.pi/360
-        get_real_data.data = real_data
-    return get_real_data.data.copy()
-
-
-def get_real_data_axis():
-    """
-    Get axis coordinates of the experimental data
-    :return: 1D array with axis coordinates
-    """
-    return get_real_data()[:, 0]
-
-
-def get_real_data_values():
-    """
-    Get experimental data values as a 1D array
-    :return: 1D array with experimental data values
-    """
-    return get_real_data()[:, 1]
-
-
-def get_simulation(params):
-    """
-    Create and return specular simulation with its instrument defined
-    """
-    wavelength = 1.54*ba.angstrom  # beam wavelength
-
-    simulation = ba.SpecularSimulation()
-    scan = ba.AngularSpecScan(wavelength, get_real_data_axis())
-    simulation.setScan(scan)
-    simulation.setSample(get_sample(params))
-    return simulation
-
-
-def run_fitting():
-    """
-    Setup simulation and fit
-    """
-
-    real_data = get_real_data_values()
-    # setting artificial uncertainties (uncertainty sigma equals a half
-    # of experimental data value)
-    uncertainties = real_data*0.5
-
-    fit_objective = ba.FitObjective()
-    fit_objective.addSimulationAndData(get_simulation, real_data,
-                                       uncertainties)
-
-    plot_observer = ba_fitmonitor.PlotterSpecular(units=ba.Axes.RQ4)
-    fit_objective.initPrint(10)
-    fit_objective.initPlot(10, plot_observer)
-    fit_objective.setObjectiveMetric("Chi2", "L1")
-
-    params = ba.Parameters()
-    params.add("ti_thickness",
-               50*ba.angstrom,
-               min=10*ba.angstrom,
-               max=60*ba.angstrom)
-
-    minimizer = ba.Minimizer()
-    minimizer.setMinimizer("Genetic", "", "MaxIterations=40;PopSize=10")
-    result = minimizer.minimize(fit_objective.evaluate, params)
-
-    fit_objective.finalize(result)
-
-
-if __name__ == '__main__':
-    run_fitting()
-    plt.show()
diff --git a/hugo/static/files/python/fitting/ex03_ExtendedExamples/specular/RealLifeReflectometryFitting.py b/hugo/static/files/python/fitting/ex03_ExtendedExamples/specular/RealLifeReflectometryFitting.py
deleted file mode 100644
index e1ec8a7bde2d8bae719a97a53a595c2faaf1d499..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/fitting/ex03_ExtendedExamples/specular/RealLifeReflectometryFitting.py
+++ /dev/null
@@ -1,293 +0,0 @@
-#!/usr/bin/env python3
-"""
-Real life example:
-Fitting data from an X-ray reflectometer
-
-The sample is composed of a thin
-silver nano-particle layer on a silicon
-substrate. The substrate is covered with
-SiO2 layer. The nano-particle layer has negligible density
-and does not considerably affect
-the observed reflectometry picture.
-
-The following parameters of the experiment
-are fitted:
-1. beam intensity
-2. footprint correction factor
-3. beam angular divergence
-4. Material concentration in the SiO2 layer
-5. Thickness of SiO2 layer
-6. Sample roughness
-
-Fitting is done in two steps:
-First the whole range of experimental data is fitted,
-then the data related to the instrument is fixed and
-on the second step only the right-hand part of
-experimental data (i.e. the part of the reflectometry curve
-associated with bigger incident angles)
-is concerned for fitting. At the second
-stage only the sample parameters are fitted,
-since only they affect the shape of the reflectometry
-curve at bigger incident angles.
-"""
-from matplotlib import pyplot as plt
-import numpy as np
-from os import path
-import bornagain as ba
-from scipy.optimize import differential_evolution
-
-
-def get_real_data(filename="mg6a_Merged.txt.gz"):
-    """
-    Loads real data files and merges them once.
-    Returns a Nx3 array (N - the number of experimental data entries)
-    with first column being coordinates,
-    second one being values,
-    and the third one being weights to restore intensity values from experiment
-    """
-    if not hasattr(get_real_data, "data"):
-        filepath = path.join(path.dirname(path.realpath(__file__)),
-                             filename)
-        real_data = np.loadtxt(filepath, usecols=(0, 1, 3), skiprows=1)
-
-        # translating axis values from double incident angle (degs)
-        # to incident angle (radians)
-        real_data[:, 0] *= np.pi/360
-        get_real_data.data = real_data
-    return get_real_data.data.copy()
-
-
-def get_real_data_axis(start, end):
-    """
-    Get axis coordinates of the experimental data
-    :param start: first bin to extract
-    :param end: last bin to extract
-    :return: 1D array with axis coordinates
-    """
-    return get_real_data()[start:end, 0]
-
-
-def get_real_data_values(start, end):
-    """
-    Get experimental data values as a 1D array
-    :param start: first bin to extract
-    :param end: last bin to extract
-    :return: 1D array with experimental data values
-    """
-    return get_real_data()[start:end, 1]
-
-
-def get_weights(start, end):
-    """
-    Get weights to restore genuine intensity of experimental instrument
-    :param start: first bin to extract
-    :param end: last bin to extract
-    :return: 1D array with weights to restore beam intensity
-    """
-    return get_real_data()[start:end, 2]
-
-
-def create_simulation(arg_dict, bin_start, bin_end):
-    """
-    Creates and returns specular simulation
-    """
-    wavelength = 1.54*ba.angstrom
-    alpha_distr = ba.RangedDistributionGaussian(30, 3)
-    footprint = ba.FootprintGauss(arg_dict["footprint_factor"])
-
-    scan = ba.AngularSpecScan(wavelength,
-                              get_real_data_axis(bin_start, bin_end))
-    scan.setAbsoluteAngularResolution(alpha_distr, arg_dict["divergence"])
-    scan.setFootprintFactor(footprint)
-
-    simulation = ba.SpecularSimulation()
-    simulation.setScan(scan)
-    simulation.beam().setIntensity(arg_dict["intensity"])
-    return simulation
-
-
-def buildSample(arg_dict):
-    """
-    Creates sample and returns it
-    """
-    # defining materials
-    m_vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-    m_si_o2 = ba.HomogeneousMaterial(
-        "SiO2", 8.57040868e-06*arg_dict["concentration"],
-        1.11016654e-07*arg_dict["concentration"])
-    m_si = ba.HomogeneousMaterial("Si", 7.57211137e-06, 1.72728178e-07)
-
-    # roughness
-    r_si = ba.LayerRoughness(arg_dict["roughness"], 0, 0)
-
-    # layers
-    vacuum_layer = ba.Layer(m_vacuum)
-    oxide_layer = ba.Layer(m_si_o2, arg_dict["thickness"])
-    substrate_layer = ba.Layer(m_si)
-
-    # assembling multilayer
-    multi_layer = ba.MultiLayer()
-    multi_layer.addLayer(vacuum_layer)
-    multi_layer.addLayerWithTopRoughness(oxide_layer, r_si)
-    multi_layer.addLayerWithTopRoughness(substrate_layer, r_si)
-
-    return multi_layer
-
-
-def run_simulation(arg_dict, bin_start=0, bin_end=-1):
-    """
-    Runs simulation and returns its result
-    """
-
-    simulation = create_simulation(arg_dict, bin_start, bin_end)
-    simulation.setSample(buildSample(arg_dict))
-
-    simulation.runSimulation()
-    return simulation.result()
-
-
-def chi_2(real_data, sim_data, weights):
-    """
-    Computes chi_2 metrics and returns its value
-    """
-    sim_data_upsc = np.multiply(weights, sim_data)
-    sim_data_upsc[sim_data_upsc is 0] = 1e-30
-    real_data_upsc = np.multiply(weights, real_data)
-    diff = real_data_upsc - sim_data_upsc
-    return np.sum(np.divide(np.multiply(diff, diff), sim_data_upsc))
-
-
-def create_par_dict(*arg):
-    """
-    Creates a dictionary with parameter names and values
-    and returns it
-    """
-    return {
-        'intensity': arg[0],
-        'footprint_factor': arg[1],
-        'divergence': arg[2],
-        'concentration': arg[3],
-        'thickness': arg[4],
-        'roughness': arg[5]
-    }
-
-
-def objective_primary(args):
-    """
-    Objective function for preliminary stage of optimization
-    """
-
-    bin_start = 15  # first bin in the experimental data to calculate
-    bin_end = -1  # last bin in the experimental data to calculate
-    arg_dict = create_par_dict(*args)
-
-    sim_result = run_simulation(arg_dict, bin_start, bin_end)
-    sim_data = sim_result.array()
-    return chi_2(get_real_data_values(bin_start, bin_end), sim_data,
-                 get_weights(bin_start, bin_end))
-
-
-def objective_fine(args, intensity, footprint_factor, divergence):
-    """
-    Objective function for tuning the right-hand side of experimental data
-    """
-
-    bin_start = 404  # first bin in the experimental data to calculate
-    bin_end = -1  # last bin in the experimental data to calculate
-    arg_dict = create_par_dict(intensity, footprint_factor, divergence,
-                               *args)
-
-    sim_result = run_simulation(arg_dict, bin_start, bin_end)
-    sim_data = sim_result.array()
-    return chi_2(get_real_data_values(bin_start, bin_end), sim_data,
-                 get_weights(bin_start, bin_end))
-
-
-def run_fitting():
-    """
-    Runs fitting and returns its result
-    """
-    # running preliminary optimization on the total range of experimental data.
-    bounds = [
-        (1e6, 1e8),  # beam intensity
-        (0, 0.1),  # beam-to-sample width ratio
-        (0, 0.08*ba.deg),  # beam_divergence
-        (0, 1),  # oxide_concentration
-        (0, 2*ba.nm),  # oxide_thickness
-        (0, 2*ba.nm)
-    ]  # roughness
-
-    print("Start preliminary fitting of experimental data:\n")
-
-    preliminary_result = differential_evolution(objective_primary,
-                                                bounds,
-                                                maxiter=20,
-                                                popsize=60,
-                                                mutation=(0.5, 1.5),
-                                                disp=True,
-                                                tol=1e-5)
-
-    bounds = [
-        (0, 1),  # oxide_concentration
-        (0, 2*ba.nm),  # oxide_thickness
-        (0, 2*ba.nm)
-    ]  # roughness
-
-    fixed_args = (
-        preliminary_result.x[0],  # beam intensity
-        preliminary_result.x[1],  # beam-to-sample width ratio
-        preliminary_result.x[2]  # beam divergence
-    )
-
-    print(
-        "\nStart fitting big incident angle part of experimental data:\n")
-
-    fine_tuning_result = differential_evolution(objective_fine,
-                                                bounds,
-                                                fixed_args,
-                                                maxiter=20,
-                                                popsize=40,
-                                                mutation=(0.5, 1.5),
-                                                disp=True,
-                                                tol=1e-5)
-
-    result = create_par_dict(*fixed_args, *fine_tuning_result.x)
-    print("\nFitting result:")
-    print(result, "\n")
-
-    return result
-
-
-def plot_result(sim_result, ref_result, bin_start=0, bin_end=-1):
-    """
-    Plots the graphs of obtained simulation data
-    """
-    sim_data = sim_result.array()
-    ref_data = ref_result.array()
-
-    plt.semilogy(
-        get_real_data_axis(bin_start, bin_end)*180/np.pi,
-        get_real_data_values(bin_start, bin_end), sim_result.axis(),
-        sim_data, ref_result.axis(), ref_data)
-
-    xlabel = ba.get_axes_labels(sim_result, ba.Axes.DEFAULT)[0]
-    ylabel = "Intensity"
-    plt.xlabel(xlabel, fontsize=16)
-    plt.ylabel(ylabel, fontsize=16)
-    plt.legend(['Experimental data', 'Simulation', 'Reference'],
-               loc='upper right',
-               fontsize=16)
-
-    plt.show()
-
-
-if __name__ == '__main__':
-    fit_data = run_fitting()
-    ref_data = create_par_dict(
-        3.78271438e+06,  # beam intensity
-        9.58009763e-04,  # beam-to-sample width ratio
-        2.30471294e-04,  # beam angular divergence
-        0.58721753,  # oxide concentration
-        1.25559347,  # oxide thickness
-        0.19281863)  # roughness
-    plot_result(run_simulation(fit_data), run_simulation(ref_data))
diff --git a/hugo/static/files/python/fitting/ex03_ExtendedExamples/specular/genx_interchanging_layers.dat.gz b/hugo/static/files/python/fitting/ex03_ExtendedExamples/specular/genx_interchanging_layers.dat.gz
deleted file mode 100644
index c1618a99c060324f6fcc5ebe505be93270782925..0000000000000000000000000000000000000000
Binary files a/hugo/static/files/python/fitting/ex03_ExtendedExamples/specular/genx_interchanging_layers.dat.gz and /dev/null differ
diff --git a/hugo/static/files/python/fitting/ex03_ExtendedExamples/specular/mg6a_Merged.txt.gz b/hugo/static/files/python/fitting/ex03_ExtendedExamples/specular/mg6a_Merged.txt.gz
deleted file mode 100644
index 720680da7d4ceed633a77f1fcf602489b48abbc6..0000000000000000000000000000000000000000
Binary files a/hugo/static/files/python/fitting/ex03_ExtendedExamples/specular/mg6a_Merged.txt.gz and /dev/null differ
diff --git a/hugo/static/files/python/fitting/gisas2d/fit_gisas.py b/hugo/static/files/python/fitting/gisas2d/fit_gisas.py
deleted file mode 100755
index 4d52f3c8aa728fcd784726032e4d69089e9d9331..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/fitting/gisas2d/fit_gisas.py
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/usr/bin/env python3
-"""
-Basic GISAS 2D fitting example.
-The model is in gisas_model1.
-Fake experimental data are generated by gisas_fake1.
-"""
-
-import gisas_model1 as model
-import bornagain as ba
-import numpy as np
-from matplotlib import pyplot as plt
-
-
-def run_fitting():
-    real_data = np.loadtxt("../data/faked-gisas1.txt.gz", dtype=float)
-
-    fit_objective = ba.FitObjective()
-    fit_objective.addSimulationAndData(model.get_simulation, real_data)
-
-    fit_objective.initPrint(10)  # Print on every 10th iteration.
-    fit_objective.initPlot(10)  # Plot on every 10th iteration. Slow!
-
-    minimizer = ba.Minimizer()
-    params = model.start_parameters_1()
-    result = minimizer.minimize(fit_objective.evaluate, params)
-
-    fit_objective.finalize(result)
-
-    print("Fit completed.")
-    print("chi2:", result.minValue())
-    for fitPar in result.parameters():
-        print(fitPar.name(), fitPar.value, fitPar.error)
-
-    # Save simulation image corresponding to the best fit parameters
-    np.savetxt("fit.txt", fit_objective.simulationResult().array())
-
-
-if __name__ == '__main__':
-    run_fitting()
-    plt.show()
diff --git a/hugo/static/files/python/fitting/gisas2d/gisas_model1.py b/hugo/static/files/python/fitting/gisas2d/gisas_model1.py
deleted file mode 100644
index f75511d355f213c77c33a389a545558d15d66649..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/fitting/gisas2d/gisas_model1.py
+++ /dev/null
@@ -1,51 +0,0 @@
-"""
-Parametric model of a GISAS simulation.
-The idealized sample model consists of dilute cylinders on a substrate.
-"""
-
-import bornagain as ba
-from bornagain import deg, nm
-
-mat_vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-mat_substrate = ba.HomogeneousMaterial("Substrate", 6e-6, 2e-8)
-mat_particle = ba.HomogeneousMaterial("Particle", 6e-4, 2e-8)
-
-
-def get_sample(params):
-    cylinder_height = params["cylinder_height"]
-    cylinder_radius = params["cylinder_radius"]
-
-    ff = ba.FormFactorCylinder(cylinder_radius, cylinder_height)
-    cylinder = ba.Particle(mat_particle, ff)
-    layout = ba.ParticleLayout()
-    layout.addParticle(cylinder)
-
-    layer_1 = ba.Layer(mat_vacuum)
-    layer_1.addLayout(layout)
-    layer_2 = ba.Layer(mat_substrate)
-
-    sample = ba.MultiLayer()
-    sample.addLayer(layer_1)
-    sample.addLayer(layer_2)
-    return sample
-
-
-def get_simulation(params):
-    beam = ba.Beam(10**params['lg(intensity)'], 0.1*nm,
-                   ba.Direction(0.2*deg, 0))
-    det = ba.SphericalDetector(100, -1.5*deg, 1.5*deg, 100, 0, 3*deg)
-    sample = get_sample(params)
-
-    simulation = ba.ScatteringSimulation(beam, sample, det)
-    simulation.setBackground(
-        ba.ConstantBackground(10**params['lg(background)']))
-
-    return simulation
-
-def start_parameters_1():
-    params = ba.Parameters()
-    params.add("lg(intensity)", 5)
-    params.add("lg(background)", 1)
-    params.add("cylinder_height", 6.*nm, min=0.01)
-    params.add("cylinder_radius", 6.*nm, min=0.01)
-    return params
diff --git a/hugo/static/files/python/simulation/ex01_BasicParticles/AllFormFactorsAvailable.py b/hugo/static/files/python/simulation/ex01_BasicParticles/AllFormFactorsAvailable.py
deleted file mode 100644
index 012ea28d6ffe5d3a7d1d712d10b4f1842e8e1f3f..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex01_BasicParticles/AllFormFactorsAvailable.py
+++ /dev/null
@@ -1,117 +0,0 @@
-#!/usr/bin/env python3
-"""
-All form factors available in BornAgain in the Born Approximation
-"""
-import numpy
-import bornagain as ba
-import ba_plot
-from bornagain import deg, angstrom
-from matplotlib import pyplot as plt
-
-phi_min, phi_max = -2, 2.0
-alpha_min, alpha_max = 0, 2.0
-
-formfactors = [
-    ba.FormFactorAnisoPyramid(20, 16, 13, 60*deg),
-    ba.FormFactorBox(20, 16, 13),
-    ba.FormFactorCantellatedCube(15, 6),
-    ba.FormFactorCone(10, 13, 60*deg),
-    ba.FormFactorCone6(10, 13, 60*deg),
-    ba.FormFactorCuboctahedron(20, 13, 0.7, 60*deg),
-    ba.FormFactorCylinder(8, 16),
-    ba.FormFactorDodecahedron(5),
-    ba.FormFactorEllipsoidalCylinder(8, 13, 16),
-    ba.FormFactorFullSphere(8),
-    ba.FormFactorFullSpheroid(10, 13),
-    ba.FormFactorHemiEllipsoid(10, 6, 8),
-    ba.FormFactorIcosahedron(8),
-    ba.FormFactorPrism3(10, 13),
-    ba.FormFactorPrism6(5, 11),
-    ba.FormFactorPyramid(18, 13, 60*deg),
-    ba.FormFactorCosineRippleBox(27, 20, 14),
-    ba.FormFactorSawtoothRippleBox(36, 25, 14, 3),
-    ba.FormFactorTetrahedron(15, 6, 60*deg),
-    ba.FormFactorTruncatedCube(15, 6),
-    ba.FormFactorTruncatedSphere(5, 7, 0),
-    ba.FormFactorTruncatedSpheroid(7.5, 9, 1.2, 0),
-]
-
-
-def get_sample(formfactor):
-    """
-    Returns a one-layer sample that contains particles with given form factor.
-    """
-    # defining materials
-    m_vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-    m_particle = ba.HomogeneousMaterial("Particle", 6e-4, 2e-8)
-
-    # collection of particles
-    particle = ba.Particle(m_particle, formfactor)
-    particle_layout = ba.ParticleLayout()
-    particle_layout.addParticle(particle)
-
-    vacuum_layer = ba.Layer(m_vacuum)
-    vacuum_layer.addLayout(particle_layout)
-
-    multi_layer = ba.MultiLayer()
-    multi_layer.addLayer(vacuum_layer)
-    return multi_layer
-
-
-def get_simulation(sample):
-    """
-    Returns GISAXS simulation with standard beam and detector.
-    """
-    simulation = ba.ScatteringSimulation()
-    simulation.setDetectorParameters(100, phi_min*deg, phi_max*deg, 100,
-                                     alpha_min*deg, alpha_max*deg)
-    simulation.setBeamParameters(1*angstrom, 0.2*deg, 0)
-    simulation.setSample(sample)
-    return simulation
-
-
-def simulate(ff):
-    """
-    Runs simulation for one form factor, and returns simulated intensity pattern
-    """
-    sample = get_sample(ff)
-    simulation = get_simulation(sample)
-    simulation.runSimulation()
-    return simulation.result()
-
-
-def simulate_and_plot():
-    """
-    Run simulation one by one for every form factor from the list and plot results
-    on a single canvas
-    """
-
-    fig = plt.figure(figsize=(12.80, 10.24))
-
-    for nplot, ff in enumerate(formfactors):
-        name = ff.__class__.__name__
-        name = name.replace("FormFactor", "")
-        print("Generating intensity map in BA for '{0}'".format(name))
-
-        result = simulate(ff)
-
-        # showing the result
-        plt.subplot(5, 5, nplot + 1)
-        plt.subplots_adjust(wspace=0.3, hspace=0.3)
-
-        ba_plot.plot_colormap(result, xlabel="", ylabel="", zlabel="")
-
-        plt.tick_params(axis='both', which='major', labelsize=8)
-        plt.tick_params(axis='both', which='minor', labelsize=6)
-        plt.xticks(numpy.arange(phi_min, phi_max + 0.0001, 1))
-        plt.text(-0.1,
-                 2.15,
-                 name,
-                 horizontalalignment='center',
-                 verticalalignment='center',
-                 fontsize=9)
-    plt.show()
-
-
-if __name__ == '__main__':
-    simulate_and_plot()
diff --git a/hugo/static/files/python/simulation/ex01_BasicParticles/Cylinders.py b/hugo/static/files/python/simulation/ex01_BasicParticles/Cylinders.py
deleted file mode 100644
index 865db20eaee20fc25af03435cbb2339dd6003891..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex01_BasicParticles/Cylinders.py
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/usr/bin/env python3
-"""
-Basic example of a DWBA simulation of a GISAS experiment:
-Scattering by a dilute random assembly of cylinders on a substrate.
-"""
-import bornagain as ba
-from bornagain import deg, nm
-
-
-def get_sample():
-    # Define materials
-    material_Particle = ba.HomogeneousMaterial("Particle", 6e-4, 2e-08)
-    material_Substrate = ba.HomogeneousMaterial("Substrate", 6e-6, 2e-08)
-    material_Vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-
-    # Define particles
-    ff = ba.FormFactorCylinder(5*nm, 5*nm)
-    particle = ba.Particle(material_Particle, ff)
-
-    # Define particle layouts
-    layout = ba.ParticleLayout()
-    layout.addParticle(particle)
-    layout.setTotalParticleSurfaceDensity(0.01)
-
-    # Define layers
-    layer_1 = ba.Layer(material_Vacuum)
-    layer_1.addLayout(layout)
-    layer_2 = ba.Layer(material_Substrate)
-
-    # Define sample
-    sample = ba.MultiLayer()
-    sample.addLayer(layer_1)
-    sample.addLayer(layer_2)
-
-    return sample
-
-
-def get_simulation(sample):
-    # Define beam
-    wavelength = 0.1*nm
-    alpha_i = 0.2*deg
-    beam = ba.Beam(1, wavelength, ba.Direction(alpha_i, 0))
-
-    # Define detector
-    nPix = 200  # pixels per direction
-    detector = ba.SphericalDetector(nPix, -2*deg, 2*deg, nPix, 0, 3*deg)
-
-    return ba.ScatteringSimulation(beam, sample, detector)
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation)
diff --git a/hugo/static/files/python/simulation/ex01_BasicParticles/CylindersAndPrisms.py b/hugo/static/files/python/simulation/ex01_BasicParticles/CylindersAndPrisms.py
deleted file mode 100644
index e8b04c485f15b8a9b0ee79b8f684bf3a0ca0842e..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex01_BasicParticles/CylindersAndPrisms.py
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/usr/bin/env python3
-"""
-Mixture of cylinders and prisms without interference
-"""
-import bornagain as ba
-from bornagain import deg, nm
-
-
-def get_sample():
-    """
-    Returns a sample with uncorrelated cylinders and prisms on a substrate.
-    """
-
-    # Define materials
-    material_Particle = ba.HomogeneousMaterial("Particle", 0.0006, 2e-08)
-    material_Substrate = ba.HomogeneousMaterial("Substrate", 6e-06, 2e-08)
-    material_Vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-
-    # Define form factors
-    ff_1 = ba.FormFactorCylinder(5*nm, 5*nm)
-    ff_2 = ba.FormFactorPrism3(10*nm, 5*nm)
-
-    # Define particles
-    particle_1 = ba.Particle(material_Particle, ff_1)
-    particle_2 = ba.Particle(material_Particle, ff_2)
-
-    # Define interference functions
-    iff = ba.InterferenceFunctionNone()
-
-    # Define particle layouts
-    layout = ba.ParticleLayout()
-    layout.addParticle(particle_1, 0.5)
-    layout.addParticle(particle_2, 0.5)
-    layout.setInterferenceFunction(iff)
-    layout.setTotalParticleSurfaceDensity(0.01)
-
-    # Define layers
-    layer_1 = ba.Layer(material_Vacuum)
-    layer_1.addLayout(layout)
-    layer_2 = ba.Layer(material_Substrate)
-
-    # Define sample
-    sample = ba.MultiLayer()
-    sample.addLayer(layer_1)
-    sample.addLayer(layer_2)
-
-    return sample
-
-
-def get_simulation(sample):
-    beam = ba.Beam(1, 0.1*nm, ba.Direction(0.2*deg, 0))
-    detector = ba.SphericalDetector(100, 2*deg, 0, 1*deg)
-    simulation = ba.ScatteringSimulation(beam, sample, detector)
-    return simulation
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation)
diff --git a/hugo/static/files/python/simulation/ex01_BasicParticles/CylindersInBA.py b/hugo/static/files/python/simulation/ex01_BasicParticles/CylindersInBA.py
deleted file mode 100644
index 3ca591f1e2cfc9b45562f21361264c2566e52ac5..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex01_BasicParticles/CylindersInBA.py
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/usr/bin/env python3
-"""
-Cylinder form factor in Born approximation
-"""
-import bornagain as ba
-from bornagain import deg, nm
-
-
-def get_sample():
-    """
-    Returns a sample with cylinders in a homogeneous environment ("Vacuum"),
-    implying a simulation in plain Born approximation.
-    """
-
-    # Define materials
-    material_Particle = ba.HomogeneousMaterial("Particle", 0.0006, 2e-08)
-    material_Vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-
-    # Define form factors
-    ff = ba.FormFactorCylinder(5*nm, 5*nm)
-
-    # Define particles
-    particle = ba.Particle(material_Particle, ff)
-
-    # Define particle layouts
-    layout = ba.ParticleLayout()
-    layout.addParticle(particle)
-    layout.setTotalParticleSurfaceDensity(0.01)
-
-    # Define layers
-    layer = ba.Layer(material_Vacuum)
-    layer.addLayout(layout)
-
-    # Define sample
-    sample = ba.MultiLayer()
-    sample.addLayer(layer)
-
-    return sample
-
-
-def get_simulation(sample):
-    beam = ba.Beam(1, 0.1*nm, ba.Direction(0.2*deg, 0))
-    detector = ba.SphericalDetector(200, -2*deg, 2*deg, 200, 0, 3*deg)
-    simulation = ba.ScatteringSimulation(beam, sample, detector)
-    return simulation
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation)
diff --git a/hugo/static/files/python/simulation/ex01_BasicParticles/CylindersWithSizeDistribution.py b/hugo/static/files/python/simulation/ex01_BasicParticles/CylindersWithSizeDistribution.py
deleted file mode 100644
index d31cc44225aaa9b1d1326ed240dad9d4a39e50f9..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex01_BasicParticles/CylindersWithSizeDistribution.py
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/usr/bin/env python3
-"""
-Cylinders with size distribution
-"""
-import bornagain as ba
-from bornagain import deg, nm
-
-
-def get_sample():
-    """
-    Return a sample with cylinders on a substrate.
-    The cylinders have a Gaussian size distribution.
-    """
-
-    # Define materials
-    material_Particle = ba.HomogeneousMaterial("Particle", 0.0006, 2e-08)
-    material_Vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-
-    # Define form factors
-    ff = ba.FormFactorCylinder(5*nm, 5*nm)
-
-    # Define particles
-    particle = ba.Particle(material_Particle, ff)
-
-    # Define particles with parameter following a distribution
-    distr_1 = ba.DistributionGaussian(5*nm, 1*nm)
-    par_distr_1 = ba.ParameterDistribution("/Particle/Cylinder/Radius",
-                                           distr_1, 100, 2)
-    particle_distrib = ba.ParticleDistribution(particle, par_distr_1)
-
-    # Define particle layouts
-    layout = ba.ParticleLayout()
-    layout.addParticle(particle_distrib)
-    layout.setTotalParticleSurfaceDensity(0.01)
-
-    # Define layers
-    layer = ba.Layer(material_Vacuum)
-    layer.addLayout(layout)
-
-    # Define sample
-    sample = ba.MultiLayer()
-    sample.addLayer(layer)
-
-    return sample
-
-
-def get_simulation(sample):
-    beam = ba.Beam(1, 0.1*nm, ba.Direction(0.2*deg, 0))
-    detector = ba.SphericalDetector(200, 2*deg, 1*deg, 1*deg)
-    simulation = ba.ScatteringSimulation(beam, sample, detector)
-    return simulation
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation)
diff --git a/hugo/static/files/python/simulation/ex01_BasicParticles/DodecahedraSAS.py b/hugo/static/files/python/simulation/ex01_BasicParticles/DodecahedraSAS.py
deleted file mode 100755
index 958dee269eb70cb26b2f0a5d25aa3856d5bf965b..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex01_BasicParticles/DodecahedraSAS.py
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/usr/bin/env python3
-"""
-Basic example for regular small-angle scattering (SAS).
-Sample is a dilute assembly of ordered dodecahedra.
-"""
-
-import bornagain as ba
-from bornagain import deg, nm
-
-
-def get_sample():
-    m_vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-    m_solution = ba.HomogeneousMaterial("Solution", 6e-6, 2e-8)
-    m_particle = ba.HomogeneousMaterial("Particle", 6e-4, 2e-8)
-
-    # Finite sample layer, contains particles in solution:
-    ff = ba.FormFactorDodecahedron(12*nm)
-    particle = ba.Particle(m_particle, ff)
-    layout = ba.ParticleLayout()
-    layout.addParticle(particle)
-    solution_layer = ba.Layer(m_solution, 1000*nm)
-    # TODO: make intensity proportional to thickness,
-    #       https://github.com/scgmlz/BornAgain/issues/1222
-    solution_layer.addLayout(layout)
-
-    # Flat sample layer sandwiched between semi-infinite vacuum layers:
-    sample = ba.MultiLayer()
-    sample.addLayer(ba.Layer(m_vacuum))
-    sample.addLayer(solution_layer)
-    sample.addLayer(ba.Layer(m_vacuum))
-    return sample
-
-
-def get_simulation(sample):
-    # Beam from above (perpendicular to sample):
-    beam = ba.Beam(1, 0.4*nm, ba.Direction(90*deg, 0))
-
-    # Detector opposite to source:
-    detPos = 2000  # distance from sample center to detector in mm
-    detWid = 500  # detector width in mm
-    detPix = 200  # number of pixels per direction
-    det = ba.RectangularDetector(detPix, detWid, detPix, detWid)
-    det.setPerpendicularToDirectBeam(detPos, detWid/2, detWid/2)
-
-    return ba.ScatteringSimulation(beam, sample, det)
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation)
diff --git a/hugo/static/files/python/simulation/ex01_BasicParticles/RotatedPyramids.py b/hugo/static/files/python/simulation/ex01_BasicParticles/RotatedPyramids.py
deleted file mode 100644
index 47eceac3bf63df501f477ede608911fd7384a1fd..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex01_BasicParticles/RotatedPyramids.py
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/usr/bin/env python3
-"""
-Rotated pyramids on top of substrate
-"""
-import bornagain as ba
-from bornagain import deg, nm
-
-
-def get_sample():
-    """
-    Returns a sample with rotated pyramids on top of a substrate.
-    """
-
-    # Define materials
-    material_Particle = ba.HomogeneousMaterial("Particle", 0.0006, 2e-08)
-    material_Substrate = ba.HomogeneousMaterial("Substrate", 6e-06, 2e-08)
-    material_Vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-
-    # Define form factors
-    ff = ba.FormFactorPyramid(10*nm, 5*nm, 54.73*deg)
-
-    # Define particles
-    particle = ba.Particle(material_Particle, ff)
-    particle_rotation = ba.RotationZ(45*deg)
-    particle.setRotation(particle_rotation)
-
-    # Define particle layouts
-    layout = ba.ParticleLayout()
-    layout.addParticle(particle)
-    layout.setTotalParticleSurfaceDensity(0.01)
-
-    # Define layers
-    layer_1 = ba.Layer(material_Vacuum)
-    layer_1.addLayout(layout)
-    layer_2 = ba.Layer(material_Substrate)
-
-    # Define sample
-    sample = ba.MultiLayer()
-    sample.addLayer(layer_1)
-    sample.addLayer(layer_2)
-
-    return sample
-
-
-def get_simulation(sample):
-    beam = ba.Beam(1, 0.1*nm, ba.Direction(0.2*deg, 0))
-    detector = ba.SphericalDetector(200, -2*deg, 2*deg, 200, 0, 2*deg)
-    simulation = ba.ScatteringSimulation(beam, sample, detector)
-    return simulation
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation)
diff --git a/hugo/static/files/python/simulation/ex01_BasicParticles/TwoTypesOfCylindersWithSizeDistribution.py b/hugo/static/files/python/simulation/ex01_BasicParticles/TwoTypesOfCylindersWithSizeDistribution.py
deleted file mode 100644
index 8236bdb25d8f20558f7e98323bf8ce4f4783878a..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex01_BasicParticles/TwoTypesOfCylindersWithSizeDistribution.py
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/usr/bin/env python3
-"""
-Mixture cylinder particles with different size distribution
-"""
-import bornagain as ba
-from bornagain import deg, nm
-
-
-def get_sample():
-    """
-    Returns a sample with cylinders in a homogeneous medium ("Vacuum").
-    The cylinders are a 95:5 mixture of two different size distributions.
-    """
-
-    # Define materials
-    material_Particle = ba.HomogeneousMaterial("Particle", 0.0006, 2e-08)
-    material_Vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-
-    # Define form factors
-    ff_1 = ba.FormFactorCylinder(5*nm, 5*nm)
-    ff_2 = ba.FormFactorCylinder(10*nm, 10*nm)
-
-    # Define particles
-    particle_1 = ba.Particle(material_Particle, ff_1)
-    particle_2 = ba.Particle(material_Particle, ff_2)
-
-    # Define particles with parameter following a distribution
-    distr_1 = ba.DistributionGaussian(5*nm, 1*nm)
-    par_distr_1 = ba.ParameterDistribution("/Particle/Cylinder/Radius",
-                                           distr_1, 150, 3,
-                                           ba.RealLimits.nonnegative())
-    particle_distrib_1 = ba.ParticleDistribution(particle_1, par_distr_1)
-    distr_2 = ba.DistributionGaussian(10*nm, 0.2*nm)
-    par_distr_2 = ba.ParameterDistribution("/Particle/Cylinder/Radius",
-                                           distr_2, 150, 3,
-                                           ba.RealLimits.nonnegative())
-    particle_distrib_2 = ba.ParticleDistribution(particle_2, par_distr_2)
-
-    # Define particle layouts
-    layout = ba.ParticleLayout()
-    layout.addParticle(particle_distrib_1, 0.95)
-    layout.addParticle(particle_distrib_2, 0.05)
-    layout.setTotalParticleSurfaceDensity(0.01)
-
-    # Define layers
-    layer = ba.Layer(material_Vacuum)
-    layer.addLayout(layout)
-
-    # Define sample
-    sample = ba.MultiLayer()
-    sample.addLayer(layer)
-
-    return sample
-
-
-def get_simulation(sample):
-    beam = ba.Beam(1, 0.1*nm, ba.Direction(0.2*deg, 0))
-    detector = ba.SphericalDetector(200, 2*deg, 1*deg, 1*deg)
-    simulation = ba.ScatteringSimulation(beam, sample, detector)
-    return simulation
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation)
diff --git a/hugo/static/files/python/simulation/ex02_LayeredStructures/BuriedParticles.py b/hugo/static/files/python/simulation/ex02_LayeredStructures/BuriedParticles.py
deleted file mode 100644
index 4b7fe813b8858ef55db0db430ce5cc8cee1903ba..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex02_LayeredStructures/BuriedParticles.py
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/usr/bin/env python3
-"""
-Spherical particles embedded in the middle of the layer on top of substrate.
-"""
-import bornagain as ba
-from bornagain import deg, nm, kvector_t
-
-
-def get_sample():
-    """
-    Returns a sample with spherical particles in a layer
-    between vacuum and substrate.
-    """
-
-    # Define materials
-    material_IntermLayer = ba.HomogeneousMaterial("IntermLayer", 3.45e-06,
-                                                  5.24e-09)
-    material_Particle = ba.HomogeneousMaterial("Particle", 0, 0)
-    material_Substrate = ba.HomogeneousMaterial("Substrate", 7.43e-06,
-                                                1.72e-07)
-    material_Vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-
-    # Define form factors
-    ff = ba.FormFactorFullSphere(10.2*nm)
-
-    # Define particles
-    particle = ba.Particle(material_Particle, ff)
-    particle_position = kvector_t(0, 0, -25.2*nm)
-    particle.setPosition(particle_position)
-
-    # Define particle layouts
-    layout = ba.ParticleLayout()
-    layout.addParticle(particle)
-    layout.setTotalParticleSurfaceDensity(0.01)
-
-    # Define layers
-    layer_1 = ba.Layer(material_Vacuum)
-    layer_2 = ba.Layer(material_IntermLayer, 30*nm)
-    layer_2.addLayout(layout)
-    layer_3 = ba.Layer(material_Substrate)
-
-    # Define sample
-    sample = ba.MultiLayer()
-    sample.addLayer(layer_1)
-    sample.addLayer(layer_2)
-    sample.addLayer(layer_3)
-
-    return sample
-
-
-def get_simulation(sample):
-    beam = ba.Beam(1, 0.15*nm, ba.Direction(0.15*deg, 0))
-    detector = ba.SphericalDetector(200, 2*deg, 0, 1*deg)
-    simulation = ba.ScatteringSimulation(beam, sample, detector)
-    return simulation
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation)
diff --git a/hugo/static/files/python/simulation/ex02_LayeredStructures/CorrelatedRoughness.py b/hugo/static/files/python/simulation/ex02_LayeredStructures/CorrelatedRoughness.py
deleted file mode 100644
index 99364a1a39f65ea9b1061bcb545fa02c20ac292a..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex02_LayeredStructures/CorrelatedRoughness.py
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/usr/bin/env python3
-"""
-MultiLayer with correlated roughness
-"""
-import bornagain as ba
-from bornagain import deg, nm
-
-
-def get_sample():
-    """
-    Returns a sample with two layers on a substrate, with correlated roughnesses.
-    """
-    # defining materials
-    m_vacuum = ba.HomogeneousMaterial("ambience", 0, 0)
-    m_part_a = ba.HomogeneousMaterial("PartA", 5e-6, 0)
-    m_part_b = ba.HomogeneousMaterial("PartB", 10e-6, 0)
-    m_substrate = ba.HomogeneousMaterial("substrate", 15e-6, 0)
-
-    # defining layers
-    l_ambience = ba.Layer(m_vacuum)
-    l_part_a = ba.Layer(m_part_a, 2.5*nm)
-    l_part_b = ba.Layer(m_part_b, 5*nm)
-    l_substrate = ba.Layer(m_substrate)
-
-    roughness = ba.LayerRoughness()
-    roughness.setSigma(1*nm)
-    roughness.setHurstParameter(0.3)
-    roughness.setLatteralCorrLength(5*nm)
-
-    my_sample = ba.MultiLayer()
-
-    # adding layers
-    my_sample.addLayer(l_ambience)
-
-    n_repetitions = 5
-    for i in range(n_repetitions):
-        my_sample.addLayerWithTopRoughness(l_part_a, roughness)
-        my_sample.addLayerWithTopRoughness(l_part_b, roughness)
-
-    my_sample.addLayerWithTopRoughness(l_substrate, roughness)
-    my_sample.setCrossCorrLength(10*nm)
-
-    return my_sample
-
-
-def get_simulation(sample):
-    beam = ba.Beam(5e11, 0.1*nm, ba.Direction(0.2*deg, 0))
-    detector = ba.SphericalDetector(200, 1*deg, 0, 0.5*deg)
-    simulation = ba.ScatteringSimulation(beam, sample, detector)
-    return simulation
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation)
diff --git a/hugo/static/files/python/simulation/ex03_Interferences/ApproximationDA.py b/hugo/static/files/python/simulation/ex03_Interferences/ApproximationDA.py
deleted file mode 100644
index 52759eb66ef3c48a95ebfb236961ebe0d2245b2f..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex03_Interferences/ApproximationDA.py
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/env python3
-"""
-Cylinders of two different sizes in Decoupling Approximation
-"""
-import bornagain as ba
-from bornagain import deg, nm
-
-
-def get_sample():
-    """
-    Returns a sample with cylinders of two different sizes on a substrate.
-    The cylinder positions are modelled in Decoupling Approximation.
-    """
-
-    # Define materials
-    material_Particle = ba.HomogeneousMaterial("Particle", 0.0006, 2e-08)
-    material_Substrate = ba.HomogeneousMaterial("Substrate", 6e-06, 2e-08)
-    material_Vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-
-    # Define form factors
-    ff_1 = ba.FormFactorCylinder(5*nm, 5*nm)
-    ff_2 = ba.FormFactorCylinder(8*nm, 8*nm)
-
-    # Define particles
-    particle_1 = ba.Particle(material_Particle, ff_1)
-    particle_2 = ba.Particle(material_Particle, ff_2)
-
-    # Define interference functions
-    iff = ba.InterferenceFunctionRadialParaCrystal(18*nm, 1000*nm)
-    iff_pdf = ba.FTDistribution1DGauss(3*nm)
-    iff.setProbabilityDistribution(iff_pdf)
-
-    # Define particle layouts
-    layout = ba.ParticleLayout()
-    layout.addParticle(particle_1, 0.8)
-    layout.addParticle(particle_2, 0.2)
-    layout.setInterferenceFunction(iff)
-    layout.setTotalParticleSurfaceDensity(0.01)
-
-    # Define layers
-    layer_1 = ba.Layer(material_Vacuum)
-    layer_1.addLayout(layout)
-    layer_2 = ba.Layer(material_Substrate)
-
-    # Define sample
-    sample = ba.MultiLayer()
-    sample.addLayer(layer_1)
-    sample.addLayer(layer_2)
-
-    return sample
-
-
-def get_simulation(sample):
-    beam = ba.Beam(1, 0.1*nm, ba.Direction(0.2*deg, 0))
-    detector = ba.SphericalDetector(200, 2*deg, 1*deg, 1*deg)
-    simulation = ba.ScatteringSimulation(beam, sample, detector)
-    return simulation
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation)
diff --git a/hugo/static/files/python/simulation/ex03_Interferences/ApproximationLMA.py b/hugo/static/files/python/simulation/ex03_Interferences/ApproximationLMA.py
deleted file mode 100644
index 5fc6c8f5edac768a8ddedceef071c5cb3ae66726..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex03_Interferences/ApproximationLMA.py
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/usr/bin/env python3
-"""
-Cylinders of two different sizes in Local Monodisperse Approximation
-"""
-import bornagain as ba
-from bornagain import deg, nm
-
-
-def get_sample():
-    """
-    Returns a sample with cylinders of two different sizes on a substrate.
-    The cylinder positions are modelled in Local Monodisperse Approximation.
-    """
-
-    # Define materials
-    material_Particle = ba.HomogeneousMaterial("Particle", 0.0006, 2e-08)
-    material_Substrate = ba.HomogeneousMaterial("Substrate", 6e-06, 2e-08)
-    material_Vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-
-    # Define form factors
-    ff_1 = ba.FormFactorCylinder(5*nm, 5*nm)
-    ff_2 = ba.FormFactorCylinder(8*nm, 8*nm)
-
-    # Define particles
-    particle_1 = ba.Particle(material_Particle, ff_1)
-    particle_2 = ba.Particle(material_Particle, ff_2)
-
-    # Define interference functions
-    iff_1 = ba.InterferenceFunctionRadialParaCrystal(16.8*nm, 1000*nm)
-    iff_1_pdf = ba.FTDistribution1DGauss(3*nm)
-    iff_1.setProbabilityDistribution(iff_1_pdf)
-    iff_2 = ba.InterferenceFunctionRadialParaCrystal(22.8*nm, 1000*nm)
-    iff_2_pdf = ba.FTDistribution1DGauss(3*nm)
-    iff_2.setProbabilityDistribution(iff_2_pdf)
-
-    # Define particle layouts
-    layout_1 = ba.ParticleLayout()
-    layout_1.addParticle(particle_1, 0.8)
-    layout_1.setInterferenceFunction(iff_1)
-    layout_1.setTotalParticleSurfaceDensity(0.01)
-    layout_2 = ba.ParticleLayout()
-    layout_2.addParticle(particle_2, 0.2)
-    layout_2.setInterferenceFunction(iff_2)
-    layout_2.setTotalParticleSurfaceDensity(0.01)
-
-    # Define layers
-    layer_1 = ba.Layer(material_Vacuum)
-    layer_1.addLayout(layout_1)
-    layer_1.addLayout(layout_2)
-    layer_2 = ba.Layer(material_Substrate)
-
-    # Define sample
-    sample = ba.MultiLayer()
-    sample.addLayer(layer_1)
-    sample.addLayer(layer_2)
-
-    return sample
-
-
-def get_simulation(sample):
-    beam = ba.Beam(1, 0.1*nm, ba.Direction(0.2*deg, 0))
-    detector = ba.SphericalDetector(200, 2*deg, 1*deg, 1*deg)
-    simulation = ba.ScatteringSimulation(beam, sample, detector)
-    return simulation
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation)
diff --git a/hugo/static/files/python/simulation/ex03_Interferences/ApproximationSSCA.py b/hugo/static/files/python/simulation/ex03_Interferences/ApproximationSSCA.py
deleted file mode 100644
index 5693fbcc302de61fae2c0b8a17bbfcc761acf7c1..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex03_Interferences/ApproximationSSCA.py
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/usr/bin/env python3
-"""
-Cylinders of two different sizes in Size-Spacing Coupling Approximation
-"""
-import bornagain as ba
-from bornagain import deg, nm
-
-
-def get_sample():
-    """
-    Returns a sample with cylinders of two different sizes on a substrate.
-    The cylinder positions are modelled in Size-Spacing Coupling  Approximation.
-    """
-
-    # Define materials
-    material_Particle = ba.HomogeneousMaterial("Particle", 0.0006, 2e-08)
-    material_Substrate = ba.HomogeneousMaterial("Substrate", 6e-06, 2e-08)
-    material_Vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-
-    # Define form factors
-    ff_1 = ba.FormFactorCylinder(5*nm, 5*nm)
-    ff_2 = ba.FormFactorCylinder(8*nm, 8*nm)
-
-    # Define particles
-    particle_1 = ba.Particle(material_Particle, ff_1)
-    particle_2 = ba.Particle(material_Particle, ff_2)
-
-    # Define interference functions
-    iff = ba.InterferenceFunctionRadialParaCrystal(18*nm, 1000*nm)
-    iff.setKappa(1)
-    iff_pdf = ba.FTDistribution1DGauss(3*nm)
-    iff.setProbabilityDistribution(iff_pdf)
-
-    # Define particle layouts
-    layout = ba.ParticleLayout()
-    layout.addParticle(particle_1, 0.8)
-    layout.addParticle(particle_2, 0.2)
-    layout.setInterferenceFunction(iff)
-    layout.setTotalParticleSurfaceDensity(0.01)
-
-    # Define layers
-    layer_1 = ba.Layer(material_Vacuum)
-    layer_1.addLayout(layout)
-    layer_2 = ba.Layer(material_Substrate)
-
-    # Define sample
-    sample = ba.MultiLayer()
-    sample.addLayer(layer_1)
-    sample.addLayer(layer_2)
-
-    return sample
-
-
-def get_simulation(sample):
-    beam = ba.Beam(1, 0.1*nm, ba.Direction(0.2*deg, 0))
-    detector = ba.SphericalDetector(200, 2*deg, 1*deg, 1*deg)
-    simulation = ba.ScatteringSimulation(beam, sample, detector)
-    return simulation
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation)
diff --git a/hugo/static/files/python/simulation/ex03_Interferences/CosineRipplesAtRectLattice.py b/hugo/static/files/python/simulation/ex03_Interferences/CosineRipplesAtRectLattice.py
deleted file mode 100644
index 1ecaa43eaed2e2b0f6450a979724a04737ae3ed8..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex03_Interferences/CosineRipplesAtRectLattice.py
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/usr/bin/env python3
-"""
-Cosine ripple on a 2D lattice
-"""
-import bornagain as ba
-from bornagain import deg, nm
-
-
-def get_sample():
-    """
-    Returns a sample with cosine ripples on a substrate.
-    The structure is modelled as a 2D Lattice.
-    """
-
-    # Define materials
-    material_Particle = ba.HomogeneousMaterial("Particle", 0.0006, 2e-08)
-    material_Substrate = ba.HomogeneousMaterial("Substrate", 6e-06, 2e-08)
-    material_Vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-
-    # Define form factors
-    ff = ba.FormFactorCosineRippleBox(100*nm, 20*nm, 4*nm)
-
-    # Define particles
-    particle = ba.Particle(material_Particle, ff)
-
-    # Define 2D lattices
-    lattice = ba.BasicLattice2D(200*nm, 50*nm, 90*deg, 0)
-
-    # Define interference functions
-    iff = ba.InterferenceFunction2DLattice(lattice)
-    iff_pdf = ba.FTDecayFunction2DCauchy(160*nm, 16*nm, 0)
-    iff.setDecayFunction(iff_pdf)
-
-    # Define particle layouts
-    layout = ba.ParticleLayout()
-    layout.addParticle(particle)
-    layout.setInterferenceFunction(iff)
-    layout.setTotalParticleSurfaceDensity(0.0001)
-
-    # Define layers
-    layer_1 = ba.Layer(material_Vacuum)
-    layer_1.addLayout(layout)
-    layer_2 = ba.Layer(material_Substrate)
-
-    # Define sample
-    sample = ba.MultiLayer()
-    sample.addLayer(layer_1)
-    sample.addLayer(layer_2)
-
-    return sample
-
-
-def get_simulation(sample):
-    beam = ba.Beam(1, 0.16*nm, ba.Direction(0.3*deg, 0))
-    detector = ba.SphericalDetector(100, -1.5*deg, 1.5*deg, 100, 0,
-                                    2.5*deg)
-    simulation = ba.ScatteringSimulation(beam, sample, detector)
-    return simulation
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation)
diff --git a/hugo/static/files/python/simulation/ex03_Interferences/GratingMC.py b/hugo/static/files/python/simulation/ex03_Interferences/GratingMC.py
deleted file mode 100644
index 19fe3aee99bbe50ea403f646d5cb897fc8d47f89..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex03_Interferences/GratingMC.py
+++ /dev/null
@@ -1,99 +0,0 @@
-#!/usr/bin/env python3
-"""
-Simulation of grating using very long boxes and 1D lattice.
-Monte-carlo integration is used to get rid of
-large-particle form factor oscillations.
-"""
-import bornagain as ba
-from bornagain import deg, angstrom, nm, micrometer
-import ba_plot
-from matplotlib import pyplot as plt
-
-
-def get_sample(lattice_rotation_angle=0*deg):
-    """
-    Returns a sample with a grating on a substrate.
-    lattice_rotation_angle = 0 - beam parallel to grating lines
-    lattice_rotation_angle = 90*deg - beam perpendicular to grating lines
-    """
-    # defining materials
-    m_vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-    m_si = ba.HomogeneousMaterial("Si", 5.7816e-6, 1.0229e-7)
-
-    box_length, box_width, box_height = 50*micrometer, 70*nm, 50*nm
-    lattice_length = 150*nm
-
-    # collection of particles
-    interference = ba.InterferenceFunction1DLattice(
-        lattice_length, 90*deg - lattice_rotation_angle)
-
-    pdf = ba.FTDecayFunction1DGauss(450)
-    interference.setDecayFunction(pdf)
-
-    box_ff = ba.FormFactorLongBoxLorentz(box_length, box_width, box_height)
-    box = ba.Particle(m_si, box_ff)
-
-    particle_layout = ba.ParticleLayout()
-    particle_layout.addParticle(box, 1, ba.kvector_t(0, 0, 0),
-                                ba.RotationZ(lattice_rotation_angle))
-    particle_layout.setInterferenceFunction(interference)
-
-    # assembling the sample
-    vacuum_layer = ba.Layer(m_vacuum)
-    vacuum_layer.addLayout(particle_layout)
-    substrate_layer = ba.Layer(m_si)
-
-    roughness = ba.LayerRoughness()
-    roughness.setSigma(5*nm)
-    roughness.setHurstParameter(0.5)
-    roughness.setLatteralCorrLength(10*nm)
-
-    multi_layer = ba.MultiLayer()
-    multi_layer.addLayer(vacuum_layer)
-    multi_layer.addLayerWithTopRoughness(substrate_layer, roughness)
-    return multi_layer
-
-
-def get_simulation(sample):
-    """
-    Create and return GISAXS simulation with beam and detector defined
-    """
-    beam = ba.Beam(1e8, 1.34*angstrom, ba.Direction(0.4*deg, 0))
-    det = ba.SphericalDetector(200, -0.5*deg, 0.5*deg, 200, 0, 0.6*deg)
-    simulation = ba.ScatteringSimulation(beam, sample, det)
-    simulation.getOptions().setMonteCarloIntegration(True, 100)
-    return simulation
-
-
-def run_simulation():
-    """
-    Runs simulation and returns intensity map.
-    """
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    if not "__no_terminal__" in globals():
-        simulation.setTerminalProgressMonitor()
-    simulation.runSimulation()
-    return simulation.result()
-
-
-def simulate_and_plot():
-    interactive = True
-    result = run_simulation().histogram2d()
-    ba_plot.plot_histogram(result)
-
-    peaks = ba.FindPeaks(result, 2, "nomarkov", 0.001)
-    xpeaks = [peak[0] for peak in peaks]
-    ypeaks = [peak[1] for peak in peaks]
-    print(peaks)
-    plt.plot(xpeaks,
-             ypeaks,
-             linestyle='None',
-             marker='x',
-             color='white',
-             markersize=10)
-    plt.show()
-
-
-if __name__ == '__main__':
-    simulate_and_plot()
diff --git a/hugo/static/files/python/simulation/ex03_Interferences/Interference1DLattice.py b/hugo/static/files/python/simulation/ex03_Interferences/Interference1DLattice.py
deleted file mode 100644
index 26c906e6d5f7c8cabe603cb35714a73c782cb69f..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex03_Interferences/Interference1DLattice.py
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/usr/bin/env python3
-"""
-Simulation of grating using very long boxes and 1D lattice.
-Monte-carlo integration is used to get rid of
-large-particle form factor oscillations.
-"""
-import bornagain as ba
-from bornagain import angstrom, deg, nm, nm2, kvector_t
-
-
-def get_sample():
-    """
-    Returns a sample with a grating on a substrate,
-    modelled by very long boxes forming a 1D lattice with Cauchy correlations.
-    """
-
-    # Define materials
-    material_Particle = ba.HomogeneousMaterial("Particle", 0.0006, 2e-08)
-    material_Substrate = ba.HomogeneousMaterial("Substrate", 6e-06, 2e-08)
-    material_Vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-
-    # Define form factors
-    ff = ba.FormFactorBox(10*nm, 10000*nm, 10*nm)
-
-    # Define particles
-    particle = ba.Particle(material_Particle, ff)
-    particle_rotation = ba.RotationZ(45*deg)
-    particle.setRotation(particle_rotation)
-
-    # Define interference functions
-    iff = ba.InterferenceFunction1DLattice(30*nm, 45*deg)
-    iff_pdf = ba.FTDecayFunction1DCauchy(1000*nm)
-    iff.setDecayFunction(iff_pdf)
-
-    # Define particle layouts
-    layout = ba.ParticleLayout()
-    layout.addParticle(particle)
-    layout.setInterferenceFunction(iff)
-    layout.setTotalParticleSurfaceDensity(0.01)
-
-    # Define layers
-    layer_1 = ba.Layer(material_Vacuum)
-    layer_1.addLayout(layout)
-    layer_2 = ba.Layer(material_Substrate)
-
-    # Define sample
-    sample = ba.MultiLayer()
-    sample.addLayer(layer_1)
-    sample.addLayer(layer_2)
-
-    return sample
-
-
-def get_simulation(sample):
-    beam = ba.Beam(1, 1*angstrom, ba.Direction(0.2*deg, 0))
-    det = ba.SphericalDetector(200, -1*deg, 1*deg, 200, 0, 2*deg)
-    simulation = ba.ScatteringSimulation(beam, sample, det)
-    simulation.getOptions().setMonteCarloIntegration(True, 100)
-    if not "__no_terminal__" in globals():
-        simulation.setTerminalProgressMonitor()
-    return simulation
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation, intensity_min=1e-03)
diff --git a/hugo/static/files/python/simulation/ex03_Interferences/Interference1DRadialParaCrystal.py b/hugo/static/files/python/simulation/ex03_Interferences/Interference1DRadialParaCrystal.py
deleted file mode 100644
index 399e413e551aa6140d6b1d673466aade3683a63a..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex03_Interferences/Interference1DRadialParaCrystal.py
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/usr/bin/env python3
-"""
-radial paracrystal
-"""
-import bornagain as ba
-from bornagain import deg, nm
-
-
-def get_sample():
-    """
-    Returns a sample with cylinders on a substrate that form a radial paracrystal.
-    """
-
-    # Define materials
-    material_Particle = ba.HomogeneousMaterial("Particle", 0.0006, 2e-08)
-    material_Substrate = ba.HomogeneousMaterial("Substrate", 6e-06, 2e-08)
-    material_Vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-
-    # Define form factors
-    ff = ba.FormFactorCylinder(5*nm, 5*nm)
-
-    # Define particles
-    particle = ba.Particle(material_Particle, ff)
-
-    # Define interference functions
-    iff = ba.InterferenceFunctionRadialParaCrystal(20*nm, 1000*nm)
-    iff_pdf = ba.FTDistribution1DGauss(7*nm)
-    iff.setProbabilityDistribution(iff_pdf)
-
-    # Define particle layouts
-    layout = ba.ParticleLayout()
-    layout.addParticle(particle)
-    layout.setInterferenceFunction(iff)
-    layout.setTotalParticleSurfaceDensity(0.01)
-
-    # Define layers
-    layer_1 = ba.Layer(material_Vacuum)
-    layer_1.addLayout(layout)
-    layer_2 = ba.Layer(material_Substrate)
-
-    # Define sample
-    sample = ba.MultiLayer()
-    sample.addLayer(layer_1)
-    sample.addLayer(layer_2)
-
-    return sample
-
-
-def get_simulation(sample):
-    beam = ba.Beam(1, 0.1*nm, ba.Direction(0.2*deg, 0))
-    detector = ba.SphericalDetector(200, -2*deg, 2*deg, 200, 0, 2*deg)
-    simulation = ba.ScatteringSimulation(beam, sample, detector)
-    return simulation
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation)
diff --git a/hugo/static/files/python/simulation/ex03_Interferences/Interference2DCenteredSquareLattice.py b/hugo/static/files/python/simulation/ex03_Interferences/Interference2DCenteredSquareLattice.py
deleted file mode 100644
index 33007957f85d662770cacc3307589caa03f3d674..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex03_Interferences/Interference2DCenteredSquareLattice.py
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/usr/bin/env python3
-"""
-2D lattice with disorder, centered square lattice
-"""
-import bornagain as ba
-from bornagain import deg, nm, kvector_t
-
-r = 3*nm  # particle radius
-a = 25*nm # lattice constant
-
-def get_sample():
-    """
-    Returns a sample with cylinders on a substrate,
-    forming a 2D centered square lattice
-    """
-
-    # Define materials
-    material_Particle = ba.HomogeneousMaterial("Particle", 0.0006, 2e-08)
-    material_Substrate = ba.HomogeneousMaterial("Substrate", 6e-06, 2e-08)
-    material_Vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-
-    # Define particles
-    ff = ba.FormFactorCylinder(r, r)
-    particle_1 = ba.Particle(material_Particle, ff)
-    particle_2 = ba.Particle(material_Particle, ff)
-    particle_2.setPosition(kvector_t(a/2, a/2, 0))
-
-    # Define composition of particles at specific positions
-    basis = ba.ParticleComposition()
-    basis.addParticle(particle_1)
-    basis.addParticle(particle_2)
-
-    # Define 2D lattices
-    lattice = ba.SquareLattice2D(a, 0*deg)
-
-    # Define interference functions
-    iff = ba.InterferenceFunction2DLattice(lattice)
-    iff_pdf = ba.FTDecayFunction2DCauchy(48*nm, 16*nm, 0)
-    iff.setDecayFunction(iff_pdf)
-
-    # Define particle layouts
-    layout = ba.ParticleLayout()
-    layout.addParticle(basis)
-    layout.setInterferenceFunction(iff)
-    layout.setTotalParticleSurfaceDensity(0.0016)
-
-    # Define layers
-    layer_1 = ba.Layer(material_Vacuum)
-    layer_1.addLayout(layout)
-    layer_2 = ba.Layer(material_Substrate)
-
-    # Define sample
-    sample = ba.MultiLayer()
-    sample.addLayer(layer_1)
-    sample.addLayer(layer_2)
-
-    return sample
-
-
-def get_simulation(sample):
-    beam = ba.Beam(1, 0.1*nm, ba.Direction(0.2*deg, 0))
-    detector = ba.SphericalDetector(200, -2*deg, 2*deg, 200, 0, 2*deg)
-    simulation = ba.ScatteringSimulation(beam, sample, detector)
-    return simulation
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation)
diff --git a/hugo/static/files/python/simulation/ex03_Interferences/Interference2DLatticeSumOfRotated.py b/hugo/static/files/python/simulation/ex03_Interferences/Interference2DLatticeSumOfRotated.py
deleted file mode 100644
index 7612e1db6f066ee31f6511ea4b937d233aef262f..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex03_Interferences/Interference2DLatticeSumOfRotated.py
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/usr/bin/env python3
-import bornagain as ba
-from bornagain import deg, nm
-
-
-def get_sample():
-    """
-    Returns a sample with cylinders on a substrate,
-    forming a 2D lattice with different disorder rotated lattice
-    """
-    m_vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-    m_substrate = ba.HomogeneousMaterial("Substrate", 6e-6, 2e-8)
-    m_particle = ba.HomogeneousMaterial("Particle", 6e-4, 2e-8)
-
-    vacuum_layer = ba.Layer(m_vacuum)
-    substrate_layer = ba.Layer(m_substrate)
-
-    p_interference_function = \
-        ba.InterferenceFunction2DLattice(ba.SquareLattice2D(25*nm, 0))
-    pdf = ba.FTDecayFunction2DCauchy(48*nm, 16*nm, 0)
-    p_interference_function.setDecayFunction(pdf)
-
-    particle_layout = ba.ParticleLayout()
-    ff = ba.FormFactorCylinder(3*nm, 3*nm)
-    position = ba.kvector_t(0, 0, 0)
-    cylinder = ba.Particle(m_particle, ff.clone())
-    cylinder.setPosition(position)
-    particle_layout.addParticle(cylinder)
-    particle_layout.setInterferenceFunction(p_interference_function)
-
-    vacuum_layer.addLayout(particle_layout)
-
-    multi_layer = ba.MultiLayer()
-    multi_layer.addLayer(vacuum_layer)
-    multi_layer.addLayer(substrate_layer)
-    return multi_layer
-
-
-def get_simulation(sample):
-    beam = ba.Beam(1, 0.1*nm, ba.Direction(0.2*deg, 0))
-    detector = ba.SphericalDetector(100, 2*deg, 1*deg, 1*deg)
-    simulation = ba.ScatteringSimulation(beam, sample, detector)
-    distr_1 = ba.DistributionGate(0, 240*deg)
-    simulation.addParameterDistribution("*/SquareLattice2D/Xi", distr_1, 3,
-                                        0)
-    return simulation
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation)
diff --git a/hugo/static/files/python/simulation/ex03_Interferences/Interference2DParaCrystal.py b/hugo/static/files/python/simulation/ex03_Interferences/Interference2DParaCrystal.py
deleted file mode 100644
index 14ac0a7553d3e1829dc2fe98f53db1baa8f5c88e..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex03_Interferences/Interference2DParaCrystal.py
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/usr/bin/env python3
-"""
-2D paracrystal
-"""
-import bornagain as ba
-from bornagain import deg, nm
-
-
-def get_sample():
-    """
-    Returns a sample with cylinders on a substrate, forming a 2D paracrystal
-    """
-
-    # Define materials
-    material_Particle = ba.HomogeneousMaterial("Particle", 0.0006, 2e-08)
-    material_Substrate = ba.HomogeneousMaterial("Substrate", 6e-06, 2e-08)
-    material_Vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-
-    # Define form factors
-    ff = ba.FormFactorCylinder(4*nm, 5*nm)
-
-    # Define particles
-    particle = ba.Particle(material_Particle, ff)
-
-    # Define 2D lattices
-    lattice = ba.BasicLattice2D(10*nm, 10*nm, 90*deg, 0)
-
-    # Define interference functions
-    iff = ba.InterferenceFunction2DParaCrystal(lattice, 0, 20000*nm,
-                                               20000*nm)
-    iff.setIntegrationOverXi(True)
-    iff_pdf_1 = ba.FTDistribution2DCauchy(1*nm, 1*nm, 0)
-    iff_pdf_2 = ba.FTDistribution2DCauchy(1*nm, 1*nm, 0)
-    iff.setProbabilityDistributions(iff_pdf_1, iff_pdf_2)
-
-    # Define particle layouts
-    layout = ba.ParticleLayout()
-    layout.addParticle(particle)
-    layout.setInterferenceFunction(iff)
-    layout.setTotalParticleSurfaceDensity(0.01)
-
-    # Define layers
-    layer_1 = ba.Layer(material_Vacuum)
-    layer_1.addLayout(layout)
-    layer_2 = ba.Layer(material_Substrate)
-
-    # Define sample
-    sample = ba.MultiLayer()
-    sample.addLayer(layer_1)
-    sample.addLayer(layer_2)
-
-    return sample
-
-
-def get_simulation(sample):
-    beam = ba.Beam(1, 0.1*nm, ba.Direction(0.2*deg, 0))
-    detector = ba.SphericalDetector(200, -2*deg, 2*deg, 200, 0, 2*deg)
-    simulation = ba.ScatteringSimulation(beam, sample, detector)
-    return simulation
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation)
diff --git a/hugo/static/files/python/simulation/ex03_Interferences/Interference2DRotatedSquareLattice.py b/hugo/static/files/python/simulation/ex03_Interferences/Interference2DRotatedSquareLattice.py
deleted file mode 100644
index 4a5cc963035a2fad5f6754cd8ac4055d06ead81f..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex03_Interferences/Interference2DRotatedSquareLattice.py
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/env python3
-"""
-Cylinders on a rotated 2D lattice
-"""
-import bornagain as ba
-from bornagain import deg, nm
-
-
-def get_sample():
-    """
-    Returns a sample with cylinders on a substrate, forming a rotated 2D lattice
-    """
-
-    # Define materials
-    material_Particle = ba.HomogeneousMaterial("Particle", 0.0006, 2e-08)
-    material_Substrate = ba.HomogeneousMaterial("Substrate", 6e-06, 2e-08)
-    material_Vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-
-    # Define form factors
-    ff = ba.FormFactorCylinder(3*nm, 3*nm)
-
-    # Define particles
-    particle = ba.Particle(material_Particle, ff)
-
-    # Define 2D lattices
-    lattice = ba.BasicLattice2D(25*nm, 25*nm, 90*deg, 30*deg)
-
-    # Define interference functions
-    iff = ba.InterferenceFunction2DLattice(lattice)
-    iff_pdf = ba.FTDecayFunction2DCauchy(47.7464829276*nm,
-                                         15.9154943092*nm, 30*deg)
-    iff.setDecayFunction(iff_pdf)
-
-    # Define particle layouts
-    layout = ba.ParticleLayout()
-    layout.addParticle(particle)
-    layout.setInterferenceFunction(iff)
-    layout.setTotalParticleSurfaceDensity(0.0016)
-
-    # Define layers
-    layer_1 = ba.Layer(material_Vacuum)
-    layer_1.addLayout(layout)
-    layer_2 = ba.Layer(material_Substrate)
-
-    # Define sample
-    sample = ba.MultiLayer()
-    sample.addLayer(layer_1)
-    sample.addLayer(layer_2)
-
-    return sample
-
-
-def get_simulation(sample):
-    beam = ba.Beam(1, 0.1*nm, ba.Direction(0.2*deg, 0))
-    detector = ba.SphericalDetector(200, -2*deg, 2*deg, 200, 0, 2*deg)
-    simulation = ba.ScatteringSimulation(beam, sample, detector)
-    return simulation
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation)
diff --git a/hugo/static/files/python/simulation/ex03_Interferences/Interference2DSquareFiniteLattice.py b/hugo/static/files/python/simulation/ex03_Interferences/Interference2DSquareFiniteLattice.py
deleted file mode 100644
index fa4b37c6ac6f6b21f7e0e2859c40a9587390edf8..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex03_Interferences/Interference2DSquareFiniteLattice.py
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/usr/bin/env python3
-"""
-Cylinders on a 2D square lattice
-"""
-import bornagain as ba
-from bornagain import deg, nm, nm2
-
-
-def get_sample():
-    """
-    Returns a sample with cylinders on a substrate, forming a 2D square lattice.
-    """
-
-    # Define materials
-    material_Particle = ba.HomogeneousMaterial("Particle", 0.0006, 2e-08)
-    material_Substrate = ba.HomogeneousMaterial("Substrate", 6e-06, 2e-08)
-    material_Vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-
-    # Define form factors
-    ff = ba.FormFactorCylinder(3*nm, 3*nm)
-
-    # Define particles
-    particle = ba.Particle(material_Particle, ff)
-
-    # Define 2D lattices
-    lattice = ba.BasicLattice2D(25*nm, 25*nm, 90*deg, 0)
-
-    # Define interference functions
-    iff = ba.InterferenceFunctionFinite2DLattice(lattice, 40, 40)
-    iff.setPositionVariance(1*nm2)
-
-    # Define particle layouts
-    layout = ba.ParticleLayout()
-    layout.addParticle(particle)
-    layout.setInterferenceFunction(iff)
-    layout.setTotalParticleSurfaceDensity(0.0016)
-
-    # Define layers
-    layer_1 = ba.Layer(material_Vacuum)
-    layer_1.addLayout(layout)
-    layer_2 = ba.Layer(material_Substrate)
-
-    # Define sample
-    sample = ba.MultiLayer()
-    sample.addLayer(layer_1)
-    sample.addLayer(layer_2)
-
-    return sample
-
-
-def get_simulation(sample):
-    beam = ba.Beam(1, 0.1*nm, ba.Direction(0.2*deg, 0))
-    detector = ba.SphericalDetector(200, -2*deg, 2*deg, 200, 0, 2*deg)
-    simulation = ba.ScatteringSimulation(beam, sample, detector)
-    return simulation
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation)
diff --git a/hugo/static/files/python/simulation/ex03_Interferences/PositionVariance.py b/hugo/static/files/python/simulation/ex03_Interferences/PositionVariance.py
deleted file mode 100755
index d56c6317ae5736f841601ded481a36b1dd95e752..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex03_Interferences/PositionVariance.py
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/usr/bin/env python3
-"""
-"""
-import bornagain as ba
-from bornagain import deg, nm, kvector_t
-from matplotlib import pyplot as plt
-
-
-def get_sample(hasVariance, xi):
-    # Define materials
-    m_air = ba.HomogeneousMaterial("Air", 0, 0)
-    m_particle = ba.HomogeneousMaterial("Particle", 0.0006, 2e-08)
-    m_substrate = ba.HomogeneousMaterial("Substrate", 6e-06, 2e-08)
-
-    # Define particles
-    R = 2.5*nm
-    ff = ba.FormFactorFullSpheroid(R, R)
-    particle = ba.Particle(m_particle, ff)
-
-    # Define interference function
-    lattice = ba.SquareLattice2D(10*nm, xi)
-    interference = ba.InterferenceFunction2DLattice(lattice)
-    interference_pdf = ba.FTDecayFunction2DCauchy(500*nm, 500*nm, 0)
-    interference.setDecayFunction(interference_pdf)
-    if hasVariance:
-        interference.setPositionVariance(0.3*nm)
-
-    # Define particle layout
-    layout = ba.ParticleLayout()
-    layout.addParticle(particle)
-    layout.setInterferenceFunction(interference)
-
-    # Define layers
-    l_air = ba.Layer(m_air)
-    l_air.addLayout(layout)
-    l_substrate = ba.Layer(m_substrate)
-
-    # Define sample
-    multilayer = ba.MultiLayer()
-    multilayer.addLayer(l_air)
-    multilayer.addLayer(l_substrate)
-    return multilayer
-
-
-def get_simulation(sample):
-    beam = ba.Beam(1e8, 0.1*nm, ba.Direction(0.2*deg, 0))
-
-    det = ba.SphericalDetector(400, -2*deg, 2*deg, 400, 0, 3*deg)
-
-    simulation = ba.ScatteringSimulation(beam, sample, det)
-    return simulation
-
-
-def run_one(hasVariance, xi, nPlot, title):
-    sample = get_sample(hasVariance, xi)
-    simulation = get_simulation(sample)
-    simulation.runSimulation()
-    result = simulation.result()
-
-    plt.subplot(3, 2, nPlot)
-
-    return ba_plot.plot_colormap(result,
-                          title=title,
-                          intensity_max=3e7,
-                          intensity_min=3e0,
-                          zlabel=None,
-                          aspect='equal',
-                          with_cb=False)
-
-
-if __name__ == '__main__':
-    import ba_plot
-    fig, axs = plt.subplots(3, 2, figsize=(10, 13))
-
-    xi1 =  5*deg
-    xi2 = 15*deg
-    im = run_one(False, 0*deg, 1, "xi=0 deg, fixed positions")
-    run_one(True, 0*deg, 2, "position variance 0.3 nm")
-    run_one(False, xi1, 3, "xi=5 deg, fixed positions")
-    run_one(True, xi1, 4, "position variance 0.3 nm")
-    run_one(False, xi2, 5, "xi=15 deg, fixed positions")
-    run_one(True, xi2, 6, "position variance 0.3 nm")
-
-    plt.subplots_adjust(bottom=0.05, left=0.1)
-    plt.colorbar(im, cax=plt.axes([0.93, 0.36, 0.03, 0.21]))
-    plt.show()
diff --git a/hugo/static/files/python/simulation/ex03_Interferences/RectangularGrating.py b/hugo/static/files/python/simulation/ex03_Interferences/RectangularGrating.py
deleted file mode 100644
index 97dcc1f3968e3b0199a3c4d0f8d3c27ed1cd7ad7..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex03_Interferences/RectangularGrating.py
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/usr/bin/env python3
-"""
-Simulation of grating using very long boxes and 1D lattice.
-Monte-carlo integration is used to get rid of
-large-particle form factor oscillations.
-"""
-import numpy, sys
-import bornagain as ba
-from bornagain import deg, micrometer, nm, nm2, kvector_t
-
-
-def get_sample(lattice_rotation_angle=0*deg):
-    """
-    Returns a sample with a grating on a substrate.
-    lattice_rotation_angle = 0 - beam parallel to grating lines
-    lattice_rotation_angle = 90*deg - beam perpendicular to grating lines
-    """
-    # Define materials
-    m_vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-    m_si = ba.HomogeneousMaterial("Si", 5.7816e-6, 1.0229e-7)
-
-    box_length, box_width, box_height = 50*micrometer, 70*nm, 50*nm
-    lattice_length = 150*nm
-
-    # Define particle layout
-    interference = ba.InterferenceFunction1DLattice(
-        lattice_length, 90*deg - lattice_rotation_angle)
-
-    pdf = ba.FTDecayFunction1DGauss(450)
-    interference.setDecayFunction(pdf)
-
-    box_ff = ba.FormFactorLongBoxLorentz(box_length, box_width, box_height)
-    box = ba.Particle(m_si, box_ff)
-
-    particle_layout = ba.ParticleLayout()
-    particle_layout.addParticle(box, 1, ba.kvector_t(0, 0, 0),
-                                ba.RotationZ(lattice_rotation_angle))
-    particle_layout.setInterferenceFunction(interference)
-
-    # Define sample
-    vacuum_layer = ba.Layer(m_vacuum)
-    vacuum_layer.addLayout(particle_layout)
-    substrate_layer = ba.Layer(m_si)
-
-    roughness = ba.LayerRoughness()
-    roughness.setSigma(5*nm)
-    roughness.setHurstParameter(0.5)
-    roughness.setLatteralCorrLength(10*nm)
-
-    multi_layer = ba.MultiLayer()
-    multi_layer.addLayer(vacuum_layer)
-    multi_layer.addLayerWithTopRoughness(substrate_layer, roughness)
-    return multi_layer
-
-
-def get_simulation(sample):
-    beam = ba.Beam(1e8, 0.134*nm, ba.Direction(0.4*deg, 0))
-    detector = ba.SphericalDetector(200, -0.5*deg, 0.5*deg, 200, 0,
-                                    0.6*deg)
-    simulation = ba.ScatteringSimulation(beam, sample, detector)
-    simulation.getOptions().setMonteCarloIntegration(True, 100)
-    return simulation
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation)
diff --git a/hugo/static/files/python/simulation/ex03_Interferences/SpheresAtHexLattice.py b/hugo/static/files/python/simulation/ex03_Interferences/SpheresAtHexLattice.py
deleted file mode 100644
index 0839a7d60716f8573a7d8c6e3b9a31a366e39bf8..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex03_Interferences/SpheresAtHexLattice.py
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/env python3
-"""
-Spheres on a hexagonal lattice
-"""
-import bornagain as ba
-from bornagain import deg, nm
-
-
-def get_sample():
-    """
-    Returns a sample with spherical particles on a substrate,
-    forming a hexagonal 2D lattice.
-    """
-
-    # Define materials
-    material_Particle = ba.HomogeneousMaterial("Particle", 0.0006, 2e-08)
-    material_Substrate = ba.HomogeneousMaterial("Substrate", 6e-06, 2e-08)
-    material_Vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-
-    # Define form factors
-    ff = ba.FormFactorFullSphere(10*nm)
-
-    # Define particles
-    particle = ba.Particle(material_Particle, ff)
-
-    # Define 2D lattices
-    lattice = ba.BasicLattice2D(20*nm, 20*nm, 120*deg, 0)
-
-    # Define interference functions
-    iff = ba.InterferenceFunction2DLattice(lattice)
-    iff_pdf = ba.FTDecayFunction2DCauchy(10*nm, 10*nm, 0)
-    iff.setDecayFunction(iff_pdf)
-
-    # Define particle layouts
-    layout = ba.ParticleLayout()
-    layout.addParticle(particle)
-    layout.setInterferenceFunction(iff)
-    layout.setTotalParticleSurfaceDensity(0.00288675134595)
-
-    # Define layers
-    layer_1 = ba.Layer(material_Vacuum)
-    layer_1.addLayout(layout)
-    layer_2 = ba.Layer(material_Substrate)
-
-    # Define sample
-    sample = ba.MultiLayer()
-    sample.addLayer(layer_1)
-    sample.addLayer(layer_2)
-
-    return sample
-
-
-def get_simulation(sample):
-    beam = ba.Beam(1, 0.1*nm, ba.Direction(0.2*deg, 0))
-    detector = ba.SphericalDetector(200, -1*deg, 1*deg, 200, 0, 1*deg)
-    simulation = ba.ScatteringSimulation(beam, sample, detector)
-    return simulation
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation)
diff --git a/hugo/static/files/python/simulation/ex03_Interferences/TriangularRipple.py b/hugo/static/files/python/simulation/ex03_Interferences/TriangularRipple.py
deleted file mode 100644
index 1fcd2134786de4e27fb6c26fbfbc1c929094b482..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex03_Interferences/TriangularRipple.py
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/usr/bin/env python3
-"""
- Sample from the article D. Babonneau et. al., Phys. Rev. B 85, 235415, 2012 (Fig.3)
-"""
-import bornagain as ba
-from bornagain import deg, nm
-
-
-def get_sample():
-    """
-    Returns a sample with a grating on a substrate, modelled by triangular ripples
-    forming a 1D Paracrystal.
-    """
-
-    # Define materials
-    material_Particle = ba.HomogeneousMaterial("Particle", 0.0006, 2e-08)
-    material_Substrate = ba.HomogeneousMaterial("Substrate", 6e-06, 2e-08)
-    material_Vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-
-    # Define form factors
-    ff = ba.FormFactorSawtoothRippleBox(100*nm, 20*nm, 4*nm, -3*nm)
-
-    # Define particles
-    particle = ba.Particle(material_Particle, ff)
-
-    # Define 2D lattices
-    lattice = ba.BasicLattice2D(200*nm, 50*nm, 90*deg, 0)
-
-    # Define interference functions
-    iff = ba.InterferenceFunction2DLattice(lattice)
-    iff_pdf = ba.FTDecayFunction2DGauss(160*nm, 16*nm, 0)
-    iff.setDecayFunction(iff_pdf)
-
-    # Define particle layouts
-    layout = ba.ParticleLayout()
-    layout.addParticle(particle)
-    layout.setInterferenceFunction(iff)
-    layout.setTotalParticleSurfaceDensity(0.0001)
-
-    # Define layers
-    layer_1 = ba.Layer(material_Vacuum)
-    layer_1.addLayout(layout)
-    layer_2 = ba.Layer(material_Substrate)
-
-    # Define sample
-    sample = ba.MultiLayer()
-    sample.addLayer(layer_1)
-    sample.addLayer(layer_2)
-
-    return sample
-
-
-def get_simulation(sample):
-    beam = ba.Beam(1, 0.16*nm, ba.Direction(0.3*deg, 0))
-    detector = ba.SphericalDetector(200, -1.5*deg, 1.5*deg, 200, 0,
-                                    2.5*deg)
-    simulation = ba.ScatteringSimulation(beam, sample, detector)
-    return simulation
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation)
diff --git a/hugo/static/files/python/simulation/ex04_ComplexShapes/BiMaterialCylinders.py b/hugo/static/files/python/simulation/ex04_ComplexShapes/BiMaterialCylinders.py
deleted file mode 100644
index ebb33412eaa4811563c9c19549a5cb4f6cdc4cd2..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex04_ComplexShapes/BiMaterialCylinders.py
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/usr/bin/env python3
-"""
-Cylindrical particle made from two materials.
-Particle crosses air/substrate interface.
-"""
-import bornagain as ba
-from bornagain import deg, nm, kvector_t
-
-
-def get_sample():
-    """
-    Returns a multi layer with substrate/air layers.
-    Vacuum layer contains cylindrical particles made of two materials.
-    Particle shifted down to cross interface.
-    """
-
-    # Define materials
-    material_Ag = ba.HomogeneousMaterial("Ag", 1.245e-05, 5.419e-07)
-    material_Substrate = ba.HomogeneousMaterial("Substrate", 3.212e-06,
-                                                3.244e-08)
-    material_Teflon = ba.HomogeneousMaterial("Teflon", 2.9e-06, 6.019e-09)
-    material_Vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-
-    # Define form factors
-    ff_1 = ba.FormFactorCylinder(10*nm, 4*nm)
-    ff_2 = ba.FormFactorCylinder(10*nm, 10*nm)
-
-    # Define particles
-    subparticle_1 = ba.Particle(material_Ag, ff_1)
-    subparticle_1.setPosition(kvector_t(0, 0, 10*nm))
-    subparticle_2 = ba.Particle(material_Teflon, ff_2)
-
-    # Define composition of particles at specific positions
-    particle = ba.ParticleComposition()
-    particle.addParticle(subparticle_1)
-    particle.addParticle(subparticle_2)
-    particle.setPosition(kvector_t(0, 0, -10*nm))
-
-    # Define particle layouts
-    layout = ba.ParticleLayout()
-    layout.addParticle(particle)
-    layout.setTotalParticleSurfaceDensity(1)
-
-    # Define layers
-    layer_1 = ba.Layer(material_Vacuum)
-    layer_1.addLayout(layout)
-    layer_2 = ba.Layer(material_Substrate)
-
-    # Define sample
-    sample = ba.MultiLayer()
-    sample.addLayer(layer_1)
-    sample.addLayer(layer_2)
-
-    return sample
-
-
-def get_simulation(sample):
-    beam = ba.Beam(1e9, 0.1*nm, ba.Direction(0.2*deg, 0))
-    detector = ba.SphericalDetector(100, 2*deg, 0, 1*deg)
-    simulation = ba.ScatteringSimulation(beam, sample, detector)
-    return simulation
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation)
diff --git a/hugo/static/files/python/simulation/ex04_ComplexShapes/CoreShellNanoparticles.py b/hugo/static/files/python/simulation/ex04_ComplexShapes/CoreShellNanoparticles.py
deleted file mode 100644
index 5be665145dc424957abc585ac0ac459890cf584e..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex04_ComplexShapes/CoreShellNanoparticles.py
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/usr/bin/env python3
-"""
-Core shell nanoparticles
-"""
-import bornagain as ba
-from bornagain import deg, nm
-
-
-def get_sample():
-    """
-    Returns a sample with box-shaped core-shell particles on a substrate.
-    """
-
-    # Define materials
-    material_Core = ba.HomogeneousMaterial("Core", 6e-05, 2e-08)
-    material_Shell = ba.HomogeneousMaterial("Shell", 0.0001, 2e-08)
-    material_Vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-
-    # Define form factors
-    ff_1 = ba.FormFactorBox(12*nm, 12*nm, 7*nm)
-    ff_2 = ba.FormFactorBox(16*nm, 16*nm, 8*nm)
-
-    # Define particles
-    particle_1 = ba.Particle(material_Core, ff_1)
-    particle_2 = ba.Particle(material_Shell, ff_2)
-
-    # Define core shell particles
-    particle_3 = ba.ParticleCoreShell(particle_2, particle_1)
-
-    # Define interference functions
-    iff = ba.InterferenceFunctionNone()
-
-    # Define particle layouts
-    layout = ba.ParticleLayout()
-    layout.addParticle(particle_3)
-    layout.setInterferenceFunction(iff)
-    layout.setTotalParticleSurfaceDensity(0.01)
-
-    # Define layers
-    layer = ba.Layer(material_Vacuum)
-    layer.addLayout(layout)
-
-    # Define sample
-    sample = ba.MultiLayer()
-    sample.addLayer(layer)
-
-    return sample
-
-
-def get_simulation(sample):
-    beam = ba.Beam(1, 0.1*nm, ba.Direction(0.2*deg, 0))
-    detector = ba.SphericalDetector(200, 2*deg, 0, 1*deg)
-    simulation = ba.ScatteringSimulation(beam, sample, detector)
-    return simulation
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation)
diff --git a/hugo/static/files/python/simulation/ex04_ComplexShapes/CustomFormFactor.py b/hugo/static/files/python/simulation/ex04_ComplexShapes/CustomFormFactor.py
deleted file mode 100644
index 7b056ab675c7c048165db97bacf330d853db3769..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex04_ComplexShapes/CustomFormFactor.py
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/usr/bin/env python3
-"""
-Custom form factor in DWBA.
-"""
-import bornagain as ba
-from bornagain import deg, angstrom, nm
-import cmath
-
-
-def sinc(x):
-    if abs(x) == 0:
-        return 1.
-    else:
-        return cmath.sin(x)/x
-
-
-class CustomFormFactor(ba.IBornFF):
-    """
-    A custom defined form factor.
-    The particle is a prism of height H,
-    with a base in form of a Greek cross ("plus" sign) with side length L.
-    """
-    def __init__(self, L, H):
-        ba.IBornFF.__init__(self)
-        # parameters describing the form factor
-        self.L = L
-        self.H = H
-
-    def clone(self):
-        """
-        IMPORTANT NOTE:
-        The clone method needs to call transferToCPP() on the cloned object
-        to transfer the ownership of the clone to the cpp code
-        """
-        cloned_ff = CustomFormFactor(self.L, self.H)
-        cloned_ff.transferToCPP()
-        return cloned_ff
-
-    def evaluate_for_q(self, q):
-        qzhH = 0.5*q.z()*self.H
-        qxhL = 0.5*q.x()*self.L
-        qyhL = 0.5*q.y()*self.L
-        return 0.5*self.H*self.L**2*cmath.exp(complex(0., 1.)*qzhH)*\
-               sinc(qzhH)*(sinc(0.5*qyhL)*(sinc(qxhL)-0.5*sinc(0.5*qxhL))+\
-               sinc(0.5*qxhL)*sinc(qyhL))
-
-
-def get_sample():
-    """
-    Returns a sample with particles, having a custom form factor, on a substrate.
-    """
-    # defining materials
-    m_vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-    m_substrate = ba.HomogeneousMaterial("Substrate", 6e-6, 2e-8)
-    m_particle = ba.HomogeneousMaterial("Particle", 6e-4, 2e-8)
-
-    # collection of particles
-    ff = CustomFormFactor(20*nm, 15*nm)
-    particle = ba.Particle(m_particle, ff)
-    particle_layout = ba.ParticleLayout()
-    particle_layout.addParticle(particle)
-    vacuum_layer = ba.Layer(m_vacuum)
-    vacuum_layer.addLayout(particle_layout)
-    substrate_layer = ba.Layer(m_substrate)
-
-    # assemble multilayer
-    multi_layer = ba.MultiLayer()
-    multi_layer.addLayer(vacuum_layer)
-    multi_layer.addLayer(substrate_layer)
-    return multi_layer
-
-
-def get_simulation(sample):
-    beam = ba.Beam(1, 1*angstrom, ba.Direction(0.2*deg, 0))
-    det = ba.SphericalDetector(100, -1*deg, 1*deg, 100, 0, 2*deg)
-    simulation = ba.ScatteringSimulation(beam, sample, det)
-    simulation.getOptions().setNumberOfThreads(
-        -1)  # deactivate multithreading (why?)
-    return simulation
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation)
diff --git a/hugo/static/files/python/simulation/ex04_ComplexShapes/HexagonalLatticesWithBasis.py b/hugo/static/files/python/simulation/ex04_ComplexShapes/HexagonalLatticesWithBasis.py
deleted file mode 100644
index 67125d8498a3e629fa490245a789fd5b32d8a907..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex04_ComplexShapes/HexagonalLatticesWithBasis.py
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/usr/bin/env python3
-"""
-Spheres on two hexagonal close packed layers
-"""
-import bornagain as ba
-from bornagain import deg, nm, kvector_t
-
-
-def get_sample():
-    """
-    Returns a sample with spheres on a substrate,
-    forming two hexagonal close packed layers.
-    """
-
-    # Define materials
-    material_Particle = ba.HomogeneousMaterial("Particle", 0.0006, 2e-08)
-    material_Substrate = ba.HomogeneousMaterial("Substrate", 6e-06, 2e-08)
-    material_Vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-
-    # Define form factors
-    ff_1 = ba.FormFactorFullSphere(10*nm)
-    ff_2 = ba.FormFactorFullSphere(10*nm)
-
-    # Define particles
-    particle_1 = ba.Particle(material_Particle, ff_1)
-    particle_2 = ba.Particle(material_Particle, ff_2)
-    particle_2_position = kvector_t(10*nm, 10*nm, 17.3205080757*nm)
-    particle_2.setPosition(particle_2_position)
-
-    # Define composition of particles at specific positions
-    basis = ba.ParticleComposition()
-    basis.addParticle(particle_1)
-    basis.addParticle(particle_2)
-
-    # Define 2D lattices
-    lattice = ba.HexagonalLattice2D(20*nm, 0)
-
-    # Define interference functions
-    iff = ba.InterferenceFunction2DLattice(lattice)
-    iff_pdf = ba.FTDecayFunction2DCauchy(10*nm, 10*nm, 0)
-    iff.setDecayFunction(iff_pdf)
-
-    # Define particle layouts
-    layout = ba.ParticleLayout()
-    layout.addParticle(basis)
-    layout.setInterferenceFunction(iff)
-    layout.setTotalParticleSurfaceDensity(0.00288675134595)
-
-    # Define layers
-    layer_1 = ba.Layer(material_Vacuum)
-    layer_1.addLayout(layout)
-    layer_2 = ba.Layer(material_Substrate)
-
-    # Define sample
-    sample = ba.MultiLayer()
-    sample.addLayer(layer_1)
-    sample.addLayer(layer_2)
-
-    return sample
-
-
-def get_simulation(sample):
-    beam = ba.Beam(1, 0.1*nm, ba.Direction(0.2*deg, 0))
-    detector = ba.SphericalDetector(200, -1*deg, 1*deg, 200, 0, 1*deg)
-    simulation = ba.ScatteringSimulation(beam, sample, detector)
-    return simulation
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation)
diff --git a/hugo/static/files/python/simulation/ex04_ComplexShapes/LargeParticlesFormFactor.py b/hugo/static/files/python/simulation/ex04_ComplexShapes/LargeParticlesFormFactor.py
deleted file mode 100644
index c9f4d2b118729e2283e5423874ca0b5d563c38b5..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex04_ComplexShapes/LargeParticlesFormFactor.py
+++ /dev/null
@@ -1,123 +0,0 @@
-#!/usr/bin/env python3
-"""
-Large cylinders in DWBA.
-
-This example demonstrates that for large particles (~1000nm) the form factor
-oscillates rapidly within one detector bin and analytical calculations
-(performed for the bin center) give completely wrong intensity pattern.
-In this case Monte-Carlo integration over detector bin should be used.
-"""
-import bornagain as ba
-from bornagain import deg, angstrom, nm
-import ba_plot
-from matplotlib import pyplot as plt
-
-default_cylinder_radius = 10*nm
-default_cylinder_height = 20*nm
-
-
-def get_sample(cylinder_radius, cylinder_height):
-    # Define materials
-    m_vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-    m_substrate = ba.HomogeneousMaterial("Substrate", 6e-6, 2e-8)
-    m_particle = ba.HomogeneousMaterial("Particle", 6e-4, 2e-8)
-
-    # Define particle layout
-    cylinder_ff = ba.FormFactorCylinder(cylinder_radius, cylinder_height)
-    cylinder = ba.Particle(m_particle, cylinder_ff)
-    particle_layout = ba.ParticleLayout()
-    particle_layout.addParticle(cylinder)
-
-    # Define layers
-    vacuum_layer = ba.Layer(m_vacuum)
-    vacuum_layer.addLayout(particle_layout)
-    substrate_layer = ba.Layer(m_substrate)
-
-    # Define sample
-    multi_layer = ba.MultiLayer()
-    multi_layer.addLayer(vacuum_layer)
-    multi_layer.addLayer(substrate_layer)
-    return multi_layer
-
-
-def get_simulation(sample, integration_flag):
-    """
-    Returns a GISAXS simulation with defined beam and detector.
-    If integration_flag=True, the simulation will integrate over detector bins.
-    """
-    beam = ba.Beam(1, 1*angstrom, ba.Direction(0.2*deg, 0))
-    det = ba.SphericalDetector(200, -2*deg, 2*deg, 200, 0, 2*deg)
-    simulation = ba.ScatteringSimulation(beam, sample, det)
-    simulation.getOptions().setMonteCarloIntegration(integration_flag, 50)
-    if not "__no_terminal__" in globals():
-        simulation.setTerminalProgressMonitor()
-    return simulation
-
-
-def simulate_and_plot():
-    """
-    Run simulation and plot results 4 times: for small and large cylinders,
-    with and without integration
-    """
-
-    fig = plt.figure(figsize=(12.80, 10.24))
-
-    # conditions to define cylinders scale factor and integration flag
-    conditions = [{
-        'title': "Small cylinders, analytical calculations",
-        'scale': 1,
-        'integration': False,
-        'zmin': 1e-5,
-        'zmax': 1e2
-    }, {
-        'title': "Small cylinders, Monte-Carlo integration",
-        'scale': 1,
-        'integration': True,
-        'zmin': 1e-5,
-        'zmax': 1e2
-    }, {
-        'title': "Large cylinders, analytical calculations",
-        'scale': 100,
-        'integration': False,
-        'zmin': 1e-5,
-        'zmax': 1e10
-    }, {
-        'title': "Large cylinders, Monte-Carlo integration",
-        'scale': 100,
-        'integration': True,
-        'zmin': 1e-5,
-        'zmax': 1e10
-    }]
-
-    # run simulation 4 times and plot results
-    for i_plot, condition in enumerate(conditions):
-        scale = condition['scale']
-        integration_flag = condition['integration']
-
-        sample = get_sample(default_cylinder_radius*scale,
-                            default_cylinder_height*scale)
-        simulation = get_simulation(sample, integration_flag)
-        simulation.runSimulation()
-        result = simulation.result()
-
-        # plotting results
-        plt.subplot(2, 2, i_plot + 1)
-        plt.subplots_adjust(wspace=0.3, hspace=0.3)
-
-        zmin = condition['zmin']
-        zmax = condition['zmax']
-        ba_plot.plot_colormap(result,
-                              intensity_min=zmin,
-                              intensity_max=zmax)
-
-        plt.text(0,
-                 2.1,
-                 conditions[i_plot]['title'],
-                 horizontalalignment='center',
-                 verticalalignment='center',
-                 fontsize=12)
-    plt.show()
-
-
-if __name__ == '__main__':
-    simulate_and_plot()
diff --git a/hugo/static/files/python/simulation/ex04_ComplexShapes/MesoCrystal.py b/hugo/static/files/python/simulation/ex04_ComplexShapes/MesoCrystal.py
deleted file mode 100644
index 4259aef72aff83f1fb48d756743d6e40ff27936c..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex04_ComplexShapes/MesoCrystal.py
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/usr/bin/env python3
-"""
-Cylindrical mesocrystal on a substrate
-"""
-import bornagain as ba
-from bornagain import deg, nm, kvector_t
-
-
-def get_sample():
-    """
-    Returns a sample with a cylindrically shaped mesocrystal on a substrate.
-    """
-
-    # Define materials
-    material_Particle = ba.HomogeneousMaterial("Particle", 0.0006, 2e-08)
-    material_Substrate = ba.HomogeneousMaterial("Substrate", 6e-06, 2e-08)
-    material_Vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-
-    # Define form factors
-    ff_1 = ba.FormFactorFullSphere(2*nm)
-    ff_2 = ba.FormFactorCylinder(20*nm, 50*nm)
-
-    # Define particles
-    particle_1 = ba.Particle(material_Particle, ff_1)
-
-    # Define 3D lattices
-    lattice = ba.Lattice3D(ba.kvector_t(5*nm, 0, 0),
-                           ba.kvector_t(0, 5*nm, 0),
-                           ba.kvector_t(0, 0, 5*nm))
-
-    # Define crystals
-    crystal = ba.Crystal(particle_1, lattice)
-
-    # Define mesocrystals
-    particle_2 = ba.MesoCrystal(crystal, ff_2)
-
-    # Define particle layouts
-    layout = ba.ParticleLayout()
-    layout.addParticle(particle_2, 1)
-    layout.setWeight(1)
-    layout.setTotalParticleSurfaceDensity(0.01)
-
-    # Define layers
-    layer_1 = ba.Layer(material_Vacuum)
-    layer_1.addLayout(layout)
-    layer_2 = ba.Layer(material_Substrate)
-
-    # Define sample
-    sample = ba.MultiLayer()
-    sample.addLayer(layer_1)
-    sample.addLayer(layer_2)
-
-    return sample
-
-
-def get_simulation(sample):
-    beam = ba.Beam(1, 0.1*nm, ba.Direction(0.2*deg, 0))
-    detector = ba.SphericalDetector(200, -2*deg, 2*deg, 200, 0, 2*deg)
-    simulation = ba.ScatteringSimulation(beam, sample, detector)
-    return simulation
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation)
diff --git a/hugo/static/files/python/simulation/ex04_ComplexShapes/ParticlesCrossingInterface.py b/hugo/static/files/python/simulation/ex04_ComplexShapes/ParticlesCrossingInterface.py
deleted file mode 100644
index 5f2f0915ca59d96906c9f340144bbbd35daa86c8..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex04_ComplexShapes/ParticlesCrossingInterface.py
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/usr/bin/env python3
-"""
-This example demonstrates new experimental feature of release-1.8.0:
-particles can now cross interfaces.
-
-Given example is similar to simulation/ex01_BasicParticles/CylindersAndPrisms.py,
-with the difference, that z-position of particles is adjusted to move them slightly
-down from vacuum layer and to make them cross substrate/air interface.
-
-Note:
-1) Simulation kernel automatically detects particles crossing interface and
-adjusts calculations accordingly.
-
-2) Particle crossing interface requires more time to simulate.
-
-3) Crossing of interface is possible only for limited number of geometries.
-For example, X or Y rotated particles can not yet cross interfaces (exception
-will be thrown when trying to simulate such geometries).
-"""
-import bornagain as ba
-from bornagain import deg, nm, kvector_t
-
-
-def get_sample():
-    """
-    Returns a sample with uncorrelated cylinders and prisms on a substrate.
-    """
-
-    # Define materials
-    material_Particle = ba.HomogeneousMaterial("Particle", 0.0006, 2e-08)
-    material_Substrate = ba.HomogeneousMaterial("Substrate", 6e-06, 2e-08)
-    material_Vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-
-    # Define form factors
-    ff_1 = ba.FormFactorCylinder(5*nm, 5*nm)
-    ff_2 = ba.FormFactorPrism3(10*nm, 5*nm)
-
-    # Define particles
-    particle_1 = ba.Particle(material_Particle, ff_1)
-    particle_1_position = kvector_t(0, 0, -3*nm)
-    particle_1.setPosition(particle_1_position)
-    particle_2 = ba.Particle(material_Particle, ff_2)
-    particle_2_position = kvector_t(0, 0, -3*nm)
-    particle_2.setPosition(particle_2_position)
-
-    # Define interference functions
-    iff = ba.InterferenceFunctionNone()
-
-    # Define particle layouts
-    layout = ba.ParticleLayout()
-    layout.addParticle(particle_1, 0.5)
-    layout.addParticle(particle_2, 0.5)
-    layout.setInterferenceFunction(iff)
-    layout.setTotalParticleSurfaceDensity(0.01)
-
-    # Define layers
-    layer_1 = ba.Layer(material_Vacuum)
-    layer_1.addLayout(layout)
-    layer_2 = ba.Layer(material_Substrate)
-
-    # Define sample
-    sample = ba.MultiLayer()
-    sample.addLayer(layer_1)
-    sample.addLayer(layer_2)
-
-    return sample
-
-
-def get_simulation(sample):
-    beam = ba.Beam(1, 0.1*nm, ba.Direction(0.2*deg, 0))
-    detector = ba.SphericalDetector(100, 2*deg, 0, 1*deg)
-    simulation = ba.ScatteringSimulation(beam, sample, detector)
-    return simulation
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation)
diff --git a/hugo/static/files/python/simulation/ex05_BeamAndDetector/BeamDivergence.py b/hugo/static/files/python/simulation/ex05_BeamAndDetector/BeamDivergence.py
deleted file mode 100644
index 98f7a7a7b6a733c7666c71625162ac0e2e615bf7..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex05_BeamAndDetector/BeamDivergence.py
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/usr/bin/env python3
-"""
-Cylinder form factor in DWBA with beam divergence
-"""
-import bornagain as ba
-from bornagain import deg, nm
-
-
-def get_sample():
-    """
-    Returns a sample with uncorrelated cylinders on a substrate.
-    """
-
-    # Define materials
-    material_Particle = ba.HomogeneousMaterial("Particle", 0.0006, 2e-08)
-    material_Substrate = ba.HomogeneousMaterial("Substrate", 6e-06, 2e-08)
-    material_Vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-
-    # Define form factors
-    ff = ba.FormFactorCylinder(5*nm, 5*nm)
-
-    # Define particles
-    particle = ba.Particle(material_Particle, ff)
-
-    # Define particle layouts
-    layout = ba.ParticleLayout()
-    layout.addParticle(particle)
-    layout.setTotalParticleSurfaceDensity(0.01)
-
-    # Define layers
-    layer_1 = ba.Layer(material_Vacuum)
-    layer_1.addLayout(layout)
-    layer_2 = ba.Layer(material_Substrate)
-
-    # Define sample
-    sample = ba.MultiLayer()
-    sample.addLayer(layer_1)
-    sample.addLayer(layer_2)
-
-    return sample
-
-
-def get_simulation(sample):
-    beam = ba.Beam(1, 0.1*nm, ba.Direction(0.2*deg, 0))
-    detector = ba.SphericalDetector(100, 2*deg, 1*deg, 1*deg)
-    simulation = ba.ScatteringSimulation(beam, sample, detector)
-    distr_1 = ba.DistributionLogNormal(0.1*nm, 0.1)
-    simulation.addParameterDistribution("*/Beam/Wavelength", distr_1, 5, 0)
-    distr_2 = ba.DistributionGaussian(0.2*deg, 0.1*deg)
-    simulation.addParameterDistribution("*/Beam/InclinationAngle", distr_2,
-                                        5, 0)
-    distr_3 = ba.DistributionGaussian(0, 0.1*deg)
-    simulation.addParameterDistribution("*/Beam/AzimuthalAngle", distr_3,
-                                        5, 0)
-    return simulation
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation)
diff --git a/hugo/static/files/python/simulation/ex05_BeamAndDetector/ConstantBackground.py b/hugo/static/files/python/simulation/ex05_BeamAndDetector/ConstantBackground.py
deleted file mode 100644
index 837ddf2172a84eb32576aec0fde9c0c4ee6080ce..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex05_BeamAndDetector/ConstantBackground.py
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/usr/bin/env python3
-"""
-Cylinder form factor in DWBA with constant background
-"""
-import bornagain as ba
-from bornagain import deg, nm
-
-
-def get_sample():
-    """
-    Returns a sample with uncorrelated cylinders on a substrate.
-    """
-
-    # Define materials
-    material_Particle = ba.HomogeneousMaterial("Particle", 0.0006, 2e-08)
-    material_Substrate = ba.HomogeneousMaterial("Substrate", 6e-06, 2e-08)
-    material_Vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-
-    # Define form factors
-    ff = ba.FormFactorCylinder(5*nm, 5*nm)
-
-    # Define particles
-    particle = ba.Particle(material_Particle, ff)
-
-    # Define particle layouts
-    layout = ba.ParticleLayout()
-    layout.addParticle(particle)
-    layout.setTotalParticleSurfaceDensity(0.01)
-
-    # Define layers
-    layer_1 = ba.Layer(material_Vacuum)
-    layer_1.addLayout(layout)
-    layer_2 = ba.Layer(material_Substrate)
-
-    # Define sample
-    sample = ba.MultiLayer()
-    sample.addLayer(layer_1)
-    sample.addLayer(layer_2)
-
-    return sample
-
-
-def get_simulation(sample):
-    beam = ba.Beam(1e6, 0.1*nm, ba.Direction(0.2*deg, 0))
-    detector = ba.SphericalDetector(100, 2*deg, 1*deg, 1*deg)
-    simulation = ba.ScatteringSimulation(beam, sample, detector)
-    background = ba.ConstantBackground(1.0e+03)
-    simulation.setBackground(background)
-    return simulation
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation)
diff --git a/hugo/static/files/python/simulation/ex05_BeamAndDetector/DetectorResolutionFunction.py b/hugo/static/files/python/simulation/ex05_BeamAndDetector/DetectorResolutionFunction.py
deleted file mode 100644
index f99eb29b4dc9bdc36e8255b26c124e94170e53e2..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex05_BeamAndDetector/DetectorResolutionFunction.py
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/usr/bin/env python3
-"""
-Cylinder form factor in DWBA with detector resolution function applied
-"""
-import bornagain as ba
-from bornagain import deg, nm
-
-
-def get_sample():
-    """
-    Returns a sample with uncorrelated cylinders on a substrate.
-    """
-
-    # Define materials
-    material_Particle = ba.HomogeneousMaterial("Particle", 0.0006, 2e-08)
-    material_Substrate = ba.HomogeneousMaterial("Substrate", 6e-06, 2e-08)
-    material_Vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-
-    # Define form factors
-    ff = ba.FormFactorCylinder(5*nm, 5*nm)
-
-    # Define particles
-    particle = ba.Particle(material_Particle, ff)
-
-    # Define particle layouts
-    layout = ba.ParticleLayout()
-    layout.addParticle(particle)
-    layout.setTotalParticleSurfaceDensity(0.01)
-
-    # Define layers
-    layer_1 = ba.Layer(material_Vacuum)
-    layer_1.addLayout(layout)
-    layer_2 = ba.Layer(material_Substrate)
-
-    # Define sample
-    sample = ba.MultiLayer()
-    sample.addLayer(layer_1)
-    sample.addLayer(layer_2)
-
-    return sample
-
-
-def get_simulation(sample):
-    beam = ba.Beam(1, 0.1*nm, ba.Direction(0.2*deg, 0))
-    detector = ba.SphericalDetector(100, 2*deg, 1*deg, 1*deg)
-    simulation = ba.ScatteringSimulation(beam, sample, detector)
-    simulation.setDetectorResolutionFunction(
-        ba.ResolutionFunction2DGaussian(0.02*deg, 0.02*deg))
-    return simulation
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation)
diff --git a/hugo/static/files/python/simulation/ex05_BeamAndDetector/OffSpecularSimulation.py b/hugo/static/files/python/simulation/ex05_BeamAndDetector/OffSpecularSimulation.py
deleted file mode 100644
index 5d19cb021a80d176080c1e12b174f8e28f736b49..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex05_BeamAndDetector/OffSpecularSimulation.py
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/usr/bin/env python3
-"""
-Long boxes at 1D lattice, ba.OffSpecular simulation
-"""
-import bornagain as ba
-from bornagain import angstrom, deg, nm, nm2, kvector_t
-
-phi_f_min, phi_f_max = -1, 1.0
-alpha_f_min, alpha_f_max = 0, 10.0
-alpha_i_min, alpha_i_max = 0, 10.0  # incoming beam
-
-
-def get_sample():
-    """
-    Returns a sample with a grating on a substrate,
-    modelled by infinitely long boxes forming a 1D lattice.
-    """
-
-    # Define materials
-    material_Particle = ba.HomogeneousMaterial("Particle", 0.0006, 2e-08)
-    material_Substrate = ba.HomogeneousMaterial("Substrate", 6e-06, 2e-08)
-    material_Vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-
-    # Define form factors
-    ff = ba.FormFactorBox(1000*nm, 20*nm, 10*nm)
-
-    # Define particles
-    particle = ba.Particle(material_Particle, ff)
-    particle_rotation = ba.RotationZ(90*deg)
-    particle.setRotation(particle_rotation)
-
-    # Define interference functions
-    iff = ba.InterferenceFunction1DLattice(100*nm, 0)
-    iff_pdf = ba.FTDecayFunction1DCauchy(1e6*nm)
-    iff.setDecayFunction(iff_pdf)
-
-    # Define particle layouts
-    layout = ba.ParticleLayout()
-    layout.addParticle(particle)
-    layout.setInterferenceFunction(iff)
-    layout.setTotalParticleSurfaceDensity(0.01)
-
-    # Define layers
-    layer_1 = ba.Layer(material_Vacuum)
-    layer_1.addLayout(layout)
-    layer_2 = ba.Layer(material_Substrate)
-
-    # Define sample
-    sample = ba.MultiLayer()
-    sample.addLayer(layer_1)
-    sample.addLayer(layer_2)
-
-    return sample
-
-
-def get_simulation(sample):
-    """
-    Returns an off-specular simulation with beam and detector defined.
-    """
-    simulation = ba.OffSpecularSimulation()
-    simulation.setDetectorParameters(20, phi_f_min*deg, phi_f_max*deg, 200,
-                                     alpha_f_min*deg, alpha_f_max*deg)
-    # define the beam with alpha_i varied between alpha_i_min and alpha_i_max
-    alpha_i_axis = ba.FixedBinAxis("alpha_i", 200, alpha_i_min*deg,
-                                   alpha_i_max*deg)
-    simulation.setBeamParameters(1*angstrom, alpha_i_axis, 0)
-    simulation.beam().setIntensity(1e9)
-    simulation.setSample(sample)
-    return simulation
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation, intensity_min=1)
diff --git a/hugo/static/files/python/simulation/ex06_Reflectometry/AlternatingLayers.py b/hugo/static/files/python/simulation/ex06_Reflectometry/AlternatingLayers.py
deleted file mode 100644
index 95597dea773c225d0e6a93b84d0a4389fb9d735c..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex06_Reflectometry/AlternatingLayers.py
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/usr/bin/env python3
-"""
-Basic example of specular reflectometry simulation with BornAgain.
-The sample consists of 20 alternating Ti and Ni layers.
-"""
-import bornagain as ba
-from bornagain import deg, angstrom
-
-
-def get_sample():
-    # Define materials
-    m_ambient = ba.MaterialBySLD("Vacuum", 0, 0)
-    m_ti = ba.MaterialBySLD("Ti", -1.9493e-06, 0)
-    m_ni = ba.MaterialBySLD("Ni", 9.4245e-06, 0)
-    m_substrate = ba.MaterialBySLD("SiSubstrate", 2.0704e-06, 0)
-
-    # Define layers
-    ambient_layer = ba.Layer(m_ambient)
-    ti_layer = ba.Layer(m_ti, 30*angstrom)
-    ni_layer = ba.Layer(m_ni, 70*angstrom)
-    substrate_layer = ba.Layer(m_substrate)
-
-    # Define sample
-    sample = ba.MultiLayer()
-    sample.addLayer(ambient_layer)
-    for _ in range(10):
-        sample.addLayer(ti_layer)
-        sample.addLayer(ni_layer)
-    sample.addLayer(substrate_layer)
-
-    return sample
-
-
-def get_simulation(sample, scan_size=500):
-    simulation = ba.SpecularSimulation()
-    scan = ba.AlphaScan(1.54*angstrom, scan_size, 0, 2*deg)
-    simulation.setScan(scan)
-    simulation.setSample(sample)
-    return simulation
-
-
-if __name__ == '__main__':
-    from bornagain import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation)
diff --git a/hugo/static/files/python/simulation/ex06_Reflectometry/BasicPolarizedReflectometry.py b/hugo/static/files/python/simulation/ex06_Reflectometry/BasicPolarizedReflectometry.py
deleted file mode 100644
index 2f64c1595f8e65a9e32c327eb65e63eb22ffbcfc..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex06_Reflectometry/BasicPolarizedReflectometry.py
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/usr/bin/env python3
-"""
-An example of computing reflectivity on a
-magnetized sample.
-"""
-
-import bornagain as ba
-from bornagain import angstrom, deg, nm, nm2, kvector_t
-
-import matplotlib.pyplot as plt
-
-
-def get_sample():
-    """
-    Defines sample and returns it
-    """
-
-    # Define materials
-    material_Ambient = ba.MaterialBySLD("Ambient", 0, 0)
-    magnetic_field = kvector_t(0, 1e8, 0)
-    material_Layer = ba.MaterialBySLD("Layer", 0.0001, 1e-08,
-                                      magnetic_field)
-    material_Substrate = ba.MaterialBySLD("Substrate", 7e-05, 2e-06)
-
-    # Define layers
-    layer_1 = ba.Layer(material_Ambient)
-    layer_2 = ba.Layer(material_Layer, 10*nm)
-    layer_3 = ba.Layer(material_Substrate)
-
-    # Define sample
-    sample = ba.MultiLayer()
-    sample.addLayer(layer_1)
-    sample.addLayer(layer_2)
-    sample.addLayer(layer_3)
-
-    return sample
-
-
-def get_simulation(sample, scan_size=500):
-    """
-    Defines and returns a specular simulation.
-    """
-    simulation = ba.SpecularSimulation()
-    scan = ba.AngularSpecScan(1.54*angstrom, scan_size, 0, 5*deg)
-    simulation.setScan(scan)
-    simulation.setSample(sample)
-    return simulation
-
-
-def run_simulation(polarization=ba.kvector_t(0, 1, 0),
-                   analyzer=ba.kvector_t(0, 1, 0)):
-    """
-    Runs simulation and returns its result.
-    """
-    sample = get_sample()
-    simulation = get_simulation(sample)
-
-    # adding polarization and analyzer operator
-    simulation.beam().setPolarization(polarization)
-    simulation.detector().setAnalyzerProperties(analyzer, 1, 0.5)
-
-    simulation.runSimulation()
-    return simulation.result()
-
-
-def plot(data, labels):
-
-    plt.figure()
-    for d, l in zip(data, labels):
-        plt.semilogy(d.axis(), d.array(), label=l, linewidth=1)
-
-    plt.legend(loc='upper right')
-    plt.gca().yaxis.set_ticks_position('both')
-    plt.gca().xaxis.set_ticks_position('both')
-
-    plt.xlabel(r"$\alpha_i$ [deg]")
-    plt.ylabel("Reflectivity")
-
-    plt.tight_layout()
-    plt.show()
-
-
-if __name__ == '__main__':
-    results_pp = run_simulation(ba.kvector_t(0, 1, 0),
-                                ba.kvector_t(0, 1, 0))
-    results_mm = run_simulation(ba.kvector_t(0, -1, 0),
-                                ba.kvector_t(0, -1, 0))
-    plot([results_pp, results_mm], ["$++$", "$--$"])
diff --git a/hugo/static/files/python/simulation/ex06_Reflectometry/BeamAngularDivergence.py b/hugo/static/files/python/simulation/ex06_Reflectometry/BeamAngularDivergence.py
deleted file mode 100644
index 41190fd742fb89729428e14e16e04e09bb70436c..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex06_Reflectometry/BeamAngularDivergence.py
+++ /dev/null
@@ -1,99 +0,0 @@
-#!/usr/bin/env python3
-"""
-An example of taking into account beam angular divergence
-and beam footprint correction in reflectometry calculations.
-"""
-import numpy as np
-import bornagain as ba
-from bornagain import angstrom, deg
-from os import path
-from matplotlib import pyplot as plt
-
-# input parameters
-wavelength = 1.54*angstrom
-alpha_i_min = 0  # min incident angle, deg
-alpha_i_max = 2*deg  # max incident angle, rad
-beam_sample_ratio = 0.01  # beam-to-sample size ratio
-
-# convolution parameters
-d_ang = 0.01*deg  # spread width for incident angle
-n_sig = 3  # number of sigmas to convolve over
-n_points = 25  # number of points to convolve over
-
-# substrate (Si)
-si_sld_real = 2.0704e-06  # \AA^{-2}
-# layer parameters
-n_repetitions = 10
-# Ni
-ni_sld_real = 9.4245e-06  # \AA^{-2}
-d_ni = 70*angstrom
-# Ti
-ti_sld_real = -1.9493e-06  # \AA^{-2}
-d_ti = 30*angstrom
-
-
-def get_sample():
-    # defining materials
-    m_vacuum = ba.MaterialBySLD("Vacuum", 0, 0)
-    m_ni = ba.MaterialBySLD("Ni", ni_sld_real, 0)
-    m_ti = ba.MaterialBySLD("Ti", ti_sld_real, 0)
-    m_substrate = ba.MaterialBySLD("SiSubstrate", si_sld_real, 0)
-
-    vacuum_layer = ba.Layer(m_vacuum)
-    ni_layer = ba.Layer(m_ni, d_ni)
-    ti_layer = ba.Layer(m_ti, d_ti)
-    substrate_layer = ba.Layer(m_substrate)
-    multi_layer = ba.MultiLayer()
-    multi_layer.addLayer(vacuum_layer)
-    for i in range(n_repetitions):
-        multi_layer.addLayer(ti_layer)
-        multi_layer.addLayer(ni_layer)
-    multi_layer.addLayer(substrate_layer)
-    return multi_layer
-
-
-def create_real_data():
-    """
-    Loading data from genx_angular_divergence.dat
-    """
-    filepath = path.join(path.dirname(path.realpath(__file__)),
-                         "genx_angular_divergence.dat.gz")
-    ax_values, real_data = np.loadtxt(filepath,
-                                      usecols=(0, 1),
-                                      skiprows=3,
-                                      unpack=True)
-
-    # translating axis values from double incident angle # to incident angle
-    ax_values *= 0.5
-
-    return ax_values, real_data
-
-
-def get_simulation(sample, scan_size=500):
-    """
-    Returns a specular simulation with beam and detector defined.
-    """
-    footprint = ba.FootprintSquare(beam_sample_ratio)
-    alpha_distr = ba.RangedDistributionGaussian(n_points, n_sig)
-
-    scan = ba.AngularSpecScan(wavelength, scan_size, alpha_i_min,
-                              alpha_i_max)
-    scan.setFootprintFactor(footprint)
-    scan.setAbsoluteAngularResolution(alpha_distr, d_ang)
-
-    simulation = ba.SpecularSimulation()
-    simulation.setScan(scan)
-    simulation.setSample(sample)
-
-    return simulation
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation)
-    genx_axis, genx_values = create_real_data()
-    plt.semilogy(genx_axis, genx_values, 'ko', markevery=300)
-    plt.legend(['BornAgain', 'GenX'], loc='upper right')
-    plt.show()
diff --git a/hugo/static/files/python/simulation/ex06_Reflectometry/BeamFullDivergence.py b/hugo/static/files/python/simulation/ex06_Reflectometry/BeamFullDivergence.py
deleted file mode 100644
index 79a342412cc2e4f4c64d5cb3932f3036203a6ac7..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex06_Reflectometry/BeamFullDivergence.py
+++ /dev/null
@@ -1,78 +0,0 @@
-#!/usr/bin/env python3
-"""
-An example of taking into account beam angular and wavelength
-divergence in reflectometry calculations with BornAgain.
-"""
-import bornagain as ba
-from bornagain import angstrom, deg
-
-# input parameters
-wavelength = 1.54*angstrom
-alpha_i_min = 0  # min incident angle, deg
-alpha_i_max = 2*deg  # max incident angle, rad
-
-# convolution parameters
-d_wl = 0.01*wavelength  # spread width for wavelength
-d_ang = 0.01*deg  # spread width for incident angle
-n_sig = 3  # number of sigmas to convolve over
-n_points = 25  # number of points to convolve over
-
-# substrate (Si)
-si_sld_real = 2.0704e-06  # \AA^{-2}
-# layer parameters
-n_repetitions = 10
-# Ni
-ni_sld_real = 9.4245e-06  # \AA^{-2}
-d_ni = 70*angstrom  # ni layer thickness (nm)
-# Ti
-ti_sld_real = -1.9493e-06  # \AA^{-2}
-d_ti = 30*angstrom  # ti layer thickness (nm)
-
-
-def get_sample():
-    # defining materials
-    # this example implies beam divergence in the wavelength,
-    # thus MaterialBySLD must be used to provide correct result
-    m_vacuum = ba.MaterialBySLD("Vacuum", 0, 0)
-    m_ni = ba.MaterialBySLD("Ni", ni_sld_real, 0)
-    m_ti = ba.MaterialBySLD("Ti", ti_sld_real, 0)
-    m_substrate = ba.MaterialBySLD("SiSubstrate", si_sld_real, 0)
-
-    vacuum_layer = ba.Layer(m_vacuum)
-    ni_layer = ba.Layer(m_ni, d_ni)
-    ti_layer = ba.Layer(m_ti, d_ti)
-    substrate_layer = ba.Layer(m_substrate)
-    multi_layer = ba.MultiLayer()
-    multi_layer.addLayer(vacuum_layer)
-    for i in range(n_repetitions):
-        multi_layer.addLayer(ti_layer)
-        multi_layer.addLayer(ni_layer)
-    multi_layer.addLayer(substrate_layer)
-    return multi_layer
-
-
-def get_simulation(sample, scan_size=500):
-    """
-    Returns a specular simulation with beam and detector defined.
-    """
-
-    alpha_distr = ba.RangedDistributionGaussian(n_points, n_sig)
-    wavelength_distr = ba.RangedDistributionGaussian(n_points, n_sig)
-
-    scan = ba.AngularSpecScan(wavelength, scan_size, alpha_i_min,
-                              alpha_i_max)
-    scan.setAbsoluteAngularResolution(alpha_distr, d_ang)
-    scan.setAbsoluteWavelengthResolution(wavelength_distr, d_wl)
-
-    simulation = ba.SpecularSimulation()
-    simulation.setScan(scan)
-    simulation.setSample(sample)
-
-    return simulation
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation)
diff --git a/hugo/static/files/python/simulation/ex06_Reflectometry/FootprintCorrection.py b/hugo/static/files/python/simulation/ex06_Reflectometry/FootprintCorrection.py
deleted file mode 100644
index bce268fc309390f06ec9f9c17cbcb49d58422928..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex06_Reflectometry/FootprintCorrection.py
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/usr/bin/env python3
-"""
-Specular simulation with a footprint correction
-for a square beam
-
-"""
-from matplotlib import pyplot as plt
-import bornagain as ba
-from bornagain import deg, angstrom
-
-
-def get_sample():
-    """
-    Defines sample and returns it
-    """
-
-    # creating materials
-    m_ambient = ba.MaterialBySLD("Ambient", 0, 0)
-    m_ti = ba.MaterialBySLD("Ti", -1.9493e-06, 0)
-    m_ni = ba.MaterialBySLD("Ni", 9.4245e-06, 0)
-    m_substrate = ba.MaterialBySLD("SiSubstrate", 2.0704e-06, 0)
-
-    # creating layers
-    ambient_layer = ba.Layer(m_ambient)
-    ti_layer = ba.Layer(m_ti, 30*angstrom)
-    ni_layer = ba.Layer(m_ni, 70*angstrom)
-    substrate_layer = ba.Layer(m_substrate)
-
-    # creating multilayer
-    multi_layer = ba.MultiLayer()
-    multi_layer.addLayer(ambient_layer)
-    for i in range(10):
-        multi_layer.addLayer(ti_layer)
-        multi_layer.addLayer(ni_layer)
-    multi_layer.addLayer(substrate_layer)
-
-    return multi_layer
-
-
-def get_simulation(footprint):
-    """
-    Defines and returns a specular simulation.
-    """
-    simulation = ba.SpecularSimulation()
-    scan = ba.AngularSpecScan(1.54*angstrom, 500, 0, 0.6*deg)
-    scan.setFootprintFactor(footprint)
-    simulation.setScan(scan)
-    return simulation
-
-
-def run_simulation(simulation):
-    """
-    Runs simulation and returns its result.
-    """
-    simulation.setSample(get_sample())
-    simulation.runSimulation()
-    return simulation.result()
-
-
-def get_plot_data(sim_result):
-    return sim_result.axis(), sim_result.array()
-
-
-def plot(sim_result_1, sim_result_2):
-    """
-    Plots results from two different simulations
-    """
-
-    x1, y1 = get_plot_data(sim_result_1)
-    x2, y2 = get_plot_data(sim_result_2)
-    plt.semilogy(x1, y1, x2, y2)
-
-    plt.xlabel(r'$\alpha_i \; (deg)$', fontsize=16)
-    plt.ylabel(r'Intensity', fontsize=16)
-
-    plt.legend(['With footprint', 'Without footprint'], loc='upper right')
-
-    plt.show()
-
-
-if __name__ == '__main__':
-    beam_sample_ratio = 0.01  # beam-to-sample size ratio
-    result_with_fp = run_simulation(
-        get_simulation(footprint=ba.FootprintSquare(beam_sample_ratio)))
-    result_without_fp = run_simulation(get_simulation(footprint=None))
-    plot(result_with_fp, result_without_fp)
diff --git a/hugo/static/files/python/simulation/ex06_Reflectometry/MaterialProfile.py b/hugo/static/files/python/simulation/ex06_Reflectometry/MaterialProfile.py
deleted file mode 100644
index 440d41e5d8a61d5cf905ec7d34e4b57a8873fe6b..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex06_Reflectometry/MaterialProfile.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/usr/bin/env python3
-"""
-Basic example for producing a profile of SLD of a multilayer.
-"""
-
-import bornagain as ba
-from bornagain import deg, angstrom, nm
-import numpy as np
-import matplotlib.pyplot as plt
-
-
-def get_sample():
-    """
-    Defines sample and returns it
-    """
-
-    # creating materials
-    m_ambient = ba.MaterialBySLD("Ambient", 0, 0)
-    m_ti = ba.MaterialBySLD("Ti", -1.9493e-06, 0)
-    m_ni = ba.MaterialBySLD("Ni", 9.4245e-06, 0)
-    m_substrate = ba.MaterialBySLD("SiSubstrate", 2.0704e-06, 0)
-
-    # creating layers
-    ambient_layer = ba.Layer(m_ambient)
-    ti_layer = ba.Layer(m_ti, 30*angstrom)
-    ni_layer = ba.Layer(m_ni, 70*angstrom)
-    substrate_layer = ba.Layer(m_substrate)
-
-    # create roughness
-    roughness = ba.LayerRoughness(5*angstrom, 0.5, 10*angstrom)
-
-    # creating multilayer
-    multi_layer = ba.MultiLayer()
-    multi_layer.addLayer(ambient_layer)
-    for i in range(4):
-        multi_layer.addLayerWithTopRoughness(ti_layer, roughness)
-        multi_layer.addLayerWithTopRoughness(ni_layer, roughness)
-    multi_layer.addLayer(substrate_layer)
-
-    return multi_layer
-
-
-if __name__ == '__main__':
-    sample = get_sample()
-    zpoints, slds = ba.materialProfile(sample)
-
-    plt.figure()
-    plt.plot(zpoints, np.real(slds))
-    plt.show()
diff --git a/hugo/static/files/python/simulation/ex06_Reflectometry/MaterialProfileWithParticles.py b/hugo/static/files/python/simulation/ex06_Reflectometry/MaterialProfileWithParticles.py
deleted file mode 100644
index f3df2bfd0c16e693f4888614b8054ad7fc1fb4a6..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex06_Reflectometry/MaterialProfileWithParticles.py
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/usr/bin/env python3
-"""
-Example for producing a profile of SLD of a multilayer with particles
-and slicing.
-"""
-
-import bornagain as ba
-from bornagain import deg, angstrom, nm
-import numpy as np
-import matplotlib.pyplot as plt
-
-
-def get_sample():
-    """
-    Defines sample and returns it
-    """
-
-    # creating materials
-    m_ambient = ba.MaterialBySLD("Ambient", 0, 0)
-    m_ti = ba.MaterialBySLD("Ti", -1.9493e-06, 0)
-    m_ni = ba.MaterialBySLD("Ni", 9.4245e-06, 0)
-    m_particle = ba.MaterialBySLD("Particle", 5e-6, 0)
-    m_substrate = ba.MaterialBySLD("SiSubstrate", 2.0704e-06, 0)
-
-    # creating layers
-    ambient_layer = ba.Layer(m_ambient)
-    ti_layer = ba.Layer(m_ti, 30*angstrom)
-    ni_layer = ba.Layer(m_ni, 70*angstrom)
-    substrate_layer = ba.Layer(m_substrate)
-
-    # create roughness
-    roughness = ba.LayerRoughness(5*angstrom, 0.5, 10*angstrom)
-
-    # create particle layout
-    ff = ba.FormFactorCone(5*nm, 10*nm, 75*deg)
-    particle = ba.Particle(m_particle, ff)
-    layout = ba.ParticleLayout()
-    layout.addParticle(particle)
-    iff = ba.InterferenceFunction2DLattice(ba.SquareLattice2D(10*nm, 0))
-    layout.setInterferenceFunction(iff)
-    ambient_layer.addLayout(layout)
-    ambient_layer.setNumberOfSlices(20)
-
-    # creating multilayer
-    multi_layer = ba.MultiLayer()
-    multi_layer.addLayer(ambient_layer)
-    for i in range(2):
-        multi_layer.addLayerWithTopRoughness(ti_layer, roughness)
-        multi_layer.addLayerWithTopRoughness(ni_layer, roughness)
-    multi_layer.addLayer(substrate_layer)
-
-    return multi_layer
-
-
-if __name__ == '__main__':
-    sample = get_sample()
-    zpoints, slds = ba.materialProfile(sample)
-
-    plt.figure()
-    plt.plot(zpoints, np.real(slds))
-    plt.show()
diff --git a/hugo/static/files/python/simulation/ex06_Reflectometry/PolarizedNoAnalyzer.py b/hugo/static/files/python/simulation/ex06_Reflectometry/PolarizedNoAnalyzer.py
deleted file mode 100644
index 492fd0bca70d76e5597c9240a352ea5109487c10..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex06_Reflectometry/PolarizedNoAnalyzer.py
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/usr/bin/env python3
-"""
-An example of computing splin-flip reflectivity from
-a magnetized sample.
-"""
-import numpy
-import matplotlib.pyplot as plt
-
-import bornagain as ba
-from bornagain import angstrom, deg, nm, nm2, kvector_t
-from math import sqrt
-
-def get_sample():
-    """
-    Defines sample and returns it
-    """
-
-    # Define materials
-    material_Ambient = ba.MaterialBySLD("Ambient", 0, 0)
-    h = 1e8
-    magnetic_field = kvector_t(1/2*h, sqrt(3)/2*h, 0)
-    material_Layer = ba.MaterialBySLD("Layer", 0.0001, 1e-08,
-                                      magnetic_field)
-    material_Substrate = ba.MaterialBySLD("Substrate", 7e-05, 2e-06)
-
-    # Define layers
-    layer_1 = ba.Layer(material_Ambient)
-    layer_2 = ba.Layer(material_Layer, 10*nm)
-    layer_3 = ba.Layer(material_Substrate)
-
-    # Define sample
-    sample = ba.MultiLayer()
-    sample.addLayer(layer_1)
-    sample.addLayer(layer_2)
-    sample.addLayer(layer_3)
-
-    return sample
-
-
-def get_simulation(sample, scan_size=500):
-    """
-    Defines and returns a specular simulation.
-    """
-    simulation = ba.SpecularSimulation()
-    scan = ba.AngularSpecScan(1.54*angstrom, scan_size, 0, 5*deg)
-    simulation.setScan(scan)
-    simulation.setSample(sample)
-    return simulation
-
-
-def run_simulation(polarization=ba.kvector_t(0, 1, 0), analyzer=None):
-    """
-    Runs simulation and returns its result.
-    """
-    sample = get_sample()
-    simulation = get_simulation(sample)
-
-    # adding polarization and analyzer operator
-    simulation.beam().setPolarization(polarization)
-    if analyzer:
-        simulation.detector().setAnalyzerProperties(analyzer, 1, 0.5)
-
-    simulation.runSimulation()
-    result = simulation.result()
-    return result.axis(), result.array()
-
-
-def plot(axis, data, labels):
-
-    plt.figure()
-    for d, l in zip(data, labels):
-        plt.semilogy(axis, d, label=l, linewidth=1)
-
-    plt.legend(loc='upper right')
-    plt.gca().yaxis.set_ticks_position('both')
-    plt.gca().xaxis.set_ticks_position('both')
-
-    plt.xlabel(r"$\alpha_i$ [deg]")
-    plt.ylabel("Reflectivity")
-
-    plt.tight_layout()
-
-
-if __name__ == '__main__':
-    q, results_pp = run_simulation(ba.kvector_t(0, 1, 0),
-                                   ba.kvector_t(0, 1, 0))
-    q, results_mm = run_simulation(ba.kvector_t(0, -1, 0),
-                                   ba.kvector_t(0, -1, 0))
-
-    q, results_pm = run_simulation(ba.kvector_t(0, 1, 0),
-                                   ba.kvector_t(0, -1, 0))
-    q, results_mp = run_simulation(ba.kvector_t(0, -1, 0),
-                                   ba.kvector_t(0, 1, 0))
-
-    r_plus = results_pp + results_pm
-    r_minus = results_mm + results_mp
-    plot(q, [r_plus, r_minus], ["$+$", "$-$"])
-
-    # same result, but need half the computational time
-    q, results_p = run_simulation(ba.kvector_t(0, 1, 0))
-    q, results_m = run_simulation(ba.kvector_t(0, -1, 0))
-
-    plot(q, [results_p, results_m], ["$+$", "$-$"])
-
-    plt.show()
diff --git a/hugo/static/files/python/simulation/ex06_Reflectometry/PolarizedNonperfectAnalyzerPolarizer.py b/hugo/static/files/python/simulation/ex06_Reflectometry/PolarizedNonperfectAnalyzerPolarizer.py
deleted file mode 100644
index 8a9c670e8a5ec5b9a8f3f3ea4a4f512854782f6a..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex06_Reflectometry/PolarizedNonperfectAnalyzerPolarizer.py
+++ /dev/null
@@ -1,139 +0,0 @@
-#!/usr/bin/env python3
-"""
-An example that shows how to simulate
-a non-perfect polarizer and analyzer
-following Devishvili et al., Rev. Sci. Instrum. 84, 025112 (2013)
-"""
-import numpy
-import matplotlib.pyplot as plt
-
-import bornagain as ba
-from bornagain import deg, angstrom
-
-sldFe = (8.0241e-06, 6.0448e-10)
-sldPd = (4.0099e-6, 1.3019e-09)
-sldMgO = (5.9803e-06, 9.3996e-12)
-
-magnetizationMagnitude = 1.6e6
-angle = 0
-magnetizationVector = ba.kvector_t(
-    magnetizationMagnitude*numpy.sin(angle*deg),
-    magnetizationMagnitude*numpy.cos(angle*deg), 0)
-
-
-def get_sample(*, magnetization=magnetizationVector):
-    """
-    Define sample and returns it
-    """
-
-    # create materials
-    mat_vacuum = ba.MaterialBySLD("Vacuum", 0, 0)
-    mat_Pd = ba.MaterialBySLD("Pd", *sldPd)
-    mat_Fe = ba.MaterialBySLD("Fe", *sldFe, magnetizationVector)
-    mat_substrate = ba.MaterialBySLD("MgO", *sldMgO)
-
-    # create layers
-    layer_vacuum = ba.Layer(mat_vacuum)
-    layer_Pd = ba.Layer(mat_Pd, 120*angstrom)
-    layer_Fe = ba.Layer(mat_Fe, 1000*angstrom)
-    layer_substrate = ba.Layer(mat_substrate)
-
-    roughness = ba.LayerRoughness()
-    roughness.setSigma(20*angstrom)
-
-    # create sample
-    multi_layer = ba.MultiLayer()
-
-    multi_layer.addLayer(layer_vacuum)
-    multi_layer.addLayerWithTopRoughness(layer_Pd, roughness)
-    multi_layer.addLayerWithTopRoughness(layer_Fe, roughness)
-    multi_layer.addLayerWithTopRoughness(layer_substrate, roughness)
-
-    return multi_layer
-
-
-def get_simulation(sample, scan_size=1500):
-    """
-    Defines and returns a specular simulation.
-    """
-    simulation = ba.SpecularSimulation()
-    qzs = numpy.linspace(0.1, 1.5, scan_size)
-
-    n_sig = 4.0
-    n_samples = 25
-    distr = ba.RangedDistributionGaussian(n_samples, n_sig)
-
-    scan = ba.QSpecScan(qzs)
-    scan.setAbsoluteQResolution(distr, 0.008)
-
-    simulation.setScan(scan)
-    simulation.setSample(sample)
-    return simulation
-
-
-def run_simulation(*,
-                   polarization=ba.kvector_t(0, 1, 0),
-                   polarizer_efficiency=1,
-                   analyzer=ba.kvector_t(0, 1, 0),
-                   analyzer_efficiency=1):
-    """
-    Runs simulation and returns its result.
-    """
-    sample = get_sample()
-    simulation = get_simulation(sample)
-
-    simulation.beam().setPolarization(polarization*polarizer_efficiency)
-    simulation.detector().setAnalyzerProperties(analyzer,
-                                                analyzer_efficiency, 0.5)
-
-    simulation.setBackground(ba.ConstantBackground(1e-7))
-
-    simulation.runSimulation()
-    return simulation.result()
-
-
-def plot(data, labels):
-
-    plt.figure()
-    for d, l in zip(data, labels):
-        plt.semilogy(numpy.array(d.axis(ba.Axes.QSPACE)),
-                     d.array(ba.Axes.QSPACE),
-                     label=l,
-                     linewidth=1)
-
-    plt.legend(loc='upper right')
-    plt.gca().yaxis.set_ticks_position('both')
-    plt.gca().xaxis.set_ticks_position('both')
-
-    plt.xlabel("$Q$ [nm${}^{-1}$]")
-    plt.ylabel("Reflectivity")
-
-    plt.tight_layout()
-    plt.show()
-
-
-if __name__ == '__main__':
-
-    polarizer_efficiency = 0.986
-    analyzer_efficiency = 0.970
-
-    results_pp = run_simulation(polarization=ba.kvector_t(0, 1, 0),
-                                analyzer=ba.kvector_t(0, 1, 0),
-                                polarizer_efficiency=polarizer_efficiency,
-                                analyzer_efficiency=analyzer_efficiency)
-    results_mm = run_simulation(polarization=ba.kvector_t(0, -1, 0),
-                                analyzer=ba.kvector_t(0, -1, 0),
-                                polarizer_efficiency=polarizer_efficiency,
-                                analyzer_efficiency=analyzer_efficiency)
-
-    results_pm = run_simulation(polarization=ba.kvector_t(0, 1, 0),
-                                analyzer=ba.kvector_t(0, -1, 0),
-                                polarizer_efficiency=polarizer_efficiency,
-                                analyzer_efficiency=analyzer_efficiency)
-    results_mp = run_simulation(polarization=ba.kvector_t(0, -1, 0),
-                                analyzer=ba.kvector_t(0, 1, 0),
-                                polarizer_efficiency=polarizer_efficiency,
-                                analyzer_efficiency=analyzer_efficiency)
-
-    plot([results_pp, results_mm, results_pm, results_mp],
-         ["$++$", "$--$", "$+-$", "$-+$"])
diff --git a/hugo/static/files/python/simulation/ex06_Reflectometry/PolarizedSpinAsymmetry.py b/hugo/static/files/python/simulation/ex06_Reflectometry/PolarizedSpinAsymmetry.py
deleted file mode 100644
index 0b5a89dcf3451eedcbbc4e88565d2ec597b65c5a..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex06_Reflectometry/PolarizedSpinAsymmetry.py
+++ /dev/null
@@ -1,313 +0,0 @@
-#!/usr/bin/env python3
-"""
-This simulation example demonstrates how to replicate the
-fitting example "Magnetically Dead Layers in Spinel Films"
-given at the Nist website:
-https://www.nist.gov/ncnr/magnetically-dead-layers-spinel-films
-
-For simplicity, here we only reproduce the first part of that 
-demonstration without the magnetically dead layer.
-"""
-
-# import boranagain
-import bornagain as ba
-from bornagain import deg, angstrom, nm
-
-import numpy
-import matplotlib.pyplot as plt
-
-# import more libs needed for data processing
-from re import match, DOTALL
-from sys import argv
-from io import BytesIO
-from urllib.request import urlopen
-from zipfile import ZipFile
-from os.path import isfile
-
-# q-range on which the simulation and fitting are to be performed
-qmin = 0.05997
-qmax = 1.96
-
-# number of points on which the computed result is plotted
-scan_size = 1500
-
-# The SLD of the substrate is kept constant
-sldMao = (5.377e-06, 0)
-
-# constant to convert between magnetization and magnetic SLD
-RhoMconst = 2.910429812376859e-12
-
-####################################################################
-#                  Create Sample and Simulation                    #
-####################################################################
-
-
-def get_sample(params):
-    """
-    construct the sample with the given parameters
-    """
-    magnetizationMagnitude = params["rhoM_Mafo"]*1e-6/RhoMconst
-    angle = 0
-    magnetizationVector = ba.kvector_t(
-        magnetizationMagnitude*numpy.sin(angle*deg),
-        magnetizationMagnitude*numpy.cos(angle*deg), 0)
-
-    mat_vacuum = ba.MaterialBySLD("Vacuum", 0, 0)
-    mat_layer = ba.MaterialBySLD("(Mg,Al,Fe)3O4", params["rho_Mafo"]*1e-6,
-                                 0, magnetizationVector)
-    mat_substrate = ba.MaterialBySLD("MgAl2O4", *sldMao)
-
-    ambient_layer = ba.Layer(mat_vacuum)
-    layer = ba.Layer(mat_layer, params["t_Mafo"]*angstrom)
-    substrate_layer = ba.Layer(mat_substrate)
-
-    r_Mafo = ba.LayerRoughness()
-    r_Mafo.setSigma(params["r_Mafo"]*angstrom)
-
-    r_substrate = ba.LayerRoughness()
-    r_substrate.setSigma(params["r_Mao"]*angstrom)
-
-    multi_layer = ba.MultiLayer()
-    multi_layer.addLayer(ambient_layer)
-    multi_layer.addLayerWithTopRoughness(layer, r_Mafo)
-    multi_layer.addLayerWithTopRoughness(substrate_layer, r_substrate)
-
-    return multi_layer
-
-
-def get_simulation(q_axis, parameters, polarization, analyzer):
-    """
-    Returns a simulation object.
-    Polarization, analyzer and resolution are set
-    from given parameters
-    """
-    simulation = ba.SpecularSimulation()
-    q_axis = q_axis + parameters["q_offset"]
-    scan = ba.QSpecScan(q_axis)
-
-    dq = parameters["q_res"]*q_axis
-    n_sig = 4.0
-    n_samples = 25
-
-    distr = ba.RangedDistributionGaussian(n_samples, n_sig)
-    scan.setAbsoluteQResolution(distr, parameters["q_res"])
-
-    simulation.beam().setPolarization(polarization)
-    simulation.detector().setAnalyzerProperties(analyzer, 1, 0.5)
-
-    simulation.setScan(scan)
-    return simulation
-
-
-def run_simulation(q_axis, fitParams, *, polarization, analyzer):
-    """
-    Run a simulation on the given q-axis, where the sample is 
-    constructed with the given parameters.
-    Vectors for polarization and analyzer need to be provided
-    """
-    parameters = dict(fitParams, **fixedParams)
-
-    sample = get_sample(parameters)
-    simulation = get_simulation(q_axis, parameters, polarization, analyzer)
-
-    simulation.setSample(sample)
-    simulation.runSimulation()
-    return simulation
-
-
-def qr(result):
-    """
-    Returns two arrays that hold the q-values as well as the
-    reflectivity from a given simulation result
-    """
-    q = numpy.array(result.result().axis(ba.Axes.QSPACE))
-    r = numpy.array(result.result().array(ba.Axes.QSPACE))
-
-    return q, r
-
-
-####################################################################
-#                         Plot Handling                            #
-####################################################################
-
-
-def plot(qs, rs, exps, labels, filename):
-    """
-    Plot the simulated result together with the experimental data
-    """
-    fig = plt.figure()
-    ax = fig.add_subplot(111)
-
-    for q, r, exp, l in zip(qs, rs, exps, labels):
-
-        ax.errorbar(exp[0],
-                    exp[1],
-                    xerr=exp[3],
-                    yerr=exp[2],
-                    fmt='.',
-                    markersize=0.75,
-                    linewidth=0.5)
-
-        ax.plot(q, r, label=l)
-
-    ax.set_yscale('log')
-    plt.legend()
-
-    plt.xlabel("Q [nm${}^{-1}$]")
-    plt.ylabel("R")
-
-    plt.tight_layout()
-    plt.savefig(filename)
-
-
-def plotSpinAsymmetry(data_pp, data_mm, q, r_pp, r_mm, filename):
-    """
-    Plot the simulated spin asymmetry as well its 
-    experimental counterpart with errorbars
-    """
-
-    # compute the errorbars of the spin asymmetry
-    delta = numpy.sqrt(4 * (data_pp[1]**2 * data_mm[2]**2 + \
-            data_mm[1]**2 * data_pp[2]**2 ) /
-                ( data_pp[1] + data_mm[1] )**4 )
-
-    fig = plt.figure()
-    ax = fig.add_subplot(111)
-
-    ax.errorbar(data_pp[0],
-                (data_pp[1] - data_mm[1])/(data_pp[1] + data_mm[1]),
-                xerr=data_pp[3],
-                yerr=delta,
-                fmt='.',
-                markersize=0.75,
-                linewidth=0.5)
-
-    ax.plot(q, (r_pp - r_mm)/(r_pp + r_mm))
-
-    plt.gca().set_ylim((-0.3, 0.5))
-
-    plt.xlabel("Q [nm${}^{-1}$]")
-    plt.ylabel("Spin asymmetry")
-
-    plt.tight_layout()
-    plt.savefig(filename)
-
-
-####################################################################
-#                          Data Handling                           #
-####################################################################
-
-
-def normalizeData(data):
-    """
-    Removes duplicate q values from the input data,
-    normalizes it such that the maximum of the reflectivity is
-    unity and rescales the q-axis to inverse nm
-    """
-
-    r0 = numpy.where(data[0] - numpy.roll(data[0], 1) == 0)
-    data = numpy.delete(data, r0, 1)
-
-    data[0] = data[0]/angstrom
-    data[3] = data[3]/angstrom
-
-    norm = numpy.max(data[1])
-    data[1] = data[1]/norm
-    data[2] = data[2]/norm
-
-    so = numpy.argsort(data[0])
-    data = data[:, so]
-
-    return data
-
-
-def filterData(data, qmin, qmax):
-    minIndex = numpy.argmin(numpy.abs(data[0] - qmin))
-    maxIndex = numpy.argmin(numpy.abs(data[0] - qmax))
-
-    return data[:, minIndex:maxIndex + 1]
-
-
-def get_Experimental_data(qmin, qmax):
-    if hasattr(get_Experimental_data, "raw_data"):
-        data_pp = get_Experimental_data.raw_data_pp
-        data_mm = get_Experimental_data.raw_data_mm
-
-    else:
-        input_Data = downloadAndExtractData()
-        data_pp = normalizeData(input_Data[0])
-        data_mm = normalizeData(input_Data[1])
-
-        get_Experimental_data.data_pp = data_pp
-        get_Experimental_data.data_mm = data_mm
-        get_Experimental_data.raw_data = True
-
-    return (filterData(data_pp, qmin,
-                       qmax), filterData(data_mm, qmin, qmax))
-
-
-def downloadAndExtractData():
-    url = "https://www.nist.gov/document/spinelfilmzip"
-
-    if not isfile("spinelfilm.zip"):
-        downloadfile = urlopen(url)
-        with open("spinelfilm.zip", 'wb') as outfile:
-            outfile.write(downloadfile.read())
-
-    zipfile = ZipFile("spinelfilm.zip")
-    rawdata = zipfile.open("MAFO_Saturated.refl").\
-                  read().decode("utf-8")
-
-    table_pp = match(
-        r'.*# "polarization": "\+\+"\n#.*?\n# "units".*?\n(.*?)#.*',
-        rawdata, DOTALL).group(1)
-    table_mm = match(
-        r'.*# "polarization": "\-\-"\n#.*?\n# "units".*?\n(.*?)#.*',
-        rawdata, DOTALL).group(1)
-
-    data_pp = numpy.genfromtxt(BytesIO(table_pp.encode()), unpack=True)
-    data_mm = numpy.genfromtxt(BytesIO(table_mm.encode()), unpack=True)
-
-    return (data_pp, data_mm)
-
-
-####################################################################
-#                          Main Function                           #
-####################################################################
-
-if __name__ == '__main__':
-
-    fixedParams = {
-        # parameters from our own fit run
-        'q_res': 0.010542945012551425,
-        'q_offset': 7.971243487467318e-05,
-        'rho_Mafo': 6.370140108715461,
-        'rhoM_Mafo': 0.27399566816062926,
-        't_Mafo': 137.46913056084736,
-        'r_Mao': 8.60487712674644,
-        'r_Mafo': 3.7844265311293483
-    }
-
-    def run_Simulation_pp(qzs, params):
-        return run_simulation(qzs,
-                              params,
-                              polarization=ba.kvector_t(0, 1, 0),
-                              analyzer=ba.kvector_t(0, 1, 0))
-
-    def run_Simulation_mm(qzs, params):
-        return run_simulation(qzs,
-                              params,
-                              polarization=ba.kvector_t(0, -1, 0),
-                              analyzer=ba.kvector_t(0, -1, 0))
-
-    qzs = numpy.linspace(qmin, qmax, scan_size)
-    q_pp, r_pp = qr(run_Simulation_pp(qzs, fixedParams))
-    q_mm, r_mm = qr(run_Simulation_mm(qzs, fixedParams))
-
-    data_pp, data_mm = get_Experimental_data(qmin, qmax)
-
-    plot([q_pp, q_mm], [r_pp, r_mm], [data_pp, data_mm], ["$++$", "$--$"],
-         f'MAFO_Saturated.pdf')
-
-    plotSpinAsymmetry(data_pp, data_mm, qzs, r_pp, r_mm,
-                      "MAFO_Saturated_spin_asymmetry.pdf")
diff --git a/hugo/static/files/python/simulation/ex06_Reflectometry/PolarizedSpinAsymmetryFit.py b/hugo/static/files/python/simulation/ex06_Reflectometry/PolarizedSpinAsymmetryFit.py
deleted file mode 100644
index 66330a72344f513f5040d4b36635cb0f89015f5c..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex06_Reflectometry/PolarizedSpinAsymmetryFit.py
+++ /dev/null
@@ -1,378 +0,0 @@
-#!/usr/bin/env python3
-"""
-This fitting and simulation example demonstrates how to replicate
-the fitting example "Magnetically Dead Layers in Spinel Films"
-given at the Nist website:
-https://www.nist.gov/ncnr/magnetically-dead-layers-spinel-films
-
-For simplicity, here we only reproduce the first part of that
-demonstration without the magnetically dead layer.
-"""
-
-# import boranagain
-import bornagain as ba
-from bornagain import deg, angstrom, nm
-
-import numpy
-import matplotlib.pyplot as plt
-
-# import more libs needed for data processing
-from re import match, DOTALL
-from sys import argv
-from io import BytesIO
-from urllib.request import urlopen
-from zipfile import ZipFile
-from os.path import isfile
-
-# q-range on which the simulation and fitting are to be performed
-qmin = 0.05997
-qmax = 1.96
-
-# number of points on which the computed result is plotted
-scan_size = 1500
-
-# The SLD of the substrate is kept constant
-sldMao = (5.377e-06, 0)
-
-# constant to convert between magnetization and magnetic SLD
-RhoMconst = 2.910429812376859e-12
-
-####################################################################
-#                  Create Sample and Simulation                    #
-####################################################################
-
-
-def get_sample(params):
-    """
-    construct the sample with the given parameters
-    """
-    magnetizationMagnitude = params["rhoM_Mafo"]*1e-6/RhoMconst
-    angle = 0
-    magnetizationVector = ba.kvector_t(
-        magnetizationMagnitude*numpy.sin(angle*deg),
-        magnetizationMagnitude*numpy.cos(angle*deg), 0)
-
-    mat_vacuum = ba.MaterialBySLD("Vacuum", 0, 0)
-    mat_layer = ba.MaterialBySLD("(Mg,Al,Fe)3O4", params["rho_Mafo"]*1e-6,
-                                 0, magnetizationVector)
-    mat_substrate = ba.MaterialBySLD("MgAl2O4", *sldMao)
-
-    ambient_layer = ba.Layer(mat_vacuum)
-    layer = ba.Layer(mat_layer, params["t_Mafo"]*angstrom)
-    substrate_layer = ba.Layer(mat_substrate)
-
-    r_Mafo = ba.LayerRoughness()
-    r_Mafo.setSigma(params["r_Mafo"]*angstrom)
-
-    r_substrate = ba.LayerRoughness()
-    r_substrate.setSigma(params["r_Mao"]*angstrom)
-
-    multi_layer = ba.MultiLayer()
-    multi_layer.addLayer(ambient_layer)
-    multi_layer.addLayerWithTopRoughness(layer, r_Mafo)
-    multi_layer.addLayerWithTopRoughness(substrate_layer, r_substrate)
-
-    return multi_layer
-
-
-def get_simulation(q_axis, parameters, polarization, analyzer):
-    """
-    Returns a simulation object.
-    Polarization, analyzer and resolution are set
-    from given parameters
-    """
-    simulation = ba.SpecularSimulation()
-    q_axis = q_axis + parameters["q_offset"]
-    scan = ba.QSpecScan(q_axis)
-
-    dq = parameters["q_res"]*q_axis
-    n_sig = 4.0
-    n_samples = 25
-
-    distr = ba.RangedDistributionGaussian(n_samples, n_sig)
-    scan.setAbsoluteQResolution(distr, parameters["q_res"])
-
-    simulation.beam().setPolarization(polarization)
-    simulation.setAnalyzerProperties(analyzer, 1, 0.5)
-
-    simulation.setScan(scan)
-    return simulation
-
-
-def run_simulation(q_axis, fitParams, *, polarization, analyzer):
-    """
-    Run a simulation on the given q-axis, where the sample is constructed
-    with the given parameters.
-    Vectors for polarization and analyzer need to be provided
-    """
-    parameters = dict(fitParams, **fixedParams)
-
-    sample = get_sample(parameters)
-    simulation = get_simulation(q_axis, parameters, polarization, analyzer)
-
-    simulation.setSample(sample)
-    simulation.runSimulation()
-    return simulation
-
-
-def qr(result):
-    """
-    Returns two arrays that hold the q-values as well as the
-    reflectivity from a given simulation result
-    """
-    q = numpy.array(result.result().axis(ba.Axes.QSPACE))
-    r = numpy.array(result.result().array(ba.Axes.QSPACE))
-
-    return q, r
-
-
-####################################################################
-#                         Plot Handling                            #
-####################################################################
-
-
-def plot(qs, rs, exps, labels, filename):
-    """
-    Plot the simulated result together with the experimental data
-    """
-    fig = plt.figure()
-    ax = fig.add_subplot(111)
-
-    for q, r, exp, l in zip(qs, rs, exps, labels):
-
-        ax.errorbar(exp[0],
-                    exp[1],
-                    xerr=exp[3],
-                    yerr=exp[2],
-                    fmt='.',
-                    markersize=0.75,
-                    linewidth=0.5)
-
-        ax.plot(q, r, label=l)
-
-    ax.set_yscale('log')
-    plt.legend()
-
-    plt.xlabel("Q [nm${}^{-1}$]")
-    plt.ylabel("R")
-
-    plt.tight_layout()
-    plt.savefig(filename)
-
-
-def plotSpinAsymmetry(data_pp, data_mm, q, r_pp, r_mm, filename):
-    """
-    Plot the simulated spin asymmetry as well its
-    experimental counterpart with errorbars
-    """
-
-    # compute the errorbars of the spin asymmetry
-    delta = numpy.sqrt(4 * (data_pp[1]**2 * data_mm[2]**2 + \
-            data_mm[1]**2 * data_pp[2]**2 ) /
-                ( data_pp[1] + data_mm[1] )**4 )
-
-    fig = plt.figure()
-    ax = fig.add_subplot(111)
-
-    ax.errorbar(data_pp[0],
-                (data_pp[1] - data_mm[1])/(data_pp[1] + data_mm[1]),
-                xerr=data_pp[3],
-                yerr=delta,
-                fmt='.',
-                markersize=0.75,
-                linewidth=0.5)
-
-    ax.plot(q, (r_pp - r_mm)/(r_pp + r_mm))
-
-    plt.gca().set_ylim((-0.3, 0.5))
-
-    plt.xlabel("Q [nm${}^{-1}$]")
-    plt.ylabel("Spin asymmetry")
-
-    plt.tight_layout()
-    plt.savefig(filename)
-
-
-####################################################################
-#                          Data Handling                           #
-####################################################################
-
-
-def normalizeData(data):
-    """
-    Removes duplicate q values from the input data,
-    normalizes it such that the maximum of the reflectivity is
-    unity and rescales the q-axis to inverse nm
-    """
-
-    r0 = numpy.where(data[0] - numpy.roll(data[0], 1) == 0)
-    data = numpy.delete(data, r0, 1)
-
-    data[0] = data[0]/angstrom
-    data[3] = data[3]/angstrom
-
-    norm = numpy.max(data[1])
-    data[1] = data[1]/norm
-    data[2] = data[2]/norm
-
-    so = numpy.argsort(data[0])
-    data = data[:, so]
-
-    return data
-
-
-def filterData(data, qmin, qmax):
-    minIndex = numpy.argmin(numpy.abs(data[0] - qmin))
-    maxIndex = numpy.argmin(numpy.abs(data[0] - qmax))
-
-    return data[:, minIndex:maxIndex + 1]
-
-
-def get_Experimental_data(qmin, qmax):
-    input_Data = downloadAndExtractData()
-    data_pp = normalizeData(input_Data[0])
-    data_mm = normalizeData(input_Data[1])
-
-    return (filterData(data_pp, qmin,
-                       qmax), filterData(data_mm, qmin, qmax))
-
-
-def downloadAndExtractData():
-    url = "https://www.nist.gov/document/spinelfilmzip"
-
-    if not isfile("spinelfilm.zip"):
-        downloadfile = urlopen(url)
-        with open("spinelfilm.zip", 'wb') as outfile:
-            outfile.write(downloadfile.read())
-
-    zipfile = ZipFile("spinelfilm.zip")
-
-    rawdata = zipfile.open("MAFO_Saturated.refl").read().decode("utf-8")
-
-    table_pp = match(
-        r'.*# "polarization": "\+\+"\n#.*?\n# "units".*?\n(.*?)#.*',
-        rawdata, DOTALL).group(1)
-    table_mm = match(
-        r'.*# "polarization": "\-\-"\n#.*?\n# "units".*?\n(.*?)#.*',
-        rawdata, DOTALL).group(1)
-
-    data_pp = numpy.genfromtxt(BytesIO(table_pp.encode()), unpack=True)
-    data_mm = numpy.genfromtxt(BytesIO(table_mm.encode()), unpack=True)
-
-    return (data_pp, data_mm)
-
-
-####################################################################
-#                          Fit Function                            #
-####################################################################
-
-
-def run_fit_ba(q_axis, r_data, r_uncertainty, simulationFactory,
-               startParams):
-
-    fit_objective = ba.FitObjective()
-    fit_objective.setObjectiveMetric("chi2")
-
-    fit_objective.addSimulationAndData(
-        lambda params: simulationFactory[0](q_axis[0], params), r_data[0],
-        r_uncertainty[0], 1)
-    fit_objective.addSimulationAndData(
-        lambda params: simulationFactory[1](q_axis[1], params), r_data[1],
-        r_uncertainty[1], 1)
-
-    fit_objective.initPrint(10)
-
-    params = ba.Parameters()
-    for name, p in startParams.items():
-        params.add(name, p[0], min=p[1], max=p[2])
-
-    minimizer = ba.Minimizer()
-
-    result = minimizer.minimize(fit_objective.evaluate, params)
-    fit_objective.finalize(result)
-
-    return {r.name(): r.value for r in result.parameters()}
-
-
-####################################################################
-#                          Main Function                           #
-####################################################################
-
-if __name__ == '__main__':
-
-    if len(argv) > 1 and argv[1] == "fit":
-        fixedParams = {
-            # parameters can be moved here to keep them fixed
-        }
-        fixedParams = {d: v[0] for d, v in fixedParams.items()}
-
-        startParams = {
-            # own starting values
-            "q_res": (0, 0, 0.1),
-            "q_offset": (0, -0.002, 0.002),
-            "rho_Mafo": (6.3649, 2, 7),
-            "rhoM_Mafo": (0, 0, 2),
-            "t_Mafo": (150, 60, 180),
-            "r_Mao": (1, 0, 12),
-            "r_Mafo": (1, 0, 12),
-        }
-        fit = True
-
-    else:
-        startParams = {}
-        fixedParams = {
-            # parameters from our own fit run
-            'q_res': 0.010542945012551425,
-            'q_offset': 7.971243487467318e-05,
-            'rho_Mafo': 6.370140108715461,
-            'rhoM_Mafo': 0.27399566816062926,
-            't_Mafo': 137.46913056084736,
-            'r_Mao': 8.60487712674644,
-            'r_Mafo': 3.7844265311293483
-        }
-
-        fit = False
-
-    paramsInitial = {d: v[0] for d, v in startParams.items()}
-
-    def run_Simulation_pp(qzs, params):
-        return run_simulation(qzs,
-                              params,
-                              polarization=ba.kvector_t(0, 1, 0),
-                              analyzer=ba.kvector_t(0, 1, 0))
-
-    def run_Simulation_mm(qzs, params):
-        return run_simulation(qzs,
-                              params,
-                              polarization=ba.kvector_t(0, -1, 0),
-                              analyzer=ba.kvector_t(0, -1, 0))
-
-    qzs = numpy.linspace(qmin, qmax, scan_size)
-    q_pp, r_pp = qr(run_Simulation_pp(qzs, paramsInitial))
-    q_mm, r_mm = qr(run_Simulation_mm(qzs, paramsInitial))
-
-    data_pp, data_mm = get_Experimental_data(qmin, qmax)
-
-    plot([q_pp, q_mm], [r_pp, r_mm], [data_pp, data_mm], ["$++$", "$--$"],
-         f'MAFO_Saturated_initial.pdf')
-
-    plotSpinAsymmetry(data_pp, data_mm, qzs, r_pp, r_mm,
-                      "MAFO_Saturated_spin_asymmetry_initial.pdf")
-
-    if fit:
-        fitResult = run_fit_ba([data_pp[0], data_mm[0]],
-                               [data_pp[1], data_mm[1]],
-                               [data_pp[2], data_mm[2]],
-                               [run_Simulation_pp, run_Simulation_mm],
-                               startParams)
-        print("Fit Result:")
-        print(fitResult)
-
-        q_pp, r_pp = qr(run_Simulation_pp(qzs, fitResult))
-        q_mm, r_mm = qr(run_Simulation_mm(qzs, fitResult))
-
-        plot([q_pp, q_mm], [r_pp, r_mm], [data_pp, data_mm],
-             ["$++$", "$--$"], f'MAFO_Saturated_fit.pdf')
-
-        plotSpinAsymmetry(data_pp, data_mm, qzs, r_pp, r_mm,
-                          "MAFO_Saturated_spin_asymmetry_fit.pdf")
diff --git a/hugo/static/files/python/simulation/ex06_Reflectometry/PolarizedSpinFlip.py b/hugo/static/files/python/simulation/ex06_Reflectometry/PolarizedSpinFlip.py
deleted file mode 100644
index a9549a30c4bf70f6c802a7ca4d96602a952715e0..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex06_Reflectometry/PolarizedSpinFlip.py
+++ /dev/null
@@ -1,95 +0,0 @@
-#!/usr/bin/env python3
-"""
-An example of computing splin-flip reflectivity from
-a magnetized sample.
-"""
-import numpy
-import bornagain as ba
-from bornagain import angstrom, deg, nm, nm2, kvector_t
-import matplotlib.pyplot as plt
-from math import sqrt
-
-def get_sample():
-    """
-    Defines sample and returns it
-    """
-
-    # Define materials
-    material_Ambient = ba.MaterialBySLD("Ambient", 0, 0)
-    h = 1e8
-    magnetic_field = kvector_t(1/2*h, sqrt(3)/2*h, 0)
-    material_Layer = ba.MaterialBySLD("Layer", 0.0001, 1e-08,
-                                      magnetic_field)
-    material_Substrate = ba.MaterialBySLD("Substrate", 7e-05, 2e-06)
-
-    # Define layers
-    layer_1 = ba.Layer(material_Ambient)
-    layer_2 = ba.Layer(material_Layer, 10*nm)
-    layer_3 = ba.Layer(material_Substrate)
-
-    # Define sample
-    sample = ba.MultiLayer()
-    sample.addLayer(layer_1)
-    sample.addLayer(layer_2)
-    sample.addLayer(layer_3)
-
-    return sample
-
-
-def get_simulation(sample, scan_size=500):
-    """
-    Defines and returns a specular simulation.
-    """
-    simulation = ba.SpecularSimulation()
-    scan = ba.AngularSpecScan(1.54*angstrom, scan_size, 0, 5*deg)
-    simulation.setScan(scan)
-    simulation.setSample(sample)
-    return simulation
-
-
-def run_simulation(polarization=ba.kvector_t(0, 1, 0),
-                   analyzer=ba.kvector_t(0, 1, 0)):
-    """
-    Runs simulation and returns its result.
-    """
-    sample = get_sample()
-    simulation = get_simulation(sample)
-
-    # adding polarization and analyzer operator
-    simulation.beam().setPolarization(polarization)
-    simulation.detector().setAnalyzerProperties(analyzer, 1, 0.5)
-
-    simulation.runSimulation()
-    return simulation.result()
-
-
-def plot(data, labels):
-
-    plt.figure()
-    for d, l in zip(data, labels):
-        plt.semilogy(d.axis(), d.array(), label=l, linewidth=1)
-
-    plt.legend(loc='upper right')
-    plt.gca().yaxis.set_ticks_position('both')
-    plt.gca().xaxis.set_ticks_position('both')
-
-    plt.xlabel(r"$\alpha_i$ [deg]")
-    plt.ylabel("Reflectivity")
-
-    plt.tight_layout()
-    plt.show()
-
-
-if __name__ == '__main__':
-    results_pp = run_simulation(ba.kvector_t(0, 1, 0),
-                                ba.kvector_t(0, 1, 0))
-    results_mm = run_simulation(ba.kvector_t(0, -1, 0),
-                                ba.kvector_t(0, -1, 0))
-
-    results_pm = run_simulation(ba.kvector_t(0, 1, 0),
-                                ba.kvector_t(0, -1, 0))
-    results_mp = run_simulation(ba.kvector_t(0, -1, 0),
-                                ba.kvector_t(0, 1, 0))
-
-    plot([results_pp, results_mm, results_pm, results_mp],
-         ["$++$", "$--$", "$+-$", "$-+$"])
diff --git a/hugo/static/files/python/simulation/ex06_Reflectometry/RoughnessModel.py b/hugo/static/files/python/simulation/ex06_Reflectometry/RoughnessModel.py
deleted file mode 100644
index 0118c067df39f8448479fae010caadf72998327b..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex06_Reflectometry/RoughnessModel.py
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/usr/bin/env python3
-"""
-Example of simulating a rough sample with a
-tanh and Nevot-Croce roughness model using BornAgain.
-
-"""
-
-from matplotlib import pyplot as plt
-import bornagain as ba
-from bornagain import deg, angstrom, nm
-
-
-def get_sample(roughness_model):
-    """
-    Defines sample and returns it
-    """
-
-    # creating materials
-    m_ambient = ba.MaterialBySLD("Ambient", 0, 0)
-    m_ti = ba.MaterialBySLD("Ti", -1.9493e-06, 0)
-    m_ni = ba.MaterialBySLD("Ni", 9.4245e-06, 0)
-    m_substrate = ba.MaterialBySLD("SiSubstrate", 2.0704e-06, 0)
-
-    # creating layers
-    ambient_layer = ba.Layer(m_ambient)
-    ti_layer = ba.Layer(m_ti, 30*angstrom)
-    ni_layer = ba.Layer(m_ni, 70*angstrom)
-    substrate_layer = ba.Layer(m_substrate)
-
-    # defining roughness
-    roughness = ba.LayerRoughness()
-    roughness.setSigma(1*nm)
-
-    # creating multilayer
-    multi_layer = ba.MultiLayer()
-    multi_layer.addLayer(ambient_layer)
-    for i in range(10):
-        multi_layer.addLayerWithTopRoughness(ti_layer, roughness)
-        multi_layer.addLayerWithTopRoughness(ni_layer, roughness)
-    multi_layer.addLayerWithTopRoughness(substrate_layer, roughness)
-
-    multi_layer.setRoughnessModel(roughness_model)
-
-    return multi_layer
-
-
-def get_simulation(sample, scan_size=500):
-    """
-    Defines and returns a specular simulation.
-    """
-    simulation = ba.SpecularSimulation()
-    scan = ba.AngularSpecScan(1.54*angstrom, scan_size, 0, 2*deg)
-    simulation.setScan(scan)
-    simulation.setSample(sample)
-    return simulation
-
-
-def run_simulation(roughness_model=ba.RoughnessModel.TANH):
-    """
-    Runs simulation and returns its result.
-    """
-    sample = get_sample(roughness_model)
-    simulation = get_simulation(sample)
-    simulation.runSimulation()
-    return simulation.result()
-
-
-def plot(result_tanh, result_nevot_croce):
-
-    plt.semilogy(result_nevot_croce.axis(),
-                 result_nevot_croce.array(),
-                 label="Névot-Croce")
-    plt.semilogy(result_tanh.axis(), result_tanh.array(), label="Tanh")
-
-    plt.xlabel(r'$\alpha_i \; (deg)$', fontsize=12)
-    plt.ylabel(r'Intensity', fontsize=12)
-
-    plt.legend()
-    plt.show()
-
-
-if __name__ == '__main__':
-    result_tanh = run_simulation(roughness_model=ba.RoughnessModel.TANH)
-    result_nevot_croce = run_simulation(
-        roughness_model=ba.RoughnessModel.NEVOT_CROCE)
-    plot(result_tanh, result_nevot_croce)
diff --git a/hugo/static/files/python/simulation/ex06_Reflectometry/SpecularSimulationWithRoughness.py b/hugo/static/files/python/simulation/ex06_Reflectometry/SpecularSimulationWithRoughness.py
deleted file mode 100644
index 5941d025d1a71a15809ad02e3554263cbc1a675a..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex06_Reflectometry/SpecularSimulationWithRoughness.py
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/usr/bin/env python3
-"""
-Example of simulating a reflectometry experiment
-with a rough sample using BornAgain.
-
-"""
-import bornagain as ba
-from bornagain import deg, angstrom, nm
-
-
-def get_sample():
-    """
-    Defines sample and returns it
-    """
-
-    # creating materials
-    m_ambient = ba.MaterialBySLD("Ambient", 0, 0)
-    m_ti = ba.MaterialBySLD("Ti", -1.9493e-06, 0)
-    m_ni = ba.MaterialBySLD("Ni", 9.4245e-06, 0)
-    m_substrate = ba.MaterialBySLD("SiSubstrate", 2.0704e-06, 0)
-
-    # creating layers
-    ambient_layer = ba.Layer(m_ambient)
-    ti_layer = ba.Layer(m_ti, 30*angstrom)
-    ni_layer = ba.Layer(m_ni, 70*angstrom)
-    substrate_layer = ba.Layer(m_substrate)
-
-    # defining roughness
-    roughness = ba.LayerRoughness()
-    roughness.setSigma(1*nm)
-
-    # creating multilayer
-    multi_layer = ba.MultiLayer()
-    multi_layer.addLayer(ambient_layer)
-    for i in range(10):
-        multi_layer.addLayerWithTopRoughness(ti_layer, roughness)
-        multi_layer.addLayerWithTopRoughness(ni_layer, roughness)
-    multi_layer.addLayerWithTopRoughness(substrate_layer, roughness)
-
-    return multi_layer
-
-
-def get_simulation(sample, scan_size=500):
-    """
-    Defines and returns a specular simulation.
-    """
-    simulation = ba.SpecularSimulation()
-    scan = ba.AngularSpecScan(1.54*angstrom, scan_size, 0, 2*deg)
-    simulation.setScan(scan)
-    simulation.setSample(sample)
-    return simulation
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation)
diff --git a/hugo/static/files/python/simulation/ex06_Reflectometry/TOFRWithResolution.py b/hugo/static/files/python/simulation/ex06_Reflectometry/TOFRWithResolution.py
deleted file mode 100644
index 654cd03059ff871ea9ed0f056c21f7dcb9573ef1..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex06_Reflectometry/TOFRWithResolution.py
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/usr/bin/env python3
-"""
-An example of defining reflectometry instrument
-for time of flight experiment. In this example
-we will use purely qz-defined beam,
-without explicitly specifying
-incident angle or a wavelength.
-Additionally we will set pointwise resolution
-to the scan.
-Note that these approaches work with SLD-based
-materials only.
-"""
-import numpy as np
-import bornagain as ba
-from bornagain import angstrom
-
-
-def get_sample():
-    """
-    Defines sample and returns it. Note that SLD-based materials are used.
-    """
-
-    # creating materials
-    m_ambient = ba.MaterialBySLD("Ambient", 0, 0)
-    m_ti = ba.MaterialBySLD("Ti", -1.9493e-06, 0)
-    m_ni = ba.MaterialBySLD("Ni", 9.4245e-06, 0)
-    m_substrate = ba.MaterialBySLD("SiSubstrate", 2.0704e-06, 0)
-
-    # creating layers
-    ambient_layer = ba.Layer(m_ambient)
-    ti_layer = ba.Layer(m_ti, 30*angstrom)
-    ni_layer = ba.Layer(m_ni, 70*angstrom)
-    substrate_layer = ba.Layer(m_substrate)
-
-    # creating multilayer
-    multi_layer = ba.MultiLayer()
-    multi_layer.addLayer(ambient_layer)
-    for i in range(10):
-        multi_layer.addLayer(ti_layer)
-        multi_layer.addLayer(ni_layer)
-    multi_layer.addLayer(substrate_layer)
-
-    return multi_layer
-
-
-def get_simulation(sample, scan_size=500):
-    """
-    Defines and returns specular simulation
-    with a qz-defined beam
-    """
-    qzs = np.linspace(0.01, 1, scan_size)  # qz-values
-    dq = 0.03*qzs
-    n_sig = 2.0
-    n_samples = 25
-
-    distr = ba.RangedDistributionGaussian(n_samples, n_sig)
-
-    scan = ba.QSpecScan(qzs)
-    scan.setAbsoluteQResolution(distr, dq)
-
-    simulation = ba.SpecularSimulation()
-    simulation.setScan(scan)
-    simulation.setSample(sample)
-
-    return simulation
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation)
diff --git a/hugo/static/files/python/simulation/ex06_Reflectometry/TimeOfFlightReflectometry.py b/hugo/static/files/python/simulation/ex06_Reflectometry/TimeOfFlightReflectometry.py
deleted file mode 100644
index 7335778a2807c9fa7478aec2d400848a29537cd5..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex06_Reflectometry/TimeOfFlightReflectometry.py
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/usr/bin/env python3
-"""
-An example of defining reflectometry instrument
-for time of flight experiment. In this example
-we will use purely qz-defined beam,
-without explicitly specifying
-incident angle or a wavelength.
-Note that these approaches work with SLD-based
-materials only.
-"""
-import numpy as np
-import bornagain as ba
-from bornagain import angstrom
-
-
-def get_sample():
-    """
-    Defines sample and returns it. Note that SLD-based materials are used.
-    """
-
-    # creating materials
-    m_ambient = ba.MaterialBySLD("Ambient", 0, 0)
-    m_ti = ba.MaterialBySLD("Ti", -1.9493e-06, 0)
-    m_ni = ba.MaterialBySLD("Ni", 9.4245e-06, 0)
-    m_substrate = ba.MaterialBySLD("SiSubstrate", 2.0704e-06, 0)
-
-    # creating layers
-    ambient_layer = ba.Layer(m_ambient)
-    ti_layer = ba.Layer(m_ti, 30*angstrom)
-    ni_layer = ba.Layer(m_ni, 70*angstrom)
-    substrate_layer = ba.Layer(m_substrate)
-
-    # creating multilayer
-    multi_layer = ba.MultiLayer()
-    multi_layer.addLayer(ambient_layer)
-    for i in range(10):
-        multi_layer.addLayer(ti_layer)
-        multi_layer.addLayer(ni_layer)
-    multi_layer.addLayer(substrate_layer)
-
-    return multi_layer
-
-
-def get_simulation(sample, scan_size=500):
-    """
-    Defines and returns specular simulation
-    with a qz-defined beam
-    """
-    qzs = np.linspace(0.01, 1, scan_size)  # qz-values
-    scan = ba.QSpecScan(qzs)
-    simulation = ba.SpecularSimulation()
-    simulation.setScan(scan)
-    simulation.setSample(sample)
-    return simulation
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation)
diff --git a/hugo/static/files/python/simulation/ex06_Reflectometry/genx_angular_divergence.dat.gz b/hugo/static/files/python/simulation/ex06_Reflectometry/genx_angular_divergence.dat.gz
deleted file mode 100644
index d12c7b612a4c488ff0ab436bcb9a910a1151da6c..0000000000000000000000000000000000000000
Binary files a/hugo/static/files/python/simulation/ex06_Reflectometry/genx_angular_divergence.dat.gz and /dev/null differ
diff --git a/hugo/static/files/python/simulation/ex07_Miscellaneous/AccessingSimulationResults.py b/hugo/static/files/python/simulation/ex07_Miscellaneous/AccessingSimulationResults.py
deleted file mode 100644
index dddd80053f735fcea0e5954011ccac22b3b2556c..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex07_Miscellaneous/AccessingSimulationResults.py
+++ /dev/null
@@ -1,170 +0,0 @@
-#!/usr/bin/env python3
-"""
-Extended example for simulation results treatment (cropping, slicing, exporting)
-The standard "Cylinders in DWBA" sample is used to setup the simulation.
-"""
-import math
-import random
-import bornagain as ba
-from bornagain import angstrom, deg, nm, nm2, kvector_t
-import ba_plot
-from matplotlib import pyplot as plt
-from matplotlib import rcParams
-
-
-def get_sample():
-    """
-    Returns a sample with uncorrelated cylinders on a substrate.
-    """
-
-    # Define materials
-    material_Particle = ba.HomogeneousMaterial("Particle", 0.0006, 2e-08)
-    material_Substrate = ba.HomogeneousMaterial("Substrate", 6e-06, 2e-08)
-    material_Vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-
-    # Define form factors
-    ff = ba.FormFactorCylinder(5*nm, 5*nm)
-
-    # Define particles
-    particle = ba.Particle(material_Particle, ff)
-
-    # Define particle layouts
-    layout = ba.ParticleLayout()
-    layout.addParticle(particle)
-    layout.setTotalParticleSurfaceDensity(0.01)
-
-    # Define layers
-    layer_1 = ba.Layer(material_Vacuum)
-    layer_1.addLayout(layout)
-    layer_2 = ba.Layer(material_Substrate)
-
-    # Define sample
-    sample = ba.MultiLayer()
-    sample.addLayer(layer_1)
-    sample.addLayer(layer_2)
-
-    return sample
-
-
-def get_simulation(sample):
-    """
-    Returns a GISAXS simulation with beam and detector defined.
-    """
-    beam = ba.Beam(1e5, 1*angstrom, ba.Direction(0.2*deg, 0))
-    det = ba.SphericalDetector(201, -2*deg, 2*deg, 201, 0, 2*deg)
-    simulation = ba.ScatteringSimulation(beam, sample, det)
-    return simulation
-
-
-def get_noisy_image(hist):
-    """
-    Returns clone of input histogram filled with additional noise
-    """
-    result = hist.clone()
-    noise_factor = 2.0
-    for i in range(0, result.getTotalNumberOfBins()):
-        amplitude = result.binContent(i)
-        sigma = noise_factor*math.sqrt(amplitude)
-        noisy_amplitude = random.gauss(amplitude, sigma)
-        result.setBinContent(i, noisy_amplitude)
-    return result
-
-
-def plot_histogram(hist, **kwargs):
-    ba.plot_histogram(hist,
-                      xlabel=r'$\varphi_f ^{\circ}$',
-                      ylabel=r'$\alpha_f ^{\circ}$',
-                      zlabel="",
-                      **kwargs)
-
-
-def get_relative_difference(hist):
-    """
-    Creates noisy histogram made of original histogram,
-    then creates and plots a relative difference histogram: (noisy-hist)/hist
-    """
-    noisy = get_noisy_image(hist)
-    return noisy.relativeDifferenceHistogram(hist)
-
-
-def plot_slices(hist):
-    """
-    Plot 1D slices along y-axis at certain x-axis values.
-    """
-    noisy = get_noisy_image(hist)
-
-    # projection along Y, slice at fixed x-value
-    proj1 = noisy.projectionY(0)
-    plt.semilogy(proj1.binCenters(),
-                 proj1.binValues(),
-                 label=r'$\phi=0.0^{\circ}$')
-
-    # projection along Y, slice at fixed x-value
-    proj2 = noisy.projectionY(0.5)  # slice at fixed value
-    plt.semilogy(proj2.binCenters(),
-                 proj2.binValues(),
-                 label=r'$\phi=0.5^{\circ}$')
-
-    # projection along Y for all X values between [xlow, xup], averaged
-    proj3 = noisy.projectionY(0.41, 0.59)
-    plt.semilogy(proj3.binCenters(),
-                 proj3.array(ba.IHistogram.AVERAGE),
-                 label=r'$<\phi>=0.5^{\circ}$')
-
-    plt.xlim(proj1.getXmin(), proj1.getXmax())
-    plt.ylim(proj2.getMinimum(), proj1.getMaximum()*10)
-    plt.xlabel(r'$\alpha_f ^{\circ}$', fontsize=16)
-    plt.legend(loc='upper right')
-    plt.tight_layout()
-
-
-def plot(hist):
-    """
-    Runs different plotting functions one by one
-    to demonstrate trivial data presentation tasks.
-    """
-    plt.figure(figsize=(12.80, 10.24))
-
-    plt.subplot(2, 2, 1)
-    ba_plot.plot_histogram(hist)
-    plt.title("Intensity as colormap")
-
-    plt.subplot(2, 2, 2)
-    crop = hist.crop(-1, 0.5, 1, 1)
-    ba_plot.plot_histogram(crop)
-    plt.title("Cropping")
-
-    plt.subplot(2, 2, 3)
-    reldiff = get_relative_difference(hist)
-    ba_plot.plot_histogram(reldiff, intensity_min=1e-03, intensity_max=10)
-    plt.title("Relative difference")
-
-    plt.subplot(2, 2, 4)
-    plot_slices(hist)
-    plt.title("Various slicing of 2D into 1D")
-
-    # save to file
-    # result.save("result.int")
-    # result.save("result.tif")
-    # result.save("result.txt")
-    # result.save("result.int.gz")
-    # result.save("result.tif.gz")
-    # result.save("result.txt.gz")
-    # result.save("result.int.bz2")
-    # result.save("result.tif.bz2")
-    # result.save("result.txt.bz2")
-
-    plt.tight_layout()
-    plt.show()
-
-
-def simulate_and_plot():
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    simulation.runSimulation()
-    hist = simulation.result().histogram2d()
-    plot(hist)
-
-
-if __name__ == '__main__':
-    simulate_and_plot()
diff --git a/hugo/static/files/python/simulation/ex07_Miscellaneous/AxesInDifferentUnits.py b/hugo/static/files/python/simulation/ex07_Miscellaneous/AxesInDifferentUnits.py
deleted file mode 100644
index cfbe01c72bba24686fd168542f8003309fcf7b46..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex07_Miscellaneous/AxesInDifferentUnits.py
+++ /dev/null
@@ -1,123 +0,0 @@
-#!/usr/bin/env python3
-"""
-In this example we demonstrate how to plot simulation results with
-axes in different units (nbins, mm, degs and QyQz).
-"""
-import bornagain as ba
-from bornagain import angstrom, deg, nm, nm2, kvector_t
-import ba_plot
-from matplotlib import pyplot as plt
-from matplotlib import rcParams
-
-
-def get_sample():
-    """
-    Returns a sample with uncorrelated cylinders on a substrate.
-    """
-
-    # Define materials
-    material_Particle = ba.HomogeneousMaterial("Particle", 0.0006, 2e-08)
-    material_Substrate = ba.HomogeneousMaterial("Substrate", 6e-06, 2e-08)
-    material_Vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-
-    # Define form factors
-    ff = ba.FormFactorCylinder(5*nm, 5*nm)
-
-    # Define particles
-    particle = ba.Particle(material_Particle, ff)
-
-    # Define particle layouts
-    layout = ba.ParticleLayout()
-    layout.addParticle(particle)
-    layout.setTotalParticleSurfaceDensity(0.01)
-
-    # Define layers
-    layer_1 = ba.Layer(material_Vacuum)
-    layer_1.addLayout(layout)
-    layer_2 = ba.Layer(material_Substrate)
-
-    # Define sample
-    sample = ba.MultiLayer()
-    sample.addLayer(layer_1)
-    sample.addLayer(layer_2)
-
-    return sample
-
-
-def get_simulation(sample):
-    beam = ba.Beam(1, 1*angstrom, ba.Direction(0.2*deg, 0))
-
-    # PILATUS detector
-    detector_distance = 2000.0  # in mm
-    pilatus_pixel_size = 0.172  # in mm
-    pilatus_npx, pilatus_npy = 981, 1043  # number of pixels
-    width = pilatus_npx*pilatus_pixel_size
-    height = pilatus_npy*pilatus_pixel_size
-    detector = ba.RectangularDetector(pilatus_npx, width, pilatus_npy,
-                                      height)
-    detector.setPerpendicularToSampleX(detector_distance, width/2., 0)
-
-    simulation = ba.ScatteringSimulation(beam, sample, detector)
-    return simulation
-
-
-def run_simulation():
-    simulation = get_simulation(get_sample())
-    simulation.runSimulation()
-    return simulation.result()
-
-
-def plot(result):
-    """
-    Plots simulation results for different detectors.
-    """
-    # set plotting parameters
-    rcParams['image.cmap'] = 'jet'
-    rcParams['image.aspect'] = 'auto'
-
-    fig = plt.figure(figsize=(12.80, 10.24))
-
-    plt.subplot(2, 2, 1)
-    # default units for rectangular detector are millimeters
-
-    ba_plot.plot_colormap(result,
-                          title="In default units",
-                          xlabel=r'$X_{mm}$',
-                          ylabel=r'$Y_{mm}$',
-                          zlabel=None)
-
-    plt.subplot(2, 2, 2)
-    ba_plot.plot_colormap(result,
-                          units=ba.Axes.NBINS,
-                          title="In number of bins",
-                          xlabel=r'$X_{nbins}$',
-                          ylabel=r'$Y_{nbins}$',
-                          zlabel=None)
-
-    plt.subplot(2, 2, 3)
-    ba_plot.plot_colormap(result,
-                          units=ba.Axes.DEGREES,
-                          title="In degs",
-                          xlabel=r'$\phi_f ^{\circ}$',
-                          ylabel=r'$\alpha_f ^{\circ}$',
-                          zlabel=None)
-
-    plt.subplot(2, 2, 4)
-    ba_plot.plot_colormap(result,
-                          units=ba.Axes.QSPACE,
-                          title="Q-space",
-                          xlabel=r'$Q_{y} [1/nm]$',
-                          ylabel=r'$Q_{z} [1/nm]$',
-                          zlabel=None)
-
-    plt.subplots_adjust(left=0.07,
-                        right=0.97,
-                        top=0.9,
-                        bottom=0.1,
-                        hspace=0.25)
-    plt.show()
-
-
-if __name__ == '__main__':
-    result = run_simulation()
-    plot(result)
diff --git a/hugo/static/files/python/simulation/ex07_Miscellaneous/BoxesWithSpecularPeak.py b/hugo/static/files/python/simulation/ex07_Miscellaneous/BoxesWithSpecularPeak.py
deleted file mode 100644
index 56c4b81e2aa1ad1ded4027da0e912dcf2bca40be..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex07_Miscellaneous/BoxesWithSpecularPeak.py
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/usr/bin/env python3
-"""
-Square lattice of boxes on substrate (including the specular peak)
-"""
-import bornagain as ba
-from bornagain import deg, nm
-
-
-def get_sample():
-    """
-    Returns a sample with boxes on a substrate.
-    """
-
-    # Define materials
-    material_Particle = ba.HomogeneousMaterial("Particle", 3e-05, 2e-08)
-    material_Substrate = ba.HomogeneousMaterial("Substrate", 6e-06, 2e-08)
-    material_Vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-
-    # Define form factors
-    ff = ba.FormFactorBox(5*nm, 5*nm, 10*nm)
-
-    # Define particles
-    particle = ba.Particle(material_Particle, ff)
-
-    # Define 2D lattices
-    lattice = ba.BasicLattice2D(8*nm, 8*nm, 90*deg, 0)
-
-    # Define interference functions
-    iff = ba.InterferenceFunction2DLattice(lattice)
-    iff_pdf = ba.FTDecayFunction2DCauchy(100*nm, 100*nm, 0)
-    iff.setDecayFunction(iff_pdf)
-
-    # Define particle layouts
-    layout = ba.ParticleLayout()
-    layout.addParticle(particle)
-    layout.setInterferenceFunction(iff)
-    layout.setTotalParticleSurfaceDensity(0.015625)
-
-    # Define layers
-    layer_1 = ba.Layer(material_Vacuum)
-    layer_1.addLayout(layout)
-    layer_2 = ba.Layer(material_Substrate)
-
-    # Define sample
-    sample = ba.MultiLayer()
-    sample.addLayer(layer_1)
-    sample.addLayer(layer_2)
-
-    return sample
-
-
-def get_simulation(sample):
-    beam = ba.Beam(1, 0.1*nm, ba.Direction(0.2*deg, 0))
-    detector = ba.SphericalDetector(101, -2*deg, 2*deg, 101, 0, 2*deg)
-    simulation = ba.ScatteringSimulation(beam, sample, detector)
-    simulation.getOptions().setUseAvgMaterials(True)
-    simulation.getOptions().setIncludeSpecular(True)
-    return simulation
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation)
diff --git a/hugo/static/files/python/simulation/ex07_Miscellaneous/CylindersInAverageLayer.py b/hugo/static/files/python/simulation/ex07_Miscellaneous/CylindersInAverageLayer.py
deleted file mode 100644
index 4dc007c48737a7a59df14580bd420610bdee0b55..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex07_Miscellaneous/CylindersInAverageLayer.py
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/usr/bin/env python3
-"""
-Square lattice of cylinders inside finite layer with usage of average material
-"""
-import bornagain as ba
-from bornagain import deg, nm, kvector_t
-
-
-def get_sample(cyl_height=5*nm):
-    """
-    Returns a sample with cylinders on a substrate.
-    """
-    # defining materials
-    m_vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-    m_layer = ba.HomogeneousMaterial("Layer", 3e-6, 2e-8)
-    m_substrate = ba.HomogeneousMaterial("Substrate", 6e-6, 2e-8)
-    m_particle = ba.HomogeneousMaterial("Particle", 3e-5, 2e-8)
-
-    # cylindrical particle
-    cylinder_ff = ba.FormFactorCylinder(5*nm, cyl_height)
-    cylinder = ba.Particle(m_particle, cylinder_ff)
-    position = ba.kvector_t(0, 0, -cyl_height)
-    particle_layout = ba.ParticleLayout()
-    particle_layout.addParticle(cylinder, 1, position)
-
-    # interference function
-    interference = ba.InterferenceFunction2DLattice(
-        ba.SquareLattice2D(15*nm, 0))
-    pdf = ba.FTDecayFunction2DCauchy(300*nm, 300*nm, 0)
-    interference.setDecayFunction(pdf)
-    particle_layout.setInterferenceFunction(interference)
-
-    vacuum_layer = ba.Layer(m_vacuum)
-    intermediate_layer = ba.Layer(m_layer, 5*nm)
-    intermediate_layer.addLayout(particle_layout)
-    substrate_layer = ba.Layer(m_substrate)
-
-    multi_layer = ba.MultiLayer()
-    multi_layer.addLayer(vacuum_layer)
-    multi_layer.addLayer(intermediate_layer)
-    multi_layer.addLayer(substrate_layer)
-    return multi_layer
-
-
-def get_simulation(sample):
-    beam = ba.Beam(1, 0.1*nm, ba.Direction(0.2*deg, 0))
-    detector = ba.SphericalDetector(100, -2*deg, 2*deg, 100, 0, 2*deg)
-    simulation = ba.ScatteringSimulation(beam, sample, detector)
-    simulation.getOptions().setUseAvgMaterials(True)
-    return simulation
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation)
diff --git a/hugo/static/files/python/simulation/ex07_Miscellaneous/DepthProbe.py b/hugo/static/files/python/simulation/ex07_Miscellaneous/DepthProbe.py
deleted file mode 100644
index 846f1b2655c3780c7a1166c95dbdc35069670b6c..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex07_Miscellaneous/DepthProbe.py
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/usr/bin/env python3
-"""
-Basic example of depth-probe simulation with BornAgain.
-
-Sample layers are Si | Ti | Pt | Ti | TiO2 | D2O.
-Beam comes from Si side.
-Therefore we model the stack with Si on top.
-The z axis points from D2O to Si; z=0 is at the Si/Ti interface.
-"""
-import bornagain as ba
-from bornagain import angstrom, deg, nm, nm2, kvector_t
-
-# layer thicknesses in angstroms
-t_Ti = 130*angstrom
-t_Pt = 320*angstrom
-t_Ti_top = 100*angstrom
-t_TiO2 = 30*angstrom
-
-#  beam data
-ai_min = 0  # minimum incident angle
-ai_max = 1*deg  # maximum incident angle
-n_ai_bins = 5000  # number of bins in incident angle axis
-beam_sample_ratio = 0.01  # beam-to-sample size ratio
-wl = 10*angstrom  # wavelength in angstroms
-
-# convolution parameters
-d_ang = 0.01*ba.deg  # spread width for incident angle
-n_points = 25  # number of points to convolve over
-n_sig = 3  # number of sigmas to convolve over
-
-#  depth position span
-z_min = -100*nm
-z_max = 100*nm
-n_z_bins = 500
-
-
-def get_sample():
-    """
-    Constructs a sample with one resonating Ti/Pt layer
-    """
-
-    # Define materials
-    material_D2O = ba.HomogeneousMaterial("D2O", 0.00010116, 1.809e-12)
-    material_Pt = ba.HomogeneousMaterial("Pt", 0.00010117, 3.01822e-08)
-    material_Si = ba.HomogeneousMaterial("Si", 3.3009e-05, 0)
-    material_Ti = ba.HomogeneousMaterial("Ti", -3.0637e-05, 1.5278e-08)
-    material_TiO2 = ba.HomogeneousMaterial("TiO2", 4.1921e-05, 8.1293e-09)
-
-    # Define layers
-    layer_1 = ba.Layer(material_Si)
-    layer_2 = ba.Layer(material_Ti, 13*nm)
-    layer_3 = ba.Layer(material_Pt, 32*nm)
-    layer_4 = ba.Layer(material_Ti, 10*nm)
-    layer_5 = ba.Layer(material_TiO2, 3*nm)
-    layer_6 = ba.Layer(material_D2O)
-
-    # Define sample
-    sample = ba.MultiLayer()
-    sample.addLayer(layer_1)
-    sample.addLayer(layer_2)
-    sample.addLayer(layer_3)
-    sample.addLayer(layer_4)
-    sample.addLayer(layer_5)
-    sample.addLayer(layer_6)
-
-    return sample
-
-
-def get_simulation(sample):
-    """
-    Returns a depth-probe simulation.
-    """
-    alpha_distr = ba.DistributionGaussian(0, d_ang)
-    footprint = ba.FootprintSquare(beam_sample_ratio)
-    simulation = ba.DepthProbeSimulation()
-    simulation.setBeamParameters(wl, n_ai_bins, ai_min, ai_max, footprint)
-    simulation.setZSpan(n_z_bins, z_min, z_max)
-    simulation.addParameterDistribution("*/Beam/InclinationAngle",
-                                        alpha_distr, n_points, n_sig)
-    simulation.setSample(sample)
-    return simulation
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation, aspect='auto')
diff --git a/hugo/static/files/python/simulation/ex07_Miscellaneous/FindPeaks.py b/hugo/static/files/python/simulation/ex07_Miscellaneous/FindPeaks.py
deleted file mode 100644
index e2c6193cd4ada56f9565595cfc8ad1566c082794..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex07_Miscellaneous/FindPeaks.py
+++ /dev/null
@@ -1,95 +0,0 @@
-#!/usr/bin/env python3
-"""
-Simulation of grating using very long boxes and 1D lattice.
-Monte-carlo integration is used to get rid of
-large-particle form factor oscillations.
-"""
-import bornagain as ba
-from bornagain import deg, angstrom, nm, micrometer
-import ba_plot
-from matplotlib import pyplot as plt
-
-
-def get_sample(lattice_rotation_angle=0*deg):
-    """
-    Returns a sample with a grating on a substrate.
-    lattice_rotation_angle = 0 - beam parallel to grating lines
-    lattice_rotation_angle = 90*deg - beam perpendicular to grating lines
-    """
-    # defining materials
-    m_vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-    m_si = ba.HomogeneousMaterial("Si", 5.7816e-6, 1.0229e-7)
-
-    box_length, box_width, box_height = 50*micrometer, 70*nm, 50*nm
-    lattice_length = 150*nm
-
-    # collection of particles
-    interference = ba.InterferenceFunction1DLattice(
-        lattice_length, 90*deg - lattice_rotation_angle)
-
-    pdf = ba.FTDecayFunction1DGauss(450)
-    interference.setDecayFunction(pdf)
-
-    box_ff = ba.FormFactorLongBoxLorentz(box_length, box_width, box_height)
-    box = ba.Particle(m_si, box_ff)
-
-    particle_layout = ba.ParticleLayout()
-    particle_layout.addParticle(box, 1, ba.kvector_t(0, 0, 0),
-                                ba.RotationZ(lattice_rotation_angle))
-    particle_layout.setInterferenceFunction(interference)
-
-    # assembling the sample
-    vacuum_layer = ba.Layer(m_vacuum)
-    vacuum_layer.addLayout(particle_layout)
-    substrate_layer = ba.Layer(m_si)
-
-    roughness = ba.LayerRoughness()
-    roughness.setSigma(5*nm)
-    roughness.setHurstParameter(0.5)
-    roughness.setLatteralCorrLength(10*nm)
-
-    multi_layer = ba.MultiLayer()
-    multi_layer.addLayer(vacuum_layer)
-    multi_layer.addLayerWithTopRoughness(substrate_layer, roughness)
-    return multi_layer
-
-
-def get_simulation(sample):
-    beam = ba.Beam(1e8, 1.34*angstrom, ba.Direction(0.4*deg, 0))
-    det = ba.SphericalDetector(200, -0.5*deg, 0.5*deg, 200, 0, 0.6*deg)
-    simulation = ba.ScatteringSimulation(beam, sample, det)
-    simulation.getOptions().setMonteCarloIntegration(True, 100)
-    return simulation
-
-
-def run_simulation():
-    """
-    Runs simulation and returns intensity map.
-    """
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    if not "__no_terminal__" in globals():
-        simulation.setTerminalProgressMonitor()
-    simulation.runSimulation()
-    return simulation.result()
-
-
-def simulate_and_plot():
-    result = run_simulation().histogram2d()
-    ba_plot.plot_histogram(result)
-
-    peaks = ba.FindPeaks(result, 2, "nomarkov", 0.001)
-    xpeaks = [peak[0] for peak in peaks]
-    ypeaks = [peak[1] for peak in peaks]
-    print(peaks)
-    plt.plot(xpeaks,
-             ypeaks,
-             linestyle='None',
-             marker='x',
-             color='white',
-             markersize=10)
-    plt.show()
-
-
-if __name__ == '__main__':
-    simulate_and_plot()
diff --git a/hugo/static/files/python/simulation/ex07_Miscellaneous/HalfSpheresInAverageTopLayer.py b/hugo/static/files/python/simulation/ex07_Miscellaneous/HalfSpheresInAverageTopLayer.py
deleted file mode 100644
index b81b35d4cc1d9f38970813092e19bc814ded6acf..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex07_Miscellaneous/HalfSpheresInAverageTopLayer.py
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/usr/bin/env python3
-"""
-Square lattice of half spheres on substrate with usage of average material
-and slicing
-"""
-import bornagain as ba
-from bornagain import deg, nm
-
-
-def get_sample():
-    """
-    Returns a sample with cylinders on a substrate.
-    """
-
-    # Define materials
-    material_Particle = ba.HomogeneousMaterial("Particle", 3e-05, 2e-08)
-    material_Substrate = ba.HomogeneousMaterial("Substrate", 6e-06, 2e-08)
-    material_Vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-
-    # Define form factors
-    ff = ba.FormFactorTruncatedSphere(5*nm, 5*nm, 0)
-
-    # Define particles
-    particle = ba.Particle(material_Particle, ff)
-
-    # Define 2D lattices
-    lattice = ba.BasicLattice2D(10*nm, 10*nm, 90*deg, 0)
-
-    # Define interference functions
-    iff = ba.InterferenceFunction2DLattice(lattice)
-    iff_pdf = ba.FTDecayFunction2DCauchy(100*nm, 100*nm, 0)
-    iff.setDecayFunction(iff_pdf)
-
-    # Define particle layouts
-    layout = ba.ParticleLayout()
-    layout.addParticle(particle)
-    layout.setInterferenceFunction(iff)
-    layout.setTotalParticleSurfaceDensity(0.01)
-
-    # Define layers
-    layer_1 = ba.Layer(material_Vacuum)
-    layer_1.setNumberOfSlices(10)
-    layer_1.addLayout(layout)
-    layer_2 = ba.Layer(material_Substrate)
-
-    # Define sample
-    sample = ba.MultiLayer()
-    sample.addLayer(layer_1)
-    sample.addLayer(layer_2)
-
-    return sample
-
-
-def get_simulation(sample):
-    beam = ba.Beam(1, 0.1*nm, ba.Direction(0.2*deg, 0))
-    detector = ba.SphericalDetector(100, -2*deg, 2*deg, 100, 0, 2*deg)
-    simulation = ba.ScatteringSimulation(beam, sample, detector)
-    simulation.getOptions().setUseAvgMaterials(True)
-    return simulation
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation)
diff --git a/hugo/static/files/python/simulation/ex07_Miscellaneous/MagneticSpheres.py b/hugo/static/files/python/simulation/ex07_Miscellaneous/MagneticSpheres.py
deleted file mode 100644
index 48a86e0d59e7cdc7118d0d64bb93ae08630187ce..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex07_Miscellaneous/MagneticSpheres.py
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/env python3
-"""
-Simulation demo: magnetic spheres in substrate
-"""
-import bornagain as ba
-from bornagain import deg, nm, kvector_t
-
-
-def get_sample():
-    """
-    Returns a sample with magnetic spheres in the substrate.
-    """
-
-    # Define materials
-    magnetic_field = kvector_t(0, 0, 1e7)
-    material_Particle = ba.HomogeneousMaterial("Particle", 2e-05, 4e-07,
-                                               magnetic_field)
-    material_Substrate = ba.HomogeneousMaterial("Substrate", 7e-06,
-                                                1.8e-07)
-    material_Vacuum = ba.HomogeneousMaterial("Vacuum", 0, 0)
-
-    # Define form factors
-    ff = ba.FormFactorFullSphere(5*nm)
-
-    # Define particles
-    particle = ba.Particle(material_Particle, ff)
-    particle_position = kvector_t(0, 0, -10*nm)
-    particle.setPosition(particle_position)
-
-    # Define particle layouts
-    layout = ba.ParticleLayout()
-    layout.addParticle(particle, 1)
-    layout.setWeight(1)
-    layout.setTotalParticleSurfaceDensity(0.01)
-
-    # Define layers
-    layer_1 = ba.Layer(material_Vacuum)
-    layer_2 = ba.Layer(material_Substrate)
-    layer_2.addLayout(layout)
-
-    # Define sample
-    sample = ba.MultiLayer()
-    sample.addLayer(layer_1)
-    sample.addLayer(layer_2)
-
-    return sample
-
-
-def get_simulation(sample):
-    beam = ba.Beam(1e12, 0.1*nm, ba.Direction(0.5*deg, 0))
-    beam_polarization = kvector_t(0, 0, 1)
-    beam.setPolarization(beam_polarization)
-    detector = ba.SphericalDetector(200, 6*deg, 0, 3*deg)
-    simulation = ba.ScatteringSimulation(beam, sample, detector)
-    analyzer_direction = kvector_t(0, 0, -1)
-    simulation.detector().setAnalyzerProperties(analyzer_direction, 1, 0.5)
-    return simulation
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation)
diff --git a/hugo/static/files/python/simulation/ex07_Miscellaneous/PolarizedSANS.py b/hugo/static/files/python/simulation/ex07_Miscellaneous/PolarizedSANS.py
deleted file mode 100644
index 2ca0fd376f0917e90108b5e7b0c78f18077a2662..0000000000000000000000000000000000000000
--- a/hugo/static/files/python/simulation/ex07_Miscellaneous/PolarizedSANS.py
+++ /dev/null
@@ -1,78 +0,0 @@
-#!/usr/bin/env python3
-"""
-Simple example demonstrating how polarized SANS experiments can be
-simulated with BornAgain.
-"""
-
-import bornagain as ba
-from bornagain import angstrom, deg, nm, nm2, kvector_t
-
-# Magnetization of the particle's core material (A/m)
-magnetization_core = kvector_t(0, 0, 1e7)
-
-
-def get_sample():
-    """
-    Returns a sample with a magnetic core-shell particle in a solvent.
-    """
-
-    # Define materials
-    magnetic_field = kvector_t(0, 0, 1e7)
-    material_Core = ba.HomogeneousMaterial("Core", 6e-06, 2e-08,
-                                           magnetic_field)
-    material_Shell = ba.HomogeneousMaterial("Shell", 1e-07, 2e-08)
-    material_Solvent = ba.HomogeneousMaterial("Solvent", 5e-06, 0)
-
-    # Define form factors
-    ff_1 = ba.FormFactorFullSphere(10*nm)
-    ff_2 = ba.FormFactorFullSphere(12*nm)
-
-    # Define particles
-    particle_1 = ba.Particle(material_Core, ff_1)
-    particle_1_position = kvector_t(0, 0, 2*nm)
-    particle_1.setPosition(particle_1_position)
-    particle_2 = ba.Particle(material_Shell, ff_2)
-
-    # Define core shell particles
-    particle = ba.ParticleCoreShell(particle_2, particle_1)
-
-    # Define particle layouts
-    layout = ba.ParticleLayout()
-    layout.addParticle(particle)
-    layout.setTotalParticleSurfaceDensity(0.01)
-
-    # Define layers
-    layer = ba.Layer(material_Solvent)
-    layer.addLayout(layout)
-
-    # Define sample
-    sample = ba.MultiLayer()
-    sample.addLayer(layer)
-
-    return sample
-
-
-def get_simulation(sample):
-    """
-    Returns a polarized SANS simulation
-    """
-    # Beam from above (perpendicular to sample):
-    beam = ba.Beam(1, 0.4*nm, ba.Direction(90*deg, 0))
-    beam.setPolarization(kvector_t(0, 0, 1))
-
-    # Detector opposite to source:
-    detPos = 2000  # distance from sample center to detector in mm
-    detWid = 500  # detector width in mm
-    detPix = 200  # number of pixels per direction
-    det = ba.RectangularDetector(detPix, detWid, detPix, detWid)
-    det.setPerpendicularToDirectBeam(detPos, detWid/2, detWid/2)
-    det.setAnalyzerProperties(kvector_t(0, 0, -1), 1, 0.5)
-
-    return ba.ScatteringSimulation(beam, sample, det)
-
-
-if __name__ == '__main__':
-    import ba_plot
-    sample = get_sample()
-    simulation = get_simulation(sample)
-    ba_plot.run_and_plot(simulation) # TODO: restore units=ba.Axes.QSPACE)
diff --git a/hugo/static/files/readme.txt b/hugo/static/files/readme.txt
deleted file mode 100644
index ebce86b2c6b785713448f8cb741dd20077c4f2cb..0000000000000000000000000000000000000000
--- a/hugo/static/files/readme.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-
-XXXXXX