SDDSlib
|
Integrates a dataset using specified columns and methods. More...
Go to the source code of this file.
Macros | |
#define | NORMAL_PRINTOUT 1 |
#define | BARE_PRINTOUT 2 |
#define | STDOUT_PRINTOUT 4 |
#define | TRAPAZOID_METHOD 0 |
#define | GILLMILLER_METHOD 1 |
#define | N_METHODS 2 |
Enumerations | |
enum | option_type { CLO_INTEGRATE , CLO_VERSUS , CLO_METHOD , CLO_PRINTFINAL , CLO_MAINTEMPLATE , CLO_ERRORTEMPLATE , CLO_PIPE , CLO_EXCLUDE , CLO_MAJOR_ORDER , CLO_COPY , N_OPTIONS } |
Functions | |
void | trapizoid (double *x, double *y, double *sx, double *sy, int64_t n, double *integ, double *error) |
long | checkErrorNames (char **yErrorName, long nIntegrals) |
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, long methodCode, short columnMajorOrder, char **colMatch, int32_t colMatches) |
int | main (int argc, char **argv) |
Variables | |
static char * | USAGE |
static char * | option [N_OPTIONS] |
static char * | methodOption [N_METHODS] |
Integrates a dataset using specified columns and methods.
This program performs numerical integration on specified columns of an SDDS dataset. It supports various integration methods, error propagation, and customizable output templates. Users can specify input and output files, integrate multiple columns, exclude certain columns, and format the output as needed.
Usage: sddsinteg [<input>] [<output>] [-pipe=[input][,output]] -integrate=<column-name>[,<sigma-name>] ... [-exclude=<column-name>[,...]] -versus=<column-name>[,<sigma-name>] [-mainTemplates==<string>[,...]] [-errorTemplates==<string>[,...]] [-copycolumns=
[-method={trapazoid|GillMiller}] [-printFinal[=bare][,stdout][,format=<string>]]
Options: -pipe Standard SDDS pipe option. -integrate Name of column to integrate, plus optional RMS error. Column name may include wildcards, in which case the error name should include the field s for substitution of the main name. -exclude List of column names to exclude from integration. -versus Name of column to integrate against, plus optional RMS error. -mainTemplates==<string> Customize the main templates for name, symbol, or description. Example items: "name", "symbol", "description". -errorTemplates==<string> Customize the error templates for name, symbol, or description. Example items: "name", "symbol", "description". -copycolumns Provide a comma-separated list of columns to copy from the input file to the output file. -method Integration method to use. Options are: trapazoid (default) - Trapezoidal rule. GillMiller - Gill-Miller method (more accurate but no error propagation). -printFinal Print the final value of the integral. Options: bare - Print only the integral value. stdout - Print to standard output. format=<string> - Specify the format for printing.
Definition in file sddsinteg.c.
#define BARE_PRINTOUT 2 |
Definition at line 127 of file sddsinteg.c.
#define GILLMILLER_METHOD 1 |
Definition at line 131 of file sddsinteg.c.
#define N_METHODS 2 |
Definition at line 132 of file sddsinteg.c.
#define NORMAL_PRINTOUT 1 |
Definition at line 126 of file sddsinteg.c.
#define STDOUT_PRINTOUT 4 |
Definition at line 128 of file sddsinteg.c.
#define TRAPAZOID_METHOD 0 |
Definition at line 130 of file sddsinteg.c.
enum option_type |
Definition at line 88 of file sddsinteg.c.
char * changeInformation | ( | SDDS_DATASET * | SDDSout, |
char * | name, | ||
char * | nameRoot, | ||
char * | symbolRoot, | ||
char * | xName, | ||
char * | xSymbol, | ||
char ** | template, | ||
char * | newUnits ) |
Definition at line 512 of file sddsinteg.c.
long checkErrorNames | ( | char ** | yErrorName, |
long | nIntegrals ) |
Definition at line 569 of file sddsinteg.c.
int main | ( | int | argc, |
char ** | argv ) |
Definition at line 139 of file sddsinteg.c.
void makeSubstitutions | ( | char * | buffer1, |
char * | buffer2, | ||
char * | template, | ||
char * | nameRoot, | ||
char * | symbolRoot, | ||
char * | xName, | ||
char * | xSymbol ) |
Definition at line 535 of file sddsinteg.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, | ||
long | methodCode, | ||
short | columnMajorOrder, | ||
char ** | colMatch, | ||
int32_t | colMatches ) |
Definition at line 426 of file sddsinteg.c.
void trapizoid | ( | double * | x, |
double * | y, | ||
double * | sx, | ||
double * | sy, | ||
int64_t | n, | ||
double * | integ, | ||
double * | error ) |
Definition at line 545 of file sddsinteg.c.
|
static |
Definition at line 134 of file sddsinteg.c.
|
static |
Definition at line 102 of file sddsinteg.c.
|
static |
Definition at line 61 of file sddsinteg.c.