LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Automated background removal from spectra

Hi -

I have developed a procedure in which a user can interactively perform model-based non-linear curve fitting and after obtaining the best fit possible, applying the parameter estimates leading to this best fit to an entire folder of spectra.  I have a background removal procedure as an option that uses a polynomial fit of the background based on manual setting of 10 cursors along the baseline.  This works extremely well, if the background of the spectra is reasonably consistent from spectra to spectra.  A better procedure would be an automated method for each spectra.  Jim Nagle has sent me some articles on automated background removal, but I wanted to know if anyone here has implemented automated background removal successfully using LabVIEW and whether they might shed some light here on the algorithm used.

Below is an example spectra (within the manual background removal module).  Remember, though, the background could change from spectra to spectra.



Thanks,

Don


Message Edited by DonRoth on 06-27-2008 01:59 PM
0 Kudos
Message 1 of 39
(6,360 Views)
ps. Here is an example showing the effectiveness in the manual background removal method....Don






Message Edited by DonRoth on 06-28-2008 02:52 PM
0 Kudos
Message 2 of 39
(6,333 Views)
Don,
 
Do you have a typical datafile (such as the one shown on your graoh) to play with?
Message 3 of 39
(6,324 Views)

Certainly, here are two of several possibilities.

Thanks,

 

Don

Download All
0 Kudos
Message 4 of 39
(6,296 Views)
Don,
 
Without seeing your block diagram/alogrithm I'm unsure if you are already using this, but you could use the General Polynomial Fit VI on your data. It uses the least squares method; therefore, the end points have large error (as a result I removed them from the attached example). Take a look at the example, let me know if this helps, and/or if you have any further questions.
 
Cheers,
 
Jonah
Applications Engineer
National Instruments
Jonah Paul
Marketing Manager, NI Software
Message 5 of 39
(6,268 Views)

Hi - Thanks for your reply.  I'm using the 'general polynomial fit.vi' but instead of feeding in both the full X and Y arrays from the data, I have the user select 10 points along the baseline, the subsequent X and Y arrays of which are then fed into the 'general polynomial fit.vi.'   This routine spits out the best polynomial coefficients which are then used to create the background array using 'polynomial evaluation.vi'.  The background array is then subtracted from the total array to give the 'background removed' output you see in RED on the above graph.  This gives me quite a good result but if the set of spectra in the folder have significant differences in background, I would not be able to utilize my above result for all of the spectra.

 

Your general method would not seem to provide a good enough removal of background as compared to my method above.

 

Sincerely,

 

Don

0 Kudos
Message 6 of 39
(6,263 Views)
Hi Don,

How much fidelity do you need in your resulting spectra?  Do you just need the relative amplitudes of the peaks, or the exact amplitudes?  You might be able to run a low-pass filter on the spectral data to smooth the peaks, and then subtract the filtered data from your original.  You'd have to tune the filter cut-off to get a good result.  A moving average filter might also work well.
Regards,

Jeremy_B

Applications Engineer
National Instruments
Message 7 of 39
(6,261 Views)
Great thoughts, and I have the ability to do any smoothing filter type in the software I have built, but the spectra peaks essentially must remain as they are to be able to measure what we need to......thanks, Don.
0 Kudos
Message 8 of 39
(6,251 Views)

Perhaps you've solved this or have moved on but I've been doing this sort of thing for quite some time and have developed a few useful VI's for automatic baseline removal in spectra. I'd be happy to help you out.

0 Kudos
Message 9 of 39
(6,074 Views)

I played with your data a little and here's a quick screen shot of what I'm talking about.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

I did this quickly and didn't "tune" the inputs perfectly but visually it gave decent results.

Message Edited by caz on 01-31-2009 01:41 AM
0 Kudos
Message 10 of 39
(6,069 Views)