High precision digital automated measurement of degree of coherence in Thompson and Wolf experiment