Skip to content

Commit

Permalink
small plx loading fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian authored and Ian committed Jun 5, 2014
1 parent 5bd9b28 commit 54af72a
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions spikes.m
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ function spikes(action)
if isfield(data,'pR'); pR = data.pR; end
data=struct;
data.zs=zs;
if exist('pR','var'); data.pR = pR; else; data.pR=[]; end
if exist('pR','var'); data.pR = pR; else data.pR=[]; end
data.meta=meta;
data.info=info;
data.filetype=t;
Expand Down Expand Up @@ -360,10 +360,10 @@ function spikes(action)
data.pR.parse;
end
end
if isfield(data.pR.rE.tS,'name') && ~isempty(regexpi(data.pR.rE.tS.name,'two-figure-ground'));
inputdlg({'Enter First Variable Position:','Enter Second Variable Position:'},...
'Two Figure Trial Correction:',[1 20],{'1','1'});
end
% if isfield(data.pR.rE.tS,'name') && ~isempty(regexpi(data.pR.rE.tS.name,'two-figure-ground'));
% inputdlg({'Enter First Variable Position:','Enter Second Variable Position:'},...
% 'Two Figure Trial Correction:',[1 20],{'1','1'});
% end
data.zipload=false;
data.filetype='plx';
data.sourcepath = [pn fn];
Expand Down Expand Up @@ -491,9 +491,11 @@ function spikes(action)
data.modtime=data.meta.modtime;
tempfreq = [];
for jj = 1:length(data.info)
rx=regexp(data.info{jj},'Stim1:.+Drift.+Period:.+\((?<freq>\d.\d).+\)','names');
if ~isempty(rx)
tempfreq = [tempfreq str2num(rx.freq)];
if size(data.info{jj},1) == 1
rx=regexp(data.info{jj},'Stim1:.+Drift.+Period:.+\((?<freq>\d.\d).+\)','names');
if ~isempty(rx)
tempfreq = [tempfreq str2num(rx.freq)];
end
end
end
if isempty(tempfreq)
Expand Down

0 comments on commit 54af72a

Please sign in to comment.