summaryrefslogtreecommitdiffstats
path: root/tksao/frame
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2017-03-21 16:29:17 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2017-03-21 16:29:17 (GMT)
commit078329136ce02fc6578728f08906ed88738a92f1 (patch)
tree6ec6a6ec967fd773bced5f61eceb8d1056067251 /tksao/frame
parent28b383c0d366adf7174caa656554ef09b9775ac1 (diff)
downloadblt-078329136ce02fc6578728f08906ed88738a92f1.zip
blt-078329136ce02fc6578728f08906ed88738a92f1.tar.gz
blt-078329136ce02fc6578728f08906ed88738a92f1.tar.bz2
clean up region list code
Diffstat (limited to 'tksao/frame')
-rw-r--r--tksao/frame/box.C34
-rw-r--r--tksao/frame/circle.C26
-rw-r--r--tksao/frame/ellipse.C34
-rw-r--r--tksao/frame/polygon.C10
4 files changed, 35 insertions, 69 deletions
diff --git a/tksao/frame/box.C b/tksao/frame/box.C
index 5c4908b..0497735 100644
--- a/tksao/frame/box.C
+++ b/tksao/frame/box.C
@@ -391,8 +391,7 @@ 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_ << '(' << setprecision(8) << vv << ',' << rr << ','
- << radToDeg(angle) << ')';
+ str << type_ << '(' << vv << ',' << rr << ',' << radToDeg(angle) << ')';
}
break;
default:
@@ -402,18 +401,14 @@ void Box::listSAOtng(ostream& str, Coord::CoordSystem sys, Coord::SkyFrame sky,
case Coord::DEGREES:
{
Vector vv = ptr->mapFromRef(center,sys,sky);
- str << type_ << '('
- << setprecision(10) << vv << ','
- << setprecision(8) << rr << ','
- << setprecision(8) << radToDeg(angle) << ')';
+ str << type_ << '(' << vv << ',' << rr << ','
+ << radToDeg(angle) << ')';
}
break;
case Coord::SEXAGESIMAL:
listRADEC(ptr,center,sys,sky,format);
- str << type_ << '('
- << ra << ',' << dec << ','
- << setprecision(8) << rr << ','
- << setprecision(8) << radToDeg(angle) << ')';
+ str << type_ << '(' << ra << ',' << dec << ',' << rr << ','
+ << radToDeg(angle) << ')';
break;
}
}
@@ -437,8 +432,7 @@ 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_ << ' ' << setprecision(8) << vv << ' ' << rr << ' '
- << radToDeg(angle);
+ str << "; "<< type_ << ' ' << vv << ' ' << rr << ' ' << radToDeg(angle);
}
break;
default:
@@ -449,21 +443,15 @@ 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_ << ' '
- << setprecision(10) << setunit('d') << vv << ' '
- << setprecision(3) << fixed << setunit('"') << rr << ' ';
- str.unsetf(ios_base::floatfield);
- str << setprecision(8) << radToDeg(angle);
+ str << "; " << type_ << ' ' << setunit('d') << vv << ' '
+ << setunit('"') << rr << ' ' << radToDeg(angle);
}
break;
case Coord::SEXAGESIMAL:
listRADECPros(ptr,center,sys,sky,format);
coord.listProsCoordSystem(str,sys,sky);
- str << "; " << type_ << ' '
- << ra << ' ' << dec << ' '
- << setprecision(3) << fixed << setunit('"') << rr << ' ';
- str.unsetf(ios_base::floatfield);
- str << setprecision(8) << radToDeg(angle);
+ str << "; " << type_ << ' ' << ra << ' ' << dec << ' '
+ << setunit('"') << rr << ' ' << radToDeg(angle);
break;
}
}
@@ -478,7 +466,7 @@ void Box::listSAOimage(ostream& str, int strip)
listSAOimagePre(str);
Vector vv = ptr->mapFromRef(center,Coord::IMAGE);
- str << type_ << '(' << setprecision(8) << vv << ',' << annuli_[0] << ','
+ str << type_ << '(' << vv << ',' << annuli_[0] << ','
<< radToDeg(angle) << ')';
listSAOimagePost(str, strip);
diff --git a/tksao/frame/circle.C b/tksao/frame/circle.C
index 4b9dad2..42d75c4 100644
--- a/tksao/frame/circle.C
+++ b/tksao/frame/circle.C
@@ -281,7 +281,7 @@ void Circle::listNonCel(FitsImage* ptr, ostream& str, Coord::CoordSystem sys)
{
Vector vv = ptr->mapFromRef(center,sys);
double rr = ptr->mapLenFromRef(annuli_[0][0],sys);
- str << type_ << '(' << setprecision(8) << vv << ',' << rr << ')';
+ str << type_ << '(' << setprecision(8) << vv << ',' << rr << ')';
}
void Circle::listXML(ostream& str, Coord::CoordSystem sys, Coord::SkyFrame sky,
@@ -346,7 +346,7 @@ void Circle::listSAOtng(ostream& str,
{
Vector vv = ptr->mapFromRef(center,Coord::IMAGE);
double rr = ptr->mapLenFromRef(annuli_[0][0],Coord::IMAGE);
- str << type_ << '(' << setprecision(8) << vv << ',' << rr << ')';
+ str << type_ << '(' << vv << ',' << rr << ')';
}
break;
default:
@@ -356,16 +356,12 @@ void Circle::listSAOtng(ostream& str,
case Coord::DEGREES:
{
Vector vv = ptr->mapFromRef(center,sys,sky);
- str << type_ << '('
- << setprecision(10) << vv << ','
- << setprecision(8) << rr << ')';
+ str << type_ << '(' << vv << ',' << rr << ')';
}
break;
case Coord::SEXAGESIMAL:
listRADEC(ptr,center,sys,sky,format);
- str << type_ << '('
- << ra << ',' << dec << ','
- << setprecision(8) << rr << ')';
+ str << type_ << '(' << ra << ',' << dec << ',' << rr << ')';
break;
}
}
@@ -389,7 +385,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_ << ' ' << setprecision(8) << vv << ' ' << rr;
+ str << "; " << type_ << ' ' << vv << ' ' << rr;
}
break;
default:
@@ -400,19 +396,13 @@ 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_ << ' '
- << setprecision(10) << setunit('d') << vv << ' '
- << setprecision(3) << fixed << rr << '"';
- str.unsetf(ios_base::floatfield);
+ str << "; " << type_ << ' ' << setunit('d') << vv << ' ' << rr << '"';
}
break;
case Coord::SEXAGESIMAL:
listRADECPros(ptr,center,sys,sky,format);
coord.listProsCoordSystem(str,sys,sky);
- str << "; " << type_ << ' '
- << ra << ' ' << dec << ' '
- << setprecision(3) << fixed << rr << '"';
- str.unsetf(ios_base::floatfield);
+ str << "; " << type_ << ' ' << ra << ' ' << dec << ' ' << rr << '"';
break;
}
}
@@ -427,7 +417,7 @@ void Circle::listSAOimage(ostream& str, int strip)
listSAOimagePre(str);
Vector vv = ptr->mapFromRef(center,Coord::IMAGE);
- str << type_ << '(' << setprecision(8) << vv << ',' << annuli_[0][0] << ')';
+ str << type_ << '(' << vv << ',' << annuli_[0][0] << ')';
listSAOimagePost(str, strip);
}
diff --git a/tksao/frame/ellipse.C b/tksao/frame/ellipse.C
index 34069a4..2ac7f8d 100644
--- a/tksao/frame/ellipse.C
+++ b/tksao/frame/ellipse.C
@@ -378,8 +378,7 @@ 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_ << '(' << setprecision(8) << vv << ',' << rr << ','
- << radToDeg(angle) << ')';
+ str << type_ << '(' << vv << ',' << rr << ',' << radToDeg(angle) << ')';
}
break;
default:
@@ -389,18 +388,14 @@ void Ellipse::listSAOtng(ostream& str, Coord::CoordSystem sys,
case Coord::DEGREES:
{
Vector vv = ptr->mapFromRef(center,sys,sky);
- str << type_ << '('
- << setprecision(10) << vv << ','
- << setprecision(8) << rr << ','
- << setprecision(8) << radToDeg(angle) << ')';
+ str << type_ << '(' << vv << ',' << rr << ','
+ << radToDeg(angle) << ')';
}
break;
case Coord::SEXAGESIMAL:
listRADEC(ptr,center,sys,sky,format);
- str << type_ << '('
- << ra << ',' << dec << ','
- << setprecision(8) << rr << ','
- << setprecision(8) << radToDeg(angle) << ')';
+ str << type_ << '(' << ra << ',' << dec << ',' << rr << ','
+ << radToDeg(angle) << ')';
break;
}
}
@@ -425,8 +420,7 @@ 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_ << ' ' << setprecision(8) << vv << ' ' << rr << ' '
- << radToDeg(angle);
+ str << "; " << type_ << ' ' << vv << ' ' << rr << ' ' << radToDeg(angle);
}
break;
default:
@@ -437,21 +431,15 @@ void Ellipse::listPros(ostream& str, Coord::CoordSystem sys,
{
Vector vv = ptr->mapFromRef(center,sys,sky);
coord.listProsCoordSystem(str,sys,sky);
- str << "; " << type_ << ' '
- << setprecision(10) << setunit('d') << vv << ' '
- << setprecision(3) << fixed << setunit('"') << rr << ' ';
- str.unsetf(ios_base::floatfield);
- str << setprecision(8) << radToDeg(angle);
+ str << "; " << type_ << ' ' << setunit('d') << vv << ' '
+ << setunit('"') << rr << ' ' << radToDeg(angle);
}
break;
case Coord::SEXAGESIMAL:
listRADECPros(ptr,center,sys,sky,format);
coord.listProsCoordSystem(str,sys,sky);
- str << "; " << type_ << ' '
- << ra << ' ' << dec << ' '
- << setprecision(3) << fixed << setunit('"') << rr << ' ';
- str.unsetf(ios_base::floatfield);
- str << setprecision(8) << radToDeg(angle);
+ str << "; " << type_ << ' ' << ra << ' ' << dec << ' '
+ << setunit('"') << rr << ' ' << radToDeg(angle);
break;
}
}
@@ -466,7 +454,7 @@ void Ellipse::listSAOimage(ostream& str, int strip)
listSAOimagePre(str);
Vector vv = ptr->mapFromRef(center,Coord::IMAGE);
- str << type_ << '(' << setprecision(8) << vv << ',' << annuli_[0] << ','
+ str << type_ << '(' << vv << ',' << annuli_[0] << ','
<< radToDeg(angle) << ')';
listSAOimagePost(str, strip);
diff --git a/tksao/frame/polygon.C b/tksao/frame/polygon.C
index 29fbe67..d86a948 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 << ' ' << setprecision(8) << vv;
+ str << ' ' << 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 << ' ' << setprecision(10) << setunit('d') << vv;
+ str << ' ' << 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 << setprecision(8) << vv;
+ str << 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 << setprecision(10) << vv;
+ str << 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 << setprecision(8) << vv;
+ str << vv;
}
while (vertex.next());