@@ -77,6 +77,7 @@ getValuesWithUnit(signalTable, name::String) = begin
7777 elseif sigUnit != " "
7878 sigVal = sigVal* uparse (sigUnit)
7979 end
80+ return sigVal
8081end
8182
8283
@@ -355,15 +356,16 @@ end
355356
356357
357358"""
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)
362363
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]`.
364366A flattened signal can be, for example, used for traditional plot functions or for traditional tables.
365367
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:
367369
368370- `name` can be a signal name with or without array range indices (for example `name = "a.b.c[2,3:5]"`).
369371- 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
372374- If targetFloat is not nothing, Float-types are converted to targetFloat
373375- collect(..) is performed on the result.
374376
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
376378(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]"]`.
377379
378380If the required transformation is not possible, a warning message is printed and `nothing` is returned.
379381
380382As a special case, if signal[:values] is a vector or signal[:value] is a scalar and
381383an 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] .
384386"""
385387function getFlattenedSignal (signalTable, name:: String ;
386388 missingToNaN = true ,
0 commit comments