Measurement of spatial coherence through speckle interferometry