08-16-2016 05:00 AM
Hi everyone!
I'm currently on an university project which consists on using Labview to get data and spectra from atmospheric plasmas using an Ocean Optics HR4000 spectrometer.
After not using Labview for almost a year, I managed to get most of my knowledge back and I succeed in displaying the spectral waveform I'm expecting to get. However, as it is a quite simple design I get a lot of noises and I would like to averaging it to get a smoother graph display.
I looked into a lot of the forum posts but I couldn't really find what I was looking for.
I also got an issue when trying to save the data and the spectra: I can't find anything in my VI's directory.
In the attachment you can find the current VI I'm working on.
Thanks in advance for your answers!
Jérémy
Solved! Go to Solution.
08-16-2016 01:22 PM
Hi Jeremy,
If you can save your files for LV 2012 (File >> Save for Previous Version...) I'd be happy to take a look.
On these spectrometers you can increase the integration time, which will capture more light. If this saturates your detector or is undesirable, you can average the data as you suggested, but how much effort that is will depend on how your program is set up.
08-16-2016 02:50 PM
Here is the version 2012 as you asked!
Thanks for looking at it!
08-16-2016 02:52 PM
Hi there,
That is version 2014
08-16-2016 03:11 PM
It should be good now.
08-16-2016 03:48 PM
I have written an example for you below. It's a VI snippet, so you can drag the .png onto your block diagram and it becomes code. Pretend that everything in the green box is your Acquire Spectrum SubVI.
- Put the SubVI in a For Loop to run as many times as you want to average it
- Output of the For Loop is a 2D array with individual spectra on the rows
- Transpose the output, so individual spectra on the columns
- Input the array into another For Loop to take the average row by row (averaging different spectra togeter).
- Output is 1D array of averaged spectra
08-16-2016 04:06 PM
I don't know what kind of integration times you are dealing with, but if it's on the order of 100ms, then 10 averages will take 1 second, 50 averages will take 5 seconds. Just something to keep in mind if speed is important for you.
08-17-2016 04:20 AM
It worked perfectly. With my current integration time, 20 seems to be a good value.
Thank you so much!