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
ceddf600
Commit
ceddf600
authored
2 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
HollowSpheres: use standard_samples
parent
21709772
No related branches found
No related tags found
1 merge request
!1034
Evarious corrs; ran 'make figures'; add example 'HollowSpheres'
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Examples/scatter2d/HollowSpheres.py
+4
-20
4 additions, 20 deletions
Examples/scatter2d/HollowSpheres.py
with
4 additions
and
20 deletions
Examples/scatter2d/HollowSpheres.py
+
4
−
20
View file @
ceddf600
...
@@ -3,32 +3,16 @@
...
@@ -3,32 +3,16 @@
SAS by hollow spheres
SAS by hollow spheres
"""
"""
import
bornagain
as
ba
import
bornagain
as
ba
from
bornagain
import
ba_plot
as
bp
,
deg
,
nm
,
std_simulations
from
bornagain
import
ba_plot
as
bp
,
deg
,
nm
,
std_samples
,
std_simulations
def
get_sample
():
def
get_sample
():
# Define materials
mat
=
ba
.
RefractiveMaterial
(
"
Particle
"
,
6e-05
,
2e-08
)
material_Particle
=
ba
.
RefractiveMaterial
(
"
Particle
"
,
6e-05
,
2e-08
)
material_Vacuum
=
ba
.
RefractiveMaterial
(
"
Vacuum
"
,
0
,
0
)
# Define particle
ff
=
ba
.
HollowSphere
(
4
*
nm
,
1
*
nm
)
ff
=
ba
.
HollowSphere
(
4
*
nm
,
1
*
nm
)
particle
=
ba
.
Particle
(
mat
erial_Particle
,
ff
)
particle
=
ba
.
Particle
(
mat
,
ff
)
# Define particle layouts
return
std_samples
.
sas_sample_with_particle
(
particle
)
layout
=
ba
.
ParticleLayout
()
layout
.
addParticle
(
particle
)
layout
.
setTotalParticleSurfaceDensity
(
0.01
)
# Define layers
layer
=
ba
.
Layer
(
material_Vacuum
)
layer
.
addLayout
(
layout
)
# Define sample
sample
=
ba
.
MultiLayer
()
sample
.
addLayer
(
layer
)
return
sample
if
__name__
==
'
__main__
'
:
if
__name__
==
'
__main__
'
:
...
...
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