SDDSlib
|
Differentiates a data set in SDDS format. More...
Go to the source code of this file.
Enumerations | |
enum | option_type { CLO_DIFFERENTIATE , CLO_VERSUS , CLO_INTERVAL , CLO_MAINTEMPLATE , CLO_ERRORTEMPLATE , CLO_PIPE , CLO_EXCLUDE , CLO_SAVITZKYGOLAY , CLO_MAJOR_ORDER , N_OPTIONS } |
Functions | |
long | checkErrorNames (char **yErrorName, long nDerivatives) |
void | makeSubstitutions (char *buffer1, char *buffer2, char *template, char *nameRoot, char *symbolRoot, char *xName, char *xSymbol) |
char * | changeInformation (SDDS_DATASET *SDDSout, char *name, char *nameRoot, char *symbolRoot, char *xName, char *xSymbol, char **template, char *newUnits) |
long | setupOutputFile (SDDS_DATASET *SDDSout, SDDS_DATASET *SDDSin, char *output, char ***yOutputName, char ***yOutputErrorName, char ***yOutputUnits, char *xName, char *xErrorName, char **yName, char **yErrorName, long yNames, char **mainTemplate, char **errorTemplate, int32_t interval, long order, short columnMajorOrder) |
long | findDerivIndices (int64_t *i1, int64_t *i2, long interval, int64_t i, int64_t rows) |
void | takeDerivative (double *x, double *y, double *sy, int64_t rows, double *deriv, double *derivSigma, double *derivPosition, long interval) |
void | takeSGDerivative (double *x, double *y, int64_t rows, double *deriv, double *derivPosition, long left, long right, long sgOrder, long derivOrder) |
int | main (int argc, char **argv) |
Variables | |
static char * | USAGE |
static char * | option [N_OPTIONS] |
Differentiates a data set in SDDS format.
This program calculates the derivative of specified columns in an SDDS data set. It supports various options including handling error columns, Savitzky-Golay filtering, and customizable output templates.
Usage: sddsderiv [<input>] [<output>] [-pipe=[input][,output]] -differentiate=<column-name>[,<sigma-name>]... [-exclude=<column-name>[,...]] -versus=<column-name> [-interval=<integer>] [-SavitzkyGolay=<left>,<right>,<fitOrder>[,<derivOrder>]] [-mainTemplates==<string>[,...]] [-errorTemplates==<string>[,...]] [-majorOrder=row|column]
Options: -pipe=[input][,output] Use standard input/output. -differentiate=<col>[,<sigma-col>]... Columns to differentiate, optionally specifying sigma columns. -exclude=<col>[,...] Columns to exclude from differentiation. -versus=<col> Column to differentiate with respect to. -interval=<integer> Interval for finite difference. -SavitzkyGolay=<left>,<right>,<fitOrder>[,<derivOrder>] Apply Savitzky-Golay filter with specified parameters. -mainTemplates==<string>[,...] Templates for main output columns. Items: name, symbol, description. -errorTemplates==<string>[,...] Templates for error output columns. Items: name, symbol, description. -majorOrder=row|column Set major order of data.
The -templates may be "name", "symbol" or "description". The default main name, description, and symbol templates are "%yNameDeriv", "Derivative w.r.t %xSymbol of %ySymbol", and "d[%ySymbol]/d[%xSymbol]", respectively. The default error name, description, and symbol templates are "%yNameDerivSigma", "Sigma of derivative w.r.t %xSymbol of %ySymbol", and "Sigma[d[%ySymbol]/d[%xSymbol]]", respectively.
Definition in file sddsderiv.c.
enum option_type |
Definition at line 86 of file sddsderiv.c.
char * changeInformation | ( | SDDS_DATASET * | SDDSout, |
char * | name, | ||
char * | nameRoot, | ||
char * | symbolRoot, | ||
char * | xName, | ||
char * | xSymbol, | ||
char ** | template, | ||
char * | newUnits ) |
Definition at line 499 of file sddsderiv.c.
long checkErrorNames | ( | char ** | yErrorName, |
long | nDerivatives ) |
Definition at line 529 of file sddsderiv.c.
long findDerivIndices | ( | int64_t * | i1, |
int64_t * | i2, | ||
long | interval, | ||
int64_t | i, | ||
int64_t | rows ) |
Definition at line 371 of file sddsderiv.c.
int main | ( | int | argc, |
char ** | argv ) |
Definition at line 120 of file sddsderiv.c.
void makeSubstitutions | ( | char * | buffer1, |
char * | buffer2, | ||
char * | template, | ||
char * | nameRoot, | ||
char * | symbolRoot, | ||
char * | xName, | ||
char * | xSymbol ) |
Definition at line 520 of file sddsderiv.c.
long setupOutputFile | ( | SDDS_DATASET * | SDDSout, |
SDDS_DATASET * | SDDSin, | ||
char * | output, | ||
char *** | yOutputName, | ||
char *** | yOutputErrorName, | ||
char *** | yOutputUnits, | ||
char * | xName, | ||
char * | xErrorName, | ||
char ** | yName, | ||
char ** | yErrorName, | ||
long | yNames, | ||
char ** | mainTemplate, | ||
char ** | errorTemplate, | ||
int32_t | interval, | ||
long | order, | ||
short | columnMajorOrder ) |
Definition at line 407 of file sddsderiv.c.
void takeDerivative | ( | double * | x, |
double * | y, | ||
double * | sy, | ||
int64_t | rows, | ||
double * | deriv, | ||
double * | derivSigma, | ||
double * | derivPosition, | ||
long | interval ) |
Definition at line 347 of file sddsderiv.c.
void takeSGDerivative | ( | double * | x, |
double * | y, | ||
int64_t | rows, | ||
double * | deriv, | ||
double * | derivPosition, | ||
long | left, | ||
long | right, | ||
long | sgOrder, | ||
long | derivOrder ) |
Definition at line 334 of file sddsderiv.c.
|
static |
Definition at line 99 of file sddsderiv.c.
|
static |
Definition at line 56 of file sddsderiv.c.