finished period and phase calculation