diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-08-22 16:55:13 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-08-22 16:55:13 (GMT) |
commit | ece3115e81fa8cbf2bbd5c2b92510e5b5759a1b2 (patch) | |
tree | 52ba69b593878036ac97065325fcc7afa19d2365 /tksao/frame/fitsimage.C | |
parent | 15a560029b86a2c6022ad27896111573011d3891 (diff) | |
download | blt-ece3115e81fa8cbf2bbd5c2b92510e5b5759a1b2.zip blt-ece3115e81fa8cbf2bbd5c2b92510e5b5759a1b2.tar.gz blt-ece3115e81fa8cbf2bbd5c2b92510e5b5759a1b2.tar.bz2 |
simplify wcs code
Diffstat (limited to 'tksao/frame/fitsimage.C')
-rw-r--r-- | tksao/frame/fitsimage.C | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/tksao/frame/fitsimage.C b/tksao/frame/fitsimage.C index bf4c8ba..0b12fb4 100644 --- a/tksao/frame/fitsimage.C +++ b/tksao/frame/fitsimage.C @@ -89,7 +89,6 @@ FitsImage::FitsImage(Context* cx, Tcl_Interp* pp) wcsCel_ =NULL; wcsCelLon_ =NULL; wcsCelLat_ =NULL; - wcsCRPIX_ =NULL; wcsSize_ =NULL; wcsHPX_ =0; @@ -169,8 +168,6 @@ FitsImage::~FitsImage() if (wcsCelLat_) delete [] wcsCelLat_; - if (wcsCRPIX_) - delete [] wcsCRPIX_; if (wcsSize_) delete [] wcsSize_; @@ -1068,9 +1065,6 @@ void FitsImage::initWCS(FitsHead* hd) delete [] wcsCelLat_; wcsCelLat_ =NULL; - if (wcsCRPIX_) - delete [] wcsCRPIX_; - wcsCRPIX_ =NULL; if (wcsSize_) delete [] wcsSize_; wcsSize_ =NULL; @@ -1098,7 +1092,6 @@ void FitsImage::initWCS(FitsHead* hd) wcsCel_ = ptr->wcsCel_; wcsCelLon_ = ptr->wcsCelLon_; wcsCelLat_ = ptr->wcsCelLat_; - wcsCRPIX_ = ptr->wcsCRPIX_; wcsSize_ = ptr->wcsSize_; wcsHPX_ = ptr->wcsHPX_; @@ -1136,7 +1129,6 @@ void FitsImage::initWCS(FitsHead* hd) wcsInit(hasWCSAST); wcsCelInit(hasWCSAST); - wcsCRPIXInit(hd); wcsHPXInit(); // init wcsState @@ -2591,14 +2583,6 @@ void FitsImage::updatePS(Matrix3d ps) // WCS -Vector FitsImage::getWCSCRPIX(Coord::CoordSystem sys) -{ - if (!wcsCRPIX_ || sys<Coord::WCS) - return Vector(); - else - return wcsCRPIX_[sys-Coord::WCS]; -} - double FitsImage::getWCSSize(Coord::CoordSystem sys) { if (!wcsSize_ || sys<Coord::WCS) @@ -3103,24 +3087,6 @@ void FitsImage::wcsHPXInit() } } -void FitsImage::wcsCRPIXInit(FitsHead* hd) -{ - // init wcsCel_ array - if (wcsCRPIX_) - delete [] wcsCRPIX_; - - wcsCRPIX_ = new Vector[MULTWCS]; - - Vector cc = center(); - char crpix1[] = "CRPIX1 "; - char crpix2[] = "CRPIX2 "; - for (int ii=0; ii<MULTWCS; ii++) { - crpix1[6] = !ii ? ' ' : ii+'@'; - crpix2[6] = !ii ? ' ' : ii+'@'; - wcsCRPIX_[ii] = Vector(hd->getReal(crpix1,cc[0]),hd->getReal(crpix2,cc[1])); - } -} - void FitsImage::wcsSizeInit() { // init wcsSize_ array |