
XPS data from Phy Multipak

hegedus
Has anyone have experience with .spe file from a Phy Multipak? I have a data file (attached) that I am trying to extract the data from. There should be 6 spectra that are defined in the header. Simpler files with only 1 data range I can sort of get, though there is a bit of garbage at the beginning of the wave after export.
edit: The exported CSV file is also attached.
My goal is to extract the data directly, because the export software does not support batch processing.
The multiple ranges a bit of a stump for me. Anyone with a magic .ipf that they can share?
Andy
try:
The entire file is first loaded as text wave using FReadLine (maybe LoadWave would be easier), then I use a keyword (here "Area5") to figure out where a spectrum begins.
You need to add a bit of code to either extract x-data or to set the wave scaling.
April 15, 2014 at 01:42 am - Permalink
Thank you very much for your code. I used it as a starting point and produced this using some patterns in the file. I would really love to be able to do this off of the .spe file. It has a text header with a lot of information needed including the number of spectra and the ranges to set the scaling. The actual data is in binary and I have not been successful in parsing it into the individual spectra.
April 15, 2014 at 11:33 am - Permalink
In [1] I've found a file format specification for SPE files, maybe these are the same formats.
Thomas
[1]: ftp://ftp.princetoninstruments.com/Public/Manuals/Princeton%20Instrumen…
April 16, 2014 at 11:04 am - Permalink
Same extension different files. Thanks for the idea.
Andy
April 16, 2014 at 01:05 pm - Permalink
Using a hex file editor, it isn't too difficult to figure out how to load the spectra. See the code below. The purpose of some elements of the file aren't clear (to me); however, the procedure loads these values into waves. The values are interpreted in ways that seem to make sense (i.e. as integers or floats) but I may have guessed incorrectly. Hopefully, they will make some sense to you. Also it wasn't clear how to get the wavelength information, but, maybe you already know how to do this. Oh, yes, this procedure will likely need modification if you want to load files with spectra from more than one position.
The procedure is embedded here and as a ipf file. Also attached is an experiment file with the results for your example file.
Hope this helps.
Jeff
April 18, 2014 at 06:18 pm - Permalink
I'm also working on a PHI machine and I'm also interested in directly loading the spe data.
April 20, 2014 at 01:53 am - Permalink
I used an application (a "hex editor", see the Wikipedia article.. http://en.wikipedia.org/wiki/Hex_editor) that permits viewing the contents of a file in binary form, bit by bit, if necessary. The text header in the file gave insights into interpreting the binary data and, certainly, having the text export version of the spe file was a big help. With those hints, you have to use the hex editor to examine the file for clues to its structure and make some guesses.
There was more information in the binary portion of the file that I did not understand. This was saved in a couple of other waves that, may make sense to someone with experience using the instrument. Hopefully, those mysterious portions were interpreted (as integer or floating point values) correctly.
Also, as I mentioned in my original post, it appears that spectra from different regions of the sample can be combined in the same data file. I don't think the code provided will handle this without some changes.
By the way, are you able to load your data with the Igor procedure that was posted?
April 20, 2014 at 04:19 pm - Permalink
Thank you very much. I have never used a hex editor and this is certainly a good place to start. The spectra do make sense and match the ASCII values so your guesses were correct.
This great!
Thanks again.
Andy
April 21, 2014 at 08:06 am - Permalink
Thanks for your positng.
Recently I strongly require data loader of the .SPE files.
The pxp or ipf file you uploaded gives an error "While sxecuting FBinRead, the following error occured: logical end-of file was reached unexpectedly uring read operation." when I execute 'importXPS_bin()".
I attach an example of SPE files.
Can you check it up? I am beginner of igor program.
JW
May 2, 2016 at 06:31 am - Permalink
I will look into this.
Jeff
May 6, 2016 at 05:17 am - Permalink
http://www.igorexchange.com/project/phispefileloader
Please contact me when you would like to join in the project.
--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAH
September 3, 2016 at 07:16 am - Permalink
FWIW, the mistake in the existing code was to read "mystery bytes" at the end of each spectrum.
Please test and confirm. I'll post a non-beta release based on feedback.
--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAH
September 5, 2016 at 07:30 am - Permalink
I tested your IGOR.6.30.x-1.0 on both Igor versions 6.37 and 7.02.
As you noted, the error message always pops up.
In addition, there are several issues as the following.
The spe file that I uploaded consists of four spectra. But your macro only loads one of them.
I need a single wave with proper parameters such as row number, start, step per each spectrum. Total 7 waves are not necessary at all.
As you compare the Igor display with real spectrum in the attached figure, spectral shape and scale change a lot. Even the background is removed. I do not understand what happens...
Longing for better version,
realMAX
January 31, 2017 at 06:56 pm - Permalink
Would you do me the favor and ...
* Log the error report to the Package (so that I can keep track of it there)
* Include a ZIP archive of your SPE file (so that I can troubleshoot on hand the data you have)
I suspect this is because the SPE file that I tested only had one "region", whereas yours has more than one.
I prefer not to create wave formats that are different than what are currently used. The loader can always be run with a function that subsequently cleans up behind it or does other formatting/calculating steps, for example ...
As long as the data are all loaded correctly, decisions about what to do with the values and waves can be left to each user.
--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAH
February 1, 2017 at 07:59 am - Permalink
The error message is as follows
"While executing Make, the following error occurred: Expected name"
The zip file is attached again, the same file above BP_118. This is composed of 4 spectra.
Most serious problem is that the imported wave is different from real spectrum as I reported yesturday.
realMAX
February 1, 2017 at 09:27 pm - Permalink
SpectralRegDef: the XPS region definition
SpectralRegDef2: ??
SpectralRegDefBackgrond: ??
SpectralRegHero: ??
SpectralRegIR: ??
I will adjust the loader to skip past everything except the XPS regions.
--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAH
December 23, 2017 at 07:00 am - Permalink