Skip to content

Commit

Permalink
Bug fixes and performance improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
astigliani committed Aug 9, 2018
1 parent 3bc386b commit 6ba3442
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions functions/fLocAnalysis.m
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@

% remove spikes from each run of data with median filter
fdir = fullfile(session_dir, 'Inplane', 'MotionComp_RefScan1', 'TSeries');
fprintf(lid, 'Removing spikes from voxel time series. \n\n');
fprintf('Removing spikes from voxel time series. \n\n');
for rr = 1:rcnt
fstem = ['tSeriesScan' num2str(rr)];
copyfile(fullfile(fdir, [fstem '.nii.gz']), fullfile(fdir, [fstem '_raw.nii.gz']));
Expand All @@ -219,11 +221,11 @@
fid = fopen(parfiles{rr}, 'r');
while ~feof(fid)
ln = fgetl(fid); cnt = cnt + 1;
if isempty(ln); return; end
ln(ln == sprintf('\t')) = ''; prts = deblank(strsplit(ln, ' '));
if isempty(ln); return; end; ln(ln == sprintf('\t')) = '';
prts = deblank(strsplit(ln, ' ')); prts(cellfun(@isempty, prts)) = [];
onsets(cnt) = str2double(prts{1});
cond_nums(cnt) = str2double(prts{3});
conds{cnt} = prts{4};
cond_nums(cnt) = str2double(prts{2});
conds{cnt} = prts{3};
end
fclose(fid);
end
Expand Down

0 comments on commit 6ba3442

Please sign in to comment.