summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tksao/frame/cpanda.C4
-rw-r--r--tksao/frame/epanda.C63
-rw-r--r--tksao/frame/epanda.h2
3 files changed, 30 insertions, 39 deletions
diff --git a/tksao/frame/cpanda.C b/tksao/frame/cpanda.C
index 20d3160..e1524e3 100644
--- a/tksao/frame/cpanda.C
+++ b/tksao/frame/cpanda.C
@@ -519,8 +519,10 @@ void Cpanda::listA(ostream& str, Coord::CoordSystem sys, Coord::SkyFrame sky,
if (ptr->hasWCSCel(sys)) {
str << setprecision(parent->precArcsec_) << fixed
- << r1 << '"' << ',' << r2 << '"' << ',' << numAnnuli_-1 << ')';
+ << r1 << '"' << ',' << r2 << '"' << ',';
str.unsetf(ios_base::floatfield);
+ str << setprecision(parent->precLinear_) << numAnnuli_-1 << ')';
+
}
else
str << setprecision(parent->precLinear_)
diff --git a/tksao/frame/epanda.C b/tksao/frame/epanda.C
index e2e4ee8..b5edd53 100644
--- a/tksao/frame/epanda.C
+++ b/tksao/frame/epanda.C
@@ -489,58 +489,49 @@ void Epanda::listA(ostream& str, Coord::CoordSystem sys, Coord::SkyFrame sky,
FitsImage* ptr = parent->findFits(sys,center);
listPre(str, sys, sky, ptr, strip, 0);
+ Vector r1 = ptr->mapLenFromRef(annuli_[0],sys,Coord::ARCSEC);
+ Vector r2 = ptr->mapLenFromRef(annuli_[numAnnuli_-1],sys,Coord::ARCSEC);
+ double a1 = radToDeg(parent->mapAngleFromRef(angles_[0],sys,sky));
+ double a2 = radToDeg(parent->mapAngleFromRef(angles_[numAngles_-1],sys,sky));
+ double aa = parent->mapAngleFromRef(angle,sys,sky);
+ if (a2<=a1+FLT_EPSILON)
+ a2 += 360;
+
switch (sys) {
case Coord::IMAGE:
case Coord::PHYSICAL:
case Coord::DETECTOR:
case Coord::AMPLIFIER:
- listANonCel(ptr, str, sys);
+ str << type_ << '(' << setprecision(parent->precLinear_)
+ << ptr->mapFromRef(center,sys) << ','
+ << a1 << ',' << a2 << ',' << numAngles_-1 << ','
+ << r1 << ',' << r2 << ',' << numAnnuli_-1 << ','
+ << radToDeg(aa) << ')';
break;
default:
- if (ptr->hasWCSCel(sys)) {
- double a1 = radToDeg(parent->mapAngleFromRef(angles_[0],sys,sky));
- double a2 = radToDeg(parent->mapAngleFromRef(angles_[numAngles_-1],sys,sky));
- Vector r1 = ptr->mapLenFromRef(annuli_[0],sys,Coord::ARCSEC);
- Vector r2 = ptr->mapLenFromRef(annuli_[numAnnuli_-1],sys,Coord::ARCSEC);
- double aa = parent->mapAngleFromRef(angle,sys,sky);
- if (a2<=a1+FLT_EPSILON)
- a2 += 360;
+ listWCS(ptr,center,sys,sky,format);
+ str << type_ << '('
+ << ra << ',' << dec << ','
+ << setprecision(parent->precLinear_) << a1 << ',' << a2 <<','
+ << numAngles_-1 << ',';
- listWCS(ptr,center,sys,sky,format);
- str << type_ << '('
- << ra << ',' << dec << ','
- << setprecision(parent->precLinear_) << a1 << ',' << a2 <<','
- << numAngles_-1 << ','
- << setprecision(parent->precArcsec_) << fixed << setunit('"')
+ if (ptr->hasWCSCel(sys)) {
+ str << setprecision(parent->precArcsec_) << fixed << setunit('"')
<< r1 << ',' << setunit('"') << r2 << ',';
str.unsetf(ios_base::floatfield);
- str << setprecision(parent->precLinear_) << numAnnuli_-1 << ','
- << setprecision(parent->precLinear_) << radToDeg(aa) << ')';
+ str << setprecision(parent->precLinear_) << numAnnuli_-1 << ',';
}
- else
- listANonCel(ptr, str, sys);
+ else {
+ str << setprecision(parent->precLinear_)
+ << r1 << ',' << r2 << ',' << numAnnuli_-1 << ',';
+ }
+
+ str << setprecision(parent->precLinear_) << radToDeg(aa) << ')';
}
listPost(str, conj, strip);
}
-void Epanda::listANonCel(FitsImage* ptr, ostream& str, Coord::CoordSystem sys)
-{
- double a1 = radToDeg(parent->mapAngleFromRef(angles_[0],sys));
- double a2 = radToDeg(parent->mapAngleFromRef(angles_[numAngles_-1],sys));
- if (a2<=a1+FLT_EPSILON)
- a2 += 360;
-
- Vector vv = ptr->mapFromRef(center,sys);
- Vector r1 = ptr->mapLenFromRef(annuli_[0],sys);
- Vector r2 = ptr->mapLenFromRef(annuli_[numAnnuli_-1],sys);
- double aa = parent->mapAngleFromRef(angle,sys);
- str << type_ << '(' << setprecision(parent->precLinear_) << vv << ','
- << a1 << ',' << a2 << ',' << numAngles_-1 << ','
- << r1 << ',' << r2 << ',' << numAnnuli_-1 << ','
- << radToDeg(aa) << ')';
-}
-
void Epanda::listB(ostream& str, Coord::CoordSystem sys, Coord::SkyFrame sky,
Coord::SkyFormat format, int conj, int strip)
{
diff --git a/tksao/frame/epanda.h b/tksao/frame/epanda.h
index 3319d6f..6214a87 100644
--- a/tksao/frame/epanda.h
+++ b/tksao/frame/epanda.h
@@ -25,8 +25,6 @@ class Epanda : public BaseEllipse {
void listB(ostream&, Coord::CoordSystem, Coord::SkyFrame,
Coord::SkyFormat, int, int);
- void listANonCel(FitsImage*, ostream&, Coord::CoordSystem);
-
void listBNonCel(FitsImage*, ostream&,
Coord::CoordSystem, Coord::SkyFrame,
Coord::SkyFormat, int, int);