def _get_row_amplitudes(self):
signal_interval = self.signal()<EOL>sample_rate = self.signal.sample_rate<EOL>signal_window = np.tile(signal_interval, int(np.ceil(<NUM_LIT:1.0>/self.signal.interval_length)))<EOL>if self.windowing_function:<EOL><INDENT>smoothed_window = signal_window[<NUM_LIT:0>:sample_rate] * self.windowing_function(sample_rate)<EOL><DEDENT>else:<EOL><INDENT>smoothed_window = signal_window[<NUM_LIT:0>:sample_rate]<EOL><DEDENT>amplitudes = (np.abs(np.fft.rfft(smoothed_window))[<NUM_LIT:0>:sample_rate/<NUM_LIT:2>] + self.offset) * self.scale<EOL>for index in range(<NUM_LIT:0>, self._sheet_dimensions[<NUM_LIT:0>]-<NUM_LIT:2>):<EOL><INDENT>start_frequency = self.frequency_spacing[index]<EOL>end_frequency = self.frequency_spacing[index+<NUM_LIT:1>]<EOL>normalisation_factor =  end_frequency - start_frequency<EOL>if normalisation_factor == <NUM_LIT:0>:<EOL><INDENT>amplitudes[index] = amplitudes[start_frequency]<EOL><DEDENT>else:<EOL><INDENT>amplitudes[index] = np.sum(amplitudes[int(start_frequency):int(end_frequency)]) / normalisation_factor<EOL><DEDENT><DEDENT>return np.flipud(amplitudes[<NUM_LIT:0>:self._sheet_dimensions[<NUM_LIT:0>]].reshape(-<NUM_LIT:1>,<NUM_LIT:1>))<EOL>
Perform a real Discrete Fourier Transform (DFT; implemented
using a Fast Fourier Transform algorithm, FFT) of the current
sample from the signal multiplied by the smoothing window.

See numpy.rfft for information about the Fourier transform.