News:

:) You cannot see "members only" boards if you are not a member, so please join the forum!

Main Menu

Extracting K-ratios for Simulation Data and quantifying in CalcZAF

Started by Ben Buse, May 13, 2025, 05:04:40 AM

Previous topic - Next topic

Ben Buse

I don't know if of interest but a while back I wrote a ugly bit of python code which reads the html file (I have a separate one which reads .csv files if not using gui) and computes k-ratios and creates input files for creating a standard database and for input/export into CalcZAF for quantification

Here's an example - looking at the effect of not insuring sample flat for analysis -

Kratios

MC simulation of bulk NaAlSi3O8 -5.0°    Na K-L2    0.904778824
MC simulation of bulk NaAlSi3O8 -5.0°    Na K-L3    0.904778824
MC simulation of bulk NaAlSi3O8 -5.0°    Al K-L2    0.936264145
MC simulation of bulk NaAlSi3O8 -5.0°    Al K-L3    0.936264145
MC simulation of bulk NaAlSi3O8 -5.0°    Al K-M3    0.940239044
MC simulation of bulk NaAlSi3O8 -5.0°    Si K-L2    0.940555232
MC simulation of bulk NaAlSi3O8 -5.0°    Si K-L3    0.940555232
MC simulation of bulk NaAlSi3O8 -5.0°    Si K-M2    0.94587156
MC simulation of bulk NaAlSi3O8 -5.0°    Si K-M3    0.94587156
MC simulation of bulk NaAlSi3O8 5.0°     O K-L2     1.116906557
MC simulation of bulk NaAlSi3O8 5.0°     O K-L3     1.116906557
MC simulation of bulk NaAlSi3O8 5.0°     Na K-L2    1.099395985
MC simulation of bulk NaAlSi3O8 5.0°     Na K-L3    1.099395985


CalcZAF quant results
Tilt      O WT%      Na WT%      Al WT%      Si WT%      TOTAL
0.0°     48.8128    8.76942    10.2901    32.1305    100.003
-5.0°    44.0552    7.8818     9.57573    30.1601    91.6728
5.0°     53.7748    9.70806    10.9716    33.9613    108.416
-2.0°    45.9618    8.27223    9.88335    30.9957    95.1131
2.0°     50.675     9.14122    10.5891    32.9484    103.354


Code here https://github.com/Benjamin-Buse/DTSA2ToCalcZAF/blob/main/read%20dtsa2%20result%20html%20v7%20create%20standard%20material%20filesv6filloutLline%20tilt%20emitted%20rather%20than%20generated%20stdselectname.py