rewrote spike parsing to facilitate export to other analysis routines