APPEND
If APPEND is specified, then a new data set is created, containing the
result and n1 is unchanged.
AVERAGE
This option will not work for the SUBTRACT command. If AVERAGE is
specified, the data is averaged together according to the Y statistics.
If Y is non zero but DY is 0 then DY is assumed to be 1. If both Y1
and DY1 are zero then Y3,DY3 = Y2,DY2.
Y3=(Y1/DY1**2+Y2/DY2**2)/(1/DY1**2+1/DY2**2)
DY3=SQRT(2*DY1**2*DY2**2/(DY1**2+DY2**2))
If you wish to average several data sets with statistics, this should
give you the correct result. Zero data with zero statistics indicates
the absence of data. If you wish to average several data sets without
statistics then you should always set the statistics to a "reasonable"
value.
CHECK
CHECK=OFF turns off data set checking. When CHECK=ON both data sets
must have identical X (and Y if mesh) values, but data set n2 may
contain more points than n1. If (DX/DY) is non zero then the both DX
and X must be identical within 1% of DX. If you have data sets with
non identical values of X you may create a set with identical values
using the BIN command. you may also add together data sets with the
BIN command. If the X values of 2 data sets are not quite identical.
You may force TOPDRAWER to add them by setting DX for the data 100
times greater than the difference in X or by setting CHECK=OFF.
ERROR
ERROR=OFF excludes the errors from the FIT in the computation.
(Default:ERROR=ON)
FIT
Specifies that the last FIT is to be added or subtracted from the data
set. See:Command FIT.
LIMITED
You may specify the limits over which the histograms are to be added.
If you specify the Y or Z limits, then all data that contains values
inside these limits will be added. For example if you
ADD 1 to 2 LIMITED FROM Y=10 to Y=11
But data set 1 contains the followind data:
1,0; 2,10; 3,0; 4,11; 5,0
Points 2 to 4 inclusive will be added, and only points 1 and 5 will be
omitted.
LOG
If LOG is specified then the result of the command is typed on your
terminal.
VECTOR
The DX,DY,DZ's will be added together assuming they are a vector. The
X,Y,Z are not changed, and they should match for both input data sets.
If POLAR or SPHERICAL are ON the coordinates are handled correctly.
WEIGHT-EWEIGHT
WEIGHT=n specifies a weighting factor to multiply the data by before
adding or subtracting it. EWEIGHT=n specifies the error on WEIGHT.
This option must precede the data set number.
X|Y
Selects which coordinate of regular data is to be added. Mesh data
always adds the dependent coordinate which is usually z.
(Default:Y)
notes
For mesh data the independent coordinate must be Z. For 2-d data the
independent coordinate is always Y. If you add normal data to mesh
data each normal Y value is added to the corresponding mesh Z value.
You may not add mesh data to normal 2-d data.
If EFFICIENCY is not specified then the new value is Y3=Y1(+-)Y2. The
errors (DY) are treated as if the data sets are uncorrelated
DY3=SQRT(DY1**2+DY2**2).
The ADD command with CHECK=OFF allows you to combine X,Y,Z... data
TD:SWAP X Y SET=1 from 1 data set with mismatched data from
another set. For example you wish to plot Y of set 1 vs Y of set 2.
TD:SWAP X Y SET=1
TD:ADD 1,1 APPEND (Produces set 3=set 1)
TD:Y=0 SET=LAST (Set 3 has only X)
TD:ADD 2,3 CHECK=OFF (Set 3 has Y(1),Y(2))
Set 3 now has X=Y(set 1) and Y=Y(set 2)
example
TD:ADD 1 TO 2
or...
TD:ADD 2 1
or...
TD:ADD TO 2 1
Data set 1 is added to data set 2. Data set 1 is unchanged.
TD:ADD 1 TO 2 APPEND
Data set 1 and 2 are added. The result in put into a new data set.
Both sets 1 and 2 are unchanged.
TD:SUBTRACT 1 FROM 2
Data set 1 is subtracted from data set 2. Data set 1 is unchanged.
See:Command DIVIDE,MULTIPLY