Least square fitting [message #60326] |
Tue, 20 May 2008 02:41  |
MichaelT
Messages: 52 Registered: May 2006
|
Member |
|
|
Hi all,
I have a problem with a rather complicated function depending on four
parameters which I try to find using least square fitting and I don't
know exactly how to do it.
The basic problem is the following:
I have an astronomical image of a star field and try to relate the sky
coordinates (right ascension, declination) of the stars to the pixel
coordinates (x, y).
The function to relate the two depends on the not accurately known
parameters focal length of the lens (f), the rotation of the field of
view with respect of the north direction (beta) and the center sky
coordinates of the image (bc, lc).
I know the sky coordinates of certain stars accurately (bs, ls) as
well as their pixel coordinates (xs, ys) and the center pixel
coordinates of the image (xc, yc).
Generally, the function is as follows (equivalent for ys', but the
functions f1-f5 are slightly different):
xs' = f1(xc, f2(f, f3(ls, lc, bs, bc)), f4(ls, lc, bs, bc, f5(ls, lc,
bs, bc)), beta)
The functions f1-f5 look rather complicated and contain many sines,
cosines and acos etc.
I then did the following as I didn't know better:
First I minimized all this with respect of beta, then lc and bc and
after that f starting with some initial values for the four
parameters. Then I started all over again, beta, lc, bc, f (in a loop)
until the difference between the known coordinates (xs, ys) and the
calculated ones (xs', ys') reached a minimum.
However, the minimum deviation reached at the end of the loop pretty
much depends on the initially chosen values of beta, lc, bc and f.
There certainly is a more optimal way to do the least square fitting
than the one that I have chosen (partial derivatives etc.), but that
f1 depends on f2 and f4 and these again depend on f3 and f5 is giving
me some unsolvable problems.
How should I proceed? What would be a good method to minimize this?
Thanks, Michael
The main problem now is for me, that f1 depends on f2 and f4 and that
f2 and f4 themselves depend on f3 and f5.
|
|
|