-
Notifications
You must be signed in to change notification settings - Fork 533
fix for SpecifySPMModel #1200
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
fix for SpecifySPMModel #1200
Conversation
@@ -476,7 +476,7 @@ def _concatenate_info(self, infolist): | |||
sum(nscans[0:(i + 1)]) | |||
infoout.onsets[j].extend(onsets.tolist()) | |||
for j, val in enumerate(info.durations): | |||
if len(val) > 1: | |||
if len(val) > 0: |
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.
i think this can simply be: if len(val):
also could you please add your test to test_modelgen? it should fail without this change, and pass with it? there is already a section that checks concatenation.
@satra I implemented the test and corrected based on your comments. In the test I added some comments to separate the intention of the different tests and added mine at the end. Also modified the last test (before mine) to contrast the fact that when there are three sessions and they are not concatenated the durations are detected just fine. |
thanks @MartinPerez |
thanks @satra |
CircleCI tests are not passing on this PR. We should consider reverting the merge until this is resolved. |
@chrisfilo - is there an error message? this should only affect the spm test. |
Both example SPM workflows fail to run. See https://circleci.com/gh/nipy/nipype/48 for details. |
Effectively this should be reverted. The key problem is the same that I had (non matching number of onsets and events / Number of event onsets (16) does not match the number of durations (4)) but i guess now its about specifying all durations with only one number? When I ran the simple test, the example with one duration to describe all onsets seemed to be fine too. |
i think we should fix it to address both cases.
|
I would say that we have to check the number of onsets, like:
you agree? |
@satra you were right, I tested simply correcting the line you pointed out solved the problem. Fix for #1198.