• Hierarchical element access methods have been added to GXml and GXmlNode.Using a string in the format "params > param[1] > value > struct" one can in a single method call walk down the hierarchy of an XML document to access an element. The squared brackets allow specifying an element index in case that multiple elements with the same name exist. If squared brackets are omitted, an index of 0 is assumed. If the indicated element does not exist, the method returns a pointer to NULL.
    Jürgen Knödlseder authored
     
    Browse Dir »


  • 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.
    Jürgen Knödlseder authored
     
    Browse Dir »









  • The CTA response was refactored. GCTAResponse was renamed GCTAResponseIrf, and GCTAResponse became an abstract base class for all possible CTA response functions. GCTAResponseIrf derives from GCTAResponse. Also GCTAResponseCube derives from GCTAResponse.
    
    To make this work, the GObservation::response() method now returns a pointer instead of a reference. The interface definition is such that the pointer never can be NULL. The code has been adapted to comply to this new interface.
    
    Upon reading an XML file, GCTAObservation now determines the appropriate reponse type and calls its reader. If no response is specified in the XML file, GCTAResponseIrf will be used by default.
    Jürgen Knödlseder authored
     
    Browse Dir »




  • The normalize attribute provides control over whether a map should be normalize or not. By default a map will be normalize to that the spectral model provides the correct fluxes, but for some specific analyses, normalization can now be switched off by adding normalize="0" in the XML file. The attribute has also be added as optional argument to the constructors. A unit test has been added that checks the functionnality.
    Jürgen Knödlseder authored
     
    Browse Dir »

  • The GModelSpectralSuperExpPlaw code has been reviewed for integration into the development tree. Most changes were related to code formatting, some changes were needed in the XML interface to correctly reflect the model type "PLSuperExpCutoff".
    
    A unit test method has been added to test_GModel, modelled on unit tests for other spectral models.
    Jürgen Knödlseder authored
     
    Browse Dir »



  • This change was prompted by the addition of the ctobssim option
    to apply energy dispersion. Even if an instrument has an energy
    dispersion, it is useful to be able to apply it or not.
    
    So the meaning now is roughly this:
    use_edisp = (has_edisp && apply_edisp)
    although the apply_edisp flag has so far been only added to
    GCTAResponse, use_edisp = False.
    
    GResponse::has_tdisp() was also renamed to GResponse::use_tdisp()
    for consistency.
    Christoph Deil authored
     
    Browse Dir »



  • The mc() method went in endless loops as the exit condition of the while loop was inversed (the method continued looping when the energy was within the valid range and only exited when it was outside).
    
    The eval_gradients() method computed the gradients with respect to the parameter values and not the parameter factors. All gradients have be multiplied by the scales. Also, the gradients are now set to 0 if the parameters are fixed.
    
    Finally, the parameter "Prefactor" was renamed to "Normalization" because the parameter gives the integral flux under the Gaussian, not the prefactor.
    Jürgen Knödlseder authored
     
    Browse Dir »





  • 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
    Christoph Deil authored
     
    Browse Dir »