An abandoned work-in-progress for a high level Signal type with a common timebase (in seconds) and groups of channels. Deprecated in favor of AxisArrays.jl.
I require all signals to have a Vector of channels. I like the simplicity of that. However, some algorithms (e.g., PCA of spike snippets) require all the channels to be in a column matrix, and some datafiles return large datasets as columns in matrices, too. Given that we don't have fixed-length arrays, we cannot convert from one to the other without copying.
The current solution to this is to use ArrayViews, which works surprisingly well. But there are a few things I don't like about it.
In interpolation.jl, vi = S<:ArrayView ? Array(Array{eltype(S),1},N): Array(S,N) determines the output array. That is a mess. And a terrible smell. Fixed by improving inference in Grid.jl and SIUnits.jl and using comprehensions!
How does, e.g., PCA get at the matrix? Through private fields of ContinuousViews? Yuck. And then which column matches which vector? Especially if I implement custom indexing? Terrifying.
Perhaps a better solution here is a MatrixSignal type, which only holds a matrix and defines its own indexing such that ms[i] -> ms.matrix[:,i].
I require all signals to have a
Vector
of channels. I like the simplicity of that. However, some algorithms (e.g., PCA of spike snippets) require all the channels to be in a column matrix, and some datafiles return large datasets as columns in matrices, too. Given that we don't have fixed-length arrays, we cannot convert from one to the other without copying.The current solution to this is to use ArrayViews, which works surprisingly well. But there are a few things I don't like about it.
In interpolation.jl,Fixed by improving inference in Grid.jl and SIUnits.jl and using comprehensions!vi = S<:ArrayView ? Array(Array{eltype(S),1},N): Array(S,N)
determines the output array. That is a mess. And a terrible smell.Perhaps a better solution here is a MatrixSignal type, which only holds a matrix and defines its own indexing such that
ms[i] -> ms.matrix[:,i]
.