Download User Manual - Data Translation

Transcript
Chapter 3 Data Management
Data Structure
Contents
Example of Application
elements in lists can also contain
object references.
the result of a regression, which, in
addition to a data series with
found parameters, also contains
their confidence intervals and the
goodness-of-fit measure of the
regression.
For the X and Z components of the aggregate data structures, all real data types as well
as the calendar time and time span types are allowed. For the Y component, additional
complex data types and the Boolean value type are permitted. The aggregate data
structures from FlexPro especially simplify the analysis in FlexPro, since the X, Y and, if
applicable, Z components in a single formula can be calculated. A formula that calculates
a Fourier transform, for instance, can re-calculate the amplitudes of the time signal in
spectral amplitudes and the time values into frequency values at the same time.
Data Structure List Use the list to create complex data structures, for instance, if the
data structures supported by FlexPro are not suitable for the result. You can have the
results returned as a list even when a calculation procedure returns several results that
cannot be calculated independently of each other as separate formulas. Lists are the
basis for multichannel analyses using FlexPro. Many analysis objects as well as functions
and operators in FPScript support lists. They are processed by element and the result is
then also a list.
Lists are special because they are only allowed as a return value for formulas, but not as
a data structure for a data set. When converting a formula to a data set, only the first
element in the list is used. The same applies to FPScript functions that do not support
processing of lists. These also usually extract the first element and ignore the rest.
Data Unit
Each component of a data object can have a physical unit and is thus converted to a
quantity. The Unit Manager is an integral part of FPScript. You can make calculations
with quantities directly in FPScript. FPScript processes the unit as an integral part of the
data, is able to convert units, recognizes incorrect calculations and determines the result
unit of a calculation from the units of the arguments. The following FPScript code
generates, for instance, a signal with a sine wave with an amplitude of 2 V, a frequency
of 0.1 kHz and a sampling interval of 1 ms:
// Increasing time values in the interval [0 s, 10 s]
// and sampling interval 1 ms
Dim t = Series(0 s, 10 s, 1 ms)
Signal(2 V * Sin(2 Pi * 0.1 kHz * t), t)
103