diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2017-12-01 19:38:22 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2017-12-01 19:38:22 (GMT) |
commit | 1d739044cc07a7f3f129ee839a0f249702ad639f (patch) | |
tree | a139511f08e7f8ec97052fa206f62e299299b31c /tksao | |
parent | 42ad5735fac387a8b8459954bdab44a5a1cc057b (diff) | |
download | blt-1d739044cc07a7f3f129ee839a0f249702ad639f.zip blt-1d739044cc07a7f3f129ee839a0f249702ad639f.tar.gz blt-1d739044cc07a7f3f129ee839a0f249702ad639f.tar.bz2 |
update AST WCS
Diffstat (limited to 'tksao')
-rw-r--r-- | tksao/frame/fitsimage.C | 19 | ||||
-rw-r--r-- | tksao/frame/fitsimage.h | 8 |
2 files changed, 13 insertions, 14 deletions
diff --git a/tksao/frame/fitsimage.C b/tksao/frame/fitsimage.C index 6a0a9ac..43ba208 100644 --- a/tksao/frame/fitsimage.C +++ b/tksao/frame/fitsimage.C @@ -3329,7 +3329,8 @@ Vector3d FitsImage::wcs2pix(const Vector3d& vv, Coord::CoordSystem sys, #endif #ifndef NEWWCS -double FitsImage::getWCSDist(Vector vv1, Vector vv2, Coord::CoordSystem sys) +double FitsImage::getWCSDist(const Vector& vv1, const Vector& vv2, + Coord::CoordSystem sys) { int ss = sys-Coord::WCS; if (!(ss>=0 && ast_ && ast_[ss])) @@ -3342,7 +3343,8 @@ double FitsImage::getWCSDist(Vector vv1, Vector vv2, Coord::CoordSystem sys) wcsDistance(ast_[ss], vv1, vv2); } #else -double FitsImage::getWCSDist(Vector vv1, Vector vv2, Coord::CoordSystem sys) +double FitsImage::getWCSDist(const Vector& vv1, const Vector& vv2, + Coord::CoordSystem sys) { if (!hasWCS(sys)) return 0; @@ -3406,9 +3408,7 @@ int FitsImage::hasWCSCel(Coord::CoordSystem sys) return 0; } - #else - int FitsImage::hasWCS(Coord::CoordSystem sys) { if (!newast_ || sys<Coord::WCS) @@ -3531,7 +3531,6 @@ int FitsImage::hasWCSCel(Coord::CoordSystem sys) astEnd; // now, clean up memory return rr; } - #endif // WCSX @@ -4109,7 +4108,7 @@ void FitsImage::wcsTran(AstFrameSet* ast, int npoint, } } -Vector3d FitsImage::wcsTran(AstFrameSet* ast, Vector3d& in, int forward) +Vector3d FitsImage::wcsTran(AstFrameSet* ast, const Vector3d& in, int forward) { int naxes = astGetI(ast,"Naxes"); switch (naxes) { @@ -4197,8 +4196,8 @@ double FitsImage::wcsDistance(AstFrameSet* ast, Vector vv1, Vector vv2) #endif #ifdef NEWWCS -double FitsImage::wcsAngle(AstFrameSet* ast, Vector& vv1, Vector& vv2, - Vector& vv3) +double FitsImage::wcsAngle(AstFrameSet* ast, const Vector& vv1, + const Vector& vv2, const Vector& vv3) { int naxes = astGetI(ast,"Naxes"); switch (naxes) { @@ -4249,7 +4248,8 @@ double FitsImage::wcsAngle(AstFrameSet* ast, Vector& vv1, Vector& vv2, return 0; } -double FitsImage::wcsAxAngle(AstFrameSet* ast, Vector& vv1, Vector& vv2) +double FitsImage::wcsAxAngle(AstFrameSet* ast, const Vector& vv1, + const Vector& vv2) { int naxes = astGetI(ast,"Naxes"); switch (naxes) { @@ -4290,7 +4290,6 @@ double FitsImage::wcsAxAngle(AstFrameSet* ast, Vector& vv1, Vector& vv2) return 0; } - #endif AstFrameSet* FitsImage::fits2ast(FitsHead* hd) diff --git a/tksao/frame/fitsimage.h b/tksao/frame/fitsimage.h index bf473bc..acd689e 100644 --- a/tksao/frame/fitsimage.h +++ b/tksao/frame/fitsimage.h @@ -397,7 +397,7 @@ class FitsImage { const char* getWCSName(Coord::CoordSystem); Coord::Orientation getWCSOrientation(Coord::CoordSystem, Coord::SkyFrame); double getWCSRotation(Coord::CoordSystem, Coord::SkyFrame); - double getWCSDist(Vector, Vector, Coord::CoordSystem); + double getWCSDist(const Vector&, const Vector&, Coord::CoordSystem); #ifndef NEWWCS Vector getWCScdelt(Coord::CoordSystem); #else @@ -410,9 +410,9 @@ class FitsImage { void wcsTran(AstFrameSet*, int, Vector*, int, Vector*); double wcsDistance(AstFrameSet*, Vector, Vector); #ifdef NEWWCS - Vector3d wcsTran(AstFrameSet*, Vector3d&, int); - double wcsAngle(AstFrameSet*, Vector&, Vector&, Vector&); - double wcsAxAngle(AstFrameSet*, Vector&, Vector&); + Vector3d wcsTran(AstFrameSet*, const Vector3d&, int); + double wcsAngle(AstFrameSet*, const Vector&, const Vector&, const Vector&); + double wcsAxAngle(AstFrameSet*, const Vector&, const Vector&); #endif #ifdef NEWWCS |