%do_rawpos2mat
clear variables

%basepath should normally be the path used for raw output from filteramps,
%leaving out the final 'amps/'
outpathraw=['ampsfiltraw' filesep 'amps' filesep]; %copied from do_filteramps
basepath=outpathraw;
basepath=strrep(basepath,['amps' filesep],'');

rawpath=[basepath 'rawpos'];
matpath=[basepath 'rawposmat'];
load([outpathraw 'info']);	%should contain sensornames, samplerate, comment
triallist=1:??;
mkdir(matpath);

posampflag=1;		%if true, posamps are also converted
rawpos2mat(rawpath,matpath,triallist,samplerate,comment,sensornames,posampflag);

