Closed notthetup closed 2 years ago
No problem on REPL:
julia> using SignalAnalysis, SignalAnalysis.Units
julia> chirp(5kHz, 7kHz, 100ms, 44.1kHz; shape=:hyperbolic, window=(tukey,0.05))
SampledSignal @ 44100.0 Hz, 4410-element Vector{ComplexF64}:
0.0 - 0.0im
0.00015368365272524137 + 0.0001327388027281813im
0.00011810536015839258 + 0.0008034894213194122im
-0.000980410986611016 + 0.0015412581539023496im
-0.003108732228055483 + 0.0009334648998984505im
:
Confirmed error occurs as reported with Pluto. The reason is that Pluto calls Base.showarg()
, which the MetaArrays package defines and calls Base.keys()
on the meta data object, implicitly assuming that the object stored in meta data is a dictionary! The SignalAnalysis' metadata is stored in a struct SignalInfo
, for which Base.keys()
is not defined.
Simple fix:
Base.keys(x::SignalAnalysis.SamplingInfo) = fieldnames(typeof(x))
Works!
Running a simple Pluto notebook with
gives this...