From d1db1a45403130ea91ad2d83b4e347f2cb2ef25a Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de> Date: Tue, 8 Mar 2022 21:53:57 +0100 Subject: [PATCH] ditto detector examples --- Examples/scatter2d/ConstantBackground.py | 33 ++----------------- .../scatter2d/DetectorResolutionFunction.py | 33 ++----------------- 2 files changed, 4 insertions(+), 62 deletions(-) diff --git a/Examples/scatter2d/ConstantBackground.py b/Examples/scatter2d/ConstantBackground.py index a63dcf6a3cc..ca0f125643c 100755 --- a/Examples/scatter2d/ConstantBackground.py +++ b/Examples/scatter2d/ConstantBackground.py @@ -7,37 +7,8 @@ from bornagain import deg, nm def get_sample(): - """ - Returns a sample with uncorrelated cylinders on a substrate. - """ - - # 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 + from bornagain import std_samples + return std_samples.cylinders() def get_simulation(sample): diff --git a/Examples/scatter2d/DetectorResolutionFunction.py b/Examples/scatter2d/DetectorResolutionFunction.py index 1f40c554d49..4c1eeea9e38 100755 --- a/Examples/scatter2d/DetectorResolutionFunction.py +++ b/Examples/scatter2d/DetectorResolutionFunction.py @@ -7,37 +7,8 @@ from bornagain import deg, nm def get_sample(): - """ - Returns a sample with uncorrelated cylinders on a substrate. - """ - - # 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 + from bornagain import std_samples + return std_samples.cylinders() def get_simulation(sample): -- GitLab