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

Home » Public Forums » archive » Re: Doubt in polynomial fitting - emergency
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Doubt in polynomial fitting - emergency [message #73345] Tue, 02 November 2010 03:38
sid is currently offline  sid
Messages: 50
Registered: January 1995
Member
On Nov 2, 2:22 pm, Bringfried Stecklum <steck...@tls-tautenburg.de>
wrote:
> sid wrote:
>> Hi,
>>     I am fitting my spectral data with 2 degree polynomial with the
>> routine svdfit. I need to find the minmum value after fitting the data
>> points.
>> For example my code is like this,
>> ;c is x axis with wavelength(it is an absorption line)
>> ;d is y axis with normalised intensity
>> ypoly=svdfit(c,d,3,yfit=y1,chisq=chi,sigma=sig)
>> x=min(y1)
>> x1=-(ypoly(1))/(2*ypoly(2))
>> if suppose u,v is the position of x, x1 respectively then
>> c(u) should be equal to c(v)
>> and
>> d(u) should be equal to d(v)
>> but im getting
>> c(u)=3933.3090 in angstroms
>> c(v)=3933.3072 in angstroms
>> d(u)=0.071168385
>> d(v)=0.072779992
>> Please suggest me why it is not the same, which value should I believe
>> and how?
>> thanking you
>> sid
>
> Well, I'd say x represents the minimum for the fitted data while x1 is the
> minimum for the fitted polynomial. Since the spectrum is sampled at discrete
> points c, you cannot expect that the abscissa value for the minimum of the
> polynomial coincides with a sampling point.
>
> Regards, Bringfried

Which value will be the best and how to find that, by looking into the
plot I feel x is good.
thanking you
sid
Re: Doubt in polynomial fitting - emergency [message #73346 is a reply to message #73345] Tue, 02 November 2010 02:22 Go to previous message
Bringfried Stecklum is currently offline  Bringfried Stecklum
Messages: 75
Registered: January 1996
Member
sid wrote:
> Hi,
> I am fitting my spectral data with 2 degree polynomial with the
> routine svdfit. I need to find the minmum value after fitting the data
> points.
> For example my code is like this,
> ;c is x axis with wavelength(it is an absorption line)
> ;d is y axis with normalised intensity
> ypoly=svdfit(c,d,3,yfit=y1,chisq=chi,sigma=sig)
> x=min(y1)
> x1=-(ypoly(1))/(2*ypoly(2))
> if suppose u,v is the position of x, x1 respectively then
> c(u) should be equal to c(v)
> and
> d(u) should be equal to d(v)
> but im getting
> c(u)=3933.3090 in angstroms
> c(v)=3933.3072 in angstroms
> d(u)=0.071168385
> d(v)=0.072779992
> Please suggest me why it is not the same, which value should I believe
> and how?
> thanking you
> sid
>
>
Well, I'd say x represents the minimum for the fitted data while x1 is the
minimum for the fitted polynomial. Since the spectrum is sampled at discrete
points c, you cannot expect that the abscissa value for the minimum of the
polynomial coincides with a sampling point.

Regards, Bringfried
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Doubt in polynomial fitting - emergency
Next Topic: read FITS header keyword using IDL Astronomy users's library

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

Current Time: Fri Oct 10 06:22:18 PDT 2025

Total time taken to generate the page: 7.44068 seconds