Numerical solution of the Hilbert transform for phase calculation from an amplitude spectrum