LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make a reference spectrum to carry out spectral measurements in ocean optics spectrometer

Solved!
Go to solution

Hello ,

I am desigining a labview software for the ocean optics maya pro spectrometer and the problem that am facing is I am not able to make a base line correction as in the spectrasuit to carryout measurement process.

In spectrasuit we have the option like store dark spectrum and remove dark spectrum , which actually acts like reference  I wanna design the same way can any one help me ?

 

Thanks in advance

0 Kudos
Message 1 of 22
(7,138 Views)

Hi tanveer,

 

optical spectra usually are represented by "intensity vs. frequency" XY plots.

All you need to do is store your "dark spectrum" in a shift register and subtract it from your "light spectrum"…

 

Can you supply typical spectra for dark and light conditions?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 22
(7,127 Views)

thanks a lot for the reply,

am failing in using shift registers

can u help me with the code i will post the my vi that am working.

Download All
0 Kudos
Message 3 of 22
(7,121 Views)

Hi tanveer,

 

I repeat my question: please supply typical spectra data, either as default values in your graphs or as (text) files!

 

Do you really need 3 formula nodes in your subVI to carry out a simple multiplication?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 22
(7,111 Views)

so i must save the spectral data (dark) in the text file and subtract it with the signal from the current spectral signal to get the reference spectrum . is that  correct way?

 

can you please help me with an example vi from your side as am not so perfect in labview .

0 Kudos
Message 5 of 22
(7,108 Views)

i tried to save a spectrum and subtracted it . can you tell me if it is correct way ?

0 Kudos
Message 6 of 22
(7,104 Views)

Hi tanveer,

 

if you would remove all this ExpressVI and DDT stuff you would be on the right track!

 

Simple example on using a shift register:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 22
(7,092 Views)

I have done this before, and along with Gerd's comments I would add the following.

 

If the user wants to clear the dark spectrum, you can just fill in the dark spectrum with zeros, or make it an empty array. Also, consider averaging when taking the dark spectrum, since it will be noisy. You can collect spectra in a For Loop, add them together in a shift register, and then divide by number of spectra. 

0 Kudos
Message 8 of 22
(7,079 Views)

There's two ways of correcting for "dark spectrum" and it's hard to know which one you're actually wanting to do.

 

Method number 1: Correcting for ambient light unrelated to the light source you're measuring.

Take a sample with the light source totally off, then another with it on.  Subtract the first array from the second array on a 1-for-1 basis.

 

Method number 2: Correcting for background electrical noise that makes the detector read every wavelength as having a certain level of intensity even though it doesn't really.

Ocean Optics spectrometers have a certain fixed spectrum they detect, and they do this with a long line of detectors in a row that each pick up a different portion of the optical spectrum after it goes through some optics.  At either the start or the end of this long line, there will be a relatively small amount of detectors that are electrically identical to the other detectors but optically they are completely opaque.  Thus, this small amount of detectors captures the "dark spectrum".  If you take the average reading from these detectors, and then subtract it from the readings taken from all other detectors, you get a much more accurate reading for purposes of taking averages by integrating under the spectrum or other similar calculations.  

 

I'm pretty sure method #2 is what SpectraSuite does and what tanveer wants to replicate, but a clarification would be good.

 

If you're using a Maya Pro, then the detector has 2048 individual detectors and 3 of them are "dark".  7 of them aren't hooked up, and the remaining 2038 give you your spectrum.

Message 9 of 22
(7,072 Views)

Kyle brings up many good points, especially about the dark and garbage pixels. Until just recently (April or May of this 2016) the Ocean Optics drivers available on ni.com had a terrible flaw in which these pixels were counted as real pixels. The result is that your intensity and wavelength arrays are not lined up correctly. Using fake numbers here, what you want is:

 

wavelength: 400.0 | 400.5 | 401.0 | 401.5 ...

intensity:   I1   |  I2   |  I3   |  I4   ...

 

what you get is:

 

wavelength: 400.0   | 400.5   | 401.0 | 401.5 ...

intensity:  garbage | garbage |  I1   |  I2   ...

 

I think in practice I was actually getting ~4nm shift with the HR4000. This is just to say, be careful with the drivers, and make sure you have the most recent ones!

0 Kudos
Message 10 of 22
(7,058 Views)