Open cbrnr opened 7 months ago
Maybe we could add a method Edf.to_numpy()
which tries to return an array of shape (n_signals, n_samples)
(raising an exception if the sampling frequencies don't match)?
I think this would be a great addition! If there are other signals, users could drop them, e.g. edf.drop_signals([1, 6, 8]).to_numpy()
. WDYT?
edf.drop_signals()
only works in-place and does not return the Edf
object, so that would have to be done in two lines, but other than that I agree!
Ah OK! Maybe worth discussing if these methods should also return the object in addition so that chaining works?
As mentioned in #48, I think it would be useful to have a public method to access the underlying data array. This only works for signals with the same sampling frequency, but I think this would be a rather common use case for EEG recordings. Typically, I want to access the data from all channels as a NumPy array for subsequent processing. I'm not sure what the best way to expose this would look like, but hence this issue 😄.