Measuring phase synchronization