summaryrefslogtreecommitdiffstats
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
parent64b6dc62d5a67547ead9103d5c86837290147539 (diff)
downloadblt-c239e576791ae14fd1eba6ca6ccb1e88578df404.zip
blt-c239e576791ae14fd1eba6ca6ccb1e88578df404.tar.gz
blt-c239e576791ae14fd1eba6ca6ccb1e88578df404.tar.bz2
cleanup regions listing code
-rw-r--r--tksao/frame/annulus.C12
-rw-r--r--tksao/frame/box.C33
-rw-r--r--tksao/frame/boxannulus.C36
-rw-r--r--tksao/frame/circle.C24
-rw-r--r--tksao/frame/ellipse.C33
-rw-r--r--tksao/frame/ellipseannulus.C40
-rw-r--r--tksao/frame/point.C13
-rw-r--r--tksao/frame/polygon.C10
-rw-r--r--tksao/frame/text.C5
9 files changed, 133 insertions, 73 deletions
diff --git a/tksao/frame/annulus.C b/tksao/frame/annulus.C
index 69b64ab..4895529 100644
--- a/tksao/frame/annulus.C
+++ b/tksao/frame/annulus.C
@@ -326,7 +326,7 @@ void Annulus::listPros(ostream& str, Coord::CoordSystem sys,
{
Vector vv = ptr->mapFromRef(center,sys);
coord.listProsCoordSystem(str,sys,sky);
- str << "; " << type_ << ' ' << vv;
+ str << "; " << type_ << ' ' << setprecision(8) << vv;
for (int ii=0; ii<numAnnuli_; ii++) {
double rr = ptr->mapLenFromRef(annuli_[ii][0],Coord::IMAGE);
str << ' ' << rr;
@@ -340,20 +340,24 @@ void Annulus::listPros(ostream& str, Coord::CoordSystem sys,
{
Vector vv = ptr->mapFromRef(center,sys,sky);
coord.listProsCoordSystem(str,sys,sky);
- str << "; " << type_ << ' ' << setunit('d') << vv;
+ 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);
}
}
break;
case Coord::SEXAGESIMAL:
listRADECPros(ptr,center,sys,sky,format);
coord.listProsCoordSystem(str,sys,sky);
- str << "; " << type_ << ' ' << ra << ' ' << dec;
+ 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);
}
break;
}
@@ -369,7 +373,7 @@ void Annulus::listSAOimage(ostream& str, int strip)
listSAOimagePre(str);
Vector vv = ptr->mapFromRef(center,Coord::IMAGE);
- str << type_ << '(' << vv;
+ str << type_ << '(' << setprecision(8) << vv;
for (int ii=0; ii<numAnnuli_; ii++) {
double rr = ptr->mapLenFromRef(annuli_[ii][0],Coord::IMAGE);
str << ',' << rr;
diff --git a/tksao/frame/box.C b/tksao/frame/box.C
index cbd40e5..2c5f06d 100644
--- a/tksao/frame/box.C
+++ b/tksao/frame/box.C
@@ -389,7 +389,8 @@ void Box::listSAOtng(ostream& str, Coord::CoordSystem sys, Coord::SkyFrame sky,
{
Vector vv = ptr->mapFromRef(center,Coord::IMAGE);
Vector rr = ptr->mapLenFromRef(annuli_[0],Coord::IMAGE);
- str << type_ << '(' << vv << ',' << rr << ',' << radToDeg(angle) << ')';
+ str << type_ << '(' << setprecision(8) << vv << ',' << rr << ','
+ << radToDeg(angle) << ')';
}
break;
default:
@@ -399,14 +400,17 @@ void Box::listSAOtng(ostream& str, Coord::CoordSystem sys, Coord::SkyFrame sky,
case Coord::DEGREES:
{
Vector vv = ptr->mapFromRef(center,sys,sky);
- str << type_ << '(' << vv << ',' << rr << ','
- << radToDeg(angle) << ')';
+ str << type_ << '('
+ << setprecision(10) << vv << ','
+ << setprecision(8) << rr << ','
+ << setprecision(8) << radToDeg(angle) << ')';
}
break;
case Coord::SEXAGESIMAL:
listRADEC(ptr,center,sys,sky,format);
- str << type_ << '(' << ra << ',' << dec << ',' << rr << ','
- << radToDeg(angle) << ')';
+ str << type_ << '(' << ra << ',' << dec << ','
+ << setprecision(8) << rr << ','
+ << setprecision(8) << radToDeg(angle) << ')';
break;
}
}
@@ -430,7 +434,8 @@ void Box::listPros(ostream& str, Coord::CoordSystem sys, Coord::SkyFrame sky,
Vector vv = ptr->mapFromRef(center,sys);
Vector rr = ptr->mapLenFromRef(annuli_[0],Coord::IMAGE);
coord.listProsCoordSystem(str,sys,sky);
- str << "; "<< type_ << ' ' << vv << ' ' << rr << ' ' << radToDeg(angle);
+ str << "; "<< type_ << ' ' << setprecision(8) << vv << ' ' << rr << ' '
+ << radToDeg(angle);
}
break;
default:
@@ -441,15 +446,21 @@ void Box::listPros(ostream& str, Coord::CoordSystem sys, Coord::SkyFrame sky,
{
Vector vv = ptr->mapFromRef(center,sys,sky);
coord.listProsCoordSystem(str,sys,sky);
- str << "; " << type_ << ' ' << setunit('d') << vv << ' '
- << setunit('"') << rr << ' ' << radToDeg(angle);
+ str << "; " << type_ << ' '
+ << setprecision(10) << setunit('d') << vv << ' '
+ << setprecision(3) << fixed << setunit('"') << rr << ' ';
+ str.unsetf(ios_base::floatfield);
+ str << setprecision(8) << radToDeg(angle);
}
break;
case Coord::SEXAGESIMAL:
listRADECPros(ptr,center,sys,sky,format);
coord.listProsCoordSystem(str,sys,sky);
- str << "; " << type_ << ' ' << ra << ' ' << dec << ' '
- << setunit('"') << rr << ' ' << radToDeg(angle);
+ str << "; " << type_ << ' '
+ << ra << ' ' << dec << ' '
+ << setprecision(3) << fixed << setunit('"') << rr << ' ';
+ str.unsetf(ios_base::floatfield);
+ str << setprecision(8) << radToDeg(angle);
break;
}
}
@@ -464,7 +475,7 @@ void Box::listSAOimage(ostream& str, int strip)
listSAOimagePre(str);
Vector vv = ptr->mapFromRef(center,Coord::IMAGE);
- str << type_ << '(' << vv << ',' << annuli_[0] << ','
+ str << type_ << '(' << setprecision(8) << vv << ',' << annuli_[0] << ','
<< radToDeg(angle) << ')';
listSAOimagePost(str, strip);
diff --git a/tksao/frame/boxannulus.C b/tksao/frame/boxannulus.C
index 0b6d35f..483de52 100644
--- a/tksao/frame/boxannulus.C
+++ b/tksao/frame/boxannulus.C
@@ -369,7 +369,8 @@ void BoxAnnulus::listPros(ostream& str, Coord::CoordSystem sys,
str << "; ";
Vector rr = ptr->mapLenFromRef(annuli_[ii],Coord::IMAGE);
- str << "box " << vv << ' ' << rr << ' ' << radToDeg(angle);
+ str << "box " << setprecision(8) << vv << ' ' << rr << ' '
+ << radToDeg(angle);
if (ii!=0) {
Vector r1 = ptr->mapLenFromRef(annuli_[ii-1],Coord::IMAGE);
@@ -391,13 +392,19 @@ void BoxAnnulus::listPros(ostream& str, Coord::CoordSystem sys,
str << "; ";
Vector rr = ptr->mapLenFromRef(annuli_[ii],sys,Coord::ARCSEC);
- str << "box " << setunit('d') << vv << ' '
- << setunit('"') << rr << ' ' << radToDeg(angle);
+ str << "box "
+ << 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 << " & !box " << setunit('d') << vv << ' '
- << setunit('"') << r1 << ' ' << radToDeg(angle);
+ str << " & !box "
+ << setprecision(8) << setunit('d') << vv << ' '
+ << setprecision(3) << setunit('"') << fixed << r1 << ' ';
+ str.unsetf(ios_base::floatfield);
+ str << setprecision(8) << radToDeg(angle);
}
listProsPost(str, strip);
@@ -411,13 +418,17 @@ void BoxAnnulus::listPros(ostream& str, Coord::CoordSystem sys,
str << "; ";
Vector rr = ptr->mapLenFromRef(annuli_[ii],sys,Coord::ARCSEC);
- str << "box " << ra << ' ' << dec << ' ' << setunit('"') << rr << ' '
- << radToDeg(angle);
+ str << "box " << 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 << " & !box " << ra << ' ' << dec << ' '
- << setunit('"') << r1 << ' ' << radToDeg(angle);
+ str << " & !box " << ra << ' ' << dec << ' '
+ << setprecision(3) << setunit('"') << fixed << r1 << ' ';
+ str.unsetf(ios_base::floatfield);
+ str << setprecision(8) << radToDeg(angle);
}
listProsPost(str, strip);
@@ -435,11 +446,12 @@ void BoxAnnulus::listSAOimage(ostream& str, int strip)
for (int ii=0; ii<numAnnuli_; ii++) {
Vector vv = ptr->mapFromRef(center,Coord::IMAGE);
- str << "box(" << vv << ',' << annuli_[ii] << ',' << radToDeg(angle) << ')';
+ str << "box(" << setprecision(8) << vv << ','
+ << annuli_[ii] << ',' << radToDeg(angle) << ')';
if (ii!=0)
- str << " & !box(" << vv << ',' << annuli_[ii-1] << ','
- << radToDeg(angle) << ')';
+ str << " & !box(" << setprecision(8) << vv << ','
+ << annuli_[ii-1] << ',' << radToDeg(angle) << ')';
listSAOimagePost(str, strip);
}
diff --git a/tksao/frame/circle.C b/tksao/frame/circle.C
index 20c6d6f..5b7b072 100644
--- a/tksao/frame/circle.C
+++ b/tksao/frame/circle.C
@@ -344,7 +344,7 @@ void Circle::listSAOtng(ostream& str,
{
Vector vv = ptr->mapFromRef(center,Coord::IMAGE);
double rr = ptr->mapLenFromRef(annuli_[0][0],Coord::IMAGE);
- str << type_ << '(' << vv << ',' << rr << ')';
+ str << type_ << '(' << setprecision(8) << vv << ',' << rr << ')';
}
break;
default:
@@ -354,12 +354,16 @@ void Circle::listSAOtng(ostream& str,
case Coord::DEGREES:
{
Vector vv = ptr->mapFromRef(center,sys,sky);
- str << type_ << '(' << vv << ',' << rr << ')';
+ str << type_ << '('
+ << setprecision(10) << vv << ','
+ << setprecision(8) << rr << ')';
}
break;
case Coord::SEXAGESIMAL:
listRADEC(ptr,center,sys,sky,format);
- str << type_ << '(' << ra << ',' << dec << ',' << rr << ')';
+ str << type_ << '('
+ << ra << ',' << dec << ','
+ << setprecision(8) << rr << ')';
break;
}
}
@@ -383,7 +387,7 @@ void Circle::listPros(ostream& str, Coord::CoordSystem sys, Coord::SkyFrame sky,
Vector vv = ptr->mapFromRef(center,sys);
double rr = ptr->mapLenFromRef(annuli_[0][0],Coord::IMAGE);
coord.listProsCoordSystem(str,sys,sky);
- str << "; " << type_ << ' ' << vv << ' ' << rr;
+ str << "; " << type_ << ' ' << setprecision(8) << vv << ' ' << rr;
}
break;
default:
@@ -394,13 +398,19 @@ void Circle::listPros(ostream& str, Coord::CoordSystem sys, Coord::SkyFrame sky,
{
Vector vv = ptr->mapFromRef(center,sys,sky);
coord.listProsCoordSystem(str,sys,sky);
- str << "; " << type_ << ' ' << setunit('d') << vv << ' ' << rr << '"';
+ str << "; " << type_ << ' '
+ << setprecision(10) << setunit('d') << vv << ' '
+ << setprecision(3) << fixed << rr << '"';
+ str.unsetf(ios_base::floatfield);
}
break;
case Coord::SEXAGESIMAL:
listRADECPros(ptr,center,sys,sky,format);
coord.listProsCoordSystem(str,sys,sky);
- str << "; " << type_ << ' ' << ra << ' ' << dec << ' ' << rr << '"';
+ str << "; " << type_ << ' '
+ << ra << ' ' << dec << ' '
+ << setprecision(3) << fixed << rr << '"';
+ str.unsetf(ios_base::floatfield);
break;
}
}
@@ -415,7 +425,7 @@ void Circle::listSAOimage(ostream& str, int strip)
listSAOimagePre(str);
Vector vv = ptr->mapFromRef(center,Coord::IMAGE);
- str << type_ << '(' << vv << ',' << annuli_[0][0] << ')';
+ str << type_ << '(' << setprecision(8) << vv << ',' << annuli_[0][0] << ')';
listSAOimagePost(str, strip);
}
diff --git a/tksao/frame/ellipse.C b/tksao/frame/ellipse.C
index f423427..bbdbc26 100644
--- a/tksao/frame/ellipse.C
+++ b/tksao/frame/ellipse.C
@@ -376,7 +376,8 @@ void Ellipse::listSAOtng(ostream& str, Coord::CoordSystem sys,
{
Vector vv = ptr->mapFromRef(center,Coord::IMAGE);
Vector rr = ptr->mapLenFromRef(annuli_[0],Coord::IMAGE);
- str << type_ << '(' << vv << ',' << rr << ',' << radToDeg(angle) << ')';
+ str << type_ << '(' << setprecision(8) << vv << ',' << rr << ','
+ << radToDeg(angle) << ')';
}
break;
default:
@@ -386,14 +387,17 @@ void Ellipse::listSAOtng(ostream& str, Coord::CoordSystem sys,
case Coord::DEGREES:
{
Vector vv = ptr->mapFromRef(center,sys,sky);
- str << type_ << '(' << vv << ',' << rr << ','
- << radToDeg(angle) << ')';
+ str << type_ << '('
+ << setprecision(10) << vv << ','
+ << setprecision(8) << rr << ','
+ << setprecision(8) << radToDeg(angle) << ')';
}
break;
case Coord::SEXAGESIMAL:
listRADEC(ptr,center,sys,sky,format);
- str << type_ << '(' << ra << ',' << dec << ',' << rr << ','
- << radToDeg(angle) << ')';
+ str << type_ << '(' << ra << ',' << dec << ','
+ << setprecision(8) << rr << ','
+ << setprecision(8) << radToDeg(angle) << ')';
break;
}
}
@@ -418,7 +422,8 @@ void Ellipse::listPros(ostream& str, Coord::CoordSystem sys,
Vector vv = ptr->mapFromRef(center,sys);
Vector rr = ptr->mapLenFromRef(annuli_[0],Coord::IMAGE);
coord.listProsCoordSystem(str,sys,sky);
- str << "; " << type_ << ' ' << vv << ' ' << rr << ' ' << radToDeg(angle);
+ str << "; " << type_ << ' ' << setprecision(8) << vv << ' ' << rr << ' '
+ << radToDeg(angle);
}
break;
default:
@@ -429,15 +434,21 @@ void Ellipse::listPros(ostream& str, Coord::CoordSystem sys,
{
Vector vv = ptr->mapFromRef(center,sys,sky);
coord.listProsCoordSystem(str,sys,sky);
- str << "; " << type_ << ' ' << setunit('d') << vv << ' '
- << setunit('"') << rr << ' ' << radToDeg(angle);
+ str << "; " << type_ << ' '
+ << setprecision(10) << setunit('d') << vv << ' '
+ << setprecision(3) << fixed << setunit('"') << rr << ' ';
+ str.unsetf(ios_base::floatfield);
+ str << setprecision(8) << radToDeg(angle);
}
break;
case Coord::SEXAGESIMAL:
listRADECPros(ptr,center,sys,sky,format);
coord.listProsCoordSystem(str,sys,sky);
- str << "; " << type_ << ' ' << ra << ' ' << dec << ' '
- << setunit('"') << rr << ' ' << radToDeg(angle);
+ str << "; " << type_ << ' '
+ << ra << ' ' << dec << ' '
+ << setprecision(3) << fixed << setunit('"') << rr << ' ';
+ str.unsetf(ios_base::floatfield);
+ str << setprecision(8) << radToDeg(angle);
break;
}
}
@@ -452,7 +463,7 @@ void Ellipse::listSAOimage(ostream& str, int strip)
listSAOimagePre(str);
Vector vv = ptr->mapFromRef(center,Coord::IMAGE);
- str << type_ << '(' << vv << ',' << annuli_[0] << ','
+ str << type_ << '(' << setprecision(8) << vv << ',' << annuli_[0] << ','
<< radToDeg(angle) << ')';
listSAOimagePost(str, strip);
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);
}
diff --git a/tksao/frame/point.C b/tksao/frame/point.C
index cd55e6f..35caf4e 100644
--- a/tksao/frame/point.C
+++ b/tksao/frame/point.C
@@ -764,8 +764,7 @@ void Point::list(ostream& str, Coord::CoordSystem sys, Coord::SkyFrame sky,
case Coord::DEGREES:
{
Vector vv = ptr->mapFromRef(center,sys,sky);
- str << type_ << '('
- << setprecision(10) << vv << ')';
+ str << type_ << '(' << setprecision(10) << vv << ')';
}
break;
case Coord::SEXAGESIMAL:
@@ -866,7 +865,7 @@ void Point::listPros(ostream& str, Coord::CoordSystem sys, Coord::SkyFrame sky,
coord.listProsCoordSystem(str,sys,sky);
str << "; ";
Vector vv = ptr->mapFromRef(center,sys);
- str << type_ << ' ' << vv;
+ str << type_ << ' ' << setprecision(8) << vv;
}
break;
default:
@@ -878,7 +877,7 @@ void Point::listPros(ostream& str, Coord::CoordSystem sys, Coord::SkyFrame sky,
case Coord::DEGREES:
{
Vector vv = ptr->mapFromRef(center,sys,sky);
- str << type_ << ' ' << setunit('d') << vv;
+ str << type_ << ' ' << setprecision(10) << setunit('d') << vv;
}
break;
case Coord::SEXAGESIMAL:
@@ -906,7 +905,7 @@ void Point::listSAOtng(ostream& str, Coord::CoordSystem sys,
case Coord::AMPLIFIER:
{
Vector vv = ptr->mapFromRef(center,Coord::IMAGE);
- str << type_ << '(' << vv << ')';
+ str << type_ << '(' << setprecision(8) << vv << ')';
}
break;
default:
@@ -915,7 +914,7 @@ void Point::listSAOtng(ostream& str, Coord::CoordSystem sys,
case Coord::DEGREES:
{
Vector vv = ptr->mapFromRef(center,sys,sky);
- str << type_ << '(' << vv << ')';
+ str << type_ << '(' << setprecision(10) << vv << ')';
}
break;
case Coord::SEXAGESIMAL:
@@ -937,7 +936,7 @@ void Point::listSAOimage(ostream& str, int strip)
// all coords are in image coords
Vector vv = ptr->mapFromRef(center,Coord::IMAGE);
- str << type_ << '(' << vv << ')';
+ str << type_ << '(' << setprecision(8) << vv << ')';
listSAOimagePost(str, strip);
}
diff --git a/tksao/frame/polygon.C b/tksao/frame/polygon.C
index d86a948..ab3734c 100644
--- a/tksao/frame/polygon.C
+++ b/tksao/frame/polygon.C
@@ -487,7 +487,7 @@ void Polygon::listPros(ostream& str, Coord::CoordSystem sys,
vertex.head();
do {
Vector vv = ptr->mapFromRef(vertex.current()->vector*mm,sys);
- str << ' ' << vv;
+ str << ' ' << setprecision(8) << vv;
}
while (vertex.next());
}
@@ -503,7 +503,7 @@ void Polygon::listPros(ostream& str, Coord::CoordSystem sys,
vertex.head();
do {
Vector vv = ptr->mapFromRef(vertex.current()->vector*mm,sys,sky);
- str << ' ' << setunit('d') << vv;
+ str << ' ' << setprecision(10) << setunit('d') << vv;
}
while (vertex.next());
}
@@ -546,7 +546,7 @@ void Polygon::listSAOtng(ostream& str, Coord::CoordSystem sys,
first=0;
Vector vv = ptr->mapFromRef(vertex.current()->vector*mm,sys);
- str << vv;
+ str << setprecision(8) << vv;
}
while (vertex.next());
str << ')';
@@ -566,7 +566,7 @@ void Polygon::listSAOtng(ostream& str, Coord::CoordSystem sys,
first=0;
Vector vv = ptr->mapFromRef(vertex.current()->vector*mm,sys,sky);
- str << vv;
+ str << setprecision(10) << vv;
}
while (vertex.next());
str << ')';
@@ -611,7 +611,7 @@ void Polygon::listSAOimage(ostream& str, int strip)
first=0;
Vector vv = ptr->mapFromRef(vertex.current()->vector*mm,Coord::IMAGE);
- str << vv;
+ str << setprecision(8) << vv;
}
while (vertex.next());
diff --git a/tksao/frame/text.C b/tksao/frame/text.C
index 8bf47cc..a4824d3 100644
--- a/tksao/frame/text.C
+++ b/tksao/frame/text.C
@@ -295,7 +295,7 @@ void Text::listSAOtng(ostream& str, Coord::CoordSystem sys, Coord::SkyFrame sky,
case Coord::AMPLIFIER:
{
Vector vv = ptr->mapFromRef(center,Coord::IMAGE);
- str << type_ << '(' << vv << ", \"" << text << "\")";
+ str << type_ << '(' << setprecision(8) << vv << ", \"" << text << "\")";
}
break;
default:
@@ -304,7 +304,8 @@ void Text::listSAOtng(ostream& str, Coord::CoordSystem sys, Coord::SkyFrame sky,
case Coord::DEGREES:
{
Vector vv = ptr->mapFromRef(center,sys,sky);
- str << type_ << '(' << vv << ", \"" << text << "\")";
+ str << type_ << '(' << setprecision(10) << vv
+ << ", \"" << text << "\")";
}
break;
case Coord::SEXAGESIMAL: