Hi,
Is it possible to output BSE coefficient from DTSAII, I can't see it in the GUI reports file, have I missed it?
Thanks
Ben
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 (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)
Hi John,
Thanks that is great. Which part of the DTSA code toggles BSE output? I thinking could it be applied to a bulk using mcSimulate3- but I guess the easiest thing is to use your script with 2 layers the same composition. Just tried it - it works!
Thanks
Ben
One can indeed use either. I would like to make some observations:
1. It really helps to use more trajectories to get better estimates of the BSE fraction. I'm running 10000 in the examples that follow.
2. There are small differences between the two approaches...
Here is a script that uses the MC3 backscatter function for a bulk element
import dtsa2.mcSimulate3 as mc3
al = material("Al", density=2.70)
au = material("Au", density=19.3)
res = mc3.backscatter(al, 20, 10000)
print(res)
res = mc3.backscatter(au, 20, 10000)
print(res)
And here is the output for 20 kV
Running /Users/jrminter/Desktop/test-mc3-ver.py
Results -> /Users/jrminter/NIST DTSA-II Reports/2018/May/22-May-2018/Backscatter9179393270919868562.csv
(0.2112, 0.0)
Results -> /Users/jrminter/NIST DTSA-II Reports/2018/May/22-May-2018/Backscatter2495095179893730132.csv
(0.4869, 0.0)
Elapse: 0:01:15.2
Using the my function for a single layer (I set it to 500 microns) looks like this:
import dtsa2.jmGen as jmg
al = material("Al", density=2.70)
# a bulk Al film
layers = [[al, 500*1.0e-6]]
a = jmg.multiFilmBSE(layers, 20.0, nTraj=10000)
print(a)
# a bulk Au film
au = material("Au", density=19.3)
layers = [[au, 500*1.0e-6]]
a = jmg.multiFilmBSE(layers, 20.0, nTraj=10000)
print(a)
And here is the output
Running /Users/jrminter/Desktop/test-bse.py note it reports thickness in m...
([[Al, 0.0005]], 20.0, 10000, 0.2034, 0.0)
([[Au, 0.0005]], 20.0, 10000, 0.4948, 0.0)
Elapse: 0:01:15.
Best regards,
John
Hi John,
Thanks again, that's great.
40000
(0.200275, 0.0)
(0.49215, 0.0)
([[Al, 0.0005]], 20.0, 40000, 0.203075, 0.0)
([[Au, 0.0005]], 20.0, 40000, 0.487825, 0.0)
([[Al, 0.0005]], 20.0, 400000, 0.200415, 0.0)
Al slightly high, Reimer book value [0.159 @17.3kV, 0.151 @ 25.2kV]; [penepma 0.161]. Gold is good [0.492 @ 17.3kV, 50.1 @ 25.2kV]