Output Shaping Internals

This page describes the internal handler pipeline that converts grouped BidsFile items into the emitted channel structures.

Handler Hierarchy

BaseSetHandler owns the common grouping loop and delegates to concrete handlers:

  • PlainSetHandler

  • NamedSetHandler

  • SequentialSetHandler

  • MixedSetHandler

Internal Processing Steps

  1. Group files by loop_over entities.

  2. Match each file against config keys and set definitions.

  3. Accumulate typed set payloads and enforce required groups.

  4. Sort sequential dimensions when applicable.

  5. Emit BidsChannelData for downstream flattening/emission.

Developer Notes

  • configKey drives emitted top-level fields.

  • suffix_maps_to controls file matching suffixes.

  • Mixed sets combine named and sequential dimensions in one payload.