footstyle |
09/29/2006 11:36PM (Read 4437 times)
|
|
|
Status: offline
Registered: 11/10/2005
Posts: 5
|
What do the coefficients of surface2 in the *.db file produced by geomap actually mean or act upon? I have trawled through pyraf's documentation and iraf.net questions to find information about this, but have been unable to reproduce the behaviour suggested by either. I have written up a webpage giving the tests I have run to try to figure this out, I think I've exhausted all reasonable interpretations of the documentation! The URL with more details is given below.http://www-int.stsci.edu/~clarkson/geomap/geomap_investigation.htmlany suggestions would be very much appreciated!thanks very much! Will Clarkson
STSCI
|
|
|
|
fitz |
09/29/2006 11:36PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
Hi Will,First, I apologize for not answering your earlier mail, I was travelling and since forgot about it.Anyway, a brief look at your page and the code makes me think that what's happening is along the lines of[code:1:1b10bb863a]
x' = F1(x,y) + F2(x,y)
y' = F1(x,y) + F2(x,y)
[/code:1:1b10bb863a]That is, the transformed coords are just the sum of evaluating surface1 and surface2 independently on the input point. The relevant code comes from
images$immatch/src/geometry/geoxytran.x:[code:1:1b10bb863a]
# GEO_DO_TRANSFORM -- The linear transformation is performed in this procedure.
# First the coordinates are scaled, then rotated and translated. The
# transformed coordinates are returned.procedure geo_do_transformr (x, y, xt, yt, sx1, sy1, sx2, sy2)real x, y # initial positions
real xt, yt # transformed positions
pointer sx1, sy1 # pointer to linear surfaces
pointer sx2, sy2 # pointer to distortion surfacesreal gseval()begin
xt = gseval (sx1, x, y)
if (sx2 != NULL)
xt = xt + gseval (sx2, x, y)
yt = gseval (sy1, x, y)
if (sy2 != NULL)
yt = yt + gseval (sy2, x, y)
end
[/code:1:1b10bb863a]Frank might have more to offer, but the whole geomap/geotran thing is a bit of black magic few people understand any more. Hope this helps.Cheers,
-Mike
|
|
|
|
footstyle |
09/29/2006 11:36PM
|
|
|
Status: offline
Registered: 11/10/2005
Posts: 5
|
Thanks very much for your rapid reply Mike. From the code it does indeed look like x'=F1(x,y) + F2(x,y) must be the transformation that is taking place. However when I actually evaluate F1(x,y) and F2(x,y) separately using geoxytran, the resulting coords cover the full 0-1200 or so range at [i:523041eac0]each[/i:523041eac0] stage. Thus computing x'=F1(x,y) + F2(x,y) gives a result that cannot represent (x',y') because the x',y' range produced is too big. URL's for the evaluation of F1 and F2, each on (x,y) are given below (left and right panels of the two figures respectively):http://www-int.stsci.edu/~clarkson/geomap/geomap_images.html#s2s1
http://www-int.stsci.edu/~clarkson/geomap/geomap_images.html#s2xIt's possible something's getting messed up when I apply surface2 on (x,y); certainly the values of F2(x,y) are awfully large given the small values of the first few numbers in surface2. I will double-check this possibility now. thanks! Will
|
|
|
|
footstyle |
09/29/2006 11:36PM
|
|
|
Status: offline
Registered: 11/10/2005
Posts: 5
|
Hi - I have applied the surface1 and surface2 on the input (x,y) with IDL and indeed have reproduced the behaviour you suggest, i.e.x'=F1(x,y)+F2(x,y)
y'=G1(x,y)+G2(x,y)The problem was that under the geomap scheme, setting the surface1 to the identity did NOT nullify its effect, rather one gets x'=x+F2(x,y) ; clearly I had failed to isolate surface2 properly in my earlier tests.I tried again with geoxytran, this time setting all surface1 coefficients to zero to isolate surface2, and found that indeed the result of the two-surface transform can indeed now be reproduced in two stages. thanks very much for your help, that clears up a mystery for me...Will
|
|
|
|
| |
|