Author Topic: File format  (Read 1900 times)

marodri@sandia.gov

  • Student
  • *
  • Posts: 4
File format
« on: December 21, 2020, 03:58:29 PM »
Hi,

I am new to the forum.  I saw the DTSA-II software and thought it would be nice to use for diagnosing XRF patterns. 

I have an old Oxford XRF system that was designed for thickness.  I am repurposing it to do a quick XRF measurement for users.

The format is an (*.sp) binary file.  I have figured out how to export it as an ascii (*.spt) format, but I am having trouble importing the file.  Neither format is recognized by DTSA-II.

I am looking for a solution to read in either of these formats from the software.  Is there a means of making a file filter for DTSA-II?

Any help would be greatly appreciated.

Thanks,

Mark Rodriguez
Sandia National labs

Nicholas Ritchie

  • Moderator
  • Professor
  • *****
  • Posts: 155
    • NIST DTSA-II
Re: File format
« Reply #1 on: December 22, 2020, 03:58:17 AM »
Send me a copy of an SP and an SPT file and I'll take a look.  It might be easy to reverse engineer.  No guarantees but I often add new file filters when I can.

nicholas.ritchie@nist.gov
"Do what you can, with what you have, where you are"
  - Teddy Roosevelt

marodri@sandia.gov

  • Student
  • *
  • Posts: 4
Re: File format
« Reply #2 on: December 22, 2020, 12:10:17 PM »
Nicholas,

here is the *.sp format for the Ag spectra from our system

marodri@sandia.gov

  • Student
  • *
  • Posts: 4
Re: File format
« Reply #3 on: December 22, 2020, 12:11:20 PM »
Nicholas,

here is the ascii file for same Ag spectrum

Mark

Nicholas Ritchie

  • Moderator
  • Professor
  • *****
  • Posts: 155
    • NIST DTSA-II
Re: File format
« Reply #4 on: January 11, 2021, 04:18:01 AM »
The SPT version should be quite easy to write a filter to import.  The *.sp version a little less so.
"Do what you can, with what you have, where you are"
  - Teddy Roosevelt

Nicholas Ritchie

  • Moderator
  • Professor
  • *****
  • Posts: 155
    • NIST DTSA-II
Re: File format
« Reply #5 on: January 11, 2021, 08:31:33 AM »
I'm adding a very simple reader for Oxford .spt files.  It will only pick up the very most basic data out of the file - like the channel data, the live time, real time.  It assumes that 1) the file starts with the UTF-8 byte marker; 2) the first line starts with "Acquired: "; 3) the second line starts with "Collimator: ".  It reads in both the "raw" and "processed" versions as two distinct spectra.  It ignores the strobe data at the end of the file.

A pre-release version of DTSA-II with this feature is available here:  https://drive.google.com/file/d/17YAXRYkQ9vAQ509AwP5eZagdGfShX-dE/view?usp=sharing
"Do what you can, with what you have, where you are"
  - Teddy Roosevelt

marodri@sandia.gov

  • Student
  • *
  • Posts: 4
Re: File format
« Reply #6 on: January 11, 2021, 09:11:58 AM »
Nicholas,

thanks!   I will see about testing it.

Mark

xinleizhang

  • Student
  • *
  • Posts: 2
Re: File format
« Reply #7 on: April 03, 2021, 12:11:59 AM »
Hello Professor Nicholas,

I am also a beginner. Recently I have been studying how to use DTSA to process energy spectrum data and found that DSTA2 software is a very powerful EDS analysis software with rich functions.

However, the internal use of our instrument is Ketek’s SDD. DSTA2 seems to be unable to import KETEK’s MCA files, even if it is the same as amptek’s file format (*.mca).

I am looking forward to whether there is a way to make a file filter for this energy spectrum file format?

A ketek SDD original energy spectrum MCA file is provided in the attachment

Any help would be greatly appreciated.

Thank you,

Xinlei Zhang

A material science student from China

Nicholas Ritchie

  • Moderator
  • Professor
  • *****
  • Posts: 155
    • NIST DTSA-II
Re: File format
« Reply #8 on: April 03, 2021, 04:56:09 PM »
Looking at this file, I first notice that it is very different from the Crossroads/AMPTEK .mca file.  Same extension, very different format.  However, it is a fairly simple format and shouldn't be difficult to implement. (No promises!)
The character encoding is UTF-8.  Of course, I have no idea how to parse dates in Chinese.  Maybe you could provide some clues?
"Do what you can, with what you have, where you are"
  - Teddy Roosevelt

xinleizhang

  • Student
  • *
  • Posts: 2
Re: File format
« Reply #9 on: April 05, 2021, 07:10:32 PM »
Dear Professor Nicholas,

thank you for your reply!

The default total number of energy spectrum channels of this ketek detector is 4096 channels. In the MCA file is a list of numbers starting from the line after "4096".

Maybe it is possible to convert the Chinese date to be parsed into English in some way, or maybe skip the line with Chinese date, because this line is not necessary.

Thanks again!

Xinlei