MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

RE: FWHM, InterpolationFunction & Solve

  • To: mathgroup at
  • Subject: [mg80453] RE: [mg80418] FWHM, InterpolationFunction & Solve
  • From: "David Annetts" <davidannetts at>
  • Date: Thu, 23 Aug 2007 00:58:13 -0400 (EDT)
  • References: <>

Hi Mathieu 

< snippage>

> Can you help me please? How would you do that?

When I last needed to do this, Ted Ersek's RootSearch package worked very
well.  The package is still available on MathSource & seems to work well

> I then want to compute the area under the peak:
> Integrate[DataInterpolation[x], {x, BegFWHM, EndFWHM}]
> Which works fine with the interpolating function.

I'll use (very noisy, just to make it interesting) synthetic data after
loading the package ....

	samp = {#, Sin[#] + RandomReal[{-.1, .1}]} & /@ Range[0, Pi,
	smax = Max[samp[[All, 2]]]
	ListPlot[samp, Joined -> True, GridLines -> {None, {smax/2}}, Mesh
-> All]
	sint = Interpolation[samp];

We find the boundaries of the peak at half-height using

	hmax = t /. RootSearch[sint[t] == smax/2., {t,
First@First@First@sint, Last@First@First@sint}]

And the area using

	slimit = Flatten[#] & /@ (Join[{t, #}] & /@ Partition[hmax, 2, 1])
	areas  = Plus @@ (Integrate[sint[t], #] & /@ slimit)

Which compares favourably to the correct value 	
	areaa = Integrate[Sin[t], Join[{t}, Sequence@hmax]]

Limits above appear complicated, but really only account for noisy or
pathological data.

May I ask about your application?  For some, anomaly width at 2/3 max might
be a more robust quantity to use than anomaly width at 1/2 height.



  • Prev by Date: Re: Newbie question on FindRoot and NIntergrate
  • Next by Date: Re: Re: RE: Dashing with alternating colors?
  • Previous by thread: Re: FWHM, InterpolationFunction & Solve
  • Next by thread: Re: FWHM, InterpolationFunction & Solve