-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
drop_channels without preloading #4381
Comments
no need to preload to get the data of a few channels
raw = read_raw_xxx(..., preload=False)
data, times = raw[picks, :]
|
great, thanks! works perfectly. Who would have thought that's so easy (well probably it was at an obvious point in the manual that I didn't see). |
I'd rather think of it as, if you looked and didn't see it, it wasn't obvious enough. Where did you look? Any time to make a PR to add a line to help the next person? |
I expected to find that at http://martinos.org/mne/stable/manual/memory.html But also generally at http://martinos.org/mne/stable/manual/#reading-your-data Can it be found elsewhere? I'll try to add that to the docs in the next days. |
I'll try to add that to the docs in the next days.
thanks a lot.
|
I believe this is solved. |
I remember in a previous version I was able to drop channels without preloading the data.
Now this is not possible anymore.
What would be the most simple (and fastest) way to get all data from a certain selection of channels as a numpy array?
Right now I'm loading all data with
header.load_data()
and then I extract the channels withheader.get_data([0,1,2])
. I fear that somewhere on the way there might be a memory leakage (I had this before), as my memory consumption is far above the final numpy array nbytes. One way to avoid that is to callheader.pick_channels([0,1,2])
but then I'm loading all data just to discard 80% of it.The text was updated successfully, but these errors were encountered: