Esempio n. 1
0
"""
Plot form factors.
"""
import bornagain as ba
from bornagain import nanometer, degree
import bornplot as bp
import math

det = bp.Detector(200, -5, 5, -5, 5)
n = 3
results = []
edge = 3.2

title = 'face normal'
trafo = ba.RotationY(26.5651 * degree)
ff = ba.FormFactorDodecahedron(edge * nanometer)
data = bp.run_simulation(det, ff, trafo)
results.append(bp.Result(0, data, title))

title = 'vertex normal'
trafo = ba.RotationY(-52.6226 * degree)
ff = ba.FormFactorDodecahedron(edge * nanometer)
data = bp.run_simulation(det, ff, trafo)
results.append(bp.Result(1, data, title))

title = 'edge normal'
trafo = ba.RotationY(58.2825 * degree)
ff = ba.FormFactorDodecahedron(edge * nanometer)
data = bp.run_simulation(det, ff, trafo)
results.append(bp.Result(2, data, title))
import bornagain as ba
from bornagain import deg, angstrom
from matplotlib import pyplot as plt

phi_min, phi_max = -2.0, 2.0
alpha_min, alpha_max = 0.0, 2.0

formfactors = [
    ba.FormFactorAnisoPyramid(20.0, 16.0, 13.0, 60.0 * deg),
    ba.FormFactorBox(20.0, 16.0, 13.0),
    ba.FormFactorCantellatedCube(15.0, 6.0),
    ba.FormFactorCone(10.0, 13.0, 60.0 * deg),
    ba.FormFactorCone6(10.0, 13.0, 60.0 * deg),
    ba.FormFactorCuboctahedron(20.0, 13.0, 0.7, 60.0 * deg),
    ba.FormFactorCylinder(8.0, 16.0),
    ba.FormFactorDodecahedron(5.0),
    ba.FormFactorEllipsoidalCylinder(8.0, 13.0, 16.0),
    ba.FormFactorFullSphere(8.0),
    ba.FormFactorFullSpheroid(10.0, 13.0),
    ba.FormFactorHemiEllipsoid(10.0, 6.0, 8.0),
    ba.FormFactorIcosahedron(8.0),
    ba.FormFactorPrism3(10.0, 13.0),
    ba.FormFactorPrism6(5.0, 11.0),
    ba.FormFactorPyramid(18.0, 13.0, 60.0 * deg),
    ba.FormFactorCosineRippleBox(27.0, 20.0, 14.0),
    ba.FormFactorSawtoothRippleBox(36.0, 25.0, 14.0, 3.0),
    ba.FormFactorTetrahedron(15.0, 6.0, 60.0 * deg),
    ba.FormFactorTruncatedCube(15.0, 6.0),
    ba.FormFactorTruncatedSphere(5.0, 7.0, 0),
    ba.FormFactorTruncatedSpheroid(7.5, 9.0, 1.2, 0),
]