LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Integrate spectrum over wavelength

Solved!
Go to solution

Hi,

 

I'm using the ocean optics s2000 to acquire some spectra. What I'm trying to do now is to integrate the spectrum between two wavelengths, but don't know how to. The sampling frequency is 1MHz and thus the spectrum is constantly refreshed (I guess). I'm trying to get the instantaneous integral result between to wavelength, e.g.. 600 nm and 650 nm in the figure below. Any suggestions?

 

Thanks!spectra.jpg

0 Kudos
Message 1 of 7
(4,378 Views)

I might be oversimplifying this (sorry if I am misunderstanding the question), but you should be able to get a subset of the spectrum array (index 600 = freq0+ i*dfreq, solve for i) then sum the sub array.

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 2 of 7
(4,363 Views)

Hi falkpl,

 

Thanks for your reply. I'm not sure whether your way will work, as I have little experience with labview. But one thing with the program is that the sampling wavelength is not even spaced. For example, the spectra are sampled at wavelength 600.7078, 601.0434, 601.3789, 601.7144..., and the interval between them is 0.33557, 0.33553, 0.33549..., not fixed as shown below. So I don't think I can add the corresponding amplitude array directly. 

wav.png

0 Kudos
Message 3 of 7
(4,356 Views)
Solution
Accepted by topic author johnli

You can use the 'Uneven Integration' VI. This from a programming standpoint.

 

From a physical standpoint it might be more difficult. Each of your data samples is probably convolved with the spectral characteristics of a filter or monochromator that has to be taken into account.

 

Cheers

Edgar

Message 4 of 7
(4,351 Views)

Well, for a C-T monochromator (disperser here, actually), the wavelength differences between pixels of the detector are probably close enough to be approximated as equal over your 50 nm range (they only differ by 0.01% for adjacent pixels, and you're only talking about 150 pixels here), but if you want to be as exact as possible, you would want to sum the products (difference in wavelength of adjacent pixels * amplitude of signal) for each pixel over the wavelength range of interest.

 

EDIT: Or do what ejkaiser said.

 

Cameron

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 5 of 7
(4,349 Views)

Thanks. I'm trying uneven integration and should come back later to tell whether I worked it out.

0 Kudos
Message 6 of 7
(4,341 Views)

Just tried in the lab computer and it works, Thanks a lot, guys. Smiley Very Happy

0 Kudos
Message 7 of 7
(4,336 Views)