Testing and optimizing ADC performance: a probabilistic approach