Princeton Instrument spe file reader : How to create x wave

I was trying to use a procedure file (winspec.ipf) for reading the spe file (Princeton Instrument/Winspec Software) written by Doru and Sjors Wurpel. It does read the file but I can`t plot the spectrum as although it has the y wave (after redimension-> Scaling wave ..) but the x wave it not there ...rather x wave has to created from the x pixel value ...can anybody tell me how to create a x wave from the set of x pixel value...( I mean to create a string ( x wave) from the list of x pixel read)..so that the read wave can be plotted wrt x pixel.

I attached herewith

a) the spe data file <1.spe>. Pl rename from 1.spe.pdf to to 1.spe ( I didnt able to attach as .spe )

b) Ascii output file (1.txt) created from <1.spe> by WinSpec Software (The default sofware by Princeton to read/analyse .spe file). The xy data here are wavelength (in nm) vs pixel no. The wavelength are in nm as the spe file <1.spe> has calibration information (pixel intensity to nm) inside the file.

c) igor procedure (by Doru/Sjors) to read winspec spe file.
1.SPE_.pdf 1.txt Winspec_0.ipf
I'll start with some friendly advice: your post reads as if you put very little effort into it. Remember that you are asking strangers for help, most of whom will get nothing in return. Frankly, if you can't be bothered to describe the problem clearly, I don't see why I should put much effort in my reply.

Anyway – are you sure that there should be an x wave? Is wave scaling sufficient? Does the procedure mention anything related?
I don’t see any reason why on earth you have to be so rude in replying in a general forum ( u didn’t even posted anything other than your advice !!) .

I am not a every day “Igor” user ...rather very much "Origin" people. Frankly I don’t know Igor programming rather I am trying to learn. But there is always a tradeoff
how much time I can spent after my usual grad research work, TA and then coursework. So often we need help. And I am thankful that people answer specially the Igor Engineers they are so eager to help for even when we ask seemingly stupid simple question because of our general ignorance abut Igor programming and since our University pays money to buy Igor licenses so its a general expectation that we will get support from them. We are really thankful to them.

Of course I did looked the code, in the beginning I even opened a spe file in WinHex to see inside. to see whether I can write from scratch .Later I saw that Doru already wrote it ...tried to use it in Igor but somehow there is a confusion regarding this pixel value..and to be frank may be my question is stupid ...I tried.. but it didn’t work ....That’s why I attached two file (the original spe file and the txt output that Winspec create ( Intensity vs nm) ...so of course there is a x coumn . Regarding the wave scaling ..is it ok as I can see the loaded wave ...after coparing with the .txt file values it seems ok . And it is not the end of earth. I wrote a procedure where I can import Winspec generated ascii file and then do various spectral manipulation over it. But ofcourse it would be better to import the spe file directly.

And by the way I didn’t expect somebody from Belgium will answer my question. SO if you don’t like DONT ANSWER.
!!
I was working on the same issue just last week.
I modified the same .ipf file a bit - it is still a little unpolished.

A simple scaling does not work because usually the calibration is non-linear.

I have not checked this code carefully, it is working for my purposes but maybe not under every condition.
In particular, I am not sure if I am taking care of the case for the step&glue feature correctly.
Also, I have only assumed a calibration using a 2nd order polynomial.
Please let me know if you find any bugs or make any improvements.
SpeLoader.ipf
supra wrote:
I was trying to use a procedure file (winspec.ipf) for reading the spe file (Princeton Instrument/Winspec Software) written by Doru and Sjors Wurpel. It does read the file but I can`t plot the spectrum as although it has the y wave (after redimension-> Scaling wave ..) but the x wave it not there ...rather x wave has to created from the x pixel value ...can anybody tell me how to create a x wave from the set of x pixel value...( I mean to create a string ( x wave) from the list of x pixel read)..so that the read wave can be plotted wrt x pixel.

I attached herewith

a) the spe data file <1.spe>. Pl rename from 1.spe.pdf to to 1.spe ( I didnt able to attach as .spe )

b) Ascii output file (1.txt) created from <1.spe> by WinSpec Software (The default sofware by Princeton to read/analyse .spe file). The xy data here are wavelength (in nm) vs pixel no. The wavelength are in nm as the spe file <1.spe> has calibration information (pixel intensity to nm) inside the file.

c) igor procedure (by Doru/Sjors) to read winspec spe file.

Make some changes before you have to.

Just wondering if you have figured out this issue?

Ki2
Nothing was attached.

However, the basic principle is that you will need to create an x wave with the proper polynomial number using coefficients stored in the header.
This will map pixel number to wavelength.

Something like: xscale = C0 + C1*p + C2*p^2

where p= pixel number, and C is the coefficient from the header.
Look through the example code posted earlier to find how it reads in those coefficients.