diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-01-10 22:32:21 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-01-10 22:32:21 (GMT) |
commit | 9fa5682bf58c23ed51cdaf2e7a1a2c127f59ce1b (patch) | |
tree | 0804757fda028c78bf64e1109b286b1a37e0d0ca /tksao | |
parent | b88b9139b36ed21b565eb9d58301a64ea7598f6a (diff) | |
download | blt-9fa5682bf58c23ed51cdaf2e7a1a2c127f59ce1b.zip blt-9fa5682bf58c23ed51cdaf2e7a1a2c127f59ce1b.tar.gz blt-9fa5682bf58c23ed51cdaf2e7a1a2c127f59ce1b.tar.bz2 |
clean up marker code
Diffstat (limited to 'tksao')
-rw-r--r-- | tksao/frame/annulus.C | 64 |
1 files changed, 19 insertions, 45 deletions
diff --git a/tksao/frame/annulus.C b/tksao/frame/annulus.C index 2216109..c72f744 100644 --- a/tksao/frame/annulus.C +++ b/tksao/frame/annulus.C @@ -213,32 +213,15 @@ void Annulus::list(ostream& str, Coord::CoordSystem sys, Coord::SkyFrame sky, break; default: if (ptr->hasWCSCel(sys)) { - switch (format) { - case Coord::DEGREES: - { - Vector vv = ptr->mapFromRef(center,sys,sky); - str << type_ << '(' << setprecision(10) << vv - << setprecision(3) << fixed; - for (int ii=0; ii<numAnnuli_; ii++) { - double rr = ptr->mapLenFromRef(annuli_[ii][0],sys,Coord::ARCSEC); - str << ',' << rr << '"'; - } - str << ')'; - str.unsetf(ios_base::floatfield); - } - break; - case Coord::SEXAGESIMAL: - listRADEC(ptr,center,sys,sky,format); - str << type_ << '(' << ra << ',' << dec - << setprecision(3) << fixed; - for (int ii=0; ii<numAnnuli_; ii++) { - double rr = ptr->mapLenFromRef(annuli_[ii][0],sys,Coord::ARCSEC); - str << ',' << rr << '"'; - } - str << ')'; - str.unsetf(ios_base::floatfield); - break; + listRADEC(ptr,center,sys,sky,format); + str << type_ << '(' << ra << ',' << dec + << setprecision(3) << fixed; + for (int ii=0; ii<numAnnuli_; ii++) { + double rr = ptr->mapLenFromRef(annuli_[ii][0],sys,Coord::ARCSEC); + str << ',' << rr << '"'; } + str << ')'; + str.unsetf(ios_base::floatfield); } else listNonCel(ptr, str, sys); @@ -335,32 +318,23 @@ void Annulus::listPros(ostream& str, Coord::CoordSystem sys, break; default: if (ptr->hasWCSCel(sys)) { + listRADECPros(ptr,center,sys,sky,format); + coord.listProsCoordSystem(str,sys,sky); + str << "; " << type_ << ' '; switch (format) { case Coord::DEGREES: - { - Vector vv = ptr->mapFromRef(center,sys,sky); - coord.listProsCoordSystem(str,sys,sky); - str << "; " << type_ << ' ' << setprecision(10) << setunit('d') << vv - << setprecision(3) << fixed; - for (int ii=0; ii<numAnnuli_; ii++) { - double rr = ptr->mapLenFromRef(annuli_[ii][0],sys,Coord::ARCSEC); - str << ' ' << rr << '"'; - str.unsetf(ios_base::floatfield); - } - } + str << ra << 'd' << ' ' << dec << 'd'; break; case Coord::SEXAGESIMAL: - listRADECPros(ptr,center,sys,sky,format); - coord.listProsCoordSystem(str,sys,sky); - str << "; " << type_ << ' ' << ra << ' ' << dec - << setprecision(3) << fixed; - for (int ii=0; ii<numAnnuli_; ii++) { - double rr = ptr->mapLenFromRef(annuli_[ii][0],sys,Coord::ARCSEC); - str << ' ' << rr << '"'; - str.unsetf(ios_base::floatfield); - } + str << ra << ' ' << dec; break; } + str << setprecision(3) << fixed; + for (int ii=0; ii<numAnnuli_; ii++) { + double rr = ptr->mapLenFromRef(annuli_[ii][0],sys,Coord::ARCSEC); + str << ' ' << rr << '"'; + } + str.unsetf(ios_base::floatfield); } } |