NiLearn signal clean for surface data

Dear NiLearn experts,

For gifti images output by fmriprep, is NiLearn.signal.clean the appropriate way to remove confounds (similar to image.clean_img for volume data)? Or is there another approach designed for surface data?

Hi,
No there’s no approach dedicated to surface data.
Calling nilearn.signal.clean is atm the best thing you can do indeed.
Best,
Bertrand

This signal.clean documentation states that the timeseries “Must have shape (instant number, features number)”
surface data in nilearn has shape (vertices, instant number)

For using signal.clean on surface data is it preferable to:
a) transpose the surface data, apply signal clean, transpose the output
b) loop over vertices and apply signal clean separately to the time series in each vertex

Do a), it’s much more efficient and less error-prone.
HTH,
Bertrand