Skip to content

FIX: Update ApplyVDM to handle 4D inputs #3500

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

Merged
merged 3 commits into from
Sep 5, 2022
Merged

Conversation

fabioboh
Copy link
Contributor

…ames (e.g. fMRI)

Summary

Fixes # .

List of changes proposed in this PR (pull-request)

@fabioboh
Copy link
Contributor Author

@effigies I tried to extend the apply VDM functionality to imaging data containing multiple frames (e.g. fMRI). this is a tiny modification. however, despite the fact that these modifications work for my private data, my commit does not pass the tests (see commit e8fe958). I am a bit puzzled because none of the tests concerns the modified file. furthermore, when I revert the changes (see commit 90385cf), the original commit also does NOT pass the tests, producing the same errors.

any hints on how I should handle this?

@effigies
Copy link
Member

Hi, thanks for this. Could you try rebasing on the latest master? I suspect the issues you were seeing are related to an incompatible traits release.

@fabioboh fabioboh reopened this Aug 29, 2022
@codecov
Copy link

codecov bot commented Aug 29, 2022

Codecov Report

Merging #3500 (adea98e) into master (4a91e88) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

❗ Current head adea98e differs from pull request most recent head 970ea4f. Consider uploading reports for the commit 970ea4f to get more accurate results

@@            Coverage Diff             @@
##           master    #3500      +/-   ##
==========================================
- Coverage   65.25%   65.25%   -0.01%     
==========================================
  Files         309      309              
  Lines       40859    40861       +2     
  Branches     5379     5380       +1     
==========================================
  Hits        26663    26663              
- Misses      13122    13124       +2     
  Partials     1074     1074              
Flag Coverage Δ
unittests 65.03% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
nipype/interfaces/spm/preprocess.py 50.18% <0.00%> (-0.10%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Comment on lines 260 to 263
in_files = InputMultiObject(
ImageFileSPM(exists=True),
field="data.scans",
traits.Either(
ImageFileSPM(exists=True), traits.List(ImageFileSPM(exists=True))
),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that InputMultiObject is already a single file or a list of files. Is the goal to make it either a single file, a list of files, or a list of lists of files?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey, thanks for the hint about rebasing and your quick review. let me have another look at my logfiles before I answer this. for the moment, I am happy the tests were passed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, so regarding your question:

InputMultiPath = InputMultiObject
OutputMultiPath = OutputMultiObject

therefore the syntax I use is the same as other interfaces:

SliceTimingInputSpec
RealignInputSpec
RealignUnwarp
...

also, without this modification my nipype - workflow was failing.

but you seem to suggest my modification was not needed, and the documentation of the MultiObjects suggests the same.

but then why my wf was failing? could it be related to the incompatible traits release?
I mean:

  • with the newest release, no need for my modification (it would actually be a wrong edit - but also for realign and slicetime interfaces?)
  • with the old ones (for example version nipype = "1.8.0" or nipype = "1.8.2") it somehow solves a problem

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the change around L340 enough?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@effigies yes! I have done some tests now. so I push anew commit with only changes around line 340?

I guess so.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that would work.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this pull request be accepted then? if not, what remains to be done?

Copy link
Member

@effigies effigies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, didn't notice the update. Small fixes to avoid reverting the style...

@effigies effigies changed the title extend apply VDM functionality to imaging data containing multiple fr… FIX: Update ApplyVDM to handle 4D inputs Sep 5, 2022
@effigies effigies merged commit 0a8316d into nipy:master Sep 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants