How do we go about telling QDP that the one of the columns in a data file is not data, but instead is a list of errors on our data values? This is done from the QDP file, by putting the READ Serr QDP command at top. This tells QDP that the data has symmetric errors. For instance:
READ Serr 1 2 1.0 0.25 1.24 0.5 1.5 0.25 1.86 0.5 2.0 0.25 3.76 0.5 4.0 1.75 16.43 4.8 7.0 1.25 49.06 0.5
would tell QDP that the third and fourth columns of numbers in our data file are the X and Y errors respectively. Confused? Don't worry, this confuses many of people to being with, let us take a step back. Basically when it thinks about columns QDP doesn't count columns that contain errors, so that to QDP there is not really four column in our file. Instead there are only two, a column containing X data and the associated errors, and a column containing the Y data and the associated errors. Perhaps this will make more sense if we separate the columns QDP perceives using commas. Hence:
READ Serr 1 2 1.0 0.25 , 1.24 0.5 1.5 0.25 , 1.86 0.5 2.0 0.25 , 3.76 0.5 4.0 1.75 , 16.43 4.8 7.0 1.25 , 49.06 0.5
Does it make more sense now? The READ Serr command basically
tells QDP that the the two lists of numbers should each have two real
columns (one for data, one for errors). You can see what QDP makes of
this file in Figure
.
Figure: Our
second test data set plotted using QDP with the default options.
You can also tell QDP to use two-sided errors using the READ Terr command. It takes three real columns to specify a two-sided error. The first column is the central value, the second (which must be positive) specifies the upper error the third column (which must be negative or zero) specifies the lower error. For instance the file:
READ Serr 1 READ Terr 2 1. .1 2. +.1 -.2
would plot a point at
The Graphics Cookbook