stuff for analysis/evaluation (in progress). may have introduced bug in buildTemplate: intervals are off by one. check out the annotations dataset in the MAT file.