subtractcurves(1)           General Commands Manual          subtractcurves(1)



NAME
       subtractcurves - subtract curves between two files

SYNOPSIS
       subtractcurves  options  positiveFile negativeFile outputFile

DESCRIPTION
       Subtractcurves is a Python program that will subtract one data column
       between two corresponding files with one or more sets of values.  The
       values are treated as curves having a regular progression of X values
       in one column and the Y values to be subtracted in another column.
       Contiguous groups of lines can be averaged to produce an output with
       less noise.  The regular progression is not necessary unless averaging
       is being done; however, the X values must correspond between the two
       files.  There is an option for forming an appropriately weighted aver-
       age of values that were deriving from averaging over rings of data.

       If a file has multiple curves in it, there must be integer values in
       the first column that provide a type number for each curve, such as
       would be needed when plotting the data with onegenplot or genhst-
       plot(1).

OPTIONS
       Subtractcurves uses the PIP package for input (see the manual page for
       pip).  Options can be specified either as command line arguments
       (with the -) or one per line in a command file (without the -).
       Options can be abbreviated to unique letters; the currently valid
       abbreviations for short names are shown in parentheses.

       -pos (-p) OR -PositiveInputFile     File name
              Input file that is subtracted from (required)

       -neg (-ne) OR -NegativeInputFile    File name
              Input file to subtract from first file (required)

       -output (-o) OR -OutputFile    File name
              File in which to write subtracted curves (required)

       -column (-c) OR -ColumnToSubtract   Integer
              Column with values to take differences of, numbered from 1.  If
              the files have two columns, the default is the first column.  If
              the files have more than two columns, the default is the third
              column.

       -average (-a) OR -AverageLines      Integer
              Number of input lines to combine into one output line by averag-
              ing.  All of the data columns in each successive, non-overlap-
              ping group of lines are averaged to produce a single output line
              with the average.

       -radial (-r) OR -RadialWeightColumn      Integer
              Column for radial weighting when averaging lines.  By default, a
              simple average is used.  However, when the data represent aver-
              ages over values in successive rings, such as Fourier ring cor-
              relations or rotationally averaged power spectra, it is neces-
              sary to weight each value by the ring radius to make the average
              the same as what would have been obtained originally with the
              larger ring size.  This entry would thus specify the column con-
              taining the ring radius.  Simple averaging will be applied to
              this column.

       -notype (-no) OR -NoTypeColumn
              Whenever there are more than two columns, the program assumes
              that there is a type number in the first column, and it restarts
              any averaging when the type number changes.  Thus, this entry is
              needed when averaging files that have no types and more than two
              columns.

       -help (-h) OR -usage
              Print help output

       -StandardInput
              Read parameter entries from standard input


FILES
       If the output file already exists, it is renamed to a backup with the ~
       extension.

AUTHOR
       David Mastronarde

SEE ALSO
       alignframes, onegenplot

       Email bug reports to mast at colorado dot edu.



IMOD                                 5.2.0                   subtractcurves(1)