-
The new method stack_maps() now works on the object it is applied to instead of creating a new sky map. The reason is on the one hand semantic, as "stack_maps" is an action applied on the current object. For an object returning a skymap, the name should be something like "stacked" as the new map is a stacked version of the old one. But another reason is memory usage. The method now allocates a new memory space for the stacked map and releases the old memory once the stacking is done. The new implementation is also more general as this method now works for both WCS and HEALPIX projections. A unit test has been added to make sure that the maps were indeed stacked.
-
The pixel value set operator will assign the same value to all sky map pixels, i.e. map = 1.0; will set all map pixels to 1.0.
-
The pre-computation cache speeds up the interpolation in case of repeated requests of the same sky direction.
-
Conflicts: ChangeLog src/sky/GSkymap.cpp
-
…ted from commit d809ce80f9e426a6b580362b789c1e15f6b27fff)
-
The operator+= and operator-= add and subtract pixel values from one map to another by bi-linearily interpolating the values in the right hand side map.
-
…ace for GHorizDir class and revise code. Conflicts (resolved): inst/cta/include/GCTAPointing.hpp inst/cta/test/test_CTA.cpp
-
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.