Skip to content

Commit

Permalink
Fix no late re-referencing object
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxvandenBoom committed Jun 15, 2023
1 parent 2488ae3 commit e034055
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ieegprep/bids/data_epoch.py
Original file line number Diff line number Diff line change
Expand Up @@ -1278,7 +1278,7 @@ def __load_data_epochs__by_channels__withPrep(average, data_reader, retrieve_cha
# if baselining and late re-ref channel selection based on variance is enabled, make sure the baseline epoch is
# included in the trial epoch. This way the common average (which is calculated over the trial epoch) can be applied
# to both the baseline epoch and the trial epoch
if baseline_method > 0 and late_reref.late_group_reselect_varPerc is not None:
if baseline_method > 0 and late_reref is not None and late_reref.late_group_reselect_varPerc is not None:
if baseline_epoch[0] < trial_epoch[0]:
logging.error('Invalid \'baseline_epoch\' parameter, the given baseline start-point (at ' + str( baseline_epoch[0]) + ') lies before the trial start-point (at ' + str(trial_epoch[0]) + ')\n'
'When baselining is enabled and common average re-referencing needs to be applied, the baseline window should fall within the trial window\n')
Expand Down

0 comments on commit e034055

Please sign in to comment.