-
…and writing to the XML file of the associations (#3469)
-
…ack for model parameters with analytical gradients at the level of the GObservation class.
-
Implemented the following methods: - GVector GModel::eval(GObservation&, GMatrixSparse*) - GVector GModelSky::eval(GObservation&, GMatrixSparse*) - GVector GResponse::convolve(GModelSky&, GObservation&, GMatrixSparse*) - GVector GObservation::model(GModels&, GMatrixSparse*) - GVector GObservation::model_grad(GModel&, GModelPar&)
-
The methods GModel::has_eval_indices() and GModel::eval_indices() allow for a more efficient parameter handling in GObservation::model() that is specifically relevant for a model with many parameters, such as the SPI data space models. These methods allow the GModel::eval() method to signal which of the parameters were actually updated, so that the gradients for only these parameters will be considered in GObservation::model(), while all other gradients will be ignored.
-
The GModel::is_valid() method now allows specifying empty strings for the instrument and id parameters that will skip the specific model validity check. This allows to check for models of a given identifier whatever the instrument, or for models for a given instrument, whatever the identifier.
-
…ll GModelData derivatives
-
The coding and design conventions (CDC) document was also updated.
-
The haspar() method checks whether a parameter of a given name does exist in the model.
-
There is no reason for having case insensitive instrument names and observation identifiers, a part from preventing mis typings. But type conversion is quite time consuming, thus I decided to remove all implicit type conversions from the code to speed up the computations. This is particularily relevant for the isvalid() method that is called pretty often.
-
The GModelPar interface has been revisited and the code has been adapted to satisfy the new interface.
-
A vector of GModelPar objects has been added to the GModel class that can hold instrument specific model scaling factors. The name of each parameter specifies the instrument, which will be converted automatically in upper case. The scale factors can be set and accessed using the scale() methods. If the scale method is called for an instrument for which no instrument specific scale factor has been defined, unity is returned (hence the model will not be scaled). The class now provides the protected methods read_scales() and write_scales() for reading and writing of scale factors from and to a XML file. The scale factors are written to an optional <scaling> tag, which contains a list of tags of type <instrument ... />. These methods are used by the GModelSky class for reading and writing the scale factors.
-
In addition to the applicability to a given instrument, models can now also be defined to be applicable to a given observation identifier. This allows for example to specify a separate background model for each observation. A model may also apply to several observation identifiers. Methods id() have been added to convert from and to a string of observation identifiers. The interface for the isvalid() method has been changed. An observation identifier argument has been added that allows to check for the applicability to an observation.
-
The ostream and GLog functions are not defined at the GBase level.
-
…re eval() and eval_gradients() const