Skip to content
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

Open
wants to merge 8 commits into
base: master
from

Conversation

@jasmainak
Copy link
Member

jasmainak commented Aug 7, 2019

To do

  • make use of MNE-Python to handle duplicate events: mne-tools/mne-python#6688
  • make mne-study-template work for inconsitent runs
@jasmainak jasmainak added this to In progress in gsoc 2019 via automation Aug 7, 2019
@jasmainak

This comment has been minimized.

Copy link
Member Author

jasmainak commented Aug 7, 2019

This PR should be merged after #40

@jasmainak

This comment has been minimized.

Copy link
Member Author

jasmainak commented Aug 7, 2019

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 mne-python end because all the epochs were dropped and that's not what the error message says. Another easy fix @sappelhoff ?

I need to stop now. Can you take over @sappelhoff ?

@jasmainak jasmainak force-pushed the jasmainak:bids_ds001971 branch from 1bcba81 to 231c62c Aug 7, 2019
@jasmainak jasmainak mentioned this pull request Aug 8, 2019
1 of 1 task complete
@sappelhoff sappelhoff force-pushed the jasmainak:bids_ds001971 branch from 1072fe9 to d680bd8 Aug 8, 2019
@jasmainak

This comment has been minimized.

Copy link
Member Author

jasmainak commented Aug 12, 2019

@sappelhoff why is CircleCI failing here?

@sappelhoff sappelhoff force-pushed the jasmainak:bids_ds001971 branch from a1d6b0f to a952569 Aug 14, 2019
@sappelhoff sappelhoff changed the title make it work for ds001971 MRG: make it work for ds001971 Aug 14, 2019
gsoc 2019 automation moved this from In progress to Done Aug 14, 2019
@sappelhoff sappelhoff reopened this Aug 14, 2019
gsoc 2019 automation moved this from Done to In progress Aug 14, 2019
@sappelhoff sappelhoff force-pushed the jasmainak:bids_ds001971 branch from a952569 to 51b3a8d Aug 15, 2019
@jasmainak

This comment has been minimized.

Copy link
Member Author

jasmainak commented Aug 20, 2019

@sappelhoff can you make the CIs happy here?

jasmainak and others added 7 commits Aug 7, 2019
@sappelhoff sappelhoff force-pushed the jasmainak:bids_ds001971 branch from c28281b to a4fde6a Aug 21, 2019
@jasmainak

This comment has been minimized.

Copy link
Member Author

jasmainak commented Aug 21, 2019

@sappelhoff where did my commit disappear? :)

@sappelhoff

This comment has been minimized.

Copy link
Member

sappelhoff commented Aug 21, 2019

@sappelhoff where did my commit disappear? :)

😱 which commit?

@sappelhoff

This comment has been minimized.

Copy link
Member

sappelhoff commented Aug 21, 2019

uff, got it: c28281b

no clue how it disappeared ... why it did not survive the rebase and force push

Co-authored-by: Mainak Jas <mainakjas@gmail.com>
@sappelhoff

This comment has been minimized.

Copy link
Member

sappelhoff commented Aug 21, 2019

so commit is back @jasmainak ... but now it's failing of course :-)

I'll add this to the project board

@jasmainak

This comment has been minimized.

Copy link
Member Author

jasmainak commented Aug 21, 2019

@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 ...

@sappelhoff

This comment has been minimized.

Copy link
Member

sappelhoff commented Aug 22, 2019

@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

@jasmainak

This comment has been minimized.

Copy link
Member Author

jasmainak commented Aug 22, 2019

what did not get done in 3 months will not get done in 4 days :)

@sappelhoff sappelhoff changed the title MRG: make it work for ds001971 Make it work for "inconsisten runs" (using ds001971) Aug 23, 2019
@sappelhoff sappelhoff changed the title Make it work for "inconsisten runs" (using ds001971) Make it work for "inconsistent runs" (using ds001971) Aug 23, 2019
warnings.warn('Events are not unique. Uniqifying them')
_, idx = np.unique(events[:, 0], return_index=True)
events = events[idx]

This comment has been minimized.

Copy link
@sappelhoff

sappelhoff Aug 29, 2019

Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
gsoc 2019
  
In progress
4 participants
You can’t perform that action at this time.