diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-08-12 18:44:01 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-08-12 18:44:01 (GMT) |
commit | 2dc6fd7bdb85b8e0c901b4978555217b5442df90 (patch) | |
tree | 3301065fc043a78bfb2e6d5692bde3e5492a315c /tksao/frame | |
parent | 2b0d1fc5f0859859e21d15732fb0847aefdd0397 (diff) | |
download | blt-2dc6fd7bdb85b8e0c901b4978555217b5442df90.zip blt-2dc6fd7bdb85b8e0c901b4978555217b5442df90.tar.gz blt-2dc6fd7bdb85b8e0c901b4978555217b5442df90.tar.bz2 |
update wcs precision
Diffstat (limited to 'tksao/frame')
-rw-r--r-- | tksao/frame/annulus.C | 8 | ||||
-rw-r--r-- | tksao/frame/box.C | 9 | ||||
-rw-r--r-- | tksao/frame/boxannulus.C | 8 | ||||
-rw-r--r-- | tksao/frame/bpanda.C | 22 | ||||
-rw-r--r-- | tksao/frame/circle.C | 4 | ||||
-rw-r--r-- | tksao/frame/compass.C | 8 | ||||
-rw-r--r-- | tksao/frame/cpanda.C | 17 | ||||
-rw-r--r-- | tksao/frame/ellipse.C | 4 | ||||
-rw-r--r-- | tksao/frame/ellipseannulus.C | 8 | ||||
-rw-r--r-- | tksao/frame/epanda.C | 22 | ||||
-rw-r--r-- | tksao/frame/line.C | 3 | ||||
-rw-r--r-- | tksao/frame/point.C | 3 | ||||
-rw-r--r-- | tksao/frame/projection.C | 11 | ||||
-rw-r--r-- | tksao/frame/ruler.C | 3 | ||||
-rw-r--r-- | tksao/frame/text.C | 7 | ||||
-rw-r--r-- | tksao/frame/vect.C | 9 |
16 files changed, 73 insertions, 73 deletions
diff --git a/tksao/frame/annulus.C b/tksao/frame/annulus.C index 8ef4807..d870670 100644 --- a/tksao/frame/annulus.C +++ b/tksao/frame/annulus.C @@ -210,9 +210,9 @@ void Annulus::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); - for (int ii=0; ii<numAnnuli_; ii++) + str << setprecision(parent->precLinear_) << ptr->mapFromRef(center,sys); + str << setprecision(parent->precLenLinear_); + for (int ii=0; ii<numAnnuli_; ii++) str << ',' << ptr->mapLenFromRef(annuli_[ii][0],sys); break; default: @@ -228,7 +228,7 @@ void Annulus::list(ostream& str, Coord::CoordSystem sys, Coord::SkyFrame sky, str.unsetf(ios_base::floatfield); } else { - str << setprecision(parent->precLinear_); + str << setprecision(parent->precLenLinear_); for (int ii=0; ii<numAnnuli_; ii++) str << ',' << ptr->mapLenFromRef(annuli_[ii][0],sys); } diff --git a/tksao/frame/box.C b/tksao/frame/box.C index 7257d86..891bfb2 100644 --- a/tksao/frame/box.C +++ b/tksao/frame/box.C @@ -271,9 +271,8 @@ void Box::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_) << ptr->mapFromRef(center,sys) + << ',' << setprecision(parent->precLenLinear_) << rr << ','; break; default: listWCS(ptr,center,sys,sky,format); @@ -285,9 +284,9 @@ void Box::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 << setprecision(parent->precAngle_) << radToDeg(aa) << ')'; listPost(str, conj, strip); } diff --git a/tksao/frame/boxannulus.C b/tksao/frame/boxannulus.C index da662c8..07c5c9e 100644 --- a/tksao/frame/boxannulus.C +++ b/tksao/frame/boxannulus.C @@ -285,8 +285,8 @@ void BoxAnnulus::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); + str << setprecision(parent->precLinear_) << ptr->mapFromRef(center,sys); + str << setprecision(parent->precLenLinear_); for (int ii=0; ii<numAnnuli_; ii++) str << ',' << ptr->mapLenFromRef(annuli_[ii],sys); break; @@ -303,12 +303,12 @@ void BoxAnnulus::list(ostream& str, Coord::CoordSystem sys, Coord::SkyFrame sky, str.unsetf(ios_base::floatfield); } else { - str << setprecision(parent->precLinear_); + str << setprecision(parent->precLenLinear_); for (int ii=0; ii<numAnnuli_; ii++) str << ',' << ptr->mapLenFromRef(annuli_[ii],sys); } } - str << setprecision(parent->precLinear_) << ',' << radToDeg(aa) << ')'; + str << ',' << setprecision(parent->precAngle_) << radToDeg(aa) << ')'; listPost(str, conj, strip); } diff --git a/tksao/frame/bpanda.C b/tksao/frame/bpanda.C index 61a60b3..0c76f35 100644 --- a/tksao/frame/bpanda.C +++ b/tksao/frame/bpanda.C @@ -539,28 +539,30 @@ void Bpanda::listA(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) << ',' - << a1 << ',' << a2 << ',' << numAngles_-1 << ',' - << r1 << ',' << r2 << ',' << numAnnuli_-1 << ','; + str << setprecision(parent->precLinear_) << ptr->mapFromRef(center,sys) + << ',' + << setprecision(parent->precAngle_) << a1 << ',' << a2 << ','; + str << numAngles_-1 << ',' + << setprecision(parent->precLenLinear_) << r1 << ',' << r2 << ','; + str << numAnnuli_-1 << ','; break; default: listWCS(ptr,center,sys,sky,format); str << ra << ',' << dec << ',' - << setprecision(parent->precLinear_) << a1 << ',' << a2 << ',' - << numAngles_-1 << ','; + << setprecision(parent->precLinear_) << a1 << ',' << a2 << ',' ; + str << numAngles_-1 << ','; if (ptr->hasWCSCel(sys)) { str << setprecision(parent->precArcsec_) << fixed << setunit('"') << r1 << ',' << setunit('"') << r2 << ','; str.unsetf(ios_base::floatfield); - str << setprecision(parent->precLinear_) << numAnnuli_-1 << ','; } else - str << setprecision(parent->precLinear_) - << r1 << ',' << r2 << ',' << numAnnuli_-1 << ','; + str << setprecision(parent->precLenLinear_) << r1 << ',' << r2 << ','; + + str << numAnnuli_-1 << ','; } - str << setprecision(parent->precLinear_) << radToDeg(aa) << ')'; + str << setprecision(parent->precAngle_) << radToDeg(aa) << ')'; listPost(str, conj, strip); } diff --git a/tksao/frame/circle.C b/tksao/frame/circle.C index 9595756..709b256 100644 --- a/tksao/frame/circle.C +++ b/tksao/frame/circle.C @@ -223,8 +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)<< ',' - << setprecision(parent->precLenLinear_) << rr; + str << setprecision(parent->precLinear_)<<ptr->mapFromRef(center,sys) + << ',' << setprecision(parent->precLenLinear_) << rr; break; default: listWCS(ptr,center,sys,sky,format); diff --git a/tksao/frame/compass.C b/tksao/frame/compass.C index 7dc004b..d78eb36 100644 --- a/tksao/frame/compass.C +++ b/tksao/frame/compass.C @@ -562,9 +562,9 @@ void Compass::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_) << ptr->mapFromRef(center,sys) + << ',' + << setprecision(parent->precLenLinear_) << rr; break; default: listWCS(ptr,center,sys,sky,format); @@ -575,7 +575,7 @@ void Compass::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 << ')'; diff --git a/tksao/frame/cpanda.C b/tksao/frame/cpanda.C index 589920c..93fa227 100644 --- a/tksao/frame/cpanda.C +++ b/tksao/frame/cpanda.C @@ -509,25 +509,26 @@ void Cpanda::listA(ostream& str, Coord::CoordSystem sys, Coord::SkyFrame sky, case Coord::AMPLIFIER: str << setprecision(parent->precLinear_) << ptr->mapFromRef(center,sys) << ',' - << a1 << ',' << a2 << ',' << numAngles_-1 << ',' - << r1 << ',' << r2 << ',' << numAnnuli_-1; + << setprecision(parent->precAngle_) << a1 << ',' << a2 << ','; + str << numAngles_-1 << ',' + << setprecision(parent->precLenLinear_) << r1 << ',' << r2 << ','; + str << numAnnuli_-1; break; default: listWCS(ptr,center,sys,sky,format); str << ra << ',' << dec << ',' - << setprecision(parent->precLinear_) << a1 << ',' << a2 << ',' - << numAngles_-1 << ','; + << setprecision(parent->precAngle_) << a1 << ',' << a2 << ','; + str << numAngles_-1 << ','; if (ptr->hasWCSCel(sys)) { str << setprecision(parent->precArcsec_) << fixed << r1 << '"' << ',' << r2 << '"' << ','; str.unsetf(ios_base::floatfield); - str << setprecision(parent->precLinear_) << numAnnuli_-1; - } else - str << setprecision(parent->precLinear_) - << r1 << ',' << r2 << ',' << numAnnuli_-1; + str << setprecision(parent->precLenLinear_) << r1 << ',' << r2 << ','; + + str << numAnnuli_-1; } str << ')'; diff --git a/tksao/frame/ellipse.C b/tksao/frame/ellipse.C index 4e155c4..f242340 100644 --- a/tksao/frame/ellipse.C +++ b/tksao/frame/ellipse.C @@ -245,8 +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) << ',' - << setprecision(parent->precLenLinear_) << rr << ','; + str << setprecision(parent->precLinear_) << ptr->mapFromRef(center,sys) + << ',' << setprecision(parent->precLenLinear_) << rr << ','; break; default: listWCS(ptr,center,sys,sky,format); diff --git a/tksao/frame/ellipseannulus.C b/tksao/frame/ellipseannulus.C index d359599..d0f7a03 100644 --- a/tksao/frame/ellipseannulus.C +++ b/tksao/frame/ellipseannulus.C @@ -253,8 +253,8 @@ void EllipseAnnulus::list(ostream& str, Coord::CoordSystem sys, case Coord::PHYSICAL: case Coord::DETECTOR: case Coord::AMPLIFIER: - str << setprecision(parent->precLinear_) - << ptr->mapFromRef(center,sys); + str << setprecision(parent->precLinear_) << ptr->mapFromRef(center,sys); + str << setprecision(parent->precLenLinear_); for (int ii=0; ii<numAnnuli_; ii++) str << ',' << ptr->mapLenFromRef(annuli_[ii],sys); break; @@ -271,12 +271,12 @@ void EllipseAnnulus::list(ostream& str, Coord::CoordSystem sys, str.unsetf(ios_base::floatfield); } else { - str << setprecision(parent->precLinear_); + str << setprecision(parent->precLenLinear_); for (int ii=0; ii<numAnnuli_; ii++) str << ',' << ptr->mapLenFromRef(annuli_[ii],sys); } } - str << setprecision(parent->precLinear_) << ',' << radToDeg(aa) << ')'; + str << ',' << setprecision(parent->precAngle_) << radToDeg(aa) << ')'; listPost(str, conj, strip); } diff --git a/tksao/frame/epanda.C b/tksao/frame/epanda.C index 6326ae6..7528b97 100644 --- a/tksao/frame/epanda.C +++ b/tksao/frame/epanda.C @@ -503,28 +503,30 @@ void Epanda::listA(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) << ',' - << a1 << ',' << a2 << ',' << numAngles_-1 << ',' - << r1 << ',' << r2 << ',' << numAnnuli_-1 << ','; + str << setprecision(parent->precLinear_) << ptr->mapFromRef(center,sys) + << ',' + << setprecision(parent->precAngle_) << a1 << ',' << a2 << ','; + str << numAngles_-1 << ',' + << setprecision(parent->precLenLinear_) << r1 << ',' << r2 << ','; + str << numAnnuli_-1 << ','; break; default: listWCS(ptr,center,sys,sky,format); str << ra << ',' << dec << ',' - << setprecision(parent->precLinear_) << a1 << ',' << a2 <<',' - << numAngles_-1 << ','; + << setprecision(parent->precAngle_) << a1 << ',' << a2 << ','; + str << numAngles_-1 << ','; if (ptr->hasWCSCel(sys)) { str << setprecision(parent->precArcsec_) << fixed << setunit('"') << setunit('"') << r1 << ',' << setunit('"') << r2 << ','; str.unsetf(ios_base::floatfield); - str << setprecision(parent->precLinear_) << numAnnuli_-1 << ','; } else - str << setprecision(parent->precLinear_) - << r1 << ',' << r2 << ',' << numAnnuli_-1 << ','; + str << setprecision(parent->precLenLinear_) << r1 << ',' << r2 << ','; + + str << numAnnuli_-1 << ','; } - str << setprecision(parent->precLinear_) << radToDeg(aa) << ')'; + str << setprecision(parent->precAngle_) << radToDeg(aa) << ')'; listPost(str, conj, strip); } diff --git a/tksao/frame/line.C b/tksao/frame/line.C index b7f3ad0..ad19d04 100644 --- a/tksao/frame/line.C +++ b/tksao/frame/line.C @@ -212,8 +212,7 @@ void Line::list(ostream& str, Coord::CoordSystem sys, Coord::SkyFrame sky, case Coord::DETECTOR: case Coord::AMPLIFIER: str << setprecision(parent->precLinear_) - << ptr->mapFromRef(p1,sys) << ',' - << ptr->mapFromRef(p2,sys); + << ptr->mapFromRef(p1,sys) << ',' << ptr->mapFromRef(p2,sys); break; default: listWCS(ptr,p1,sys,sky,format); diff --git a/tksao/frame/point.C b/tksao/frame/point.C index a86eecf..0cf50da 100644 --- a/tksao/frame/point.C +++ b/tksao/frame/point.C @@ -760,8 +760,7 @@ void Point::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); + str << setprecision(parent->precLinear_) << ptr->mapFromRef(center,sys); break; default: listWCS(ptr,center,sys,sky,format); diff --git a/tksao/frame/projection.C b/tksao/frame/projection.C index 9a3c377..2f4d0c9 100644 --- a/tksao/frame/projection.C +++ b/tksao/frame/projection.C @@ -342,7 +342,7 @@ void Projection::list(ostream& str, Coord::CoordSystem sys, Coord::SkyFrame sky, FitsImage* ptr = parent->findFits(sys,center); listPre(str, sys, sky, ptr, strip, 1); - double ww = ptr->mapLenFromRef(width,sys,Coord::ARCSEC); + double rr = ptr->mapLenFromRef(width,sys,Coord::ARCSEC); str << type_ << '('; switch (sys) { @@ -351,9 +351,8 @@ void Projection::list(ostream& str, Coord::CoordSystem sys, Coord::SkyFrame sky, case Coord::DETECTOR: case Coord::AMPLIFIER: str << setprecision(parent->precLinear_) - << ptr->mapFromRef(p1,sys) << ',' - << ptr->mapFromRef(p2,sys) << ',' - << ww; + << ptr->mapFromRef(p1,sys) << ',' << ptr->mapFromRef(p2,sys) << ',' + << setprecision(parent->precLenLinear_) << rr; break; default: listWCS(ptr,p1,sys,sky,format); @@ -362,11 +361,11 @@ void Projection::list(ostream& str, Coord::CoordSystem sys, Coord::SkyFrame sky, str << ra << ',' << dec << ','; if (ptr->hasWCSCel(sys)) { - str << setprecision(parent->precArcsec_) << fixed << ww << '"'; + str << setprecision(parent->precArcsec_) << fixed << rr << '"'; str.unsetf(ios_base::floatfield); } else - str << setprecision(parent->precLinear_) << ww; + str << setprecision(parent->precLenLinear_) << rr; } str << ')'; diff --git a/tksao/frame/ruler.C b/tksao/frame/ruler.C index 81da5d0..d2e60a0 100644 --- a/tksao/frame/ruler.C +++ b/tksao/frame/ruler.C @@ -497,8 +497,7 @@ void Ruler::list(ostream& str, Coord::CoordSystem sys, Coord::SkyFrame sky, case Coord::DETECTOR: case Coord::AMPLIFIER: str << setprecision(parent->precLinear_) - << ptr->mapFromRef(p1,sys) << ',' - << ptr->mapFromRef(p2,sys); + << ptr->mapFromRef(p1,sys) << ',' << ptr->mapFromRef(p2,sys); break; default: listWCS(ptr,p1,sys,sky,format); diff --git a/tksao/frame/text.C b/tksao/frame/text.C index 6a85da1..acc92c1 100644 --- a/tksao/frame/text.C +++ b/tksao/frame/text.C @@ -223,8 +223,7 @@ void Text::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); + str << setprecision(parent->precLinear_) << ptr->mapFromRef(center,sys); break; default: listWCS(ptr,center,sys,sky,format); @@ -236,7 +235,9 @@ void Text::list(ostream& str, Coord::CoordSystem sys, Coord::SkyFrame sky, str << " ||"; if (angle != 0) - str << " textangle=" << radToDeg(parent->mapAngleFromRef(angle,sys,sky)); + str << " textangle=" << setprecision(parent->precAngle_) + << radToDeg(parent->mapAngleFromRef(angle,sys,sky)); + if (!rotate) str << " textrotate=" << 0; listProperties(str, 0); diff --git a/tksao/frame/vect.C b/tksao/frame/vect.C index 7e37435..9623e5e 100644 --- a/tksao/frame/vect.C +++ b/tksao/frame/vect.C @@ -68,9 +68,8 @@ void Vect::list(ostream& str, Coord::CoordSystem sys, Coord::SkyFrame sky, case Coord::PHYSICAL: case Coord::DETECTOR: case Coord::AMPLIFIER: - str << setprecision(parent->precLinear_) - << ptr->mapFromRef(p1,sys) << ',' - << rr << ','; + str << setprecision(parent->precLinear_) << ptr->mapFromRef(p1,sys) << ',' + << setprecision(parent->precLenLinear_) << rr << ','; break; default: listWCS(ptr,p1,sys,sky,format); @@ -81,9 +80,9 @@ void Vect::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 << setprecision(parent->precAngle_) << radToDeg(aa) << ')'; if (conj) str << " ||"; |