portions of mancovan toolbox script to perform preproc of timecourses