Correction of gain, threshold, offset or phase control