9d9ef625dccb7ba0ed3295f18d90de9d6dd59469,nussl/audio_signal.py,AudioSignal,get_stft_channel,#AudioSignal#,643

Before Change


        Returns:
            (:obj:`np.array`): the stft data in the n-th channel of the signal, 1D
        
        if n > self.num_channels:
            raise Exception(
                "Cannot get channel {0} when this object only has {1} channels!".format(n, self.num_channels))

        if n <= 0:
            raise Exception("Cannot get channel {}. This will cause unexpected results".format(n))

        return self._get_axis(self.stft_data, self._STFT_CHAN, n - 1)

    def get_power_spectrogram_channel(self, n):
         Returns the n-th channel from ``self.power_spectrogram_data``. **1-based.**

After Change


        for i in range(self.num_channels):
            yield self.get_channel(i)

    def get_stft_channel(self, n):
         Returns the n-th channel from ``self.stft_data``.

        Raises:
            Exception: If not ``0 <= n < self.num_channels``.

        Args:
            n: (int) index of stft channel to get. **0-based**

        Returns:
            (:obj:`np.array`): the stft data in the n-th channel of the signal, 1D
        
        self._verify_get_channel(n)

        return self._get_axis(self.stft_data, self._STFT_CHAN, n)

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 12

Instances


Project Name: interactiveaudiolab/nussl
Commit Name: 9d9ef625dccb7ba0ed3295f18d90de9d6dd59469
Time: 2017-04-04
Author: ethanmanilow@gmail.com
File Name: nussl/audio_signal.py
Class Name: AudioSignal
Method Name: get_stft_channel


Project Name: interactiveaudiolab/nussl
Commit Name: 9d9ef625dccb7ba0ed3295f18d90de9d6dd59469
Time: 2017-04-04
Author: ethanmanilow@gmail.com
File Name: nussl/audio_signal.py
Class Name: AudioSignal
Method Name: get_channel


Project Name: interactiveaudiolab/nussl
Commit Name: 9d9ef625dccb7ba0ed3295f18d90de9d6dd59469
Time: 2017-04-04
Author: ethanmanilow@gmail.com
File Name: nussl/audio_signal.py
Class Name: AudioSignal
Method Name: get_power_spectrogram_channel