Computation Window
Data is added to the Computation Window by pressing the "Computation
with Selected" button in the Database
Directory window.
The computation window allows for you to state an algebraic equation to be
solved with variables representing data. For example, an isotopic mixture
can be generated with "0.98 * a + 0.02 * b". Or some cross sections
can be weight averaged (e.g. "(2 * a + 5 * b ) / 7"). Or a simple
numerical calculation can be written (e.g. "2^3 + 5.1E2 / 66").
You may store a calculation as a new variable by pressing the "Store" button.
This is handy if you wish to define a material as a cross section like natural
iron from its isotopes. Computation sessions may be saved and loaded with the
menu at the top of the window. The current session format is not guaranteed
to always be supported
since it is in a beta stage of testing.
In the follow, d0 is a scalar (0-dimensional data, i.e. a number)
and d2 is 2 column data (2-dimensional data, e.g., cross-section vs energy).
A string is test surrounded b double quotes. For
d2
data
the first column is called the x values and the second column is called the
y values. Also, the expression
- thicken( d2, dx [, Log] ) -> d2
is read as, the function thicken has 2 required and 1 optional argument,
and returns a d2 object. The first argument must be a d2 object, the second
must
be a d0 object and the third, if present, must be a d0 object.
The supported operations are
Symbol |
Meaning |
Restrictions* |
+ |
Addition |
None |
- |
Subtraction |
None |
* |
Multiplication |
None |
/ |
Division |
No division by 0 |
^ |
Exponent |
None |
* Operants must be d0 or d2
- exp( d0 ) -> d0 | exp( d2 ) -> d2
- For exp( d2 ) only the y values
are exponentiated.
- log( d0 ) -> d0 | log(
d2 ) -> d2
- For log( d2 ) only the y values are
log-ed.
- log10( d0 ) -> d0 | log10(
d2 ) -> d2
- For log10( d2 ) only the y values
are log10-ed.
- max( d2 ) -> d0
- Returns the maximum y value of d2
- min( d2 ) -> d0
- Returns of minimum y value of d2
- normalize( d2 ) -> d2
- Returns its argument scaled so that the integral
y(x) dx is 1 (i.e. normalized).
- sqrt( d0 ) -> d0 | sqrt( d2 ) -> d2
- For sqrt( d2 ) only the y values
are square rooted.
- clip( d2, yMin, yMax )
-> d2
- yMin -> d0
- yMax -> d0
- Returns a d2 object whose data is the same as the first arguments,
except that y values are clip at yMin and yMax.
- convolution( d2, d2 [, dxMax] ) -> d2
- Returns the convolution, c(x)
= integral f(x') * g(x-x'), of the first two arguments, f(x) and g(x)
respectively, to this function. The maximum spacing
of the output x-values can be set using dxMax. If dxMax is not set,
then it is set to xDomain / 20 where xDomain is the smallest x domain
of f
and g. Be careful not to have to dxMax be to small or the calculation
will take a long time. The x domain of the output only includes the regions
where the smaller x domain completely overlaps the larger x domain.
- flattop( xMin, xMax ) -> d2
- xMin = d0
- xMax = d0
- Creates a d2 object with points ( ( xMin, 1 ), ( xMax, 1 ) ).
- gauss( xCenter,
xWidth [, f [, xsigma [, xMin [, xMax ] ] ] ] ) -> d2
- xCenter
-> d0
- xWidth -> d0
- f -> d0
- xsigma -> d0
- xMin -> d0
- xMax -> d0
- Returns a d2 object that is a Gaussian centered at xCenter with
width xWidth. The interpolation accuracy of the Gaussian is determine by
f (default = 1e-3
or 0.1%). The x range of the returned object is between xMin and xMax.
The x range is also limits by abs( x - xCenter ) <= xsigma * xWidth.
- pow( d0, d0 )
-> d0 | pow( d2, d0 ) -> d2 | pow( d0, d2 ) -> d2
- ramp( xMin, xMax [, Down ] ) -> d2
- xMin = d0
- xMax = d0
- Down = d0
- Creates a d2 object with points ( ( xMin, 0 ), ( xMax, 1 ) ) if
Down = 0 (default) or with points ( ( xMin, 1 ), ( xMax, 0 ) ) if Down
!= 0.
- range(
d2, xMin,
xMax ) -> d2
- xMin = d0
- xMax = d0
- Returns a d2 object that consist of all points in the first argument
that lie between xMin and xMax.
- rangex( d2, xMin, xMax ) -> d2
- xMin = d0
- xMax = d0
- Returns a d2 object that consist of all points in the first argument
that lie
between xMin and xMax, with the points xMin and xMax added if not in
the first argument.
- scalex( d2, operation, unit)
-> d2
- operation -> string
- unit -> string
- Returns a d2 object that has been modified by the operation and has
a new set of units.
- Examples
- scalex( a, "sin(x)", "")
- scalex( b, "x * 1E-24", "cm^2")
- thicken( d2, dx [, Log] ) -> d2
- dx -> d0
- Log -> d0
- Increase the density of x points in d2 so the the x spacing is
no greater
than dx for Log = 0 (the default). If Log != 0, dx is factional increase
of x value spacing (e.g. x_n / x_(n-1)). For Log = 0, dx must be greater
than 0, else dx must be greater than 1.
- triangle( xMin, xMid, xMax
) -> d2
- xMin = d0
- xMid = d0
- xMax = d0
- Creates a d2 object with points ( (
xMin, 0 ), ( xMid, 1 ), ( xMax, 0 ) ).
UCRL-WEB-207296