diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-01-10 23:01:08 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-01-10 23:01:08 (GMT) |
commit | a65a76785b5424fb8c0162c294a2b2eecf0b0e78 (patch) | |
tree | 4e1cda9a6a9605fcd2cc065750d4fdf8bf5ce0f7 /tksao | |
parent | 4b1e6f6d7633235c92942b73ec324eeb5af2957f (diff) | |
download | blt-a65a76785b5424fb8c0162c294a2b2eecf0b0e78.zip blt-a65a76785b5424fb8c0162c294a2b2eecf0b0e78.tar.gz blt-a65a76785b5424fb8c0162c294a2b2eecf0b0e78.tar.bz2 |
clean up marker code
Diffstat (limited to 'tksao')
-rw-r--r-- | tksao/frame/compass.C | 20 | ||||
-rw-r--r-- | tksao/frame/marker.C | 28 |
2 files changed, 9 insertions, 39 deletions
diff --git a/tksao/frame/compass.C b/tksao/frame/compass.C index 0d5a8ae..c5611a1 100644 --- a/tksao/frame/compass.C +++ b/tksao/frame/compass.C @@ -563,23 +563,11 @@ void Compass::list(ostream& str, Coord::CoordSystem sys, Coord::SkyFrame sky, break; default: if (ptr->hasWCSCel(sys)) { + listRADEC(ptr,center,sys,sky,format); double rr = ptr->mapLenFromRef(radius,sys,Coord::ARCSEC); - switch (format) { - case Coord::DEGREES: - { - Vector vv = ptr->mapFromRef(center,sys,sky); - str << type_ << '(' << setprecision(10) << vv << ',' - << setprecision(3) << fixed << rr << '"' << ')'; - str.unsetf(ios_base::floatfield); - } - break; - case Coord::SEXAGESIMAL: - listRADEC(ptr,center,sys,sky,format); - str << type_ << '(' << ra << ',' << dec << ',' - << setprecision(3) << fixed << rr << '"' << ')'; - str.unsetf(ios_base::floatfield); - break; - } + str << type_ << '(' << ra << ',' << dec << ',' + << setprecision(3) << fixed << rr << '"' << ')'; + str.unsetf(ios_base::floatfield); } else listNonCel(ptr, str, sys); diff --git a/tksao/frame/marker.C b/tksao/frame/marker.C index ca43585..9c8816f 100644 --- a/tksao/frame/marker.C +++ b/tksao/frame/marker.C @@ -1628,15 +1628,8 @@ void Marker::listXY(ostream& str, Coord::CoordSystem sys, Coord::SkyFrame sky, default: if (ptr->hasWCS(sys)) { if (ptr->hasWCSCel(sys)) { - switch (format) { - case Coord::DEGREES: - str << setprecision(10) << ptr->mapFromRef(center,sys,sky); - break; - case Coord::SEXAGESIMAL: - listRADEC(ptr,center,sys,sky,format); - str << ra << ' ' << dec; - break; - } + listRADEC(ptr,center,sys,sky,format); + str << ra << ' ' << dec; } else { str << setprecision(8) << ptr->mapFromRef(center,sys); @@ -1920,20 +1913,9 @@ void Marker::XMLRowPoint(FitsImage* ptr, Coord::CoordSystem sys, default: if (ptr->hasWCS(sys)) { if (ptr->hasWCSCel(sys)) { - switch (format) { - case Coord::DEGREES: - { - Vector v = ptr->mapFromRef(vv,sys,sky); - XMLRow(XMLX,v[0],10); - XMLRow(XMLY,v[1],10); - } - break; - case Coord::SEXAGESIMAL: - listRADEC(ptr,vv,sys,sky,format); - XMLRow(XMLX,ra); - XMLRow(XMLY,dec); - break; - } + listRADEC(ptr,vv,sys,sky,format); + XMLRow(XMLX,ra); + XMLRow(XMLY,dec); } else { Vector v = ptr->mapFromRef(vv,sys); |