nipy / nipype

Workflows and interfaces for neuroimaging packages
https://nipype.readthedocs.org/en/latest/
Other
748 stars 530 forks source link

modelgen.SpecifyModel from bids_event_file substring problem #3312

Open cni-md opened 3 years ago

cni-md commented 3 years ago

Summary

I generate a model from a bids event file. The events are named li, limr, re, remr

Actual behavior

In the bunch file the event li is containing the li events, but in addition the limr too. The same for re with remr. Only the limr and remr are correct.

The re,match is catching the substring.

Platform details:

{'commit_hash': '54f502940', 'commit_source': 'installation', 'networkx_version': '2.5', 'nibabel_version': '3.2.1', 'nipype_version': '1.6.0', 'numpy_version': '1.20.1', 'pkg_path': '/home/jstadler/studien/fm_r_v_train/lib/python3.7/site-packages/nipype', 'scipy_version': '1.6.1', 'sys_executable': '/home/jstadler/studien/fm_r_v_train/bin/python', 'sys_platform': 'linux', 'sys_version': '3.7.3 (default, Jul 25 2020, 13:03:44) \n[GCC 8.3.0]', 'traits_version': '6.2.0'}

Execution environment

Choose one

satra commented 3 years ago

@cni-md - it may be worth instrumenting this function to debug: https://github.com/nipy/nipype/blob/master/nipype/algorithms/modelgen.py#L170

it looks like the conditions are matched by equality, which shouldn't be true for partial matches. do you think you could check by just running that function to see what is returned for your bids event file? and create a simple test case for it.