identifying phase gradients