01-04-2014 07:16 PM
Hi, I am working on a 4th year project in which I have to make a LabView interface. I wanted to know how can I convert pixel axis into wavelength axis, is there any source file I can use, or is there any other possible way?
Thanks
01-04-2014 09:39 PM
What do you mean by "pixel axis" and "waveform axis"?
These are not LabVIEW terms. You need to define them.
01-05-2014 10:20 AM
Sorry for the misunderstanding. I am actually working with both IMON and LabView softwares which has different source files. Our project requires to design IMON using LabView designing. I have attched how should the screen actually look like:
Now the problem is the x-axis in the attachment below is pixel no, what can I do to get corresponding wavelength axis. According to the lab manual there is a formula attached below. How can I implement that to get correct corresponding wavelength?
Thanks
01-05-2014 11:31 AM
It looks like a simple mathematical formula to convert pixels (or data points) into real units of wavelength. Your formula appears to be a common power series. Do you have the constant values (A, B1, B2, B3, B4, B5) to actually solve the equation for each pixel? If you do, then it looks like you just need to convert your pixel numbers to wavelengths, which can be done easily in a for loop. Of course, if your new x axis is not evenly sampled, you will need to use an XY plot and not a waveform. You could store both versions of the x axis and switch between them when the user presses the "x-axis unit button". You could even use property nodes to properly relabel the x axis when you switch scales. Does this sound like what you're trying to do?
01-05-2014 03:49 PM
Yes this is exactly what we have to do. And I do have the constants as well, so that is not a problem. So you mean to say within a for loop I should put my constants right? When it says pix^2 or pix^3 should I make pix as a 2-D array and then put it in a for loop because this is also an issue and I guess that is because of some compatibility errors?
Thanks
01-05-2014 04:02 PM
You sound very confused. Why do you think pix^2 or pix^3 means you need a 2-D array? It means you need to take that value and square it or cube it.
I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours
01-05-2014 04:13 PM
What I am confused in is how do I get a specific pix number, because pixel is between 0-511, so how will I get to know which one I need to get the right wavelength?
01-05-2014 04:20 PM
In the for loop, you take the pixel number and put it into the formula. The output tunnel of the for loop, enable auto-indexing. Now you'll have an array of wavelengths that correspond to each pixel number.
As for "which one I need to get the right wavelength", what do you mean by the "right" wavelength?