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

several more instances of standard samples

parent d1db1a45
No related branches found
No related tags found
1 merge request!729Doc: use std_samples
...@@ -12,37 +12,8 @@ from matplotlib import pyplot as plt ...@@ -12,37 +12,8 @@ from matplotlib import pyplot as plt
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):
......
...@@ -10,37 +10,8 @@ from matplotlib import rcParams ...@@ -10,37 +10,8 @@ from matplotlib import rcParams
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