Rewriting code for select samples for calcultation
Discriminate saved traces by different location code