LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Automated background removal from spectra

Hi Drew:

 

My carelessness for not checking the data.  In fact, I knew about this because I have a conditional loop in my overall code that stops the loop when translation from string to numeric errors.  This step makes sure that the line is not part of the data.  But had not looked at this in awhile so I had forgotten that when I opened it with your code.

 

Sorry also about unofficially changing your name!

 

Later today I will present an LLB that can be used as a platform for both the manual and automated methods.

 

Altenbach's attempt looks to preserve the fidelity of the original data pretty well also.

 

The question is - with one set of settings, can we rip thru a whole folder of spectra files with such a procedure (not including outlier spectra)?  That is something I will investigate.  The manual method that I had coded up so far produces a polynomial coefficient result that is applied to the next spectra (first substituting the next spectra's specific DC value for a0) to determine the background curve for the next spectra.  Your method would produce a set of filter parameters that would be applied to the next spectra.

 

Sincerely,

 

Don

0 Kudos
Message 21 of 39
(3,810 Views)

Hi Don,

 

I just wanted to point out that Altenbach's method and mine are quite similar, filtering followed by some form of thresholding to get to the baseline points. The are some subtle differences in that Altenbach's proposed method will be fast since it iterates once but the choice of the gaussian width for the convolution will need to be done carefully. My method allows for a little more leeway in the input parameters since it is iterative. Regardless, both methods are for situations where the end user does not want to manually pick baseline points and can be used when processing multiple spectra which can vary dramatically. If you have a bunch of spectra to process that don't change much except for slight variations in the baseline (e.g. T, P, color axis ~ constant) then manually picking baseline points for one and reusing these point locations for each subsequent spectrum is still a good way to do things. Perhaps you could even use a method like Altenbach's or mine to more automatically populate your initial point picking and then the user can discard or add points as they see fit.  My use for automatic background correction comes from situations where there is a bunch of spectra to process and the environmental conditions change widely from start to end. For instance, spectrum(0) could have an apparent baseline point at location (x) but in spectrum (1000) location (x) is actually the location of a new spectral feature (be it a higher quantum state or new species is present etc...) so a whole new array of baseline points would have to be chosen and thus the need for automating the process.

 

Good luck with your app and it sounds like the LV community might get another tool to add to the toolbox.

 

-Drew

0 Kudos
Message 22 of 39
(3,798 Views)

....Automated method now integrated into prior subVI module.  Time permitting, we can do more with this too.  The method seems to work quite well and execution speed is not an issue. Will play with on a folder of spectra. Thanks so much for bringing this up.

 

 

 

Sincerely,

 

Don

Message Edited by DonRoth on 02-06-2009 01:42 PM
Download All
0 Kudos
Message 23 of 39
(3,780 Views)
....fixed a few mistakes and added error handling for good measure.  So this should be a good platform from which to add.  Drew - give me your full name if you like or I will just refer to this discussion thread link to credit your work in the help box and manual I have....Don
0 Kudos
Message 24 of 39
(3,767 Views)

hi,

 

 

we've run into the same automated background problem and were wondering if anybody could post this solution in labview 8.2?

 

 

thanks if possible!

JP

0 Kudos
Message 25 of 39
(3,672 Views)

treeline wrote:

hi,

 

 

we've run into the same automated background problem and were wondering if anybody could post this solution in labview 8.2?

 

 

thanks if possible!

JP


Request moved to here.

0 Kudos
Message 26 of 39
(3,616 Views)

Don

I want to use your labview file. But my labview version is LabView 7.1. So, I want to show your program. Could you send to me your labview file in downgraded? It is my e-mail. I  sincerely want to send labview file. Thank you.

hank14@korea.ac.kr

0 Kudos
Message 27 of 39
(3,358 Views)

Hello Hank -

 

Please make your request thru this thread:

 

http://forums.ni.com/t5/LabVIEW/Downconvert-VI-Requests/m-p/1067229

 

Sincerely,

 

Don

0 Kudos
Message 28 of 39
(3,347 Views)

Edit: 

 

I found the version 8.2 on the posts above however a subvi is giving an error before execution.

I attached the picture of the vi. Are those red M's just stop functions? 

 

Thanks in advance,

Emre

0 Kudos
Message 29 of 39
(2,976 Views)
I don't have a clue what red M is. Try replacing for loop with current conditional for loop and see what happens. I don't have access to code (I am on travel). Let us know.

Don
0 Kudos
Message 30 of 39
(2,969 Views)