lime/noise.py
def corr(eps):
    """
    calculate the autocorrelation function in variable MEAN.
    """
    f = open('corr.out')

    nstep, nsample = eps.shape 
    
    cor = np.zeros(nstep)

    npts = nstep * nsample

    for idly in range(nstep):

        mean = 0.0
        std = 0.

        for i in range(nsample):# i=1,nreal
            for j in range(nstep - idly):
                mean += eps[j,i] * eps[j+idly, i]

        cor[idly] = mean/float(npts)

    f.close()
    return cor

    calculate the autocorrelation function in variable MEAN.
    
calculate the autocorrelation function in variable MEAN.
calculate the autocorrelation function in variable MEAN .
def corr(eps):
    f = open('corr.out')
    nstep, nsample = eps.shape 
    cor = np.zeros(nstep)
    npts = nstep * nsample
    for idly in range(nstep):
        mean = 0.0
        std = 0.
        for i in range(nsample):
            for j in range(nstep - idly):
                mean += eps[j,i] * eps[j+idly, i]
        cor[idly] = mean/float(npts)
    f.close()
    return cor
def corr ( eps ) : f = open ( 'corr.out' ) nstep , nsample = eps . shape cor = np . zeros ( nstep ) npts = nstep * nsample for idly in range ( nstep ) : mean = 0.0 std = 0. for i in range ( nsample ) : for j in range ( nstep - idly ) : mean += eps [ j , i ] * eps [ j + idly , i ] cor [ idly ] = mean / float ( npts ) f . close ( ) return cor
calculate the autocorrelation function in variable MEAN.
calculate the autocorrelation function in variable MEAN .
"""
    calculate the autocorrelation function in variable MEAN.
    """ # i=1,nreal
eps