- description: sdds2dpfit does ordinary 2-dimensional polynomial fits to column data.
- synopsis:
sdds2dpfit [inputfile] [outputfile] [-pipe=[input][,output]] -independent=x1ColumnName,x2ColumnName -dependent=yColumnName[,sigma=columnName] -maximumOrder=value | [-addOrders=xOrder,yOrder [-addOrders=...]] [-coefficients=filename] [-evaluate=locationsFilename,x1Name,x2Name,outputFilename] [-copyParameters]

- files: inputFile is an SDDS file containing columns of data to be fit. If it contains multiple pages,
they are processed separately. outputFile is an SDDS file containing one page for each
page of inputFile. It contains columns of the independent and dependent variable data,
plus columns for the fit and residuals. The values of the fit and of the residuals are in a
columns named yNameFit and yNameResidual. outputFile also contains the following
parameters:
- RmsResidual — Rms residual of the fit.
- ReducedChiSquared: the reduced chi-squared of the fit:
- ConditionNumber — Condition number from SVD inversion of the matrix used in obtaining the fit.
- FitIsValid — If non-zero, the fit is valid.
- Terms — Number of terms in the fit.
- Coefficient_mm_nn — Coefficient C
_{mn}of the fit. E.g., if fitting z as a function of x and y, then(1)

- switches:
- -pipe[=input][,output] — The standard SDDS Toolkit pipe option.
- -independent=x1Name,x2Name — Gives the names of the columns containing values of the independent quantities.
- -dependent=yName[,sigma=sigmaName] — Gives the name of the column containing value sof the dependent quantities, and optionally the name of the column containing error bars.
- -maximumOrder=p — Request inclusion of all terms up to x
^{m}y^{n}such that (n + m) ≤ p. - -addOrders=m,n — Request inclusion of x
^{m}y^{n}. May be repeated to request inclusion of additional terms. - -coefficients=filename — Request that fit coefficients be written to the named file.
- -evaluate=locationsFilename,x1Name,x2Name,outputFilename — Request evaluation of the fit for a set of x and y values given in locationsFilename, with results written to outputFilename.
- -copyParameters — If given, program copies all parameters from the input file into the main output file. By default, no parameters are copied.

- see also:
- author: M. Borland, ANL/APS.