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

Home » Public Forums » archive » fitting after rebinning
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
fitting after rebinning [message #57361] Thu, 06 December 2007 12:46
Greg Hennessy is currently offline  Greg Hennessy
Messages: 45
Registered: November 2005
Member
Assume I create a large array containing a function (such as a
gaussian) and I use my favorite routine to fit the function. I then
rebin the array to a smaller array, and fit again. It seems that the
answers for the peak, and width of the smaller function should be the
values for the large array divided by the scaling I rebinned by, so
long as I haven't rebinned so badly that I'm no longer properly
sampled, right? I'm finding offsets which I can't explain easily.

a=psf_gaussian(npix=512,fwhm=90)
b=rebin(a,64,64)
c=rebin(a,16,16)
t1=gauss2dfit(a,p1,/tilt)
t2=gauss2dfit(b,p2,/tilt)
t3=gauss2dfit(c,p3,/tilt)
print,p1/32,p2/4,p3

yeilds:

6.91216e-10 0.031247 1.19436 1.19436 7.98438 7.98438 0.00000
3.84789e-08 0.247748 1.19650 1.19650 7.87500 7.87500 0.00000
-3.39881e-05 0.869213 1.22937 1.22937 7.50000 7.50000 0.00000

I'd like to figure out where those half and .375 pixel offsets come
from.
[Message index]
 
Read Message
Previous Topic: 'analyzing code' and # of pro files
Next Topic: Custom formatting under version 7.0?

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

Current Time: Wed Oct 08 19:51:36 PDT 2025

Total time taken to generate the page: 0.00424 seconds