summaryrefslogtreecommitdiffstats
path: root/tksao/frame/epanda.C
diff options
context:
space:
mode:
Diffstat (limited to 'tksao/frame/epanda.C')
-rw-r--r--tksao/frame/epanda.C63
1 files changed, 27 insertions, 36 deletions
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)
{