#!/usr/bin/env python3
"""
Basic example of specular reflectometry simulation,
using a standard sample from Wrap/Python/std_samples.py.
"""
import bornagain as ba
from bornagain import ba_plot as bp, deg, angstrom, std_samples, nm


def get_sample():
    return std_samples.alternating_layers()


def get_simulation(sample):
    n = <%= test_mode ? 50 : 500 %>
    scan = ba.AlphaScan(n, 2*deg/n, 2*deg)
    scan.setWavelength(1.54*angstrom)
    return ba.SpecularSimulation(scan, sample)


<%= include_partial("template/main/runsim.py",
    "ba.showSample3D(sample, sample_size=120*nm, seed=0)") -%>
