diff --git a/+jrclust/+controllers/+curate/CurateController.m b/+jrclust/+controllers/+curate/CurateController.m index f5fe2f8d..404dd4fe 100644 --- a/+jrclust/+controllers/+curate/CurateController.m +++ b/+jrclust/+controllers/+curate/CurateController.m @@ -638,7 +638,7 @@ function addMenu(obj, hFig) hFig.figApply(@set, 'MenuBar','None'); obj.hMenus('FileMenu') = hFig.uimenu('Label', 'File'); - uimenu(obj.hMenus('FileMenu'), 'Label', 'Save', 'Callback', @obj.saveFiles); + uimenu(obj.hMenus('FileMenu'), 'Label', 'Save', 'Callback', @(hO, hE) obj.saveFiles()); uimenu(obj.hMenus('FileMenu'), 'Label', 'Save figures as .fig', 'Callback', @(hO, hE) obj.saveFigures('.fig')); uimenu(obj.hMenus('FileMenu'), 'Label', 'Save figures as .png', 'Callback', @(hO, hE) obj.saveFigures('.png')); uimenu(obj.hMenus('FileMenu'), 'Label', 'Export units to csv', 'Callback', @(hO, hE) obj.hClust.exportToCSV(), 'Separator', 'on'); diff --git a/+jrclust/Config.m b/+jrclust/Config.m index 18b7ed0e..38779571 100644 --- a/+jrclust/Config.m +++ b/+jrclust/Config.m @@ -316,7 +316,11 @@ function validateParams(obj) obj.error('nSitesExcl is too large or nSiteDir is too small', 'Bad configuration'); end - obj.ignoreSites = obj.ignoreSites(ismember(obj.ignoreSites, obj.siteMap)); + % ignoreSites/ignoreChans + obj.ignoreChans = obj.ignoreChans(ismember(obj.ignoreChans, obj.siteMap)); + obj.ignoreSites = intersect(obj.ignoreSites, 1:numel(obj.siteMap)); + obj.ignoreSites = union(obj.ignoreSites, find(ismember(obj.siteMap, obj.ignoreChans))); + obj.siteNeighbors = findSiteNeighbors(obj.siteLoc, 2*obj.nSiteDir + 1, obj.ignoreSites, obj.shankMap); % boost that gain diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT index 99e16bdf..5a193be6 100644 --- a/CHANGELOG.TXT +++ b/CHANGELOG.TXT @@ -1,3 +1,14 @@ +11 Feb 2019 + +# Parameters +- ignoreChans (formerly viChanZero) (re)implemented to address issue #83. + +# Config +- canonical version of ignoreSites was computed wrong in validation; this has been fixed + +# CurateController +- "File > Save" menu callback crashed with "Too many input arguments" (see #86); this has been fixed + 7 Feb 2019 # Parameters diff --git a/default.prm b/default.prm index b7a2eb05..eaf04f64 100644 --- a/default.prm +++ b/default.prm @@ -23,7 +23,8 @@ blankThresh = []; % (formerly blank_thresh) Threshold (in MADs) above which to r filterType = 'ndiff'; % (formerly vcFilter) Type of filter to use on raw data filtOrder = 3; % Bandpass filter order freqLimBP = [300, 3000]; % (formerly freqLim) Frequency cutoffs for bandpass filter -ignoreSites = []; % (formerly viSiteZero) Sites to ignore manually +ignoreChans = []; % (formerly viChanZero) Channel numbers to ignore manually +ignoreSites = []; % (formerly viSiteZero) Site IDs to ignore manually % SPIKE DETECTION PARAMETERS blankPeriod = 5; % (formerly blank_period_ms) Duration of blanking period (in ms) when the common mean exceeds blankThresh diff --git a/docs/parameters/index.rst b/docs/parameters/index.rst index 1ebcb05a..41b300c5 100644 --- a/docs/parameters/index.rst +++ b/docs/parameters/index.rst @@ -238,6 +238,19 @@ JRCLUST will skip this many bytes at the beginning of your recording file. **Default** is 0. +.. _ignoreChans: + +ignoreChans +^^^^^^^^^^^ + +(Formerly ``viChanZero``) + +Channel numbers to ignore manually. +Should be an array of integers between 1 and nChans. +These values will be merged into :ref:`ignoreSites`. + +**Default** is empty. + .. _ignoreSites: ignoreSites @@ -245,7 +258,8 @@ ignoreSites (Formerly ``viSiteZero``) -Sites to ignore manually. +Site IDs to ignore manually. +Should be an array of integers between 1 and nSites. **Default** is empty. diff --git a/jrc.json b/jrc.json index 9ef290c7..db23b2c2 100644 --- a/jrc.json +++ b/jrc.json @@ -4,10 +4,10 @@ "major": 4, "minor": 0, "release": 0, - "tag": "alpha-patch2", + "tag": "alpha-patch4", "codename": "Edward" }, - "changeDate": "7 Feb 2019", + "changeDate": "11 Feb 2019", "authors": [ "James Jun" ], diff --git a/params.json b/params.json index 5661d5eb..5a073278 100644 --- a/params.json +++ b/params.json @@ -243,8 +243,21 @@ }, "section": ["recording file"] }, + "ignoreChans": { + "description": "Channel numbers to ignore manually", + "comment": "", + "default_value": [], + "validation": { + "classes": ["numeric"], + "attributes": [ + "integer", + "positive" + ] + }, + "section": ["preprocessing"] + }, "ignoreSites": { - "description": "Sites to ignore manually", + "description": "Site IDs to ignore manually", "comment": "", "default_value": [], "validation": { @@ -1764,6 +1777,7 @@ "vcFilter": "filterType", "vcFilter_show": "dispFilter", "vcLabel_aux": "auxLabel", + "viChanZero": "ignoreChans", "viShank_site": "shankMap", "viSite2Chan": "siteMap", "viSiteZero": "ignoreSites",