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

+ example HollowSpheres

parent 8ba277e0
No related branches found
No related tags found
1 merge request!1034Evarious corrs; ran 'make figures'; add example 'HollowSpheres'
#!/usr/bin/env python3
"""
SAS by hollow spheres
"""
import bornagain as ba
from bornagain import ba_plot as bp, deg, nm, std_simulations
def get_sample():
# Define materials
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)
particle = ba.Particle(material_Particle, ff)
# Define particle layouts
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__':
bp.parse_args(sim_n=200)
sample = get_sample()
simulation = std_simulations.sas(sample, bp.simargs['n'])
result = simulation.simulate()
bp.plot_simulation_result(result)
......@@ -149,6 +149,7 @@ test_example(scatter2d/DetectorResolutionFunction 2e-10)
test_example(scatter2d/DodecahedraSAS 2e-10)
test_example(scatter2d/HalfSpheresInAverageTopLayer 2e-10)
test_example(scatter2d/HexagonalLatticesWithBasis 2e-10)
test_example(scatter2d/HollowSpheres 2e-10)
test_example(scatter2d/Interference1DLattice 1.5)
test_example(scatter2d/Interference1DRadialParacrystal 2e-10)
test_example(scatter2d/Interference2DCenteredSquareLattice 2e-10)
......
File added
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