summaryrefslogtreecommitdiffstats
path: root/tksao/frame
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2017-12-12 18:04:51 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2017-12-12 18:04:51 (GMT)
commita5640dad083deca5300b21c823107fc106029421 (patch)
treef193659f76f536d5b830a89f0e129588b8a243b1 /tksao/frame
parentf66b225026825e8972bd5db0e1695c38661fea84 (diff)
downloadblt-a5640dad083deca5300b21c823107fc106029421.zip
blt-a5640dad083deca5300b21c823107fc106029421.tar.gz
blt-a5640dad083deca5300b21c823107fc106029421.tar.bz2
upgrade AST
Diffstat (limited to 'tksao/frame')
-rw-r--r--tksao/frame/base.C4
-rw-r--r--tksao/frame/fitsimage.C20
-rw-r--r--tksao/frame/fitsimage.h3
-rw-r--r--tksao/frame/fitsmap.C4
4 files changed, 16 insertions, 15 deletions
diff --git a/tksao/frame/base.C b/tksao/frame/base.C
index 00fb7e2..39c98de 100644
--- a/tksao/frame/base.C
+++ b/tksao/frame/base.C
@@ -662,8 +662,8 @@ Matrix Base::calcAlignWCS(FitsImage* fits1, FitsImage* fits2,
astInvert(cvt);
Vector cc1 = fits1->center();
Vector cc2 = fits2->center();
- Vector ll = fits1->wcsTran(fits1->ast_, cc1, 1);
- Vector ur = fits2->wcsTran(fits2->ast_, cc2, 1);
+ Vector ll = fits1->wcsTran(cc1, 1);
+ Vector ur = fits2->wcsTran(cc2, 1);
double fit[6];
double tol = 1;
diff --git a/tksao/frame/fitsimage.C b/tksao/frame/fitsimage.C
index da62acc..f3dab44 100644
--- a/tksao/frame/fitsimage.C
+++ b/tksao/frame/fitsimage.C
@@ -3104,8 +3104,8 @@ double FitsImage::getWCSRotation(Coord::CoordSystem sys, Coord::SkyFrame sky)
double ang = wcsAxAngle(out[0], out[1]);
// {
- // Vector npix = wcsTran(ast_,out[0]+Vector(0,.01),0);
- // Vector epix = wcsTran(ast_,out[0]+Vector(.01,0),0);
+ // Vector npix = wcsTran(out[0]+Vector(0,.01),0);
+ // Vector epix = wcsTran(out[0]+Vector(.01,0),0);
// Vector north = (npix-in[0]).normalize();
// Vector east = (epix-in[0]).normalize();
// Vector diff = (north-east).abs();
@@ -3167,7 +3167,7 @@ Vector FitsImage::pix2wcs(const Vector& in, Coord::CoordSystem sys,
setWCSSystem(ast_,sys);
setWCSSkyFrame(ast_,sky);
- Vector out = wcsTran(ast_, in, 1);
+ Vector out = wcsTran(in, 1);
if (astOK && checkWCS(out))
return wcsIsASkyFrame(ast_) ? radToDeg(out) : out;
else
@@ -3247,7 +3247,7 @@ char* FitsImage::pix2wcs(const Vector& in, Coord::CoordSystem sys,
setWCSSkyFrame(ast_,sky);
ostringstream str;
- Vector out = wcsTran(ast_, in, 1);
+ Vector out = wcsTran(in, 1);
if (astOK && checkWCS(out)) {
if (wcsIsASkyFrame(ast_)) {
switch (format) {
@@ -3399,7 +3399,7 @@ Vector FitsImage::wcs2pix(const Vector& vv, Coord::CoordSystem sys,
setWCSSkyFrame(ast_,sky);
Vector in = wcsIsASkyFrame(ast_) ? degToRad(vv) : vv;
- Vector out = wcsTran(ast_, in, 0);
+ Vector out = wcsTran(in, 0);
if (astOK && checkWCS(out))
return out;
}
@@ -4049,16 +4049,16 @@ void FitsImage::wcsTran(AstFrameSet* ast, int npoint,
}
#else
-Vector FitsImage::wcsTran(AstFrameSet* ast, const Vector& in, int forward)
+Vector FitsImage::wcsTran(const Vector& in, int forward)
{
- int naxes = astGetI(ast,"Naxes");
+ int naxes = astGetI(ast_,"Naxes");
switch (naxes) {
case 1:
// error
break;
case 2:
double xout, yout;
- astTran2(ast, 1, in.v, in.v+1, forward, &xout, &yout);
+ astTran2(ast_, 1, in.v, in.v+1, forward, &xout, &yout);
return Vector(xout, yout);
case 3:
{
@@ -4067,7 +4067,7 @@ Vector FitsImage::wcsTran(AstFrameSet* ast, const Vector& in, int forward)
pin[0] = in[0];
pin[1] = in[1];
pin[2] = forward ? context_->slice(2) : 0;
- astTranN(ast, 1, 3, 1, pin, forward, 3, 1, pout);
+ astTranN(ast_, 1, 3, 1, pin, forward, 3, 1, pout);
return Vector(pout[0],pout[1]);
}
break;
@@ -4079,7 +4079,7 @@ Vector FitsImage::wcsTran(AstFrameSet* ast, const Vector& in, int forward)
pin[1] = in[1];
pin[2] = forward ? context_->slice(2) : 0;
pin[3] = forward ? context_->slice(3) : 0;
- astTranN(ast, 1, 4, 1, pin, forward, 4, 1, pout);
+ astTranN(ast_, 1, 4, 1, pin, forward, 4, 1, pout);
return Vector(pout[0],pout[1]);
}
break;
diff --git a/tksao/frame/fitsimage.h b/tksao/frame/fitsimage.h
index 629ee88..b1c0724 100644
--- a/tksao/frame/fitsimage.h
+++ b/tksao/frame/fitsimage.h
@@ -417,8 +417,10 @@ class FitsImage {
#endif
#ifndef NEWWCS
+ Vector wcsTran(AstFrameSet*, const Vector&, int);
double wcsDistance(AstFrameSet*, const Vector&, const Vector&);
#else
+ Vector wcsTran(const Vector&, int);
double wcsDistance(const Vector&, const Vector&);
Vector3d wcsTran(const Vector3d&, int);
double wcsAngle(const Vector&, const Vector&, const Vector&);
@@ -426,7 +428,6 @@ class FitsImage {
#endif
int wcsIsASkyFrame(AstFrameSet*);
- Vector wcsTran(AstFrameSet*, const Vector&, int);
void wcsTran(AstFrameSet*, int, Vector*, int, Vector*);
#ifdef NEWWCS
diff --git a/tksao/frame/fitsmap.C b/tksao/frame/fitsmap.C
index 4b1140c..618cc98 100644
--- a/tksao/frame/fitsmap.C
+++ b/tksao/frame/fitsmap.C
@@ -328,9 +328,9 @@ double FitsImage::mapLenToRef(double dd, Coord::CoordSystem sys,
}
Vector cc = center();
- Vector wcc = wcsTran(ast_,cc,1);
+ Vector wcc = wcsTran(cc,1);
Vector wpp = wcc+Vector(0,rdd);
- Vector pp = wcsTran(ast_,wpp,0);
+ Vector pp = wcsTran(wpp,0);
astInvert(ast_);
double rr = wcsDistance(cc, pp);
astInvert(ast_);