diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-01-11 17:25:41 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-01-11 17:25:41 (GMT) |
commit | aecffafa9daebb5d9ab0e366a75a9778a5a0d909 (patch) | |
tree | 903d8de67436770c881cb4dfdc70c09ea04641a8 /tksao/frame/ellipseannulus.C | |
parent | 3a67bac4dbcf25fca514a947497ccdd86d5f9a8c (diff) | |
download | blt-aecffafa9daebb5d9ab0e366a75a9778a5a0d909.zip blt-aecffafa9daebb5d9ab0e366a75a9778a5a0d909.tar.gz blt-aecffafa9daebb5d9ab0e366a75a9778a5a0d909.tar.bz2 |
clean up marker code
Diffstat (limited to 'tksao/frame/ellipseannulus.C')
-rw-r--r-- | tksao/frame/ellipseannulus.C | 81 |
1 files changed, 33 insertions, 48 deletions
diff --git a/tksao/frame/ellipseannulus.C b/tksao/frame/ellipseannulus.C index ce9bda5..593e102 100644 --- a/tksao/frame/ellipseannulus.C +++ b/tksao/frame/ellipseannulus.C @@ -335,57 +335,42 @@ void EllipseAnnulus::listPros(ostream& str, Coord::CoordSystem sys, break; default: if (ptr->hasWCSCel(sys)) { - switch (format) { - case Coord::DEGREES: - { - Vector vv = ptr->mapFromRef(center,sys,sky); - for (int ii=0; ii<numAnnuli_; ii++) { - coord.listProsCoordSystem(str,sys,sky); - str << "; "; - - Vector rr = ptr->mapLenFromRef(annuli_[ii],sys,Coord::ARCSEC); - str << "ellipse " - << setprecision(10) << setunit('d') << vv << ' ' - << setprecision(3) << setunit('"') << fixed << rr << ' '; - str.unsetf(ios_base::floatfield); - str << setprecision(8) << radToDeg(angle); - - if (ii!=0) { - Vector r1 = ptr->mapLenFromRef(annuli_[ii-1],sys,Coord::ARCSEC); - str << " & !ellipse " - << setprecision(8) << setunit('d') << vv << ' ' - << setprecision(3) << setunit('"') << fixed << r1 << ' '; - str.unsetf(ios_base::floatfield); - str << setprecision(8) << radToDeg(angle); - } - - listProsPost(str, strip); - } + listRADECPros(ptr,center,sys,sky,format); + for (int ii=0; ii<numAnnuli_; ii++) { + coord.listProsCoordSystem(str,sys,sky); + str << "; "; + + Vector rr = ptr->mapLenFromRef(annuli_[ii],sys,Coord::ARCSEC); + str << "ellipse "; + switch (format) { + case Coord::DEGREES: + str << ra << 'd' << ' ' << dec << 'd' << ' '; + break; + case Coord::SEXAGESIMAL: + str << ra << ' ' << dec << ' '; + break; } - break; - case Coord::SEXAGESIMAL: - listRADECPros(ptr,center,sys,sky,format); - for (int ii=0; ii<numAnnuli_; ii++) { - coord.listProsCoordSystem(str,sys,sky); - str << "; "; - - Vector rr = ptr->mapLenFromRef(annuli_[ii],sys,Coord::ARCSEC); - str << "ellipse " << ra << ' ' << dec << ' ' - << setprecision(3) << setunit('"') << fixed << rr << ' '; - str.unsetf(ios_base::floatfield); - str << setprecision(8) << radToDeg(angle); - - if (ii!=0) { - Vector r1 = ptr->mapLenFromRef(annuli_[ii-1],sys,Coord::ARCSEC); - str << " & !ellipse " << ra << ' ' << dec << ' ' - << setprecision(3) << setunit('"') << fixed << r1 << ' '; - str.unsetf(ios_base::floatfield); - str << setprecision(8) << radToDeg(angle); - } + str << setprecision(3) << setunit('"') << fixed << rr << ' '; + str.unsetf(ios_base::floatfield); + str << setprecision(8) << radToDeg(angle); - listProsPost(str, strip); + if (ii!=0) { + Vector r1 = ptr->mapLenFromRef(annuli_[ii-1],sys,Coord::ARCSEC); + str << " & !ellipse "; + switch (format) { + case Coord::DEGREES: + str << ra << 'd' << ' ' << dec << 'd' << ' '; + break; + case Coord::SEXAGESIMAL: + str << ra << ' ' << dec << ' '; + break; + } + str << setprecision(3) << setunit('"') << fixed << r1 << ' '; + str.unsetf(ios_base::floatfield); + str << setprecision(8) << radToDeg(angle); } - break; + + listProsPost(str, strip); } } } |