@@ -77,6 +77,7 @@ getValuesWithUnit(signalTable, name::String) = begin
77
77
elseif sigUnit != " "
78
78
sigVal = sigVal* uparse (sigUnit)
79
79
end
80
+ return sigVal
80
81
end
81
82
82
83
@@ -355,15 +356,16 @@ end
355
356
356
357
357
358
"""
358
- flattenedSignal = getFlattenedSignal(signalTable, name;
359
- missingToNaN = true,
360
- targetInt = Int,
361
- targetFloat = Float64)
359
+ signal = getFlattenedSignal(signalTable, name;
360
+ missingToNaN = true,
361
+ targetInt = Int,
362
+ targetFloat = Float64)
362
363
363
- Returns a copy of a signal where the values or the value are *flattened* and converted (e.g.: missing -> NaN).
364
+ Returns a copy of a signal where the *flattened* and *converted* values (e.g.: missing -> NaN)
365
+ are stored as `signal[:flattenedValues]` and the legend as `signal[:legend]`.
364
366
A flattened signal can be, for example, used for traditional plot functions or for traditional tables.
365
367
366
- Flattened values is a reshape of values into a vector or a matrix with optionally the following transformations:
368
+ `signal[:flattenedValues]` is a reshape of values into a vector or a matrix with optionally the following transformations:
367
369
368
370
- `name` can be a signal name with or without array range indices (for example `name = "a.b.c[2,3:5]"`).
369
371
- If `missingToNaN=true`, then missing values are replaced by NaN values.
@@ -372,15 +374,15 @@ Flattened values is a reshape of values into a vector or a matrix with optionall
372
374
- If targetFloat is not nothing, Float-types are converted to targetFloat
373
375
- collect(..) is performed on the result.
374
376
375
- Legend is a vector of strings that provides a description for every array column
377
+ `flattenedSignal[:legend]` is a vector of strings that provides a description for every array column
376
378
(e.g. if `"name=a.b.c[2,3:5]", unit="m/s"`, then `legend = ["a.b.c[2,3] [m/s]", "a.b.c[2,3] [m/s]", "a.b.c[2,5] [m/s]"]`.
377
379
378
380
If the required transformation is not possible, a warning message is printed and `nothing` is returned.
379
381
380
382
As a special case, if signal[:values] is a vector or signal[:value] is a scalar and
381
383
an element of values or value is of type `Measurements{targetFloat}` or
382
- `MonteCarloMeasurements{targetFloat}`, then the signal is not transformed and
383
- flattenedSignal = getValues(signalTable,name) or getValue(signalTable,name) .
384
+ `MonteCarloMeasurements{targetFloat}`, then the signal is not transformed,
385
+ so signal[:flattenedValues] = signal[:values] .
384
386
"""
385
387
function getFlattenedSignal (signalTable, name:: String ;
386
388
missingToNaN = true ,
0 commit comments