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
Make it work for "inconsistent runs" (using ds001971) #41
Conversation
This PR should be merged after #40 |
I get: ---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
~/Desktop/projects/github_repos/mne-study-template/05a-run_ica.py in <module>()
171 parallel, run_func, _ = parallel_func(run_ica, n_jobs=config.N_JOBS)
172 parallel(run_func(subject, session) for subject, session in
--> 173 itertools.product(config.subjects_list, config.sessions))
~/Desktop/projects/github_repos/mne-study-template/05a-run_ica.py in <genexpr>(.0)
170 if config.use_ica:
171 parallel, run_func, _ = parallel_func(run_ica, n_jobs=config.N_JOBS)
--> 172 parallel(run_func(subject, session) for subject, session in
173 itertools.product(config.subjects_list, config.sessions))
~/Desktop/projects/github_repos/mne-study-template/05a-run_ica.py in run_ica(subject, session)
136 ica.fit(epochs_for_ica, decim=config.ica_decim)
137 else:
--> 138 ica.fit(epochs_for_ica, picks=picks, decim=config.ica_decim)
139
140 print(' Fit %d components (explaining at least %0.1f%% of the'
</home/mainak/Desktop/projects/github_repos/mne-python/mne/externals/decorator.py:decorator-gen-394> in fit(self, inst, picks, start, stop, decim, reject, flat, tstep, reject_by_annotation, verbose)
~/Desktop/projects/github_repos/mne-python/mne/utils/_logging.py in wrapper(*args, **kwargs)
87 with use_log_level(verbose_level):
88 return function(*args, **kwargs)
---> 89 return function(*args, **kwargs)
90 return FunctionMaker.create(
91 function, 'return decfunc(%(signature)s)',
~/Desktop/projects/github_repos/mne-python/mne/preprocessing/ica.py in fit(self, inst, picks, start, stop, decim, reject, flat, tstep, reject_by_annotation, verbose)
472 tstep, reject_by_annotation, verbose)
473 elif isinstance(inst, BaseEpochs):
--> 474 self._fit_epochs(inst, picks, decim, verbose)
475
476 # sort ICA components by explained variance
~/Desktop/projects/github_repos/mne-python/mne/preprocessing/ica.py in _fit_epochs(self, epochs, picks, decim, verbose)
569 # more from _pre_whiten)
570 data, self.pre_whitener_ = \
--> 571 self._pre_whiten(np.hstack(data), epochs.info, picks)
572
573 self._fit(data, self.max_pca_components, 'epochs')
~/anaconda2/envs/mne/lib/python3.6/site-packages/numpy/core/shape_base.py in hstack(tup)
286 return _nx.concatenate(arrs, 0)
287 else:
--> 288 return _nx.concatenate(arrs, 1)
289
290
ValueError: need at least one array to concatenate This is a bad error message from I need to stop now. Can you take over @sappelhoff ? |
1bcba81
to
231c62c
Compare
1072fe9
to
d680bd8
Compare
@sappelhoff why is CircleCI failing here? |
a1d6b0f
to
a952569
Compare
a952569
to
51b3a8d
Compare
@sappelhoff can you make the CIs happy here? |
c28281b
to
a4fde6a
Compare
@sappelhoff where did my commit disappear? :) |
😱 which commit? |
uff, got it: c28281b no clue |
Co-authored-by: Mainak Jas <mainakjas@gmail.com>
so commit is back @jasmainak ... but now it's failing of course :-) I'll add this to the project board |
@sappelhoff don't add too much to the project board. It'll just be me and maybe one more person on this. And we're there for 4.5 days split over many projects ... |
so you are telling me I should not put the excess work from my GSoC on the project board? 😄 sounds reasonable ... but it felt so nice |
what did not get done in 3 months will not get done in 4 days :) |
warnings.warn('Events are not unique. Uniqifying them') | ||
_, idx = np.unique(events[:, 0], return_index=True) | ||
events = events[idx] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with mne-tools/mne-python#6688 being merged, we can outsource handling of non-unique events to MNE-Python and remove this code in the study template
Closes mne-tools#41 Remaining / highlightes issues: - Original dataset doesn't store fine-calibration and crosstalk files according to BIDS, so not doing Maxwell filtering for now - I'd like to calculate the contrast of "face" vs "scrambled", however, to do that, I'd need to merge the "familiar" and "unfamiliar" events to "faces". We need to add support for operations like this. Tests will fail until mne-tools/mne-bids#680 has been merged.
I incorrectly referenced this PR in a different commit. Will start working on this one now. |
@jasmainak any interest in redoing this with latest |
umm ... I'm not really using |
I have been using MNE-BIDS-Pipeline for inconsistent runs with some success, and opened #820 to discuss a somewhat related issue. Let's close this for now and open follow-up PRs as needed to address specific use cases. |
To do