I have data corresponding to 300 seconds. Sampling rate is 500Hz. I should have 500*300 = 150000 samples. But due to hardware error, I am receiving a few extra samples. What is the optimal way of removing extra samples obtained to reduce the data to 150000 samples. I can't use all of the samples because data obtained contains many events which are synchronized in time.