File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -590,6 +590,7 @@ def auto_trigger_selection(self):
590590 Automatically retrieved trigger index
591591 """
592592 LGR .info ('Running automatic trigger detection.' )
593+ LGR .info ('Matching channel names with known trigger names first.' )
593594 joint_match = '§' .join (TRIGGER_NAMES )
594595 indexes = []
595596 for n , case in enumerate (self .ch_name ):
@@ -604,10 +605,10 @@ def auto_trigger_selection(self):
604605 raise Exception ('More than one possible trigger channel was automatically found. '
605606 'Please run phys2bids specifying the -chtrig argument.' )
606607 else :
607- self .trigger_idx = indexes [0 ]
608+ self .trigger_idx = int ( indexes [0 ])
608609 else :
609610 # Time-domain automatic trigger detection
610-
611+ LGR . info ( 'Find the trigger channel by measuring data distance from its value limits.' )
611612 # Create numpy array with all channels (excluding time)
612613 channel_ts = np .array (self .timeseries [1 :])
613614
@@ -621,7 +622,7 @@ def auto_trigger_selection(self):
621622 distance_mean = np .mean (distance , axis = 1 )
622623
623624 # Set the trigger as the channel with the smallest distance
624- self .trigger_idx = np .nanargmin (distance_mean ) + 1
625+ self .trigger_idx = int ( np .nanargmin (distance_mean ) + 1 )
625626
626627 LGR .info (f'{ self .ch_name [self .trigger_idx ]} selected as trigger channel' )
627628
You can’t perform that action at this time.
0 commit comments