Skip to content

Commit 88e1ea8

Browse files
committed
Change basetype to eltypeOrType
1 parent 7b2360e commit 88e1ea8

File tree

12 files changed

+148
-144
lines changed

12 files changed

+148
-144
lines changed

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,19 @@ showInfo(sigTable)
6060
Command `showInfo` generates the following output:
6161

6262
```julia
63-
name unit size basetype kind attributes
64-
─────────────────────────────────────────────────────────────────────────────────────────
65-
time "s" (6,) Float64 Var independent=true
66-
load.r "m" (6,3) Float64 Var
67-
motor.angle "rad" (6,) Float64 Var state=true
68-
motor.w "rad/s" (6,) Float64 Var integral="motor.angle"
69-
motor.w_ref ["rad","1/s"] (6,2) Float64 Var info="Reference angle and speed"
70-
wm "rad/s" (6,) Float64 Var integral="motor.angle", alias="motor.w"
71-
ref.clock (6,) Bool Var variability="clock"
72-
motor.w_c (6,) Float64 Var variability="clocked", clock="ref.clock"
73-
motor.inertia "kg*m/s^2" () Float32 Par
74-
motor.data String Par
75-
attributes Par info="This is a test signal table"
63+
name unit size eltypeOrType kind attributes
64+
───────────────────────────────────────────────────────────────────────────────────────────────────────
65+
time "s" (6,) Float64 Var independent=true
66+
load.r "m" (6,3) Float64 Var
67+
motor.angle "rad" (6,) Float64 Var state=true, der="motor.w"
68+
motor.w "rad/s" (6,) Float64 Var
69+
motor.w_ref ["rad", "1/s"] (6,2) Float64 Var info="Reference angle and speed"
70+
wm "rad/s" (6,) Float64 Var alias="motor.w"
71+
ref.clock (6,) Union{Missing,Bool} Var variability="clock"
72+
motor.w_c (6,) Union{Missing,Float64} Var variability="clocked", clock="ref.clock"
73+
motor.inertia "kg*m/s^2" () Float32 Par
74+
motor.data String Par
75+
attributes Par info="This is a test signal table"
7676
```
7777

7878
The various Julia FileIO functions can be directly used to save a signal table

docs/src/Examples/Plots.md

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ plot(sigTable, "phi", heading="sine(time)")
2525
results in:
2626

2727
```julia
28-
name unit size basetype kind attributes
29-
──────────────────────────────────────────────────────
30-
time (100,) Float64 Var independent=true
31-
phi (100,) Float64 Var
28+
name unit size eltypeOrType kind attributes
29+
──────────────────────────────────────────────────────────
30+
time (100,) Float64 Var independent=true
31+
phi (100,) Float64 Var
3232
```
3333

3434
![OneScalarSignal](../../resources/examples/plots/OneScalarSignal.png)
@@ -55,10 +55,10 @@ plot(sigTable, "phi", heading="sine(time)")
5555
results in:
5656

5757
```julia
58-
name unit size basetype kind attributes
59-
───────────────────────────────────────────────────────
60-
time "s" (100,) Float64 Var independent=true
61-
phi "rad" (100,) Float64 Var
58+
name unit size eltypeOrType kind attributes
59+
───────────────────────────────────────────────────────────
60+
time "s" (100,) Float64 Var independent=true
61+
phi "rad" (100,) Float64 Var
6262
```
6363

6464
![OneScalarSignalWithUnit](../../resources/examples/plots/OneScalarSignalWithUnit.png)
@@ -84,10 +84,10 @@ plot(sigTable, "phi", heading="sine(time)")
8484
results in:
8585

8686
```julia
87-
name unit size basetype kind attributes
88-
────────────────────────────────────────────────────────
89-
time "s" (100,) Float64 Var independent=true
90-
r "m" (100, 3) Float64 Var
87+
name unit size eltypeOrType kind attributes
88+
───────────────────────────────────────────────────────────
89+
time "s" (100,) Float64 Var independent=true
90+
r "m" (100,3) Float64 Var
9191
```
9292

9393
![OneVectorSignalWithUnit](../../resources/examples/plots/OneVectorSignalWithUnit.png)
@@ -120,10 +120,10 @@ plot(sigTable, "phi", heading="sine(time)")
120120
results in:
121121

122122
```julia
123-
name unit size basetype kind attributes
124-
─────────────────────────────────────────────────────────────
125-
time (100,) Float64 Var independent=true
126-
matrix (100, 2, 3) Float64 Var
123+
name unit size eltypeOrType kind attributes
124+
─────────────────────────────────────────────────────────────
125+
time (10,) Float64 Var independent=true
126+
matrix (10,2,3) Float64 Var
127127
```
128128

