Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
d1db1a45
Commit
d1db1a45
authored
3 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
ditto detector examples
parent
9d3937c3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!729
Doc: use std_samples
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Examples/scatter2d/ConstantBackground.py
+2
-31
2 additions, 31 deletions
Examples/scatter2d/ConstantBackground.py
Examples/scatter2d/DetectorResolutionFunction.py
+2
-31
2 additions, 31 deletions
Examples/scatter2d/DetectorResolutionFunction.py
with
4 additions
and
62 deletions
Examples/scatter2d/ConstantBackground.py
+
2
−
31
View file @
d1db1a45
...
@@ -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
):
...
...
This diff is collapsed.
Click to expand it.
Examples/scatter2d/DetectorResolutionFunction.py
+
2
−
31
View file @
d1db1a45
...
@@ -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
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment