Re: FWHM, InterpolationFunction & Solve
- To: mathgroup at smc.vnet.net
- Subject: [mg80468] Re: FWHM, InterpolationFunction & Solve
- From: dh <dh at metrohm.ch>
- Date: Thu, 23 Aug 2007 01:06:00 -0400 (EDT)
- References: <fagstu$8du$1@smc.vnet.net>
Hi Mathieu, if your data has noise you may have some troubles with Max and Solve. In this case a fit will be more adequate. If the peak has gaussian form I would fit a Gaussian (take log of data to make the fit linear!). If you have the Gaussian, you can get FWHM analytically. hope this helps, Daniel Mathieu G wrote: > Hello, > I have a set of discrete data, representing a peak. > I would like to compute the Full Width at Half Maximum (FWHM) of this peak. > For that I would like to know which points correspond to half the peak value. > SO far I was considering using an interpolating function, but this does > not seem to work: > > > DataFile = Import["FFT.dat"]; > CleanDataFile = Part[DataFile, 2 ;; Length[DataFile]]; > WorkingData = CleanDataFile[[All, {1, 3}]]; > > ListLinePlot[WorkingData, PlotRange -> All] > > MaximumFFTY = Max[WorkingData[[All, 2]]]; > MaximumFFTPosition = Position[WorkingData, MaximumFFTY][[1, 1]]; > MaximumFFTX = WorkingData[[MaximumFFTPosition, 1]]; > > DataInterpolation = Interpolation[WorkingData]; > > Solve[DataInterpolation[x] == MaximumFFTValue/2, x] > > > Can you help me please? How would you do that? > I then want to compute the area under the peak: > > Integrate[DataInterpolation[x], {x, BegFWHM, EndFWHM}] > > Which works fine with the interpolating function. > > Thank you for your help! > Mathieu >