129129
![OneMatrixSignal](../../resources/examples/plots/OneMatrixSignal.png)
@@ -157,10 +157,10 @@ plot(sigTable, "phi", heading="sine(time)")
157157
results in:
158158

159159
```julia
160-
name unit size basetype kind attributes
161-
────────────────────────────────────────────────────────────────────────────────────────────────────
162-
time "s" (10,) Float64 Var independent=true
163-
matrix ["m" "m/s" "m/s^2"; "rad" "rad/s" "rad/s^2"] (10, 2, 3) Float64 Var
160+
name unit size eltypeOrType kind attributes
161+
──────────────────────────────────────────────────────────────────────────────────────────────────────
162+
time "s" (10,) Float64 Var independent=true
163+
matrix ["m" "m/s" "m/s^2"; "rad" "rad/s" "rad/s^2"] (10,2,3) Float64 Var
164164
```
165165

166166
![OneMatrixSignalWithMatrixUnits](../../resources/examples/plots/OneMatrixSignalWithMatrixUnits.png)
@@ -196,16 +196,16 @@ plot(sigTable, "phi", heading="sine(time)")
196196
results in:
197197

198198
```julia
199-
name unit size basetype kind attributes
200-
─────────────────────────────────────────────────────────────────────────────────────────────────
201-
time "s" (5,) Float64 Var independent=true
202-
phi_max "rad" () Float32 Par
203-
i_max () Int64 Par
204-
open () Bool Par
205-
file String Par
206-
matrix1 (2, 3) Float64 Par
207-
matrix2 "m/s" (2, 3) Float64 Par alias="matrix1"
208-
matrix3 ["m" "m/s" "m/s^2"; "rad" "rad/s" "rad/s^2"] (2, 3) Float64 Par alias="matrix1"
199+
name unit size eltypeOrType kind attributes
200+
────────────────────────────────────────────────────────────────────────────────────────────────────
201+
time "s" (5,) Float64 Var independent=true
202+
phi_max "rad" () Float32 Par
203+
i_max () Int64 Par
204+
open () Bool Par
205+
file String Par
206+
matrix1 (2,3) Float64 Par
207+
matrix2 "m/s" (2,3) Float64 Par alias="matrix1"
208+
matrix3 ["m" "m/s" "m/s^2"; "rad" "rad/s" "rad/s^2"] (2,3) Float64 Par alias="matrix1"
209209
```
210210

211211
![ConstantSignals](../../resources/examples/plots/ConstantSignals.png)
@@ -252,14 +252,14 @@ plot(sigTable, [("sigC", "load.r[2:3]"), ("sigB", "sigD")])
252252
results in:
253253

