Transform statement
Transform
Mode=RunAve|RunDiff|RunSum|BackSum|Abs |Diff|Step|DivTim|DivPath|MultTim|MultPath|Equalize
|Zero|MissVal|Fill|Frame |ClusterSum|ClusterAve|ClusterMax|ClusterMin |ClusterDir|ClusterDivers|ClusterSpread|ClusterNeigh|MinDist [Frame=frame_value]
Type conventions
and statement syntax
are explained in the Glossary.
Apply the transformation indicated by the Mode parameter to the cell
values
in all columns of the active data matrix.
Parameters...
Mode
Radio button parameter
indicating the transformation mode. There is no default, specify one
of the following options:
- RunAve = running average using the time window specified by Frame.
If there are empty cells within the averaging window, the transformation
result is the average of the remaining non-empty cells. If all cells
within the averaging window are empty, the result is an empty cell.
- RunDiff = replace the value of each cell by the difference of that
value to the value in the preceding cell. The first cell will become
empty, as well as all cells preceded by an empty cell. Empty cells
remain empty. The function performs a circular transformation of the
difference values if parameter Frame>0: e.g. when treating differences
between direction values with Frame=360 a difference of 270 is replaced
by -90.
- RunSum = replace the value of each cell by the sum of the values
of all non-empty cells from the beginning up to that cell. Empty cells
remain empty.
- BackSum = replace the value of each cell by the sum of the values
of all non-empty cells from the end back to that cell. Empty cells
remain empty.
- Abs = replace all negative cell values by corresponding positive
values. Empty cells remain empty.
- Diff = cells are grouped into contiguous clusters with same value:
cluster boundaries are either defined by value changes or interveening
empty cells. The first cell of each cluster is set to the difference
between its value and the value of the closest upsteram cluster. All
other cells are emptied. This mode is intended for calculation of
relative field indices in data
matrices representing field entries (Matrix statement with Data=Field).
The function performs a circular transformation of the difference
values if parameter Frame>0: e.g. when treating differences between
direction values with Frame=360 a difference of 270 is replaced by
-90.
- Step = as Diff, but differences are calculated downstream.
- DivTim = divide the value of each cell by the time stamp difference
between the corresponding and the nearest upstream data point. Empty
cells remain empty.
- DivPath = divide the value of each cell by the length of the path
segment between the corresponding and the nearest upstream data point.
Empty cells remain empty.
- MultTim = multiply the value of each cell by the time stamp difference
between the current and nearest upstream data point. Empty cells remain
empty.
- MultPath = multiply the value of each cell by the length of the
path segment between the current and nearest upstream data point.
Empty cells remain empty.
- Equalize = divide the value of each cell by the sum of all cells
in the column and multiply the result by 100. Empty cells remain empty.
Modes above are not affected by the selection state of the cells
in the matrix. Below are a set of modes that transform the values
of or generate new values for selected cells. Deselected cells remain
unchanged:
- Zero = set all deselected non-empty cells to zero. Empty cells remain
empty.
- MissVal = empty all deselected cells, that is assign them a missing
value code.
- Fill = set all deselected cells to value of next upstream selected
cell.
- Frame = replace the value of all selected cells by the one supplied
with the Frame parameter.
- ClusterSum = look for clusters of selected cells. For each cluster
found, calculate the sum of all non-empty cells in the cluster and
write that sum to all cells in the cluster, including to empty cells.
If all cells of a cluster are empty they remain empty.
- ClusterAve = look for clusters of selected cells. For each cluster
found, calculate the average of all non-empty cells in the cluster
and write that average to all cells in the cluster, including to empty
cells. If all cells of a cluster are empty they remain empty.
- ClusterMax = look for clusters of selected cells. Within each cluster
found, replace all cell values (including empty cells) by the largest
value in the cluster. If all cells of a cluster are empty they remain
empty.
- ClusterMin = look for clusters of selected cells. Within each cluster
found, replace all cell values (including empty cells) by the smallest
value in the cluster. If all cells of a cluster are empty they remain
empty.
- ClusterDir = look for clusters of selected cells. Within each cluster
found, replace all cell values (including empty cells) with the direction
angle of the vector connecting the first point in the cluster to the
last point in the cluster. If all cells of a cluster are empty they
remain empty.
- ClusterDivers = look for clusters of selected cells. Within each
cluster, replace all non empty cells by the diversity of the corresponding
cluster points, that is the average distance between any two points,
weighted by the distribution of the cell values.
- ClusterSpread = look for clusters of selected cells. For each cluster
determine the center of gravity of the corresponding points. Then
replace all cell values (including empty cells) in the cluster by
the distance of the corresponding point to the cluster's center of
gravity.
- ClusterNeigh = look for clusters of selected cells and replace all
cell values (including empty cells) by the sum of first values of
the corresponding point's neighboring clusters. Neighboring clusters
are those that contain at least one point whose distance to the examined
point is smaller than the value specified by the Frame parameter.
- MinDist = Replace all cell values by the distance of the corresponding
point to the nearest selected point. By definition, all selected cells
obtain value 0.
Frame
Number parameter
needed if RunAve, Frame, or ClusterNeigh are used for Mode. For RunAve,
it specifies the width of the averaging window in seconds. For Frame
it specifies the value to which selected cells should be set. For ClusterNeigh
it specifies the maximally allowed distance for neighbors. If RunDiff
or Diff is specified for Mode, this parameter is optional: values >0
trigger a circular transformation of the difference values, e.g. when
treating differences between direction values with frame=360 a difference
of 270 is replaced by -90.
Note that...
Transformations never modify the active selection mask. Except for
Mode=Zero, Mode=MissVal, Mode=Fill, Mode=ClusterSum, and Mode=ClusterAve,
they are not affected by the active selection mask. They are applied
to all cells of the active data matrix, no matter whether they are currently
selected or deselected. You may, but do not have to, apply transformations
to the active data matrix before using it to create variables.
Additional information...
|