Skip to content
Snippets Groups Projects
Commit a3df3b6f authored by Ammar Nejati's avatar Ammar Nejati
Browse files

[fixDocImages_i297] Fix documentation figures (Closes #297)

Merging branch 'fixDocImages_i297'  into 'main'.

The scripts for producing the figures and their corresponding links in the documentation are amended, and the missing figures in the documentation are added.

Closes #297

See merge request !1377
parents a4bc7772 7336a8a3
No related branches found
No related tags found
1 merge request!1377Fix documentation figures
Pipeline #90282 failed
......@@ -75,4 +75,5 @@ if __name__ == '__main__':
sample = get_sample()
simulation = get_simulation(sample)
result = simulation.simulate()
bp.plot_simulation_result(result)
bp.show_or_export()
# bp.plot_simulation_result(result)
......@@ -123,10 +123,6 @@ def plot(field):
print("Layout")
plt.tight_layout()
if bp.do_show:
print("Show")
plt.show()
if __name__ == '__main__':
bp.parse_args(sim_n=200)
......@@ -143,3 +139,4 @@ if __name__ == '__main__':
field = result.datafield()
print("Plot")
plot(field)
bp.show_or_export()
......@@ -83,7 +83,7 @@ we get the result
{{< galleryscg >}}
{{< figscg src="/files/fitted/SpinAsymmetry1.png" width="350px" caption="Reflectivity">}}
{{< figscg src="/img/auto/todo/PolarizedSpinAsymmetry.png" width="350px" caption="Spin Asymmetry">}}
{{< figscg src="/img/auto/specular/PolarizedSpinAsymmetry.png" width="350px" caption="Spin Asymmetry">}}
{{< /galleryscg >}}
......
......@@ -13,7 +13,7 @@ is used for running the simulation.
* The simulation results are retrieved as a `Histogram2D` object and then processed in various functions to achieve a resulting image.
{{< galleryscg >}}
{{< figscg src="/img/auto/todo/AccessingSimulationResults.png" width="670px" caption="Intensity images">}}
{{< figscg src="/img/auto/varia/AccessingSimulationResults.png" width="670px" caption="Intensity images">}}
{{< /galleryscg >}}
{{< highlightfile file="Examples/varia/AccessingSimulationResults.py" >}}
......@@ -8,7 +8,7 @@ weight = 30
[Plotting the Scattering Length Density (SLD) profile]({{% ref-py "result/material-profile/material-profile" %}}) of a sample which contains embedded particles, will produce a figure similar to the one below. To embedd particles on a sample, a [2D square lattice particle layout]({{% ref-py "sample/interference/lattice2d/interference-2d-rotated-square-lattice" %}}) needs to be created.
{{< galleryscg >}}
{{< figscg src="/img/auto/todo/MaterialProfileWithParticles.png" width="500px" caption="This figure shows the SLD profile of the sample built, i.e. the SLD value ($y$ axis) as a function of $z$, the depth of the sample ($x$ axis). $z = 0$ represents the surface of the sample, while the substrate is located at $x = −40$[nm] in this example. Notice the stairlike structure that forms for positive $z$ values, $0 < z < 10$, due to the presence o the embedded cone particles." >}}
{{< figscg src="/img/auto/varia/MaterialProfileWithParticles.png" width="500px" caption="This figure shows the SLD profile of the sample built, i.e. the SLD value ($y$ axis) as a function of $z$, the depth of the sample ($x$ axis). $z = 0$ represents the surface of the sample, while the substrate is located at $x = −40$[nm] in this example. Notice the stairlike structure that forms for positive $z$ values, $0 < z < 10$, due to the presence o the embedded cone particles." >}}
{{< /galleryscg >}}
In the figure above, the embeded cone particles in the top layer create a stairlike SLD profile in the region $0 < z < 10$. Each step of the stairlike profile is a weighted average between the SLD of the particle material and that of the solvent (air in this case).
......
......@@ -10,7 +10,7 @@ For more details about preparing a sample and carrying on a reflectometry simula
[reflectometry simulation tutorial]({{% ref-py "simulation/reflectometry/_index.md" %}}).
{{< galleryscg >}}
{{< figscg src="/img/auto/todo/MaterialProfile.png" width="500px" caption="This figure shows the sld profile of the sample built, i.e. the sld value ($y$ axis) as a function of depth ($x$ axis). $x = 0$ represents the surface of the sample, while the substrate is located at $x = -40 \, [{\rm nm}]$ in this example." >}}
{{< figscg src="/img/auto/varia/MaterialProfile.png" width="500px" caption="This figure shows the sld profile of the sample built, i.e. the sld value ($y$ axis) as a function of depth ($x$ axis). $x = 0$ represents the surface of the sample, while the substrate is located at $x = -40 \, [{\rm nm}]$ in this example." >}}
{{< /galleryscg >}}
To obtain the figure above, one must run the script below, which is basically about
......
......@@ -19,6 +19,6 @@ By default the variance is zero.
A square lattice of hemispheres on a substrate, for different lattice orientation angles xi.
{{< figscg src="/img/auto/todo/PositionVariance.png">}}
{{< figscg src="/img/auto/scatter2d/PositionVariance.png">}}
{{< highlightfile file="Examples/scatter2d/PositionVariance.py" >}}
......@@ -22,7 +22,7 @@ Accordingly, we consider Si the ''ambient'' material, placed ''on top'' of the s
As a result, we obtain the neutron intensity
as function of depth and incident angle $\alpha_i$.
{{< figscg src="/img/auto/specular/DepthProbe.png" width="500" class="center">}}
{{< figscg src="/img/auto/varia/DepthProbe.png" width="500" class="center">}}
## Script
......
......@@ -19,7 +19,7 @@ Off-specular scattering from a monodisperse distribution of long boxes.
{{< galleryscg >}}
{{< figscg src="OffSpecularSimulation_setup.jpg" width="350px" caption="Real-space model">}}
{{< figscg src="/img/auto/varia/OffSpecularSimulation.png" width="350px" caption="Intensity image">}}
{{< figscg src="/img/auto/varia/OffspecSimulation.png" width="350px" caption="Intensity image">}}
{{< /galleryscg >}}
{{< highlightfile file="Examples/varia/OffspecSimulation.py" >}}
......@@ -15,7 +15,7 @@ The simulation generates four plots using different sizes of the particles, (rad
* The incident angles are $\alpha\_i = 0.2 ^{\circ}$ and $\varphi\_i = 0^{\circ}$.
{{< galleryscg >}}
{{< figscg src="LargeParticles_setup.jpg" width="350px" caption="Real-space model">}}
{{< figscg src="LargeParticlesFormFactor_setup.jpg" width="700px" caption="Real-space model">}}
{{< figscg src="/img/auto/scatter2d/LargeParticlesFormFactor.png" width="350px" caption="Intensity image">}}
{{< /galleryscg >}}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment