lots more trial refactoring and trial selection for using fieldtrip
spike functions