Overview of Functions
This chapter documents functions that operate on signals and on signal tables
A signal table is an ordered dictionary of signals with string keys that supports the Abstract Signal Table Interface. The first k entries represent the k independent signals. A signal is either a
Var
dictionary that has a required :values key representing a signal array of any element type as function of the independent signal(s) (or is the k-th independent variable), or aPar
dictionary that has an optional :value key representing a constant of any type.
A signal array has indices [i1,i2,...,j1,j2,...]
to hold variable elements [j1,j2,...]
at the [i1,i2,...]
independent signal(s). If an element of a signal array is not defined it has a value of missing. In both dictionaries, additional attributes can be stored, for example units, into texts, variability (continuous, clocked, ...), alias.
Note, FileIO functions (e.g. JSON, HDF5) can be directly used, see FileIO Examples.
Signal functions | Description |
---|---|
Var | Returns a variable signal definition in form of a dictionary. |
Par | Returns a parameter signal definition in form of a dictionary. |
isVar | Returns true, if signal is a Var . |
isPar | Returns true, if signal is a Par . |
isMap | Returns true, if signal is a Map . |
isSignal | Returns true, if signal is a Var , Par or Map . |
showSignal | Prints a Var , Par or Map signal to io. |
eltypeOrType | Returns eltype(..) of AbstractArray or otherwise typeof(..). |
quantity | Returns Unitful.Quantity from numberType and numberUnit, e.g. quantity(Float64,u"m/s") |
unitAsParseableString | Returns the unit as a String that can be parsed with Unitful.uparse , e.g. "m*s^-1" |
Signal table functions | Description |
---|---|
SignalTable | Returns a new SignalTable dictionary. |
showInfo | Writes info about a signal table to the output stream. |
getIndependentSignalNames | Returns the names of the independent signals. |
getSignalNames | Returns a string vector of the signal names that are present in a signal table. |
hasSignal | Returns true if a signal is present in a signal table. |
getSignal | Returns signal from a signal table as Var , Par or Map . |
getSignalInfo | Returns signal with :_typeof, :_size keys instead of :values/:value keys. |
getIndependentSignalsSize | Returns the lengths of the independent signals as Dims. |
getValues | Returns the values of a Var signal from a signal table. |
getValuesWithUnit | Returns the values of a Var signal from a signal table including its unit. |
getValue | Returns the value of a Par signal from a signal table. |
getValueWithUnit | Returns the value of a Par signal from a signal table including its unit. |
getFlattenedSignal | Returns a copy of a signal where the values or the value are flattened and converted for use in plots or traditional tables. |
getDefaultHeading | Returns the default heading for a plot. |
signalTableToJSON | Returns a JSON string representation of a signal table. |
writeSignalTable | Write a signal table in JSON format on file. |
toSignalTable | Returns a signal table as SignalTable object. |
signalTableToDataFrame | Returns a signal table as DataFrame object. |
Plot package functions | Description |
---|---|
@usingPlotPackage | Expands into using PlotPackage_<PlotPackageName> |
usePlotPackage | Define the plot package to be used. |
usePreviousPlotPackage | Define the previously defined plot package to be used. |
currentPlotPackage | Return name defined with usePlotPackage |
Plot functions | Description |
---|---|
plot | Plot signals from a signal table in multiple diagrams/figures. |
saveFigure | Save figure in different formats on file. |
closeFigure | Close one figure |
closeAllFigures | Close all figures |
showFigure | Show figure in window (only GLMakie, WGLMakie) |