OHBA-analysis / osl-ephys

OHBA Software Library Electrophys Analysis Tools
https://osl-ephys.readthedocs.io/en/latest/
Other
45 stars 9 forks source link

src_recon batch fails with extra funcs #343

Closed matsvanes closed 1 month ago

matsvanes commented 2 months 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 2 months ago

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

matsvanes commented 1 month ago

Fixed.