- description: sddsslopes makes straight line fits of column data of the input file with respect
to a selected column used as the independent variable. The output file contains a one-row
data set of slopes and intercepts for each data set of the input file. Errors on the slope and
intercept may be calculated as an option.
- examples: The file corrector.sdds contains beam position monitor (BPM) readbacks as a
function of corrector setting. The defined columns are CorrectorSetpoint and the
series bpm1, bpm2, etc. The BPM response to the corrector setpoints is calculated with
sddsslopes:
sddsslopes corrector.sdds corrector.slopes -independentVariable=CorrectorSetpoint \
-columns=’bpm*’
- synopsis:
sddsslopes [-pipe=[input][,output]] inputFile outputFile
-independentVariable=parameterName [-range=lower,upper]
[-columns=listOfNames] [-excludeColumns=listOfNames]
[-sigma[=generate]] [-residual=file] [-ascii] [-verbose]
- files: inputFile contains the tabular data for fitting. Multiple data sets are processed one at a time.
For optional error processing, additional columns of sigma values associated with the data to be
fitted must be present. These sigma columns must be named <name>Sigma or Sigma<name>, the
former being searched first.
outputFile contains a one-row data set for each data set in inputFile. The columns defined have
names such as nameSlope and nameIntercept, where name is the name of the fitted data.
A string column called IndependentVariable is defined containing the name of the
independent variable. If only one file is specified, then the input file is overwritten by the
output.
- switches:
- pipe[=input][,output] — The standard SDDS Toolkit pipe option.
- -independentVariable=parameterName — Name of the independent variable (default
is the first valid column).
- -range=lower,upper — The range of the independent variable over which the fit is
calculated. By default, all data points are used.
- -columns=listOfNames — Columns to be individually paired with the independent
variable for straight line fitting.
- -excludeColumns=listOfNames — Columns to exclude from fitting.
- -sigma[=generate] — Calculates errors by interpreting column names <name>Sigma or
Sigma<name> as sigma of column <name>. If these columns do not exist, the program
generates a common sigma from the residual of a first fit and refits with these sigmas.
If -sigma=generate is given, sigmas are generated from the residual of a first fit for all
columns irrespective of the presence of sigma columns.
- -residual=file — Specifies an output file into which the residual of the fits are written.
The column names in the residual file are the same as they appear in the input file.
- -ascii — Make output file in ASCII mode (binary is the default).
- -verbose — Prints some output to stderr.
- see also: sddspfit()
- author: L. Emery, ANL.