Stochastic phase estimation and unwrapping