-
…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.
-
Add GChatter argument to print() method. The print() method now takes an argument of type GChatter to control the chattiness of the output in a homogenous manner. Pass NORMAL chatter level in __str__ method. Add chatter argument to print() methods. Use GLog::chatter() method to control the chattiness of the log stream operator. Add chatter() methods and provide member access through const references. Add chatter() methods, provide member access through const references, and declare one liners as inline methods. The chatter() methods control the new m_chatter attribute that is used to control the chattiness of the object's print() methods. name() and version() methods return const references. logFileOpen() method now sets the chattiness from the applications's chatter parameter, and name() and version() methods now return a const reference.
-
This value is needed in the eval_gradients() method and takes up most of the computing time. Including it in the common eval() and eval_gradients() pre computation cache makes eval() slower in case that the method is called subsequently with different energies or parameters.
-
The value constructor now takes an object of type GEnergy for the pivot energy. Methods have been added to access are three model parameters. Evaluation caches have been added to support the eval(), eval_gradients() and mc() methods. This speeds up evaluation of the spectrum, in particular for binned analysis, and the simulation of photons.
-
The eval_gradients() method is no longer const to reflect the fact that the method explicitly sets the gradient attribute of the model parameters.
-
The GModelPar interface has been revisited and the code has been adapted to satisfy the new interface.
-
The autoscale() method has been removed as it exists now in the GModelSpectral() base class. The parameter constructor now calls autoscale() to perform an autoscaling of all model parameters.