Hey everyone,
I want to create an array consisting of differently created brain masks to check their
effect on the subsequent first level analysis. Basically, I thought to do that via a small function
and function MapNode. Something in the line of:
def create_mask_array(brain_mask_files):
brain_masks=[]
for mask in brain_mask_files:
brain_masks.append(mask)
return brain_masks
create_mask_array = MapNode(Function(input_names=['brain_mask_files'],
iterfield=['brain_mask_files'],
output_names=['brain_masks'],
function=create_mask_array),
name='create_mask_array')
maskflow.connect([(meanfuncmask, create_mask_array, [('mask_file'), ('brain_mask_files')]),
(binarize, create_mask_array, [('binary_file'), ('brain_mask_files')]),
(binarize_aparc, create_mask_array, [('binary_file'), ('brain_mask_files')]),
])
With that, I get the error:
name='create_mask_array')
TypeError: __init__() takes at least 4 arguments (3 given)
I’m kinda sure, I’m missing something obvious, maybe something MapNode related, as I use some Function Nodes (which are working properly) within my pipeline which are defined like the one above, except for being a MapNode!? I’ve no idea why it should be at least 4 arguments, as I don’t define that number of necessary inputs.
Does anyone have an idea and/or pointers?
Have a good one, best, Peer