LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dominant wavelength VI

This is kind of an abstract question I realize; However, I thought I would give it a try as you folks have been very kind to me in the past.

Does anybody have a LabVIEW VI example that would input a raw optical spectrum then compute dominant wavelength?

 

I also realize I can use other tool functions such as DLL based software that comes with the spectrometer.

Lux PY ETC.

I was hoping for something that just mathematically computes dominant or centroid wavelength from a raw spectrum. (In LabVIEW solely)

 

Attaching a text file with a spectrum just in case

 

 

 

0 Kudos
Message 1 of 15
(290 Views)

mcduff_0-1770221604281.png

 

What is the dominant wavelength in your data? Is it the max or the other peak?

 

LabVIEW has built in Max/Min functions for arrays and a built in peak-finder. Have you tried those?

 

0 Kudos
Message 2 of 15
(283 Views)

@LED47 wrote:

I was hoping for something that just mathematically computes dominant or centroid wavelength from a raw spectrum. (In LabVIEW solely)


You have two peaks. Do you want to process the entire data or just the broader peak on the right?

 

I assume with "centroid" you are looking for the wavelength that splits the spectrum in two separate equal areas. For that you would just do a normalized integral, then use threshold array for find the point where the integral is 0.5.

 

Can we assume that the data does not have an offset? Your x-values are not spaced equally.

0 Kudos
Message 3 of 15
(262 Views)

I would want to process the entire data.

 

I would want dominant wavelength I only put centroid in there because I didn't know what I was talking about.

 

But I could use the centroid value If you had an example of that in Labview that would be very helpful?

 

Yes we can assume the data does not have an offset

0 Kudos
Message 4 of 15
(258 Views)

If you search for the max peak, in your case the data is clipped or has a nearly flat top (bandwidth), from  ~438 to ~444 nm

 

so you have to decide if you what you want to measure ....

 

peak.png

but maybe look for the peaks in the top?

 

peak2.png

 

 

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 5 of 15
(253 Views)

Yes, the term "centroid" typically relates to geometry, so I was just trying to figure out what you mean. It defines the center of gravity, so here it would split the graph into two equal areas.

 

Here's code that would roughly do that (result is ~550.733. What value do you expect).

 

altenbach_0-1770226144160.png

 

 

 

Message 6 of 15
(243 Views)

Thank you... I'll give that a try and let you know how it goes

0 Kudos
Message 7 of 15
(236 Views)

I work with lasers professionally and also use spectrometers regularly.

 

Other people have mentioned this somewhat, but it looks like the spectrum you have captured is clipped at around the 440 nm mark, because the signal is very close to what is almost certainly the max limit of a 16-bit spectrometer.  It would be more obvious if the data was 65565 the entire time because that's exactly (2^16)-1, but the spectrometer has likely been calibrated with a "dark level" per pixel that's being subtracted to give you the jagged peak you see there.  Likely the 440 nm signal you see is 2-10 times more powerful than you can see and is much more dominant, to the point where the wider "hump" in the 500-700 range is really much shorter than it is depicted as on the spectrum and so it is currently over-emphasized.  I would add something to your data capture code to look for anything above 95% of the max allowed by the detector and if found, lower the exposure time or gain until it's no longer saturating the sensor.

 

Honestly, I am kind of wondering if you have a primarily 440 nm laser source and the remainder of the spectrum that you see there is just background light from the room you're in.  If so, you likely need to put some light blocking around your test setup.

 

You haven't yet mentioned the overall goal of your task.  Is this homework?  Grad student/PhD work?  Commercial application?

 

This is a case where, if it is a practical application rather than an academic one, trying to just use math to get a "centroid" may not produce a helpful result.  In my line of work we often are tasked to put as much power in one narrow wavelength band as possible while ignoring the remainder because it's unhelpful, so it might be to the point where your real measurements should be split into at least two.  First, find the peak power, then find the rough width of that peak, then calculate the centroid only on an area that's double the peak width or so.  Then, if needed, check for any other light not around the main peak, and calculate how much light is there in a separate calculation.

Message 8 of 15
(234 Views)

We really don't know what the data represents. Could it be that the sharp peak is an excitation wavelength and the broad peak are the emissions from quantum dots? In this case only the broad peak would really be interesting.

 

You said that the instrument reports the correct result. What would that be for the current data?

 

So, please explain the experiment in detail.

0 Kudos
Message 9 of 15
(212 Views)

Platelet function test.jpg

 The overall system I'm developing is LED platelet function test.

Yes it's a 440 nanometer laser, The data I sent you is saturated...

It's a commercial project.

 

I do subtract the dark spectrum.

 

A lot of ambient light in this site at the moment..

 

 

Currently I do run Lux Py both dominant wavelength and centroid wavelength..

 

I would really want to use dominant wavelength and see if I could get a small VI that would give me that without having to bring in Lux Py

I need dominant wavelength at every point that I'm measuring on the platelet wafer and if I'm running Lux Py that's increasing the test time

Message 10 of 15
(209 Views)