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 a
  • Par 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 functionsDescription
VarReturns a variable signal definition in form of a dictionary.
ParReturns a parameter signal definition in form of a dictionary.
isVarReturns true, if signal is a Var.
isParReturns true, if signal is a Par.
isMapReturns true, if signal is a Map.
isSignalReturns true, if signal is a Var, Par or Map.
showSignalPrints a Var, Par or Map signal to io.
eltypeOrTypeReturns eltype(..) of AbstractArray or otherwise typeof(..).
quantityReturns Unitful.Quantity from numberType and numberUnit, e.g. quantity(Float64,u"m/s")
unitAsParseableStringReturns the unit as a String that can be parsed with Unitful.uparse, e.g. "m*s^-1"
Signal table functionsDescription
SignalTableReturns a new SignalTable dictionary.
showInfoWrites info about a signal table to the output stream.
getIndependentSignalNamesReturns the names of the independent signals.
getSignalNamesReturns a string vector of the signal names that are present in a signal table.
hasSignalReturns true if a signal is present in a signal table.
getSignalReturns signal from a signal table as Var, Par or Map.
getSignalInfoReturns signal with :_typeof, :_size keys instead of :values/:value keys.
getIndependentSignalsSizeReturns the lengths of the independent signals as Dims.
getValuesReturns the values of a Var signal from a signal table.
getValuesWithUnitReturns the values of a Var signal from a signal table including its unit.
getValueReturns the value of a Par signal from a signal table.
getValueWithUnitReturns the value of a Par signal from a signal table including its unit.
getFlattenedSignalReturns a copy of a signal where the values or the value are flattened and converted for use in plots or traditional tables.
getDefaultHeadingReturns the default heading for a plot.
signalTableToJSONReturns a JSON string representation of a signal table.
writeSignalTableWrite a signal table in JSON format on file.
toSignalTableReturns a signal table as SignalTable object.
signalTableToDataFrameReturns a signal table as DataFrame object.
Plot package functionsDescription
@usingPlotPackageExpands into using PlotPackage_<PlotPackageName>
usePlotPackageDefine the plot package to be used.
usePreviousPlotPackageDefine the previously defined plot package to be used.
currentPlotPackageReturn name defined with usePlotPackage
Plot functionsDescription
plotPlot signals from a signal table in multiple diagrams/figures.
saveFigureSave figure in different formats on file.
closeFigureClose one figure
closeAllFiguresClose all figures
showFigureShow figure in window (only GLMakie, WGLMakie)