comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: IDL - EXP fitting function
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: IDL - EXP fitting function [message #65901 is a reply to message #65898] Fri, 27 March 2009 03:13 Go to previous messageGo to previous message
Maarten[1] is currently offline  Maarten[1]
Messages: 176
Registered: November 2005
Senior Member
On Mar 26, 11:55 pm, Christopher Thom <ct...@oddjob.uchicago.edu>
wrote:

>> Does the linfit function work when i would like my data to be fitted to
>> an EXP(a + bx) function? I didn't think that a linear function would be
>> correct when considering the EXP? Or am i getting confused going from
>> real space to log space!
>
> No, linfit() fits a linear model of the form y = A + B*x, so it will not
> "just work". why don't you just fit a linear model in logspace?
>
> res = linfit(x, alog(yfit))
> a = res[0]
> b = res[1]

Be very careful with that. Small offsets (on measured data, usually
way below the noise level) will throw this fit way off. A non-linear
fit will probably give better results, especially if you have a
realistic error model (Poisson noise on a decay signal for instance).

At the very least plot the fit over the data, and plot the residuals
for visual inspection.

Maarten
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL & ENVI error: WIDGET_CONTROL: Invalid widget identifier: 17
Next Topic: Re: IDL & ENVI error: WIDGET_CONTROL: Invalid widget identifier: 17

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 20:12:45 PDT 2025

Total time taken to generate the page: 1.12072 seconds