int bestErr[]={1000,1000,1000,1000,1000,1000,1000,1000,1000};
int peaksdet[]={0,0,0,0,0,0,0,0,0};
//test each valid clock from smallest to greatest to see which lines up
int bestErr[]={1000,1000,1000,1000,1000,1000,1000,1000,1000};
int peaksdet[]={0,0,0,0,0,0,0,0,0};
//test each valid clock from smallest to greatest to see which lines up