Description
The current rdrecord
API is rather confusing when dealing with more complex records/signals. Namely: multi-frequency signals.
We should create a better API to allow users to:
- Specify/know the exact return types/dimensions of the signals being read
- Deal with single and multi-frequency records consistently.
In addition, the current API is also limiting when reading single-frequency records, as there is no way for users to explicitly specify whether they want 1d or 2d numpy arrays.
We current have:
Line 1715 in 0d42dfb
smooth_frames
We've chatted about the issue here, where I suggested a new set of params:
#313 (comment)
What do people think of the suggestion of having two params: return_dims
and smooth_frames
? return_dims
will apply for both single and multi-frequency signals, and smooth_frames
will apply only to multi-frequency signals. Given the combination of the params, the return value of the signals will be:
(1, True): List of 1d arrays. Guaranteed to be same length.
(1, False): List of 1d arrays. Not guaranteed to be same length for multi-frequency signals.
(2, True): Single 2d array.
(2, False): Illegal combination.