Detect cHPI activity

Error at using process to detect cHPI activity:

***************************************************************************
** Error: [process_evt_detect_chpi] Events > Detect cHPI activity (Elekta)
** Line 134: Unrecognized function or variable 'minNewEvent'.
**
** Call stack:
** >process_evt_detect_chpi.m>Run at 134
** >process_evt_detect_chpi.m at 24
** >bst_process.m>Run at 236
** >bst_process.m at 38
** >panel_process1.m>RunProcess at 131
** >panel_process1.m at 26
** >gui_brainstorm.m>CreateWindow/ProcessRun_Callback at 781
** >bst_call.m at 28
** >gui_brainstorm.m>@(h,ev)bst_call(@ProcessRun_Callback) at 301
**
**
** File: case_0689_240610/@rawrest_02/data_0raw_rest_02.mat
**
***************************************************************************

Hello @saltwater,

Thanks for reaching out. This is in fact a bug that was not detected, as for most recordings there is only one period when the HPI coils are ON(or OFF), so there was no need to merge multiple segments. Thus bug is now fixed in Commit: 53d0724.

Please update your Brainstorm instance to 05-Mar-2026

Now, two consecutive segments when the HPI coils are ON (or OFF, depending on the option selected by the user) are merged if the gap between them is equal or less than 1s.

1 Like

Thanks @Raymundo.Cassani for fixing this.
The fix works, I have tested it now.