254254
```julia
255-
name unit size basetype kind attributes
256-
────────────────────────────────────────────────────────────────────────────────────────────────
257-
time "s" (153,) Float64 Var independent=true
258-
load.r "m" (153, 3) Float64 Var
259-
sigA "m" (153,) Float64 Var
260-
sigB "m/s" (153,) Float64 Var
261-
sigC "N*m" (153,) Float64 Var
262-
sigD "rad/s" (153,) Float64 Var variability="clocked", info="Motor angular velocit…
255+
name unit size eltypeOrType kind attributes
256+
─────────────────────────────────────────────────────────────────────────────────────────────────────────────
257+
time "s" (153,) Float64 Var independent=true
258+
load.r "m" (153,3) Float64 Var
259+
sigA "m" (153,) Float64 Var
260+
sigB "m/s" (153,) Float64 Var
261+
sigC "N*m" (153,) Union{Missing,Float64} Var
262+
sigD "rad/s" (153,) Union{Missing,Float64} Var variability="clocked", info="Motor angular velocit…
263263
```
264264
265265
![MissingValues](../../resources/examples/plots/MissingValues.png)
@@ -298,19 +298,19 @@ plot(sigTable, ["load.r", ("motor.w", "wm", "motor.w_c", "ref.clock")], heading=
298298
results in:
299299
300300
```julia
301-
name unit size basetype kind attributes
302-
─────────────────────────────────────────────────────────────────────────────────────────────────
303-
time "s" (6,) Float64 Var independent=true
304-
load.r "m" (6, 3) Float64 Var
305-
motor.angle "rad" (6,) Float64 Var state=true
306-
motor.w "rad/s" (6,) Float64 Var integral="motor.angle"
307-
motor.w_ref ["rad", "1/s"] (6, 2) Float64 Var info="Reference angle and speed"
308-
wm "rad/s" (6,) Float64 Var integral="motor.angle", alias="motor.w"
309-
ref.clock (6,) Bool Var variability="clock"
310-
motor.w_c (6,) Float64 Var variability="clocked", clock="ref.clock"
311-
motor.inertia "kg*m/s^2" () Float32 Par
312-
motor.data String Par
313-
attributes Par info="This is a test signal table"
301+
name unit size eltypeOrType kind attributes
302+
──────────────────────────────────────────────────────────────────────────────────────────────────────────────
303+
time "s" (6,) Float64 Var independent=true
304+
load.r "m" (6,3) Float64 Var
305+
motor.angle "rad" (6,) Float64 Var state=true, der="motor.w"
306+
motor.w "rad/s" (6,) Float64 Var
307+
motor.w_ref ["rad", "1/s"] (6,2) Float64 Var info="Reference angle and speed"
308+
wm "rad/s" (6,) Float64 Var alias="motor.w"
309+
ref.clock (6,) Union{Missing,Bool} Var variability="clock"
310+
motor.w_c (6,) Union{Missing,Float64} Var variability="clocked", clock="ref.clock"
311+
motor.inertia "kg*m/s^2" () Float32 Par
312+
motor.data String Par
313+
attributes Par info="This is a test signal table"
314314
```
315315
316316
![VariousTypes](../../resources/examples/plots/VariousTypes.png)

docs/src/Functions/OverviewOfFunctions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Note, *FileIO* functions (e.g. JSON, HDF5) can be directly used, see [FileIO Exa
3030
| [`isPar`](@ref) | Returns true, if signal is a [`Par`](@ref). |
3131
| [`isSignal`](@ref) | Returns true, if signal is a [`Var`](@ref) or a [`Par`](@ref). |
3232
| [`showSignal`](@ref) | Prints a [`Var`](@ref)(...) or [`Par`](@ref)(...) signal to io. |
33-
| [`basetype`](@ref) | Returns eltype of an array (but without Missing) and otherwise returns typeof. | |
33+
| [`eltypeOrType`](@ref) | Returns eltype(..) of AbstractArray or otherwise typeof(..). |
3434
| [`quantity`](@ref) | Returns `Unitful.Quantity` from numberType and numberUnit, e.g. `quantity(Float64,u"m/s")` |
3535
| [`unitAsParseableString`](@ref) | Returns the unit as a String that can be parsed with `Unitful.uparse`, e.g. "m*s^-1" |
3636

docs/src/Functions/SignalTables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The functions below operate on a *signal table* that implements the [Abstract Si
1515
| [`new_signal_table`](@ref) | Returns a new signal table dictionary (= OrderedDict{String,Any}("_class" => :SignalTable)). |
1616
| [`SignalTable`](@ref) | Returns a new instance of type SignalTable. |
1717
| [`showInfo`](@ref) | Writes info about a signal table to the output stream. |
18-
| [`independentSignalNames`](@ref | Returns the names of the independent signals. |
18+
| [`independentSignalNames`](@ref) | Returns the names of the independent signals. |
1919
| [`signalNames`](@ref) | Returns a string vector of the signal names that are present in a signal table. |
2020
| [`hasSignal`](@ref) | Returns `true` if a signal is present in a signal table. |
2121
| [`getSignal`](@ref) | Returns signal from a signal table as [`Var`](@ref) or as [`Par`](@ref). |

docs/src/Functions/Signals.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The functions below operate on *signals*.
1818
| [`isPar`](@ref) | Returns true, if signal is a [`Par`](@ref). |
1919
| [`isSignal`](@ref) | Returns true, if signal is a [`Var`](@ref) or a [`Par`](@ref). |
2020
| [`showSignal`](@ref) | Prints a [`Var`](@ref)(...) or [`Par`](@ref)(...) signal to io. |
21-
| [`basetype`](@ref) | Returns eltype of an array (but without Missing) and otherwise returns typeof. | |
21+
| [`eltypeOrType`](@ref) | Returns eltype of an array (but without Missing) and otherwise returns typeof. | |
2222
| [`quantity`](@ref) | Returns `Unitful.Quantity` from numberType and numberUnit, e.g. `quantity(Float64,u"m/s")` |
2323
| [`unitAsParseableString`](@ref) | Returns the unit as a String that can be parsed with `Unitful.uparse`, e.g. "m*s^-1" |
2424

@@ -29,7 +29,7 @@ isVar
2929
isPar
3030
isSignal
3131
showSignal
32-
basetype
32+
eltypeOrType
3333
quantity
3434
unitAsParseableString
3535
```

0 commit comments

Comments
 (0)