diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-08-22 18:38:46 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-08-22 18:38:46 (GMT) |
commit | f9f65e1e7937f6f32bb41b4cabf2052a1ae725c3 (patch) | |
tree | eab919e419b88a44e218aefae9b7b0dca59a51df /tksao | |
parent | 4e95c159cd983676cf0a56c58e5de6b16a55e0c6 (diff) | |
download | blt-f9f65e1e7937f6f32bb41b4cabf2052a1ae725c3.zip blt-f9f65e1e7937f6f32bb41b4cabf2052a1ae725c3.tar.gz blt-f9f65e1e7937f6f32bb41b4cabf2052a1ae725c3.tar.bz2 |
simplify wcs code
Diffstat (limited to 'tksao')
-rw-r--r-- | tksao/frame/basecommand.C | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tksao/frame/basecommand.C b/tksao/frame/basecommand.C index 87c513b..0113e9d 100644 --- a/tksao/frame/basecommand.C +++ b/tksao/frame/basecommand.C @@ -1790,10 +1790,10 @@ void Base::getFitsSliceToImageCmd(double dd, Coord::CoordSystem sys, { if (currentContext->cfits) { FitsImage* ptr = currentContext->fits; - Vector3d cc = Vector3d(ptr->center(),1) * Translate3d(-.5,-.5,-.5); + Vector3d cc = Vector3d(ptr->center(),1) * Translate3d(-.5, -.5, -.5); Vector3d wcc = ptr->mapFromRef(cc,sys,sky); Vector3d oo = ptr->mapToRef(Vector3d(wcc[0],wcc[1],dd),sys,sky); - Vector3d out = oo * Translate3d(.5,.5,.5); + Vector3d out = oo * Translate3d(.5, .5, .5); printInteger(out[2]); } else @@ -1985,7 +1985,7 @@ void Base::getPixelTableCmd(const Vector& vv, Coord::InternalSystem ref, if (ur[0]>=params->xmin && ll[0]<params->xmax && ur[1]>=params->ymin && ll[1]<params->ymax) { - Vector pt = ((ll+Vector(ii,jj)) * dataToImage).round(); + Vector pt = ((ll+Vector(ii,jj)) * Translate(.5, .5)).round(); if (pt[0]>params->xmin && pt[0]<=params->xmax) { ostringstream lstr; lstr << pt[0] << ends; @@ -2005,7 +2005,7 @@ void Base::getPixelTableCmd(const Vector& vv, Coord::InternalSystem ref, if (ur[0]>=params->xmin && ll[0]<params->xmax && ur[1]>=params->ymin && ll[1]<params->ymax) { - Vector pt = ((ll+Vector(ii,jj)) * dataToImage).round(); + Vector pt = ((ll+Vector(ii,jj)) * Translate(.5, .5)).round(); if (pt[1]>params->ymin && pt[1]<=params->ymax) { ostringstream lstr; lstr << pt[1] << ends; @@ -2865,10 +2865,10 @@ void Base::sliceCmd(double dd, Coord::CoordSystem sys, Coord::SkyFrame sky) return; FitsImage* ptr = currentContext->fits; - Vector3d cc = Vector3d(ptr->center(),1) * Translate3d(-.5,-.5,-.5); + Vector3d cc = Vector3d(ptr->center(),1) * Translate3d(-.5, -.5, -.5); Vector3d wcc = ptr->mapFromRef(cc,sys,sky); Vector3d oo = ptr->mapToRef(Vector3d(wcc[0],wcc[1],dd),sys,sky); - Vector3d out = oo * Translate3d(.5,.5,.5); + Vector3d out = oo * Translate3d(.5, .5, .5); // IMAGE (ranges 1-n) setSlice(2,out[2]); |