Skip to content

Commit

Permalink
Update loadSpikes.m
Browse files Browse the repository at this point in the history
  • Loading branch information
petersenpeter committed Jul 31, 2019
1 parent 6a3bac6 commit 3ff2058
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions calc_CellMetrics/loadSpikes.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

% By Peter Petersen
% [email protected]
% Last edited: 20-06-2019
% Last edited: 31-07-2019

% Version history
% 3.2 waveforms for phy data extracted from the raw dat
Expand Down Expand Up @@ -89,6 +89,7 @@
end
else
forceReload = true;
spikes = [];
end

% Loading spikes
Expand All @@ -106,7 +107,6 @@
case {'klustakwik', 'neurosuite'}
disp('loadSpikes: Loading Klustakwik data')
unit_nb = 0;
spikes = [];
shanks_new = [];
if isnan(shanks)
fileList = dir(fullfile(clusteringPath,[baseName,'.res.*']));
Expand All @@ -122,7 +122,7 @@
if ~raw_clusters
cluster_index = load(fullfile(clusteringPath, [baseName '.clu.' num2str(shank)]));
time_stamps = load(fullfile(clusteringPath,[baseName '.res.' num2str(shank)]));
if getWaveforms
if getWaveforms & useNeurosuiteWaveforms
fname = fullfile(clusteringPath,[baseName '.spk.' num2str(shank)]);
f = fopen(fname,'r');
waveforms = LSB * double(fread(f,'int16'));
Expand Down Expand Up @@ -242,7 +242,7 @@
if getWaveforms % gets waveforms from dat file
spikes = GetWaveformsFromDat(spikes,xml,basepath,baseName,LSB,session);
end

% Loading klustaViewa - Kwik format (Klustasuite 0.3.0.beta4)
case 'klustaViewa'
disp('loadSpikes: Loading KlustaViewa data')
Expand Down

0 comments on commit 3ff2058

Please sign in to comment.