... | @@ -123,8 +123,8 @@ The `EXPR` The optimiser parser knows the following mathematical functions (whic |
... | @@ -123,8 +123,8 @@ The `EXPR` The optimiser parser knows the following mathematical functions (whic |
|
- `pow(x,k)` : x to the power k
|
|
- `pow(x,k)` : x to the power k
|
|
- `exp(x)` : _e_ to the power x
|
|
- `exp(x)` : _e_ to the power x
|
|
- `log(x)` : natural logarithm of x
|
|
- `log(x)` : natural logarithm of x
|
|
- `ceil(x)` : round x upward to the smallest integral value that is not less than x.
|
|
- `ceil(x)` : round x upward to the smallest integral value that is not less than x
|
|
- `floor(x)` : round x downward to smallest integral value that is not greater than x.
|
|
- `floor(x)` : round x downward to smallest integral value that is not greater than x
|
|
- `fabs(x)` : absolute value of x
|
|
- `fabs(x)` : absolute value of x
|
|
- `fmod(x,y)`: floating point remainder of x/y
|
|
- `fmod(x,y)`: floating point remainder of x/y
|
|
- `sin(x)` : sine of angle x (in radians)
|
|
- `sin(x)` : sine of angle x (in radians)
|
... | @@ -134,11 +134,19 @@ The `EXPR` The optimiser parser knows the following mathematical functions (whic |
... | @@ -134,11 +134,19 @@ The `EXPR` The optimiser parser knows the following mathematical functions (whic |
|
- `tan(x)` : tangent of angle x (in radians)
|
|
- `tan(x)` : tangent of angle x (in radians)
|
|
- `atan(x)` : the arc tangent of x (return value in radians)
|
|
- `atan(x)` : the arc tangent of x (return value in radians)
|
|
|
|
|
|
In addition to this the optimiser parser has one non-STL function:
|
|
In addition the optimiser parser has one non-STL function:
|
|
|
|
|
|
- `sq(x)` : square of x
|
|
- `sq(x)` : square of x
|
|
|
|
|
|
**TODO** Methods to access output files
|
|
There are several methods to access output data:
|
|
|
|
|
|
|
|
- `fromFile(filename)` : reads vector data from file. If the file contains more than one value the sum is returned.
|
|
|
|
- `sumErrSq(measfilename,variable,statfilename)` : computes the square root of the sum of all measurement errors (given as first and third argument) for a variable (second argument) according to $result = \frac{1}{n} * \sqrt{\sum_{i=0}^n (measurement_i - value_i)^2}$
|
|
|
|
- `sddsVariableAt(variable,s,filename)` : interpolates a variable (first argument) from SDDS file (third argument) near a specific _s_ position (second argument)
|
|
|
|
- `radialPeak(filename,turnnumber)` : returns n-th peak of a radial probe output file
|
|
|
|
- `sumErrSqRadialPeak(measfilename,statfilename,start,end)` : computes the square root of the sum of all peak errors (given as first and second argument) for a range of peaks (third argument and fourth argument) according to $result = \frac{1}{n} * \sqrt{\sum_{i=start}^end (measurement_i - value_i)^2}$
|
|
|
|
- `probVariableWithID(variable,id,probelossfile)` : returns the value of the variable (first argument) with a certain ID (second argument) from probe loss file (third argument)
|
|
|
|
- `sameSDDSVariableAt(variable,s)` : same as `sddsVariableAt` for the main `.stat` output file
|
|
|
|
|
|
FODO Example
|
|
FODO Example
|
|
===========
|
|
===========
|
... | | ... | |