LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I convert pixel axis into wavelength axis

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

0 Kudos
Message 1 of 8
(3,904 Views)

What do you mean by "pixel axis" and "waveform axis"?

 

These are not LabVIEW terms.  You need to define them.

0 Kudos
Message 2 of 8
(3,885 Views)

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

 

 

Download All
0 Kudos
Message 3 of 8
(3,846 Views)

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?

0 Kudos
Message 4 of 8
(3,834 Views)

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

0 Kudos
Message 5 of 8
(3,808 Views)

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

0 Kudos
Message 6 of 8
(3,803 Views)

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?

0 Kudos
Message 7 of 8
(3,798 Views)

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?

0 Kudos
Message 8 of 8
(3,793 Views)