Ben,
I have a function that does it via MonteCarlo simulation for multilayer films. It is in my jmGen.py helper library on github
https://github.com/jrminter/dtsa2Scripts/tree/master/jmGen. The function is multiFilmBSE. I put this python file
with the other DTSA python functions in the lib/dtsa folder. I am attaching the help string below. Hope this helps
Best regards,
John
"""multiFilmBSE(layers, det, e0=20.0, withPoisson=True,
nTraj=1000, dose=60.0, bOutFull=False,
outDir='C:/Temp/',fullOutFile='BSE.csv')
Monte Carlo simulate the backscattered fraction from a multilayer
thin film.
Parameters
----------
layers - an iterable list of [material,thickness].
Note thematerials must have associated densities.
e0 - float (20)
The accekerating voltage in kV
nTraj - integer
The number of trajectories to run
bOutFull - boolean (False)
A flag to write the full data to a csv file
outDir - string ('C:/Temp/')
Path for full output
fullOutFile - string ('BSE.csv')
name for full output file
Returns
-------
tuple - (layers, e0, nTraj, backscatterFraction,
forwardscatterFraction)
Example
-------
import dtsa2.jmGen as jmg
al = material("Al", density=2.70)
c = material("C", density=2.267)
zno = material("ZnO", density=5.61)
si = material("Si", density=2.3296)
layers = [ [c, 20*1.0e-9],
[zno, 20*1.0e-9],
[al, 20*1.0e-9],
[si, 50.0e-6]
]
a = jmg.multiFilmBSE(layers, 7.0, nTraj=10000)
print(a)