question: public static double [ ] computeAmplitudeSpectrum_FD ( final double [ ] fft ) { if ( fft == null ) throw new NullPointerException ( "Received null argument" ) ; int halfN = fft . length / 2 ; double [ ] freqs = new double [ halfN ] ; freqs [ 0 ] = fft [ 0 ] ; for ( int i = 2 ; i < fft . length ; i += 2 ) { freqs [ i / 2 ] = Math . sqrt ( fft [ i ] * fft [ i ] + fft [ i + 1 ] * fft [ i + 1 ] ) ; } return freqs ; }
target:  From the result of the FFT (in the frequency domain), compute the absolute value for each positive frequency, i.e. the norm of each complex number in the lower half of the array