rtcog.processor package
Submodules
rtcog.processor.basic_processor module
- class rtcog.processor.basic_processor.BasicProcessor(options, sync, **kwargs)[source]
Bases:
objectClass representing a real-time fMRI processor.
This class handles the setup of the data processing stream, initialization of the preprocessing pipeline, and the management of incoming data from the scanner.
- Parameters:
options (Options) – Configuration object containing experiment parameters (e.g., TR, number of volumes, paths).
sync (SyncEvents) – Container for multiprocessing synchronization primitives used in experiment.
rtcog.processor.esam_processor module
- class rtcog.processor.esam_processor.ESAMProcessor(options, sync, minimal=False)[source]
Bases:
BasicProcessorReal-time fMRI processor class supporting experience sampling (ESAM) mode.
Extends Processor with template matching, hit detection, action state tracking, and dynamic Panel-based GUI streaming.
- Parameters:
options (Options) – Experiment configuration options.
sync (SyncEvents) – Multiprocessing event signals for synchronization.
minimal (bool, optional) – If True, generate a static score report at the end.
- lastaction_endTR
Most recent action offset TR.
- Type:
int
Shared memory array for matched volumes.
- Type:
np.ndarray
Shared list of action onsets.
- Type:
ListProxy
Shared list of action offsets.
- Type:
ListProxy
- hits
Hit detection matrix [template x TR].
- Type:
np.ndarray
- compute_TR_data(motion, extra)[source]
Process one TR in ESAM mode with template matching and hit detection.
- Parameters:
motion (list of list[float]) – 6 motion parameters per TR.
extra (list of list[float]) – Voxel-wise time series.
- Returns:
Always returns 1.
- Return type:
int
- end_run(save=True)[source]
Finalize the experiment, including file output and memory cleanup.
- Parameters:
save (bool) – Whether to save final output files (default: True).
- get_enabled_step_config(step_name)[source]
Return config dict for enabled pipeline step by name.
- Parameters:
step_name (str) – Name of the step (e.g., “windowing”).
- Returns:
Step config dictionary if enabled, otherwise None.
- Return type:
dict or None
Module contents
Classes for orchestrating the flow of data processing.