# Specular on BornAgain

file:///usr/share/doc/bornagain/html/ref/sim/class/specular/index.html Recent content in Specular on BornAgain Hugo en-us

# Example

file:///usr/share/doc/bornagain/html/ref/sim/class/specular/ex.html Mon, 01 Jan 0001 00:00:00 +0000 file:///usr/share/doc/bornagain/html/ref/sim/class/specular/ex.html <h2 id="basic-specular-reflectometry-example">Basic specular reflectometry example</h2> <p>As introductory example, we simulate specular reflectometry by a sample that consists of 10 Ti/Ni double layers on a Si substrate.</p> <h5 id="full-script">Full script</h5> <p>The same script has been used in the tutorial to explain <a href="file:///usr/share/doc/bornagain/html/py/run">usage</a> and <a href="file:///usr/share/doc/bornagain/html/py/syntax">syntax</a> of BornAgain Python code.</p> <p>Root class reference: <a href="file:///usr/share/doc/bornagain/html/ref/sim/class/specular">SpecularSimulation</a>.</p> <figure class="center"> <a href="file:///usr/share/doc/bornagain/html/img/auto/specular/AlternatingLayers1.png"> <img src="file:///usr/share/doc/bornagain/html/img/auto/specular/AlternatingLayers1.png" width="500"> </a> <figcaption> <p></p> </figcaption> </figure> <div class="highlight"><div class="chroma"> <table class="lntable"><tr><td class="lntd"> <pre tabindex="0" class="chroma"><code></code></pre></td> <td class="lntd"> <pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"></code></pre></td></tr></table> </div> </div> <a class="linktofile" href="https://jugit.fz-juelich.de/mlz/bornagain/-/tree/r23/auto/Examples/specular/AlternatingLayers1.py"/>auto/Examples/specular/AlternatingLayers1.py</a> <h5 id="shorthand-with-standard-sample">Shorthand with standard sample</h5> <p>Since we will use the same sample in several other examples, we provide the shorthand <code>std_samples.alternating_layers()</code> so that the above script can be shortened as</p>