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
06510d9e
Commit
06510d9e
authored
3 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
several more instances of standard samples
parent
d1db1a45
No related branches found
No related tags found
1 merge request
!729
Doc: use std_samples
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Examples/varia/AccessingSimulationResults.py
+2
-31
2 additions, 31 deletions
Examples/varia/AccessingSimulationResults.py
Examples/varia/AxesInDifferentUnits.py
+2
-31
2 additions, 31 deletions
Examples/varia/AxesInDifferentUnits.py
with
4 additions
and
62 deletions
Examples/varia/AccessingSimulationResults.py
+
2
−
31
View file @
06510d9e
...
@@ -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
):
...
...
This diff is collapsed.
Click to expand it.
Examples/varia/AxesInDifferentUnits.py
+
2
−
31
View file @
06510d9e
...
@@ -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
):
...
...
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