[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Spline Fitting and FWHM
- Subject: Re: Spline Fitting and FWHM
- From: Martin Schultz <martin.schultz(at)dkrz.de>
- Date: Tue, 21 Nov 2000 13:03:22 +0100
- Newsgroups: comp.lang.idl-pvwave
- Organization: Max-Planck-Institut fuer Meteorologie, Hamburg
- References: <3A1A4630.E90141BB@astro.uu.nl>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:22281
Peter den Hartog wrote:
>
> Hi,
> I have some data tabulated in two arrays (pixels versus intensities) .
> The idea is to fit a cubic spline to the data with the function SPLINE
> but I am struggling with the following problem: I would like to be able
> to extract a full width at half maximum and at quarter maximum out of
> the fit. How can I accomplish this, as the function SPLINE only reads
> x-values and returns corresponding, fitted y-values as result, while I
> am interested in the reverse.
>
> Thanks!
>
> Omar Noor
> student astronomy
> Utrecht University Netherlands
> o.f.d.noor@phys.uu.nl
If you want to extract meaningful information from a fit, you must
use a function that gives you meaningful information. A spline is
designed to make data smoother, but it does not give you any
analytical information. The normal thing to do is to define an
analytical function that resembles your data and fit that function to
the data. For this you should probably use CM_FIT by Craig Markwardt.
Typical functions used in spectral analysis (and, here please excuse
my ignorance) are gauss, or lorentz functions.
... then again, if you insist on splines and extracting a rather
ill-defined quantity ;-), you could do it with an iterative search
algorithm:
(1) find the maximum
(2) for the left and right side move away from the maximum until you
are below 1/2 max value
(3) decrease step size and move back up
(4) decrease step size and move back down
(...) and so on until you are satisfied with the precision
Regards,
Martin
--
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[
[[ Dr. Martin Schultz Max-Planck-Institut fuer Meteorologie [[
[[ Bundesstr. 55, 20146 Hamburg [[
[[ phone: +49 40 41173-308 [[
[[ fax: +49 40 41173-298 [[
[[ martin.schultz@dkrz.de [[
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[