code: def _get_row_amplitudes(self):
          
  
          signal_interval = self.signal()
          sample_rate = self.signal.sample_rate
  
          # A signal window *must* span one sample rate
          signal_window = np.tile(signal_interval, int(np.ceil(1.0/self.signal.interval_length)))
  
          if self.windowing_function:
              smoothed_window = signal_window[0:sample_rate] * self.windowing_function(sample_rate)
          else:
              smoothed_window = signal_window[0:sample_rate]
  
          amplitudes = (np.abs(np.fft.rfft(smoothed_window))[0:sample_rate/2] + self.offset) * self.scale
  
          for index in range(0, self._sheet_dimensions[0]-2):
              start_frequency = self.frequency_spacing[index]
              end_frequency = self.frequency_spacing[index+1]
  
              normalisation_factor =  end_frequency - start_frequency
              if normalisation_factor == 0:
                  amplitudes[index] = amplitudes[start_frequency]
              else:
                  amplitudes[index] = np.sum(amplitudes[int(start_frequency):int(end_frequency)]) / normalisation_factor
  
          return np.flipud(amplitudes[0:self._sheet_dimensions[0]].reshape(-1,1))
docs: 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.