diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-08-13 21:00:23 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-08-13 21:00:23 (GMT) |
commit | 702867761bb723840a0cdefdd35e6e05883c8e7b (patch) | |
tree | 89dd531b212d13f9b67366dbcaee553955d0a413 /tksao/frame/fitsimage.C | |
parent | da5c099053d3c0d4a6559e1d1755b43fc960b8f0 (diff) | |
download | blt-702867761bb723840a0cdefdd35e6e05883c8e7b.zip blt-702867761bb723840a0cdefdd35e6e05883c8e7b.tar.gz blt-702867761bb723840a0cdefdd35e6e05883c8e7b.tar.bz2 |
wcs speed improvements
Diffstat (limited to 'tksao/frame/fitsimage.C')
-rw-r--r-- | tksao/frame/fitsimage.C | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/tksao/frame/fitsimage.C b/tksao/frame/fitsimage.C index c7a16aa..3b63104 100644 --- a/tksao/frame/fitsimage.C +++ b/tksao/frame/fitsimage.C @@ -90,7 +90,10 @@ FitsImage::FitsImage(Context* cx, Tcl_Interp* pp) wcsSystem_ = Coord::WCS; wcsSkyFrame_ = Coord::FK5; - wcsSkyFormat_ = Coord::DEGREES; + + wcsFormatSystem_ = Coord::WCS; + wcsFormatFrame_ = Coord::FK5; + wcsFormat_ = Coord::DEGREES; wcsAltHeader_ =NULL; wfpc2Header_ =NULL; @@ -1091,7 +1094,10 @@ void FitsImage::initWCS(FitsHead* hd) wcsSystem_ = ptr->wcsSystem_; wcsSkyFrame_ = ptr->wcsSkyFrame_; - wcsSkyFormat_ = ptr->wcsSkyFormat_; + + wcsFormatSystem_ = ptr->wcsFormatSystem_; + wcsFormatFrame_ = ptr->wcsFormatFrame_; + wcsFormat_ = ptr->wcsFormat_; wcsPhyInit(); manageWCS_ =0; @@ -1129,12 +1135,12 @@ void FitsImage::initWCS(FitsHead* hd) wcsSystem_ = Coord::WCS; wcsSkyFrame_ = Coord::FK5; - wcsSkyFormat_ = Coord::DEGREES; + wcsFormat_ = Coord::DEGREES; // init ast_ state wcsSystem(ast_,wcsSystem_); wcsSkyFrame(ast_,wcsSkyFrame_); - setWCSFormat(wcsSystem_,wcsSkyFrame_,wcsSkyFormat_,1); + setWCSFormat(wcsFormatSystem_,wcsFormatFrame_,wcsFormat_,1); if (DebugWCS && ast_) astShow(ast_); @@ -3177,12 +3183,15 @@ void FitsImage::setWCSFormat(Coord::CoordSystem sys, Coord::SkyFrame sky, Coord::SkyFormat format, int init) { if (!init && - wcsSystem_ == sys && - wcsSkyFrame_ == sky && - wcsSkyFormat_ == format) + wcsFormatSystem_ == sys && + wcsFormatFrame_ == sky && + wcsFormat_ == format) return; - wcsSkyFormat_ = format; + wcsFormatSystem_ = sys; + wcsFormatFrame_ = sky; + wcsFormat_ = format; + int id = sys-Coord::WCS; // spacial axes |