GraphSysErr
0.10-2
A class to hold results with statistical and systematic errors A class to hold results with statistical and systematic errors
|
We define a function in a script. It takes one argument - whether to fit the data or not.
The first thing we do, is to check if we have the class GraphSysErr, and if not, we compile the script.
Then, we adjust some sizes - the default error along X, how large the end bars should be.
Now we're ready to declare our object.
The first we do, is set some parameters on the object: That we shouldn't put tick marks ('ends') on the error, and the name of the X and Y axis.
Next, we set some key values. These are mainly for exporting to a Durham database input file. In principle one can define any key, but only a sub-set is written when exporting.
Next, we can add as many qualifiers to the data set we want. If one is to export multiple graphs to a table, one should set a RE qualifier to distinguish the columns, or give each graph a distinct title.
Now we can define common errors. That is, errors that are correlated over all points. Common errors only have one negative and one positive value (which may be identical). Common errors can be relative. The member function GraphSysErr:DefineCommon returns a unique identifier. This identifier should be stored for later manipulation of the error.
Next is the point-to-point (uncorrelated) systematic errors. Here, we simple give a name and whether the error is relative. The member function GraphSysErr:DeclarePoint2Point returns a unique identifier. This identifier should be stored for later manipulation of the error.
Now we customize the graphical output of each error
In this example, we take the data points to from a Gaussian deviate. Technically, we make a histogram of the probability of a given number.
Now we can set all our points. We remove our temporary histogram after we're done with it.
Finally, we can build a canvas
Depending on the single parameter, we either draw or fit a Gaussian distribtion to the data.
And then we draw and finish