summaryrefslogtreecommitdiffstats
path: root/tksao/frame/base.C
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-07-31 15:44:42 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-07-31 15:44:42 (GMT)
commit4a95d7d2042b5c25e992afefe5004d8d8b774a7c (patch)
tree19d0674a5ecce8b76a00804d2088069c21482fc8 /tksao/frame/base.C
parentc05398ec1b743547ea7af7a375cc64edd132cb57 (diff)
downloadblt-4a95d7d2042b5c25e992afefe5004d8d8b774a7c.zip
blt-4a95d7d2042b5c25e992afefe5004d8d8b774a7c.tar.gz
blt-4a95d7d2042b5c25e992afefe5004d8d8b774a7c.tar.bz2
fix wcsToRef for mosaicimage wcs
Diffstat (limited to 'tksao/frame/base.C')
-rw-r--r--tksao/frame/base.C12
1 files changed, 9 insertions, 3 deletions
diff --git a/tksao/frame/base.C b/tksao/frame/base.C
index 47a4a10..3b99ba7 100644
--- a/tksao/frame/base.C
+++ b/tksao/frame/base.C
@@ -635,12 +635,14 @@ Matrix Base::calcAlignWCS(FitsImage* fits1, FitsImage* fits2,
Vector orpix2 = fits2->wcs2pix(orval2,sys2,sky) * imageToData;
- return Translate(-orpix2) *
+ Matrix rr = Translate(-orpix2) *
flip *
Scale(zoom) *
Rotate(rotation) *
Translate(orpix2) *
Translate(origin);
+
+ return rr;
}
}
#else
@@ -691,13 +693,17 @@ Matrix Base::calcAlignWCS(FitsImage* fits1, FitsImage* fits2,
double* fit = new double[ss];
double tol = 1;
if (astLinearApprox(cvt, ll, ur, tol, fit) != AST__BAD)
- rr = Matrix(fit[naxes2], fit[naxes2+naxes1],
+ rr = dataToImage *
+ Matrix(fit[naxes2], fit[naxes2+naxes1],
fit[naxes2+1], fit[naxes2+naxes1+1],
- fit[0], fit[1]);
+ fit[0], fit[1]) *
+ imageToData;
+
if (fit)
delete [] fit;
astEnd; // now, clean up memory
+
return rr;
}
#endif