Commit e23ca974ab2ff78d898ef1d9a3df0b5914f419bb

Authored by knodlseder
1 parent 2f1c06f2

set crpix = (naxis+1.0)/2.0 as default

Showing 1 changed file with 5 additions and 2 deletions
src/sky/GSkymap.cpp
... ... @@ -18,6 +18,9 @@
18 18 */
19 19  
20 20 /* __ Includes ___________________________________________________________ */
  21 +#ifdef HAVE_CONFIG_H
  22 +#include <config.h>
  23 +#endif
21 24 #include <iostream>
22 25 #include "GException.hpp"
23 26 #include "GTools.hpp"
... ... @@ -174,8 +177,8 @@ GSkymap::GSkymap(const std::string&amp; wcs, const std::string&amp; coords,
174 177 // Set WCS
175 178 double crval1 = x;
176 179 double crval2 = y;
177   - double crpix1 = double(nx)/2.0;
178   - double crpix2 = double(ny)/2.0;
  180 + double crpix1 = double(nx+1)/2.0;
  181 + double crpix2 = double(ny+1)/2.0;
179 182 double cdelt1 = dx;
180 183 double cdelt2 = dy;
181 184 GMatrix cd(2,2);
... ...