Skip to content
Snippets Groups Projects
Commit d1db1a45 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

ditto detector examples

parent 9d3937c3
No related branches found
No related tags found
1 merge request!729Doc: use std_samples
...@@ -7,37 +7,8 @@ from bornagain import deg, nm ...@@ -7,37 +7,8 @@ from bornagain import deg, nm
def get_sample(): def get_sample():
""" from bornagain import std_samples
Returns a sample with uncorrelated cylinders on a substrate. return std_samples.cylinders()
"""
# 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): def get_simulation(sample):
......
...@@ -7,37 +7,8 @@ from bornagain import deg, nm ...@@ -7,37 +7,8 @@ from bornagain import deg, nm
def get_sample(): def get_sample():
""" from bornagain import std_samples
Returns a sample with uncorrelated cylinders on a substrate. return std_samples.cylinders()
"""
# 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): def get_simulation(sample):
......
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