diff options
-rw-r--r-- | ds9/doc/release/r7.6.html | 1 | ||||
-rw-r--r-- | tksao/frame/fitsimage.C | 25 |
2 files changed, 18 insertions, 8 deletions
diff --git a/ds9/doc/release/r7.6.html b/ds9/doc/release/r7.6.html index 356b233..6f97b97 100644 --- a/ds9/doc/release/r7.6.html +++ b/ds9/doc/release/r7.6.html @@ -156,6 +156,7 @@ <li><tt>10.30.2017 MACOS: removed codesign step during build.</tt></li> <li><tt><b>10.31.2017 RELEASE version 7.6b8</b></tt></li> <li><tt>11.27.2017 MMT: updated Binospec template. </tt></li> + <li><tt>11.27.2017 REGION: fixed an issue where region templates are rendered incorrectly in the case where the WCS RA and DEC axes have been flipped in the definition.</tt></li> <li><tt><b>xx.xx.2017 RELEASE version 7.6rc1</b></tt></li> </ol> </ol> diff --git a/tksao/frame/fitsimage.C b/tksao/frame/fitsimage.C index eb94469..805f779 100644 --- a/tksao/frame/fitsimage.C +++ b/tksao/frame/fitsimage.C @@ -1334,16 +1334,25 @@ void FitsImage::initWCS0(const Vector& pix) if (wcs_[0]) { Vector cc = mapFromRef(pix, Coord::IMAGE, Coord::FK5); WorldCoor* ww = wcs_[0]; - wcs_[ii] = wcskinit(ww->nxpix, ww->nypix, - (char*)"RA---TAN", (char*)"DEC--TAN", - cc[0], cc[1], 0, 0, ww->cd, 0, 0, 0, 2000, 2000); + if (!ww->coorflip) + wcs_[ii] = wcskinit(ww->nxpix, ww->nypix, + (char*)"RA---TAN", (char*)"DEC--TAN", + cc[0], cc[1], 0, 0, ww->cd, 0, 0, 0, 2000, 2000); + else + wcs_[ii] = wcskinit(ww->nxpix, ww->nypix, + (char*)"DEC--TAN", (char*)"RA---TAN", + cc[0], cc[1], 0, 0, ww->cd, 0, 0, 0, 2000, 2000); wcs_[ii]->longpole = 999; wcs_[ii]->latpole = 999; + if (DebugWCS) + wcsShow(wcs_[ii]); if (ast_[ii]) astAnnul(ast_[ii]); ast_[ii] = NULL; astinit0(ii, hd, prim); + if (DebugAST) + astShow(ast_[ii]); } } @@ -1531,7 +1540,7 @@ void FitsImage::match(const char* xxname1, const char* yyname1, if (out1) delete [] out1; if (in2) - delete [] int2; + delete [] in2; if (out2) delete [] out2; } @@ -4017,10 +4026,10 @@ Vector FitsImage::wcsTran(AstFrameSet* ast, Vector in, int forward) void FitsImage::wcsTran(AstFrameSet* ast, int npoint, Vector* in, int forward, Vector* out) { - double* xin = double[npoint]; - double* yin = double[npoint]; - double* xout = double[npoint]; - double* yout = double[npoint]; + double* xin = new double[npoint]; + double* yin = new double[npoint]; + double* xout = new double[npoint]; + double* yout = new double[npoint]; for (int ii=0; ii<npoint; ii++) { xin[ii] = in[ii][0]; |