News:

:) To see the latest forum posts scroll to the bottom of the main page and click on the View the most recent posts on the forum link

Main Menu

Theoretical detector windows

Started by jabbott28, July 09, 2019, 03:07:00 PM

Previous topic - Next topic

jabbott28

I want to simulate spectra collected with theoretical detector windows. I have a text file of transmission percentage at different energies but I don't know how to use this in DTSA II. This reply is the closest information I could find.

Quote from: NicholasRitchie on May 13, 2019, 11:25:10 AM
I'm trying to figure a good way to do this...
There are calculated windows and combined tabulated/calculated windows.  The tabulated portions are added from a CSV file.  Maybe if the user adds a custom CSV file to the install directory, it could be used to define a custom window.

Windows may be only part of the problem as ionization cross sections and relaxation rates are poorly known for L & M lines.  Could just be bad physics in the model.

Nicholas

Could you elaborate on how to add a custom CSV file to define a custom window?

Thanks,

lukmuk

Hello all,

this is my first post in this forum and first I want to thank you for making and maintaining the awesome DTSA-II software!  :)

On topic: I revived this thread because I had the same problem and my workaround was using HyperSpy to convert a tabulated .csv with the detector efficiency to the .msa spectrum format and applying it to a DTSA-simulated spectrum (with 100% transmission efficiency for all energies). I uploaded the Jupyter notebook (.ipynb) to Github:
https://github.com/lukmuk/em-stuff/tree/main/DTSA-simulation-detector-efficiency

I treated the detector efficiency as an envelope function (values between 0 and 1) and multiplied it (channel-wise) with a simulated DTSA spectrum. At first, I tried to do this multiplication in DTSA directly, but channel-wise multiplication (i.e. s1 = s2*s3) rises an error.

Hopefully this workaround is useful for someone and suggestions for improvement are welcome.

Best regards
lukmuk

Nicholas Ritchie

There is a new version of DTSA-II at https://www.cstl.nist.gov/div837/837.02/epq/dtsa2/index.html.  It supports custom windows.  It is a little bit clumsy but it can be done. 

The trick is to find the file epq.jar in the install directory (usually something like "C:\Users\username\AppData\Local\NIST\NIST DTSA-II Microscopium 2021-01-06").  Open this file up with a ZIP file reader like 7Zip and navigate inside the JAR file to "epq.jar\gov\nist\microanalysis\EPQLibrary\Detector\".   There is a CSV file here called "custom.csv".  Extract it and edit it to represent the efficiency you desire.  The first column is the energy of the low side of the bin in eV.  The second column is the efficiency (1.0 => 100% efficient, 0.5 => 50% efficient, etc).  Finally replace "custom.csv" in epq.jar with the edited version.  DTSA-II will now use this data for the "Custom Table" window type.

You can verify this from the command line by using "listDetectors()" to find the "d??" variable associated with the detector (say "d53"), then using "display(windowTransmission(d53))" to show the window transmission in the spectrum display (100 => 100%).

If you update DTSA-II, you'll need to update "custom.csv" in the new "epq.jar".

Does this help?

Nicholas
"Do what you can, with what you have, where you are"
  - Teddy Roosevelt