SumDimension
SumDimension [/D=dimension /DEST=destWave /Y=numType ] srcWave
The SumDimension operation sums values in srcWave along the specified dimension.
The SumDimension operation was added in Igor Pro 7.00.
Flags
| /D=dimension | Specifies a zero-based dimension number. | ||||||||
| |||||||||
| If you omit /D the operation sums the highest dimension in the wave. | |||||||||
| /DEST=destWave | |||||||||
| Specifies the output wave created by the operation. If destWave already exists it is overwritten by the new results. | |||||||||
| If you omit /DEST the operation saves the data in W_SumDimension if the output wave is 1D or M_SumDimension otherwise. | |||||||||
| /FREE | Creates the specified destination wave as a free wave. | ||||||||
| /FREE is allowed only in functions, and only if the destination waves are simple names or wave reference structure fields. | |||||||||
| See Free Waves for more discussion. | |||||||||
| The /FREE flag was added in Igor Pro 10.00. | |||||||||
| /Y=type | Specifies the data type of the output wave. See WaveType for the supported values of type. | ||||||||
| If you omit /Y, the output wave is double precision. | |||||||||
| Pass -1 for type to force the output wave to have the same data type as srcWave. | |||||||||
Details
The operation sums one dimension of an N dimensional wave producing an output wave with N-1 dimensions except if srcWave is 1D wave in which case SumDimension produces a single point 1D output wave. For example, given a 4D wave of dimensions dim0 x dim1 x dim2 x dim3 and the command:
SumDimension/D=1/DEST=wout wave4d
creates a wave wout that satisfies
and wout has dimensions dim0 x dim2 x dim3.
If any values in srcWave are NaN, the corresponding sum element will be NaN.
See Also
MatrixOp keywords sumRows, sumCols, sumBeams
ImageTransform keywords sumAllCols, sumAllRows, sumPlane, sumPlanes