Skip to content
Snippets Groups Projects
Commit a588cacf authored by Pospelov, Gennady's avatar Pospelov, Gennady
Browse files

manual: review of simulation section

parent 33289436
No related branches found
No related tags found
No related merge requests found
......@@ -76,7 +76,7 @@ def run_simulation():
simulation = get_simulation()
simulation.setSample(sample)
simulation.runSimulation()
result = GetOutputData(simulation) + 1 # for log scale
result = simulation.getIntensityData().getArray() + 1 # for log scale
pylab.imshow(numpy.rot90(result, 1), norm=matplotlib.colors.LogNorm(), extent=[-1.0, 1.0, 0, 2.0])
pylab.show()
......
......@@ -288,6 +288,7 @@ Required libraries can be found at
\begin{lstlisting}[language=shell, style=commandline]
matlab:
http://matplotlib.org/downloads.html
numpy, dateutil, pyparsing:
http://www.lfd.uci.edu/~gohlke/pythonlibs
\end{lstlisting}
......@@ -295,7 +296,7 @@ http://www.lfd.uci.edu/~gohlke/pythonlibs
\noindent
{\bf Step II: $~$ use the installation package } \newline
Windows installation package can be downloaded from \url{http://apps.jcns.fz-juelich.de/BornAgain}.
\BornAgain\ installation package for Windows can be downloaded from \url{http://apps.jcns.fz-juelich.de/BornAgain}.
Double-click on it to start the installation process. And then follow the instructions.
\vspace*{2mm}
......
......@@ -15,22 +15,21 @@ A simulation of GISAXS using \BornAgain\ consists of following steps:
\item save the simulated detector image.
\end{itemize}
%\noindent The sample is built from object oriented building blocks and can be
%instead of loading data files.
\noindent
User defines all these steps using \BornAgain\ API in \Python\ script and then run
the simulation by executing the script in \Python\ interpreter.
More information about the general software architecture and \BornAgain\ internal design
are given in \SecRef{SoftwareArchitecture}.
We are planing to organize all these steps in a graphical user interface (GUI).
For the time being, however, \BornAgain\ must be involved via \Code{C++} program or
\Code{Python} scripts. In the following, we describe how to write a
\Code{Python} script which runs a \BornAgain\ simulation. For tutorials about this programming language, the users are referred to \cite{Lut09}.
\section{Conventions}
More information about the general software architecture and \BornAgain\ internal design are given in \SecRef{SoftwareArchitecture}.
\subsection{Geometry of the sample}
\section{Geometry of the sample}
\noindent The geometry used to describe the sample is shown in \reffig{multil3d}. The $z$-axis is perpendicular to the sample's
surface and pointing upwards. The $x$-axis is perpendicular to the
plane of the detector and the $y$-axis is along it. The input and the
detector plane. The input and the
scattered output beams are each characterized by two angles
$\alpha_i$, $\phi_i$ and $\alpha_f$, $\phi_f$, respectively. Our choice of orientation for the
angles $\alpha_i$ and $\alpha_f$ is so that they are positive as shown in \reffig{multil3d}. \\
......@@ -47,29 +46,26 @@ plane. }
\end{figure}
\noindent The layers are defined by their thicknesses (parallel to the
The layers are defined by their thicknesses (parallel to the
$z$-direction), their possible
roughnesses (equal to 0 by default) and the
material they are made of. We do not define any dimensions in the $x$, $y$
directions. And, except for roughness, the layer's vertical boundaries are plane and
material they are made of. They have infinite extension in the $x$, $y$
directions. And, except for roughness, they interfaces are plane and
perpendicular to the $z$-axis. There is also no limitation to the
number of layers that could be defined in \BornAgain. Note that the
thickness of the top and bottom layer are not defined. \\
\ImportantPoint{Remark:}{Order of the different steps for the simulation: \\
When assembling the sample, the layers are defined from top to
bottom. So in most cases the first layer will be the air layer.}\\
\noindent The particles are characterized by their form factors (\textit{i.e.} the Fourier transform of the shape function - see the list of form factors implemented
in \BornAgain) and the composing material. The number of input parameters for the form
factor depends on the
particle symmetry; it ranges from one parameter for a sphere (its
radius) to three for an ellipsoid (its three main axis lengths).\\ By
placing the particles
thickness of the top and bottom layer are not defined.
%\ImportantPoint{Remark:}{Order of layers: \\
%When assembling the sample, the layers are defined from top to
%bottom. So in most cases the first layer will be the air layer.}\\
The nanoparticles are characterized by their form factors (\textit{i.e.} the Fourier transform of the shape function - see the list of form factors implemented in \BornAgain) and the composing material. The number of input parameters for the form factor depends on the particle symmetry; it ranges from one parameter for a sphere (its radius) to three for an ellipsoid (its three main axis lengths).
By placing the particles
inside or on top of a layer, we impose their vertical positions, whose
values correspond to the bottoms of the particles. The in-plane distribution of particles is linked with the way the
particles interfere with each other. It is therefore implemented
when dealing with the interference function. \\
when dealing with the interference function.
%\ImportantPoint{Remark:}{Depth of particles\\
%The vertical positions of particles in a layer are given in relative
......@@ -77,7 +73,7 @@ when dealing with the interference function. \\
%\texttt{depth}=0. But for all the other layers, it is the top of the
%layer which corresponds to \texttt{depth}=0.}\\
\noindent The complex refractive index associated with a layer or a particle is written as $n=1-\delta +i\beta$, with
The complex refractive index associated with a layer or a particle is written as $n=1-\delta +i\beta$, with
$\delta, \beta \in \mathbb{R}$. In our program, we input $\delta$ and
$\beta$ directly.
......@@ -92,15 +88,6 @@ specifying them right after the value of the corresponding
parameter like, for example, \Code{20.0*micrometer}.
\subsection{Programs}
The examples presented in the next paragraphs are written in \Python. For tutorials about this
programming language, the users are referred to \cite{Lut09}.
%\noindent Note about the version of C++ and Python to run the examples.\\
%\noindent Where can the following examples be found?\\
%\noindent What is the command to run the examples?
\input{SimulationExamples}
......
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\mysection{Example 1: two types of islands on a substrate without interference}{Example 1: two types of islands on top of
substrate without interference} \SecLabel{Example1Python}
......@@ -17,34 +12,30 @@ between them. These particles are placed in air, on top
of a substrate.\\ We are going to go through each step of the
simulation. The \Python\ script specific to each stage will be given at
the beginning of the description. But for the sake of completeness the full code is given
in Appendix~\ref{PythonSimulationExampleScript}. \\
in Appendix~\ref{PythonSimulationExampleScript}.
\noindent We start by importing different functions from external
modules, for example \Code{NumPy} (lines~\ref{import_lib_beg}-\ref{import_lib_end}), which
is a fundamental package for scientific computing with \Python\
\cite{s:numpy}. In particular, line~\ref{import_ba}
imports the features of \BornAgain\ software.\\
%import sys, os, numpy @\label{import_lib}@
% -----------------------------------------------------------------------------
%
%from libBornAgainCore import * @\label{import_end}@
% -----------------------------------------------------------------------------
\subsubsection{Importing Python modules}
\begin{lstlisting}[language=python, style=eclipseboxed,name=ex1,nolol]
import numpy @\label{import_lib_beg}@
import matplotlib
import pylab @\label{import_lib_end}@
from libBornAgainCore import * @\label{import_ba}@
\end{lstlisting}
We start by importing different functions from external
modules, for example \Code{NumPy} (lines~\ref{import_lib_beg}-\ref{import_lib_end}), which
is a fundamental package for scientific computing with \Python\
\cite{s:numpy}. In particular, line~\ref{import_ba}
imports the features of \BornAgain\ software.
%%%%%%%%%%%%%
\myparagraph{\underline{First step:} Defining the materials}
%def RunSimulation(): @\label{def_function}@
% # defining materials @\label{material1}@
% mAmbience = MaterialManager.getHomogeneousMaterial("Air", 0.0, 0.0) @\label{material2}@
% mSubstrate = MaterialManager.getHomogeneousMaterial("Substrate",6e-6, 2e-8) @\label{material3}@
% mParticle = MaterialManager.getHomogeneousMaterial("Particle", 6e-4, 2e-8) @\label{materialparticle}@
% -----------------------------------------------------------------------------
%
% -----------------------------------------------------------------------------
\subsubsection{Defining the materials}
\begin{lstlisting}[language=python, style=eclipseboxed,name=ex1,nolol]
def get_sample(): @\label{def_function}@
"""
......@@ -57,29 +48,25 @@ def get_sample(): @\label{def_function}@
m_particle = MaterialManager.getHomogeneousMaterial("Particle", 6e-4, 2e-8) @\label{materialparticle}@
\end{lstlisting}
\noindent Line~\ref{def_function} marks the beginning of the
function to define our sample.
\noindent Lines~\ref{material2}, \ref{material3} and \ref{materialparticle} define different
Line~\ref{def_function} marks the beginning of the
function to define our sample. Lines~\ref{material2}, \ref{material3} and \ref{materialparticle} define different
materials using function \Code{getHomogeneousMaterial} from class
\Code{MaterialManager}. The general syntax is the following
\begin{lstlisting}[language=python, style=eclipse,numbers=none]
<material_name> = MaterialManager.getHomogeneousMaterial("name", delta, beta)
\end{lstlisting}
\noindent where \Code{name} is the name of the
where \Code{name} is the name of the
material associated with its complex refractive index
n=1-\Code{delta} +i \Code{beta}. \Code{<material\_name>} is later used when
referring to this particular material. The three defined materials in this example are \Code{Air} with a refractive
index of 1 (\Code{delta = beta = 0}), a \Code{Substrate} associated with a complex refractive index
equal to $1-6\times 10^{-6} +i2\times 10^{-8} $, and the material of particles, whose refractive index is \Code{n}$=1-6\times 10^{-4}+i2\times 10^{-8}$.\\\\
equal to $1-6\times 10^{-6} +i2\times 10^{-8} $, and the material of particles, whose refractive index is \Code{n}$=1-6\times 10^{-4}+i2\times 10^{-8}$.
%\noindent \underline{Remark:} there is no condition on the choice of \Code{name}.
%%%%%%%%%%%%%
\myparagraph{\underline{Second step:} Defining the particles}
% -----------------------------------------------------------------------------
%
% -----------------------------------------------------------------------------
\subsubsection{Defining the particles}
\begin{lstlisting}[language=python,style=eclipseboxed,name=ex1,nolol]
# collection of particles @\label{particles1}@
cylinder_ff = FormFactorCylinder(5*nanometer, 5*nanometer) @\label{particlescyl1}@
......@@ -87,57 +74,51 @@ equal to $1-6\times 10^{-6} +i2\times 10^{-8} $, and the material of particles,
prism_ff = FormFactorPrism3(5*nanometer, 5*nanometer) @\label{particlesprism1}@
prism = Particle(m_particle, prism_ff) @\label{particlesprism2}@
\end{lstlisting}
\noindent We implement two different shapes of particles: cylinders and
prisms (\textit{i.e.} elongated particles with a constant equilateral triangular cross section).\\ All particles implemented in \BornAgain\ are defined by their
form factors, their sizes and the material
they are made of. Here, for the
cylindrical particle, we input its radius and height. For the prism,
the possible inputs are the length of one side of its equilateral triangular
base and its height.\\
%\noindent In line~\ref{complx_ref_index}, we define the complex refractive index
%associated with both particle shapes: \Code{n}$=1-6\times 10^{-4}+i2\times 10^{-8}$.\\
\noindent In order to define a particle, we proceed in two steps. For example for
We implement two different shapes of particles: cylinders and
prisms (\textit{i.e.} elongated particles with a constant equilateral triangular cross section).
All particles implemented in \BornAgain\ are defined by their
form factors, their sizes and the material
they are made of. Here, for the
cylindrical particle, we input its radius and height. For the prism,
the possible inputs are the length of one side of its equilateral triangular
base and its height.
In order to define a particle, we proceed in two steps. For example for
the cylindrical particle, we first specify the form factor of a cylinder with
its radius and height, both equal to 5 nanometers in this particular
case (see line~\ref{particlescyl1}). Then we associate this shape with
the constituting material as in line~\ref{particlescyl2}.\\
the constituting material as in line~\ref{particlescyl2}.
The same procedure has been applied for the prism in lines~\ref{particlesprism1} and \ref{particlesprism2}, respectively.
\noindent The same procedure has been applied for the prism in lines~\ref{particlesprism1} and \ref{particlesprism2}, respectively.
%%%%%%%%%%%%%
\myparagraph{\underline{Third step:} Characterizing the layers and assembling the sample}
\noindent \textbf{Particle decoration} \\
% -----------------------------------------------------------------------------
%
% -----------------------------------------------------------------------------
\subsubsection{Characterizing particles assembly}
\begin{lstlisting}[language=python, style=eclipseboxed, name=ex1,nolol]
particle_decoration = ParticleDecoration() @\label{particlesdecor1}@
particle_decoration.addParticle(cylinder, 0.0, 0.5) @\label{particlesdecor2}@
particle_decoration.addParticle(prism, 0.0, 0.5)@\label{particlesdecor3}@
interference = InterferenceFunctionNone() @\label{particlesnointerf}@
particle_decoration.addInterferenceFunction(interference) @\label{particlesinterf}@
\end{lstlisting}
\noindent The object which holds the information about the positions and densities of particles
The object which holds the information about the positions and densities of particles
in our sample is called \Code{ParticleDecoration}
(line~\ref{particlesdecor1}). We use the associated function \Code{addParticle}
for each particle shape (lines~\ref{particlesdecor2}, \ref{particlesdecor3}). Its general
syntax is
for each particle shape (lines~\ref{particlesdecor2}, \ref{particlesdecor3}). Its general syntax is
\begin{lstlisting}[language=python, style=eclipse,numbers=none]
addParticle(<particle_name>, depth, abundance)
\end{lstlisting}
\noindent where \Code{<particle\_name>} is the name used to define the particles
where \Code{<particle\_name>} is the name used to define the particles
(lines~\ref{particlescyl2} and \ref{particlesprism2}), \Code{depth}
(default value =0)
is the vertical position, expressed in nanometers, of the particles in a given layer (the
association with a particular layer will be done during the next step) and
\Code{abundance} is the proportion of this type of particles,
normalized to the total number of particles. Here we have 50\% of cylinders
and 50\% of prisms. \\
and 50\% of prisms.
\ImportantPoint{Remark:}{Depth of particles\\
The vertical positions of the particles in a layer are given in relative
......@@ -156,20 +137,13 @@ interfere imposes the horizontal distribution of
the particles as
the interference reflects the long or short-range order of the
particles distribution (\textbf{see Theory}). On the contrary, the vertical position is
imposed when we add the particles in a given layer by parameter \Code{depth}, as shown in lines~\ref{particlesdecor2} and \ref{particlesdecor3}. \\
\noindent \textbf{Multilayer}\\
%# air layer with particles and substrate form multi layer @\label{sampleassembling}@
% air_layer = Layer(m_air) @\label{airlayer}@
% air_layer.setDecoration(particle_decoration) @\label{airlayerdecorator}@
% substrate_layer = Layer(m_substrate, 0) @\label{substratelayer}@
% multi_layer = MultiLayer() @\label{multilayercanvas}@
% multi_layer.addLayer(air_layer) @\label{layerairdecor}@
% multi_layer.addLayer(substrate_layer) @\label{layersubstrate}@
% return multi_layer
imposed when we add the particles in a given layer by parameter \Code{depth}, as shown in lines~\ref{particlesdecor2} and \ref{particlesdecor3}.
% -----------------------------------------------------------------------------
%
% -----------------------------------------------------------------------------
\subsubsection{Multilayer}
\begin{lstlisting}[language=python, style=eclipseboxed,name=ex1,nolol]
# air layer with particles and substrate form multi layer @\label{sampleassembling}@
air_layer = Layer(m_air) @\label{airlayer}@
......@@ -179,58 +153,41 @@ imposed when we add the particles in a given layer by parameter \Code{depth}, as
multi_layer.addLayer(air_layer) @\label{layerairdecor}@
multi_layer.addLayer(substrate_layer) @\label{layersubstrate}@
return multi_layer @\label{returnmlayer}@
\end{lstlisting}
\noindent We now have to configure our sample. For this first example,
We now have to configure our sample. For this first example,
the particles, \textit{i.e.} cylinders and prisms, are on top of a substrate in an
air layer. \textbf{The order in which we define these layers is important: we
start from the top layer down to the bottom one}.\\
start from the top layer down to the bottom one}.
\noindent Let us start with the air layer. It contains the particles. In
Let us start with the air layer. It contains the particles. In
line~\ref{airlayer}, we use the previously defined \Code{mAmbience}
(="air" material) (line~\ref{material2}). The command written in line~\ref{airlayerdecorator} shows that this layer is decorated by adding the
particles using the function \Code{particle\_decoration} defined in
lines~\ref{particlesdecor1}-\ref{particlesinterf}. The substrate layer
only contains the substrate material (line~\ref{substratelayer}).\\%Note that the
(="air" material) (line~\ref{material2}). The command in line~\ref{airlayerdecorator} shows that this layer is decorated by adding the
particles using particle decoration object defined earlier. The substrate layer
only contains the substrate material (line~\ref{substratelayer}).
%Note that the
%\Code{depth} is referenced to the bottom of the top layer (negative
%values would correspond to particles floating above layer 1 as
%the vertical axis is pointing upwards).
\noindent There are different possible syntaxes to define a layer. As shown in
There are different possible syntaxes to define a layer. As shown in
lines~\ref{airlayer} and \ref{substratelayer}, we can use
\Code{Layer(<material\_name>,thickness)} or
\Code{Layer(<material\_name>)}. The second case corresponds
to the default value of the \Code{thickness}, equal to 0. The \Code{thickness} is
expressed in nanometers. \\
expressed in nanometers.
\noindent Our two layers are now fully characterized. The sample is assembled using
Our two layers are now fully characterized. The sample is assembled using
\Code{MultiLayer()} constructor (line~\ref{multilayercanvas}): we start with the air layer decorated
with the particles (line~\ref{layerairdecor}), which is the layer at
the top and end with the bottom layer, which is the
substrate (line~\ref{layersubstrate}).
%%%%%%%%%%%%%
\myparagraph{\underline{Fourth step:} Characterizing the input beam and
output detector}% and running the simulation}
%def get_simulation(): @\label{run1}@
% """
% Create and return GISAXS simulation with beam and detector defined
% """
% simulation = Simulation() @\label{run2}@
% simulation.setDetectorParameters(100, -1.0*degree, 1.0*degree,
% 100, 0.0*degree, 2.0*degree, True) @\label{rundetector}@
% simulation.setBeamParameters(1.0*angstrom, 0.2*degree,
% 0.0*degree) @\label{runbeam}@
% return simulation
% # run simulation @\label{run1}@
% simulation = Simulation() @\label{run2}@
% simulation.setDetectorParameters(100,-1.0*degree, 1.0*degree, 100, 0.0*degree, 2.0*degree, True) @\label{rundetector}@
% simulation.setBeamParameters(1.0*angstrom, 0.2*degree, 0.0*degree) @\label{runbeam}@
% simulation.setSample(multi_layer) @\label{runsample}@
% simulation.runSimulation() @\label{runsimul}@
% -----------------------------------------------------------------------------
%
% -----------------------------------------------------------------------------
\subsubsection{Characterizing the input beam and
output detector}
\begin{lstlisting}[language=python, style=eclipseboxed,name=ex1,nolol]
def get_simulation(): @\label{run1}@
......@@ -241,24 +198,25 @@ def get_simulation(): @\label{run1}@
simulation.setDetectorParameters(100, -1.0*degree, 1.0*degree, 100, 0.0*degree, 2.0*degree, True) @\label{rundetector}@
simulation.setBeamParameters(1.0*angstrom, 0.2*degree, 0.0*degree) @\label{runbeam}@
return simulation @\label{returnsimul}@
\end{lstlisting}
\noindent The first stage is to define the \Code{Simulation()} object (line~\ref{run2}). Then we define the detector (line~\ref{rundetector}) and beam
The first stage is to create the \Code{Simulation()} object (line~\ref{run2}). Then we define the detector (line~\ref{rundetector}) and beam
parameters (line~\ref{runbeam}). %, which are associated with the
%sample previously defined (line~\ref{runsample}). Finally we run
%the simulation (line~\ref{runsimul}).
Those functions are part of the Simulation
class. The different incident and exit angles are
shown in \reffig{multil3d}. \\
shown in \reffig{multil3d}.
The detector parameters are set using ranges of angles via
the function:
\noindent The detector parameters are set using ranges of angles via
the function:\\
\begin{lstlisting}[language=python, style=eclipse,numbers=none]
setDetectorParameters(n_phi, phi_f_min, phi_f_max, n_alpha, alpha_f_min, alpha_f_max, isgisaxs_style=false)},
\end{lstlisting}
\noindent \Code{setDetectorParameters(n\_phi, phi\_f\_min,
phi\_f\_max,\\ \phantom{setDetectorParameters(}n\_alpha, alpha\_f\_min, alpha\_f\_max, isgisaxs\_style=false)}, \\
%\Code{
%setDetectorParameters(n\_phi, phi\_f\_min,
% phi\_f\_max,\\ \phantom{setDetectorParameters(}n\_alpha, alpha\_f\_min, %alpha\_f\_max, isgisaxs\_style=false)}, \\
\noindent where \Code{n\_phi=100} is the number of iterations for $\phi_f$,\\ \Code{phi\_f\_min=-1.0*degree} and \Code{phi\_f\_max=1.0*degree}
are the minimum and maximum values respectively of $\phi_f$, \\ \Code{n\_alpha=100} is
......@@ -279,53 +237,59 @@ at constant values of these two angles.\\
grazing angle on the surface of the sample,
\Code{phi\_i=0.0*degree} is the in-plane
direction of the incident beam (measured with respect to the
$x$-axis).\\
$x$-axis).
\noindent \underline{Remark}: Note that, except for
\Code{isgisaxs\_style}, there are no default values implemented for the
parameters of the beam and detector.\\
%\noindent \underline{Remark}: Note that, except for
%\Code{isgisaxs\_style}, there are no default values implemented for the
%parameters of the beam and detector.\\
%\noindent Line~\ref{runsimul} shows the command to run the simulation using the
%previously defined setup.
%%%%%%%%%%%%%
\myparagraph{\underline{Fifth step:} Running the simulation and
plotting and or saving the results}
% -----------------------------------------------------------------------------
%
% -----------------------------------------------------------------------------
\subsubsection{Running the simulation and
plotting the results}
\begin{lstlisting}[language=python, style=eclipseboxed,name=ex1,nolol]
def run_simulation():
def run_simulation(): @\label{run_simulation}@
"""
Run simulation and plot results
"""
sample = get_sample()
simulation = get_simulation()
simulation.setSample(sample) ) @\label{runsample}@
sample = get_sample() @\label{get_sample}@
simulation = get_simulation() @\label{get_simulation}@
simulation.setSample(sample) ) @\label{setsample}@
simulation.runSimulation() @\label{runsimul}@
result = GetOutputData(simulation) + 1 # for log scale @\label{outputdata}@
result = simulation.getIntensityData().getArray() + 1 # for log scale @\label{outputdata}@
pylab.imshow(numpy.rot90(result, 1), norm=matplotlib.colors.LogNorm(), extent=[-1.0, 1.0, 0, 2.0]) @\label{plot1}@
pylab.show() @\label{plot2}@
\end{lstlisting}
In function \Code{run\_simulation()}, we associate the sample
characterised by function \Code{get\_sample()} with the input beam and
output detector, defined in function \Code{get\_simulation()} (line~\ref{runsample}). Finally we run
the simulation (line~\ref{runsimul}).
\noindent In line~\ref{outputdata} we obtain the simulated intensity
%In function \Code{run\_simulation()}, we associate the sample
%characterised by function \Code{get\_sample()} with the input beam and
%output detector, defined in function \Code{get\_simulation()} (line~\ref{runsample}).
In function defined starting from the line~\ref{run_simulation} we bring all
items together. We create the sample and the simulation objects at the lines
~\ref{get_sample} and \ref{get_simulation}, using calls to the previously defined functions. We assign the sample to the simulation at line ~\ref{setsample} and
finally launch the simulation at line ~\ref{runsimul}.
In line~\ref{outputdata} we obtain the simulated intensity
as a function of outgoing angles $\alpha_f$ and $\phi_f$ for further
uses (plots, fits,\ldots) as a \Code{NumPy} array containing
\Code{n\_phi}$\times$\Code{n\_alpha}
datapoints. Some options are provided by \BornAgain. For example,
using lines~\ref{plot1}-\ref{plot2} produces the two-dimensional
datapoints. Lines~\ref{plot1}-\ref{plot2} produces the two-dimensional
contourplot of the intensity as a function of $\alpha_f$ and
$\phi_f$ shown in \reffig{output_ex1}.
\begin{figure}[p!]
\begin{figure}[htbp]
\begin{center}
\includegraphics[clip=true, width=120mm]{Figures/Manual_ex1.eps}
\end{center}
\caption[Example 1: Simulated grazing-incidence small-angle X-ray scattering from a mixture of
cylindrical and prismatic nanoparticles without any interference, deposited on top
of a substrate]{Figure of example 1: Simulated grazing-incidence small-angle X-ray scattering from a mixture of
of a substrate]{Simulated grazing-incidence small-angle X-ray scattering from a mixture of
cylindrical and prismatic nanoparticles without any interference, deposited on top
of a substrate. The input beam is characterized by a wavelength
$\lambda$ of 1~\AA\ and incident angles $\alpha_i=0.2^{\circ}$, $\phi_i=0^{\circ}$. The
......@@ -467,7 +431,7 @@ session by running \Code{multi\_layer.printSampleTree()}
The top \Code{MultiLayer} object is composed of three children, namely
\Code{Layer \#0, Layer Interface \#0} and \Code{Layer \#1}. The
children objects might themselves also be decomposed into tree-like structures. For example,
\Code{Layer \#0} contains \Code{ParticleDecoration} object, which holds information
\Code{Layer \#0} contains a \Code{ParticleDecoration} object, which holds information
related to the two types of particles populating the layer. All numerical values used
during the sample construction (thickness of layers, size of particles, roughness parameters) are part of the same tree structure.
They are marked in the figure with shaded gray boxes.
......
No preview for this file type
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