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

+ example Transmission.py, not yet working

parent b87a3a85
No related branches found
No related tags found
No related merge requests found
"""
Basic example of depth-probe simulation:
Computes intensity as function of incident angle alpha and depth z.
"""
import bornagain as ba
from bornagain import angstrom, ba_plot as bp, deg, nm
def get_sample():
material_vac = ba.RefractiveMaterial("Vacuum", 0, 0)
material_A = ba.RefractiveMaterial("A", 6e-5, 0)
material_sub = ba.RefractiveMaterial("Substrate", 3e-05, 0)
sample = ba.MultiLayer()
sample.addLayer(ba.Layer(material_vac))
sample.addLayer(ba.Layer(material_A, 100*nm))
sample.addLayer(ba.Layer(material_sub))
return sample
def get_simulation(sample, flags):
alpha = 0.3 * deg
scan = ba.AlphaScan(1, alpha, alpha)
scan.setWavelength(0.3*nm)
z_axis = ba.FixedBinAxis("z (nm)", 500, -130*nm, 30*nm)
simulation = ba.DepthprobeSimulation(scan, sample, z_axis, flags)
return simulation
def run_example(flags=0):
bp.parse_args(aspect='auto', intensity_max=1e2, intensity_min=1e-12)
sample = get_sample()
simulation = get_simulation(sample, flags)
result = simulation.simulate()
bp.plot_simulation_result(result)
if __name__ == '__main__':
run_example()
"""
Basic example of depth-probe simulation:
Computes intensity as function of incident angle alpha and depth z.
"""
import bornagain as ba
from bornagain import angstrom, ba_plot as bp, deg, nm
def get_sample():
material_vac = ba.RefractiveMaterial("Vacuum", 0, 0)
material_A = ba.RefractiveMaterial("A", 6e-5, 0)
material_sub = ba.RefractiveMaterial("Substrate", 3e-05, 0)
sample = ba.MultiLayer()
sample.addLayer(ba.Layer(material_vac))
sample.addLayer(ba.Layer(material_A, 100*nm))
sample.addLayer(ba.Layer(material_sub))
return sample
def get_simulation(sample, flags):
alpha = 0.3 * deg
scan = ba.AlphaScan(1, alpha, alpha)
scan.setWavelength(0.3*nm)
z_axis = ba.FixedBinAxis("z (nm)", 500, -130*nm, 30*nm)
simulation = ba.DepthprobeSimulation(scan, sample, z_axis, flags)
return simulation
def run_example(flags=0):
bp.parse_args(aspect='auto', intensity_max=1e2, intensity_min=1e-12)
sample = get_sample()
simulation = get_simulation(sample, flags)
result = simulation.simulate()
bp.plot_simulation_result(result)
if __name__ == '__main__':
run_example()
"""
Basic example of depth-probe simulation:
Computes intensity as function of incident angle alpha and depth z.
"""
import bornagain as ba
from bornagain import angstrom, ba_plot as bp, deg, nm
def get_sample():
material_vac = ba.RefractiveMaterial("Vacuum", 0, 0)
material_A = ba.RefractiveMaterial("A", 6e-5, 0)
material_sub = ba.RefractiveMaterial("Substrate", 3e-05, 0)
sample = ba.MultiLayer()
sample.addLayer(ba.Layer(material_vac))
sample.addLayer(ba.Layer(material_A, 100*nm))
sample.addLayer(ba.Layer(material_sub))
return sample
def get_simulation(sample, flags):
alpha = 0.3 * deg
scan = ba.AlphaScan(1, alpha, alpha)
scan.setWavelength(0.3*nm)
z_axis = ba.FixedBinAxis("z (nm)", 500, -130*nm, 30*nm)
simulation = ba.DepthprobeSimulation(scan, sample, z_axis, flags)
return simulation
def run_example(flags=0):
bp.parse_args(aspect='auto', intensity_max=1e2, intensity_min=1e-12)
sample = get_sample()
simulation = get_simulation(sample, flags)
result = simulation.simulate()
bp.plot_simulation_result(result)
if __name__ == '__main__':
run_example()
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