summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-07-26 15:56:09 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-07-26 15:56:09 (GMT)
commit57e72e4e053d330a4c59b19004a9714b64e083ef (patch)
treecffbf5d829962658f3bf1d57c366360d42f5f2bf
parent5568b6613715e557903558c1e5ee99dbecbc9336 (diff)
downloadblt-57e72e4e053d330a4c59b19004a9714b64e083ef.zip
blt-57e72e4e053d330a4c59b19004a9714b64e083ef.tar.gz
blt-57e72e4e053d330a4c59b19004a9714b64e083ef.tar.bz2
clean up code
-rw-r--r--tksao/frame/context.C2
-rw-r--r--tksao/frame/fitsimage.C56
-rw-r--r--tksao/frame/fitsimage.h4
3 files changed, 31 insertions, 31 deletions
diff --git a/tksao/frame/context.C b/tksao/frame/context.C
index 03bf2c8..e1a622b 100644
--- a/tksao/frame/context.C
+++ b/tksao/frame/context.C
@@ -1562,7 +1562,7 @@ int Context::loadMosaicWFPC2(Base::MemType which, const char* fn,
<< ends;
// fix fitsimage params
- ptr->altWCS(istr);
+ ptr->wfpc2WCS(istr);
Matrix mm = parent_->calcAlignWCS(bfits_, ptr, Coord::WCS,
Coord::WCS, Coord::FK5);
diff --git a/tksao/frame/fitsimage.C b/tksao/frame/fitsimage.C
index 5fc3f3c..51ab692 100644
--- a/tksao/frame/fitsimage.C
+++ b/tksao/frame/fitsimage.C
@@ -127,7 +127,7 @@ FitsImage::FitsImage(Context* cx, Tcl_Interp* pp)
wcsHPXSav_ =0;
#endif
wcsHeader_ =NULL;
- altHeader_ =NULL;
+ wfpc2Header_ =NULL;
iisMode_ =0;
iiszt_ =0;
@@ -218,8 +218,8 @@ FitsImage::~FitsImage()
if (wcsHeader_)
delete wcsHeader_;
- if (altHeader_)
- delete altHeader_;
+ if (wfpc2Header_)
+ delete wfpc2Header_;
}
// Fits
@@ -922,7 +922,7 @@ void FitsImageIIS::iisWCS(const Matrix& mm, const Vector& z, int zt)
// FitsImage
-void FitsImage::altWCS(istream& str)
+void FitsImage::wfpc2WCS(istream& str)
{
FitsHead* hh = parseWCS(str);
@@ -932,11 +932,11 @@ void FitsImage::altWCS(istream& str)
objectKeyword_ = dupstr(hh->getString("OBJECT"));
// Process WCS keywords
- if (altHeader_)
- delete altHeader_;
+ if (wfpc2Header_)
+ delete wfpc2Header_;
- altHeader_ = hh;
- initWCS(altHeader_, NULL);
+ wfpc2Header_ = hh;
+ initWCS(wfpc2Header_, NULL);
}
void FitsImage::appendWCS(istream& str)
@@ -1017,8 +1017,8 @@ char* FitsImage::displayWCS()
{
if (wcsHeader_)
return display(wcsHeader_);
- else if (altHeader_)
- return display(altHeader_);
+ else if (wfpc2Header_)
+ return display(wfpc2Header_);
else
return display(image_->head());
}
@@ -1329,6 +1329,22 @@ void FitsImage::initWCS(FitsHead* hd, FitsHead* prim)
}
#endif
+void FitsImage::resetWCS()
+{
+ // Process OBJECT keyword
+ if (objectKeyword_)
+ delete [] objectKeyword_;
+ objectKeyword_ = dupstr(image_->getString("OBJECT"));
+
+ // Process WCS keywords
+ if (wcsHeader_)
+ delete wcsHeader_;
+
+ wcsHeader_ = NULL;
+ initWCS(image_->head(),
+ image_->primary() && image_->inherit() ? image_->primary() : NULL);
+}
+
#ifdef OLDWCS
void FitsImage::initWCS0(const Vector& pix)
{
@@ -1336,8 +1352,8 @@ void FitsImage::initWCS0(const Vector& pix)
FitsHead* prim =NULL;
if (wcsHeader_)
hd = wcsHeader_;
- else if (altHeader_)
- hd = altHeader_;
+ else if (wfpc2Header_)
+ hd = wfpc2Header_;
else {
hd = image_->head();
prim = image_->primary() && image_->inherit() ? image_->primary() : NULL;
@@ -2526,22 +2542,6 @@ void FitsImage::reset()
data_ =NULL;
}
-void FitsImage::resetWCS()
-{
- // Process OBJECT keyword
- if (objectKeyword_)
- delete [] objectKeyword_;
- objectKeyword_ = dupstr(image_->getString("OBJECT"));
-
- // Process WCS keywords
- if (wcsHeader_)
- delete wcsHeader_;
-
- wcsHeader_ = NULL;
- initWCS(image_->head(),
- image_->primary() && image_->inherit() ? image_->primary() : NULL);
-}
-
char* FitsImage::root(const char* fn)
{
if (fn) {
diff --git a/tksao/frame/fitsimage.h b/tksao/frame/fitsimage.h
index 781a9c2..ed85307 100644
--- a/tksao/frame/fitsimage.h
+++ b/tksao/frame/fitsimage.h
@@ -130,7 +130,7 @@ class FitsImage {
int wcsHPXSav_;
#endif
FitsHead* wcsHeader_; // alt wcs header
- FitsHead* altHeader_; // wcs header for wfpc2
+ FitsHead* wfpc2Header_; // wcs header for wfpc2
Matrix wcsToRef_; // iraf/wcs matrix
@@ -402,7 +402,7 @@ class FitsImage {
char* pix2wcs(const Vector3d&, Coord::CoordSystem, Coord::SkyFrame, Coord::SkyFormat, char*);
#endif
- void altWCS(istream&);
+ void wfpc2WCS(istream&);
void appendWCS(istream&);
void listWCS(ostream&, Coord::CoordSystem);
void resetWCS();