3678a2dc9162cd9f6905cb717bdc938926fc1470,nussl/separation/ft2d.py,FT2D,compute_ft2d_mask,#FT2D#Any#Any#,97

Before Change


        fg_stft = np.abs(np.fft.ifft2(fg_ft2d)) / (_stft + 1e-7)
        
        bg_mask = bg_stft / (np.maximum(bg_stft, fg_stft) + 1e-7)
        fg_mask = fg_stft / (np.maximum(bg_stft, fg_stft) + 1e-7)
        fg_mask = fg_mask * (1 - bg_mask)
        bg_mask = bg_mask * (1 - fg_mask)
        return bg_mask, fg_mask

    def filter_local_maxima_with_std(self, ft2d):
        data = np.abs(np.fft.fftshift(ft2d))

After Change


            bg_ft2d, fg_ft2d = self.filter_local_maxima_with_std(ft2d[:, :, ch])
        
        _stft = np.abs(self.stft)[:, :, ch] + 1e-7
        bg_stft = np.minimum(np.abs(np.fft.ifft2(bg_ft2d)), _stft)
        
        bg_mask = bg_stft / _stft
        fg_mask = 1 - bg_mask
        return bg_mask, fg_mask
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: interactiveaudiolab/nussl
Commit Name: 3678a2dc9162cd9f6905cb717bdc938926fc1470
Time: 2019-07-10
Author: prem@u.northwestern.edu
File Name: nussl/separation/ft2d.py
Class Name: FT2D
Method Name: compute_ft2d_mask


Project Name: open-mmlab/mmcv
Commit Name: 0874642fb075dbe42647ab6779f1cdff17f4b79b
Time: 2020-02-04
Author: innerlee@users.noreply.github.com
File Name: mmcv/image/transforms/geometry.py
Class Name:
Method Name: bbox_clip


Project Name: mne-tools/mne-python
Commit Name: 717eedd5f9ce22431e40a15c378863de6730d3e8
Time: 2019-03-15
Author: larson.eric.d@gmail.com
File Name: mne/viz/raw.py
Class Name:
Method Name: _update_raw_data