02d5a085316ce3cf2ef767ace6d20d3678f196f9,src/nsigtf.py,,nsigtf,#Any#Any#Any#Any#,48

Before Change


    fr = N.zeros(NN,dtype=complex)  // Initialize output
    
    // The overlap-add procedure including multiplication with the synthesis windows    
    for ii in range(n):
        X = len(gd[ii])
        // TODO: the following indexes can be written as two slices
        ixs = N.concatenate((N.arange(0,int(ceil(X/2.))),N.arange(X-int(floor(X/2.)),X)))

        temp = fft(c[ii])*len(c[ii])
        cii = temp[ixs]
        pos = N.arange(-floor(X/2.),ceil(X/2.),dtype=int)+timepos[ii]-1
        win_range = N.mod(pos,NN)
        fr[win_range] += N.fft.fftshift(cii*gd[ii])

    // TODO: this could probably be a rifft, if real signals (as outcome) are assumed
    fr = ifft(fr)
    fr = fr[:Ls] // Truncate the signal to original length (if given)
    return fr

After Change


    fr = N.zeros(nn,dtype=complex)  // Initialize output
    
    // The overlap-add procedure including multiplication with the synthesis windows    
    for gdii,tpii,cii in izip(gd,timepos,c):
        X = len(gdii)
        // TODO: the following indexes can be written as two slices
        ixs = N.concatenate((N.arange(0,ceil(X/2.),dtype=int),N.arange(X-floor(X/2.),X,dtype=int)))

        temp = fft(cii)*len(cii)
        tii = temp[ixs]
        pos = N.arange(-floor(X/2.),ceil(X/2.),dtype=int)+tpii-1
        win_range = N.mod(pos,nn)
        fr[win_range] += N.fft.fftshift(tii*gdii)

    // TODO: this could probably be a rifft, if real signals (as outcome) are assumed
    fr = ifft(fr)
    fr = fr[:Ls] // Truncate the signal to original length (if given)
    return fr
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: grrrr/nsgt
Commit Name: 02d5a085316ce3cf2ef767ace6d20d3678f196f9
Time: 2011-03-30
Author: gr@grrrr.org
File Name: src/nsigtf.py
Class Name:
Method Name: nsigtf


Project Name: grrrr/nsgt
Commit Name: 02d5a085316ce3cf2ef767ace6d20d3678f196f9
Time: 2011-03-30
Author: gr@grrrr.org
File Name: src/nsgtf.py
Class Name:
Method Name: nsgtf


Project Name: grrrr/nsgt
Commit Name: 02d5a085316ce3cf2ef767ace6d20d3678f196f9
Time: 2011-03-30
Author: gr@grrrr.org
File Name: src/nsigtf.py
Class Name:
Method Name: nsigtf


Project Name: dask/dask-image
Commit Name: aab843410171a11dfd721b1d9cc980bee4420427
Time: 2018-09-02
Author: jakirkham@gmail.com
File Name: dask_image/ndfourier/_utils.py
Class Name:
Method Name: _get_freq_grid