From f560cfed0a3998c26df5a708ed114d0ae4eea1f9 Mon Sep 17 00:00:00 2001 From: Ryan Harvey Date: Mon, 20 Jan 2025 13:27:06 -0500 Subject: [PATCH] fix input parse, brainRegion --- lfp/detect_delta_waves.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lfp/detect_delta_waves.m b/lfp/detect_delta_waves.m index f81fc76..f18fb6f 100644 --- a/lfp/detect_delta_waves.m +++ b/lfp/detect_delta_waves.m @@ -78,7 +78,8 @@ function detect_delta_waves(varargin) addParameter(p, 'channel', [], @isnumeric); addParameter(p, 'peak_to_trough_ratio', 3, @isnumeric); % legacy name for "threshold" addParameter(p, 'threshold', 3, @isnumeric); -addParameter(p, 'brainRegion', {'PFC', 'MEC', 'LEC', 'EC', 'ILA', 'PL', 'Cortex', 'CTX'}, @(x) any(iscell(x), iscchar(x))); +addParameter(p, 'brainRegion', {'PFC', 'MEC', 'LEC', 'EC', 'ILA', 'PL', 'Cortex', 'CTX'}, ... + @(x) ischar(x) || isstring(x) || (iscell(x) && all(cellfun(@(y) ischar(y) || isstring(y), x)))); addParameter(p, 'manual_pick_channel', false, @islogical); addParameter(p, 'use_sleep_score_delta_channel', false, @islogical); addParameter(p, 'EMG_threshold', 0.6, @isnumeric);