From 9d9d7ab0aba73a167d37826165708c7ce3b53c72 Mon Sep 17 00:00:00 2001 From: William Joye Date: Sun, 12 Aug 2018 14:04:39 -0400 Subject: update wcs precision --- tksao/frame/circle.C | 20 ++++++++++---------- tksao/frame/ellipse.C | 44 +++++++++++++++++++++----------------------- 2 files changed, 31 insertions(+), 33 deletions(-) diff --git a/tksao/frame/circle.C b/tksao/frame/circle.C index 45ce9b2..9595756 100644 --- a/tksao/frame/circle.C +++ b/tksao/frame/circle.C @@ -223,9 +223,8 @@ void Circle::list(ostream& str, Coord::CoordSystem sys, Coord::SkyFrame sky, case Coord::PHYSICAL: case Coord::DETECTOR: case Coord::AMPLIFIER: - str << setprecision(parent->precLinear_) - << ptr->mapFromRef(center,sys) << ',' - << rr; + str << setprecision(parent->precLinear_)<mapFromRef(center,sys)<< ',' + << setprecision(parent->precLenLinear_) << rr; break; default: listWCS(ptr,center,sys,sky,format); @@ -236,7 +235,7 @@ void Circle::list(ostream& str, Coord::CoordSystem sys, Coord::SkyFrame sky, str.unsetf(ios_base::floatfield); } else - str << setprecision(parent->precLinear_) << rr; + str << setprecision(parent->precLenLinear_) << rr; } str << ')'; @@ -294,7 +293,7 @@ void Circle::listCiao(ostream& str, Coord::CoordSystem sys, int strip) Vector vv = ptr->mapFromRef(center,Coord::PHYSICAL); double rr = ptr->mapLenFromRef(annuli_[0][0],Coord::PHYSICAL); str << type_ << '(' << setprecision(parent->precLinear_) << vv << ',' - << rr << ')'; + << setprecision(parent->precLenLinear_) << rr << ')'; } break; default: @@ -326,7 +325,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(parent->precLinear_) << vv << ',' - << rr << ')'; + << setprecision(parent->precLenLinear_) << rr << ')'; } break; default: @@ -335,7 +334,7 @@ void Circle::listSAOtng(ostream& str, double rr = ptr->mapLenFromRef(annuli_[0][0],Coord::IMAGE); str << type_ << '(' << ra << ',' << dec << ',' - << setprecision(parent->precLinear_) << rr << ')'; + << setprecision(parent->precLenLinear_) << rr << ')'; } } @@ -357,8 +356,9 @@ 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(parent->precLinear_) - << vv << ' ' << rr; + str << "; " << type_ << ' ' + << setprecision(parent->precLinear_) << vv << ' ' + << setprecision(parent->precLenLinear_) << rr; } break; default: @@ -390,7 +390,7 @@ void Circle::listSAOimage(ostream& str, int strip) Vector vv = ptr->mapFromRef(center,Coord::IMAGE); str << type_ << '(' << setprecision(parent->precLinear_) << vv << ',' - << annuli_[0][0] << ')'; + << setprecision(parent->precLenLinear_) << annuli_[0][0] << ')'; listSAOimagePost(str, strip); } diff --git a/tksao/frame/ellipse.C b/tksao/frame/ellipse.C index ff665f6..4a0662b 100644 --- a/tksao/frame/ellipse.C +++ b/tksao/frame/ellipse.C @@ -245,9 +245,8 @@ void Ellipse::list(ostream& str, Coord::CoordSystem sys, Coord::SkyFrame sky, case Coord::PHYSICAL: case Coord::DETECTOR: case Coord::AMPLIFIER: - str << setprecision(parent->precLinear_) - << ptr->mapFromRef(center,sys) << ',' - << rr << ','; + str << setprecision(parent->precLinear_)<mapFromRef(center,sys) << ',' + << setprecision(parent->precLenLinear_) << rr << ','; break; default: listWCS(ptr,center,sys,sky,format); @@ -259,9 +258,9 @@ void Ellipse::list(ostream& str, Coord::CoordSystem sys, Coord::SkyFrame sky, str.unsetf(ios_base::floatfield); } else - str << setprecision(parent->precLinear_) << rr << ',' ; + str << setprecision(parent->precLenLinear_) << rr << ',' ; } - str << setprecision(parent->precLinear_) << radToDeg(aa) << ')'; + str << radToDeg(aa) << ')'; listPost(str, conj, strip); } @@ -318,8 +317,7 @@ void Ellipse::listCiao(ostream& str, Coord::CoordSystem sys, int strip) Vector vv = ptr->mapFromRef(center,Coord::PHYSICAL); Vector rr = ptr->mapLenFromRef(annuli_[0],Coord::PHYSICAL); str << type_ << '(' << setprecision(parent->precLinear_) << vv << ',' - << rr << ',' - << radToDeg(angle) << ')'; + << setprecision(parent->precLenLinear_) << rr << ','; } break; default: @@ -327,13 +325,13 @@ void Ellipse::listCiao(ostream& str, Coord::CoordSystem sys, int strip) listWCS(ptr,center,sys,Coord::FK5,Coord::SEXAGESIMAL); Vector rr = ptr->mapLenFromRef(annuli_[0],sys,Coord::ARCMIN); str << type_ << '(' << ra << ',' << dec << ',' - << setprecision(parent->precArcmin_) << fixed << setunit('\'') - << rr << ','; + << setprecision(parent->precArcmin_) << fixed << setunit('\''); str.unsetf(ios_base::floatfield); - str << setprecision(parent->precLinear_) << radToDeg(angle) << ')'; + str << setprecision(parent->precLenLinear_) << rr << ','; } break; } + str << radToDeg(angle) << ')'; listCiaoPost(str, strip); } @@ -356,8 +354,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(parent->precLinear_) << vv << ',' - << rr << ',' - << radToDeg(angle) << ')'; + << setprecision(parent->precLinear_) << rr << ','; } break; default: @@ -365,10 +362,10 @@ void Ellipse::listSAOtng(ostream& str, Coord::CoordSystem sys, listWCS(ptr,center,sys,sky,format); Vector rr = ptr->mapLenFromRef(annuli_[0],Coord::IMAGE); str << type_ << '(' << ra << ',' << dec << ',' - << setprecision(parent->precLinear_) << rr << ',' - << setprecision(parent->precLinear_) << radToDeg(angle) << ')'; + << setprecision(parent->precLenLinear_) << rr << ','; } } + str << radToDeg(angle) << ')'; listSAOtngPost(str, strip); } @@ -389,9 +386,9 @@ 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(parent->precLinear_) - << vv << ' ' << rr << ' ' - << radToDeg(angle); + str << "; " << type_ << ' ' + << setprecision(parent->precLinear_) << vv << ' ' + << setprecision(parent->precLenLinear_) << rr << ' '; } break; default: @@ -408,12 +405,12 @@ void Ellipse::listPros(ostream& str, Coord::CoordSystem sys, str << ra << ' ' << dec << ' '; break; } - str << setprecision(parent->precArcsec_) << fixed << setunit('"') - << rr << ' '; + str << setprecision(parent->precArcsec_) << fixed << setunit('"'); str.unsetf(ios_base::floatfield); - str << setprecision(parent->precLinear_) << radToDeg(angle); + str << setprecision(parent->precLenLinear_) << rr << ' '; } } + str << radToDeg(angle); listProsPost(str, strip); } @@ -424,9 +421,10 @@ void Ellipse::listSAOimage(ostream& str, int strip) listSAOimagePre(str); Vector vv = ptr->mapFromRef(center,Coord::IMAGE); - str << type_ << '(' << setprecision(parent->precLinear_) << vv << ',' - << annuli_[0] << ',' - << radToDeg(angle) << ')'; + str << type_ << '(' + << setprecision(parent->precLinear_) << vv << ',' + << setprecision(parent->precLinear_) << annuli_[0] << ','; + str << radToDeg(angle) << ')'; listSAOimagePost(str, strip); } -- cgit v0.12