summaryrefslogtreecommitdiffstats
path: root/tksao/frame/ellipseannulus.C
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2017-03-21 19:25:06 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2017-03-21 19:25:06 (GMT)
commitc239e576791ae14fd1eba6ca6ccb1e88578df404 (patch)
treea6bb45c8f57b5e9cd76dcf242f894866bf0baffc /tksao/frame/ellipseannulus.C
parent64b6dc62d5a67547ead9103d5c86837290147539 (diff)
downloadblt-c239e576791ae14fd1eba6ca6ccb1e88578df404.zip
blt-c239e576791ae14fd1eba6ca6ccb1e88578df404.tar.gz
blt-c239e576791ae14fd1eba6ca6ccb1e88578df404.tar.bz2
cleanup regions listing code
Diffstat (limited to 'tksao/frame/ellipseannulus.C')
-rw-r--r--tksao/frame/ellipseannulus.C40
1 files changed, 26 insertions, 14 deletions
diff --git a/tksao/frame/ellipseannulus.C b/tksao/frame/ellipseannulus.C
index 11fcd6e..9fa067b 100644
--- a/tksao/frame/ellipseannulus.C
+++ b/tksao/frame/ellipseannulus.C
@@ -337,11 +337,13 @@ void EllipseAnnulus::listPros(ostream& str, Coord::CoordSystem sys,
str << "; ";
Vector rr = ptr->mapLenFromRef(annuli_[ii],Coord::IMAGE);
- str << "ellipse " << vv << ' ' << rr << ' ' << radToDeg(angle);
+ str << "ellipse " << setprecision(8) << vv << ' ' << rr << ' '
+ << radToDeg(angle);
if (ii!=0) {
Vector r1 = ptr->mapLenFromRef(annuli_[ii-1],Coord::IMAGE);
- str << " & !ellipse " << vv << ' ' << r1 << ' ' << radToDeg(angle);
+ str << " & !ellipse " << setprecision(8) << vv << ' ' << r1 << ' '
+ << radToDeg(angle);
}
listProsPost(str, strip);
@@ -359,13 +361,19 @@ void EllipseAnnulus::listPros(ostream& str, Coord::CoordSystem sys,
str << "; ";
Vector rr = ptr->mapLenFromRef(annuli_[ii],sys,Coord::ARCSEC);
- str << "ellipse " << setunit('d') << vv << ' '
- << setunit('"') << rr << ' ' << radToDeg(angle);
+ 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 " << setunit('d') << vv << ' '
- << setunit('"') << r1 << ' ' << radToDeg(angle);
+ 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);
@@ -379,13 +387,17 @@ void EllipseAnnulus::listPros(ostream& str, Coord::CoordSystem sys,
str << "; ";
Vector rr = ptr->mapLenFromRef(annuli_[ii],sys,Coord::ARCSEC);
- str << "ellipse " << ra << ' ' << dec << ' '
- << setunit('"') << rr << ' ' << radToDeg(angle);
+ 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 << ' '
- << setunit('"') << r1 << ' ' << radToDeg(angle);
+ str << " & !ellipse " << ra << ' ' << dec << ' '
+ << setprecision(3) << setunit('"') << fixed << r1 << ' ';
+ str.unsetf(ios_base::floatfield);
+ str << setprecision(8) << radToDeg(angle);
}
listProsPost(str, strip);
@@ -403,12 +415,12 @@ void EllipseAnnulus::listSAOimage(ostream& str, int strip)
for (int ii=0; ii<numAnnuli_; ii++) {
Vector vv = ptr->mapFromRef(center,Coord::IMAGE);
- str << "ellipse(" << vv << ',' << annuli_[ii] << ','
- << radToDeg(angle) << ')';
+ str << "ellipse(" << setprecision(8) << vv << ','
+ << annuli_[ii] << ',' << radToDeg(angle) << ')';
if (ii!=0)
- str << " & !ellipse(" << vv << ',' << annuli_[ii-1] << ','
- << radToDeg(angle) << ')';
+ str << " & !ellipse(" << setprecision(8) << vv << ','
+ << annuli_[ii-1] << ',' << radToDeg(angle) << ')';
listSAOimagePost(str, strip);
}