diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-08-15 19:53:44 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-08-15 19:53:44 (GMT) |
commit | aa7dc58f280cb4df951c8d767afaaff4ee1fecf3 (patch) | |
tree | 47f9419afb7a139e0639d4500ba3c5e9b4c45035 /tksao/frame/fitsmap.C | |
parent | d51d3f66c47101fcaaf39f90d77950156fc05648 (diff) | |
download | blt-aa7dc58f280cb4df951c8d767afaaff4ee1fecf3.zip blt-aa7dc58f280cb4df951c8d767afaaff4ee1fecf3.tar.gz blt-aa7dc58f280cb4df951c8d767afaaff4ee1fecf3.tar.bz2 |
simplify getInfo code
Diffstat (limited to 'tksao/frame/fitsmap.C')
-rw-r--r-- | tksao/frame/fitsmap.C | 33 |
1 files changed, 3 insertions, 30 deletions
diff --git a/tksao/frame/fitsmap.C b/tksao/frame/fitsmap.C index 5aa1c19..53903ec 100644 --- a/tksao/frame/fitsmap.C +++ b/tksao/frame/fitsmap.C @@ -36,17 +36,6 @@ VectorStr FitsImage::mapFromRef(const Vector& vv, Coord::CoordSystem out, return VectorStr(); } -// waj -void FitsImage::mapFromRef(const Vector& vv, Coord::CoordSystem out, - Coord::SkyFrame sky, Coord::SkyFormat format, - char* buf) -{ - if (hasWCS(out)) - pix2wcs(vv * refToImage, out, sky, format, buf); - else - strcpy(buf,""); -} - Vector3d FitsImage::mapFromRef(const Vector3d& vv, Coord::CoordSystem out, Coord::SkyFrame sky) { @@ -146,25 +135,9 @@ void FitsImage::listFromRef(ostream& str1, ostream& str2, const Vector& vv, break; default: { - char buf[128]; - char* bptr = buf; - mapFromRef(vv,sys,sky,format,buf); - - // lon - char* lonptr = buf; - while (*bptr && *bptr != ' ') - bptr++; - *bptr = '\0'; - - // lat - bptr++; - char* latptr = bptr; - while (*bptr && *bptr != ' ') - bptr++; - *bptr = '\0'; - - str1 << lonptr; - str2 << latptr; + VectorStr rr = mapFromRef(vv,sys,sky,format); + str1 << rr[0]; + str2 << rr[1]; } } } |