question: public static double [ ] computePhaseSpectrum_FD ( final double [ ] fft ) { if ( fft == null ) throw new NullPointerException ( "Received null argument" ) ; double [ ] phases = new double [ fft . length / 2 ] ; phases [ 0 ] = Math . atan2 ( 0 , fft [ 0 ] ) ; for ( int i = 2 ; i < fft . length ; i += 2 ) { phases [ i / 2 ] = Math . atan2 ( fft [ i + 1 ] , fft [ i ] ) ; } return phases ; }
target:  From the result of the FFT (in the frequency domain), compute the phase spectrum for each positive frequency.