Import Kratos binary files

Does somebody know how to import one of the following binary formats?

Kratos DLD (*.dset) - done
Kratos Files (*.kal) - done
DS800 Files (*.mpa)
Kratos 165, HS, Vision (*.des) - done

I didn't find any information except some commercial programs.
A specification sheet would be nice to have.
Ok, I found some infos about the *.des format and wrote a small importing procedure. But no infos about the other three up to now :(
I doubt you will find enough information to be able to write a decent method to import the others. I looked at one time, and I _may_ have some scattering of notes still around about DSET. As far as I recall, the Kratos proprietary formats are convoluted to the point of being ridiculous to try to extract useful content in a clean manner, especially the DSET files. I think the MPA is reserved for maps (line or image), which in itself is further complications to handle. Basically, you will spend more time trying to figure out how to write an importer than to just dump the files as something non-proprietary (i.e. readable). As best I recall, the path of least agony was to export or translate to VAMAS.

As a side note, CASA XPS may have a way to handle the imports. I can emphasize with your desire to use Igor Pro though, having one time worked on my own version of XPS analysis routines.

Feel free to contact me off-line with questions. I'd like to hear what you find in any case.

--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAHuntsville
Did you find a solution? I'm currently wishing I had one. CASAXPS has a VAMAS conversion tool, but I only get empty files out of it.
Yes, I found a solution. I wrote a "small" procedure which can import the Kratos Vision Dset files. Dset is Big-Endian (because of SunOS Sparc) and in 4byte pieces.
The reason why you get empty files by the conversion tool from CasaXPS is that it relies on a tool from the Vision software (you have to install the complete vision software to get it working; it still doesn't work if you only copy the dump-tool and the necessary dll's).


The data begins (always??) at 2832. The first 2832 bytes contain offsets to each block but as the first object block is always found at 2832 I only check if the first block is really at 2832. In principle the 4byte unsigned integer at 12 gives an offset (always 1024). Skipping the next 8*4 bytes after 1024 you get the offset to the first data block at 1060, which is 2832 (in all my files). Skipping the next 6*4 bytes gives the offset to the next object ....
But even if there are over 100 objects the first object always starts at 2832.

The four bytes at 2832 will give the size of the object followed by four bytes, which give the object id followed by 2*4 empty bytes. The next object is the found by adding the size of the current object to the current position in the file.
If you know how the Vision KAL files are composed reading the objects is easy. Just use the ids from the KAL: each Dset object component is composed of its id (first four bytes) and its length (number of floats, integers, .. to read ; only in case of strings and arrays) and then the data.

I try to test some more Dset files in the next days (also because e.g. the excitation energy, scan mode, technique are saved as flags and I have to figure out which flag corresponds to which energy and so on). Also there are some dset files supplied by Kratos with the Vision software (e.g. element_library.dset) which I cannot read now because of missing component ID’s.
If everything is fine I will clean up the source code and upload it.


Edit: I uploaded a snippet (http://www.igorexchange.com/node/5425)
Edit2: Why can't I view my own snippet. What did I do wrong?
johnweeks wrote:
It appears that you didn't actually post any code. Did you paste or type code into the box labelled Body?

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com


Yes I put some code and text in the body. If I edit the snippet I see my text in the "Body"! But I have to update it later anyway because I made huge progress with the loader!
Callisto wrote:

Edit: I uploaded a snippet (http://www.igorexchange.com/node/5425)
Edit2: Why can't I view my own snippet. What did I do wrong?


For some reason, the <igor></igor> tags were causing a problem. It may be that the code is too long that the parser can't handle it. I changed the tags to <code></code> so that the code is at least visible, but the formatting now looks really bad. You may want to upload the .ipf itself somewhere so people can use the code.
aclight wrote:
For some reason, the <igor></igor> tags were causing a problem. It may be that the code is too long that the parser can't handle it. I changed the tags to <code></code> so that the code is at least visible, but the formatting now looks really bad. You may want to upload the .ipf itself somewhere so people can use the code.


Yes I will do that. For now I removed the old code as it was still very buggy. I will update it in the next days when I figured out the meaning of the last view flags in the Dset.

For now can somebody help me and show me a nice and easy way how to dump some data into the notebook in a spreadsheet style?
Quote:
For now can somebody help me and show me a nice and easy way how to dump some data into the notebook in a spreadsheet style?


I'm not sure why you want to do this but I recommend that you dump it into a wave, possibly a 2D wave, and a 2D text wave if it needs to store non-numeric text. Then display the wave in a table.

If you want to dump columns of data into a notebook, create a ruler in the notebook using tabs to create the columns. Then use the Notebook operation, text keyword, to store data in the notebook. Use tabs (\t) to separate columns and carriage-returns (\r) to separate lines.
hrodstein wrote:
I'm not sure why you want to do this but I recommend that you dump it into a wave, possibly a 2D wave, and a 2D text wave if it needs to store non-numeric text. Then display the wave in a table.


The Kratos .des files contain some information about the peak fitting (report) and there are some .dset files which only contain information about the elements (peak position, sensitivity factor, ... a pure element library) whithout any linescans.
Dumping this information into a notebook would be much nicer instead of using waves.
aclight wrote:
Callisto wrote:

Edit: I uploaded a snippet (http://www.igorexchange.com/node/5425)
Edit2: Why can't I view my own snippet. What did I do wrong?


For some reason, the <igor></igor> tags were causing a problem. It may be that the code is too long that the parser can't handle it. I changed the tags to <code></code> so that the code is at least visible, but the formatting now looks really bad. You may want to upload the .ipf itself somewhere so people can use the code.



Ok, I uploaded now a ipf. The loader is still not finished. It only supports some basic importing of spectra (but this would be enough for most people).
And a huge amount of ID's are missing in
function KratosDSET_checkID(file, Dsetobject, ID, offsetsnumber)
..
end


Any help is appreciated in filling these gaps.
KratosDSET_load_data() will start the file import!