Skip to content

Refactor pspm_pipeline_fc_scr API and improve usability#897

Merged
4gwe merged 5 commits into
developfrom
896_scr_pipeline_api
Apr 30, 2026
Merged

Refactor pspm_pipeline_fc_scr API and improve usability#897
4gwe merged 5 commits into
developfrom
896_scr_pipeline_api

Conversation

@gjheij
Copy link
Copy Markdown
Contributor

@gjheij gjheij commented Apr 29, 2026

Fixes #896.

Switched to name–value pair arguments

Replaced positional optional arguments with inputParser
Supported options:

  • 'method' (default: '2026_long_uni')
  • 'missing' (default: [])
  • 'normalize' (default: 0)
  • 'keepfile' (default: 0)
  • 'overwrite' (default: 0)

Simplified function signature

pspm_pipeline_fc_scr(fn, onsets, isi, varargin)

Improved input consistency

  • All inputs internally normalized to cell arrays
  • Explicit checks for session alignment
  • Robust handling of scalar vs vector ISI

Cleaned up model file handling

  • Safe generation of model_fn for single and multiple files
  • Avoids fragile assumptions about fileparts output types

Also made updates to documentation.

@gjheij gjheij requested a review from 4gwe April 29, 2026 10:27
@4gwe 4gwe merged commit 8c64d82 into develop Apr 30, 2026
1 check passed
@4gwe 4gwe deleted the 896_scr_pipeline_api branch April 30, 2026 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

API for pspm_pipeline_fc_scr is inconsistent

2 participants