Implemented amplitude_and_phase_FFT function