DEMETER provides several ways of examining GDS objects. Along with direct examination of the attributes, such as bestfit and error, there are several kinds of textual reports on the state of the GDS object and its parameter. This example shows three of these:
- my $amp_param = Demeter::GDS -> new(gds => 'guess',
- name => 'amp',
- mathexp => 1);
- ## ... some time later, after a fit ... print $amp_param -> note, $/;
- print $amp_param -> report, $/;
- print $amp_param -> full_report, $/;
The note attribute contains the annotation. By default, the annotation for a guess parameter is set after a fit using the best fit value and the uncertainty, as shown below. For most other parameter types, annotation is set using the evaluation of the parameter as store in the bestfit attribute.
amp: 0.98096480 +/- 0.08074672
There is the option of annotating a parameter to a user-defined string. When explicitly set, the automatic annotation after a fit finishes does not happen. The purpose of the annotation is to store a description of the purpose served in a fitting model by a parameter. In the example used here, you might annotate the parameter like so:
The report method is used after a fit to write out parameter results to a log file. It looks like this:
amp = 0.98096480 # +/- 0.08074672 [1]
The full_report writes out a more complete description of the state of the object. It looks like this:
amp guess parameter math expression: 1 evaluates to 0.98096480 +/- 0.08074672 annotation: "This parameter represents S_0^2."