Allgemeine Werkstoffeigenschaften
Werkstoffwissenschaften  —  Technische Fakultät  —  Friedrich-Alexander Universität  —  UnivIS


Flexible smoothing of multi-valued data series.


The multi-valued data series is accepted as plain text file with data columns separated by whitespace(s). The desired way of smoothing is configured by a special line following the format:

#! integrationColumn reductionColumn reductionStep 
integrationColumndata column containing ordered(!) values to integrate/differentiate along (usually time)
reductionColumndata column along which the reductionStep should result
reductionSteppoint to point interval within reductionColumn after smoothing

This smoothing scheme is applied for all subsequent lines until the next configuration line is encountered.

example file

In the example below, which corresponds to the two functions illustrated in the figure, two parts with different smoothing are defined. Both parts integrate over the first column, i.e. the monotonically increasing x-axis. In the first part, smoothing results in one value for every increment of 0.2 in the second column, thus allowing for variable steps along the x-axis. In contrast, the second part does a (regular) smoothing along the x-axis with step size of 5.

#! 1 2 0.2
0.837662862007  0.0866324461871 -0.172321584937
1.0618530706    0.225249967544   0.0594851994801
1.08743986213   0.14984296543    0.0848815013887
1.98060706372   0.315311660212   0.704014289526
2.52368548444   0.569025267951   0.937351328074
2.90012744169   0.503811650836   1.10890692525
3.23396529021   0.731899082155   1.21759822789
#! 1 1 5
25.5062476168  -0.872633495077   3.19399818262
26.0808390525  -0.911107196773   3.20780466247
26.5761141391  -0.967213593978   3.44124056372
26.7216262045  -0.793267519076   3.33983363803
26.833347938   -0.680978601678   3.25413829945
27.7952435362  -0.665476366915   3.44076012172
28.6792013321  -0.631359257412   3.25816844019

algorithm / method

The smoothing is performed within each part of the file which is delimited by a line of above stated format. Per part each data column is integrated along the integrationColumn. This is continued until the integral of the reductionColumn is equal or larger than the corresponding integral over the (constant) sum reductionStep + lastSmoothenedValueInReductionColumn (or until the part ends). The smoothened values in all data columns then result from cutting the integration distance to that value for which both above integrals would have been exactly equal. Integration is continued from this value in integrationColumn and the resulting lastSmoothenedValueInReductionColumn.