X-ray diffraction (XRD) Base line removal
    71 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    Herbert Middleton
 el 25 de Mayo de 2021
  
    
    
    
    
    Comentada: Star Strider
      
      
 el 29 de Mayo de 2021
            Hello all,
I am a material engineering student and we have to analyse x-ray diffraction data. What happens with this type of analysis is that the data have a baseline, that must be removed for correct analysis. The image below demonstrates such line (all above zero and a slight upwards shift on left side...though sometimes can be a lot worse!). 

What we do is, in Microsoft Excel, just select various points throughout the data (NOT ON ANY OF THE PEAKS, just the "flat" parts) and plot a graph with those selected points, determine it's function by trendline (whatever fits best...polynomial, power function...), create a column with f(x) values and subtract from our original y values.

Once this function is determined, we plot the "new" y values

As you can see, no more baseline (flat parts are at approximately zero, and no upward tendency towards the left).
I want to be able to plot using MATLAB, and have no difficulties doing such. However, when it comes to removing the baseline, I still have to use MS Excel to find a suitable fuction in MATLAB...is there anyway I could do that directly in MATLAB? Or is it easier to carry on doing in Excel, and just copying the function? Any help is greatly appreciated and I can clarify any confusion, thanks.
0 comentarios
Respuesta aceptada
  Star Strider
      
      
 el 25 de Mayo de 2021
        See if the detrend function will do what you want. (This appears to be a relatively straightforward application of it.)  
More sophisticated approaches are available if necessary, specifically using a highpass (or bandpass) filter to eliminate the baseline variation, baselline drift (and high-frequency noise), if necessary.  
8 comentarios
  Star Strider
      
      
 el 29 de Mayo de 2021
				As always, my pleasure!  
Thank you!  
(A Vote would be appreciated!)
.
Más respuestas (0)
Ver también
Categorías
				Más información sobre Get Started with Curve Fitting Toolbox en Help Center y File Exchange.
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




