sddsderiv

**description:**`sddsderiv`differentiates one or more columns of data as a function of a common column. The program will perform error propagation if error bars are provided in the data set.**examples:**Find the derivatives of columns`J0`and`J1`as a function of`z`:`sddsderiv bessel.sdds bessel.deriv -differentiate=J0,J1 -versus=z`**synopsis:**`sddsderiv [-pipe=[input][,output]] [`*input*] [*output*] -differentiate=*columnName*[,*sigmaName*] ... -versus=*columnName*[,*sigmaName*] [-interval=*integer*] [-SavitzkyGolay=*left*,*right*,*fitOrder*[,*derivOrder*]] [-mainTemplates=*item*=*string*[,...]] [-errorTemplates=*item*=*string*[,...]]**files:***input*is an SDDS file containing columns of data to be differentiated. If it contains multiple data pages, each is treated separately. The independent quantity along with the requested derivatives are placed in columns in*output*. By default, the derivative column name is constructed by appending`Deriv`to the variable column name. If applicable, the column name for the derivative error is constructed by appending`DerivSigma`. The data with respect to which the derivative is taken should be monotonically ordered.**switches:**`-pipe[=input][,output]`-- The standard SDDS Toolkit pipe option.`-differentiate=`-- Specifies the name of a column to differentiate, and optionally the name of the column containing the error in the differentiated quantity. May be given any number of times.*columnName*[,*sigmaName*`-versus=`-- Specifies the name of the independent variable column, and optionally the name of the column containing its error.*columnName*[,*sigmaName*`-interval=`-- Specifies the spacing of the data points used to approximate the derivative. The default value of 2 specifies that the derivative for each point will be obtained from values 1 row above and 1 row below the point. In general (ignoring end points, which require special treatment):*integer*

`[-SavitzkyGolay=`-- Specifies using a Savitzky-Golay smoothing filter to perform the derivative, which involves fitting a polynomial of*left*,*right*,*fitOrder*[,*derivOrder*]]*fitOrder*through*left*+*right*+1 points and then giving the derivative of the fitted curve.*derivOrder*is 1 by default and gives the order of derivative to take.`-mainTemplates=`-- Specifies template strings for names and definition entries for the derivative columns in the output file.*item*=*string*[,...]*item*may be one of`name`,`description`,`symbol`. The symbols ``%x'' and ``%y'' are used to represent the independent variable name and the name of the differentiated quantity, respectively.`-errorTemplates=`-- Specifies template strings for names and definition entries for the derivative error columns in the output file.*item*=*string*[,...]*item*may be one of`name`,`description`, the independent variable name and the name of the differentiated quantity, respectively.

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