OHBA-analysis / osl

OHBA Software Library - MEG/EEG Analysis Tools
https://osl.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
39 stars 8 forks source link

src_recon batch fails with extra funcs #343

Open matsvanes opened 3 weeks ago

matsvanes commented 3 weeks ago

source_recon batch processing with supplied extra_funcs fails when no default input parameters are specified:

https://github.com/OHBA-analysis/osl/blob/main/osl/source_recon/batch.py#L204

args, _, _, defaults = inspect.getargspec(func)
args_with_defaults = args[-len(defaults):]

suggested fix: args_with_defaults = args[-len(defaults):] if defaults is not None else []

What do you think @cgohil8 ?

cgohil8 commented 3 weeks ago

Looks fine, if you tested that with/without other functions in the source config and it works, go for it.