-
…ients argument (#1847) The eval_gradients() methods duplicate much of the code of the eval() methods. To increase the maintainability of the code, the eval_gradients() methods have been removed, and the computation of partial derivatives is now done by the eval() methods if the optional gradients argument is set to true.
-
The GModelSpectralRegistry::alloc() method now also checks for the existence of model parameters and allocates the appropriate model from the registry that is found in the XML file base on model type and parameter names. This allows now to have the same model type but different parameter names in the registry. The spectral model classes have been adapted to the new logic, and models have been added to the registry for all parameter combinations that may exist. The unit tests and documentation have been updated.
-
…eval_gradients() methods.
-
…or the observation Python module. The classname() method returns in a human readable format the class name. This method is needed for full automatic typecasting in Python. Full automatic typecasting has for the moment been implemented for the observation module.
-
There were two bugs in the parameter gradient computation. First, the wrong index was used to compute the break value gradient. Second, the index gradients were both computed, irrespectively of the energy. However, if the energy is smaller than the break energy, only the first index gradient should be computed while the second will be 0. If the energy is larger, the first index gradient should be 0 and only the second should be computed. Both bugs have been fixed.