-
The former trigonometric method led to different results on different platforms due to numerical imprecisions. We now use Huilier's theorem to be less sensitive to numerical problems. The polygon is decomposed in two triangles for this purpose.
-
When a pixel touches the pole, the pixel is effectively a triangle and not a polygon. This case is now handled properly.
-
(I chose `centre` because there were more `centre` than `center` around.)
-
The coding and design conventions (CDC) document was also updated.
-
I ran this build: CXXFLAGS="-Wall -Wno-c++11-long-long -pedantic -std=c++98" ./configure make -j 1 This commit fixes the few compiler warnings that showed up (all unimportant). There is no way to fix the issue that `long long` is not standard C++98, but it's an extension that has been supported by most compilers for a decade, so it's OK to ignore: http://stackoverflow.com/questions/4017621/how-to-do-portable-64-bit-arithmetic-without-compiler-warnings
-
Delete statements have been added to the remove() method(s) so that the elements are properly deleted before the pointers are erased.
-
All methods returning a solid angle are now named solidangle().
-
The GFitsHeader class now derives from GContainer and implements all generic container class methods (at(), size(), isempty(), append(), insert(), remove(), reserve(), extend()). The hascard() methods have been renamed to contains() for compliance with other container classes. The card() methods have been renamed to at(), also for compliance. The card access operators and methods now return the cards by reference. Card access operators[] have been implemented to access header cards without range checking. The cards are now stored using a std::vector structure.
-
The GFits class now derives from GContainer and implements all generic container class methods (at(), size(), isempty(), set(), append(), insert(), remove(), reserve(), extend()). The hashdu() method has been renamed to contains() for compliance with other container classes. The hdu() methods have been renamed to at(), also for compliance. Boolean arguments are now passed as const references, and members are returned as const references. HDU access operators[] have been implemented to access FITS extensions without range checking.
-
When using the Hammer-Aitoff projection, the pixel-to-spherical used in GCTAEventCube::set_directions may fell as pixels may correspond to zones that do not represent sky regions. To prevent this problem, any exception is catched and the solid angle of the pixel is set to 0. This has the nice side effect of filtering out the bin during model fitting as the solid angle is used to multiply the model value.
-
The GSkyPixel class now handles 1D and 2D sky indices. This made the distinctive 1D and 2D methods in GSkyProjection and the derived classes obsolete. Now, all projection classes take GSkyPixel as argument. The GSkymap class now uses the universal GSkyPixel class. Methods have been renamed consistently. An integer index is now consistently called "sky map index" and the GSkyPixel object is named a "sky map pixel". Methods operating on indices contain now "inx", method operating on sky map pixels "pix".
-
GSkyPixel is now able to handle both 1D and 2D sky map pixels. 1D sky map pixels behave like int or double types, and conversion from and to these types is supported. 2D sky map pixels store the X and Y component of the pixel. Methods are provided to test whether a pixel is 1D or 2D.
-
The GWcslib class has been renamed to GWcs for consistency with the naming convention for GammaLib base classes. All WCS implementations derive now from GWcs. The code has been adapted to this new naming convention.
-
The Healpix pixelisation is not a World Coordinate System projection, and to make this clear the name has been changed from GWcsHPX to GHealpix. The code has been adapted to this new naming convention.
-
After renaming GWcs to GSkyProjection the code has been adapted to the new naming convention.
-
WCS should be reserved for spherical world coordinate system projections, and a more general term should be used for sky projections.