def getSignificance(wk1, wk2, nout, ofac):
    """ 
    Returns the peak false alarm probabilities
    Hence the lower is the probability and the more significant is the peak
    """
    expy = exp(-wk2)                    
    effm = 2.0*(nout)/ofac             
    sig = effm*expy
    ind = (sig > 0.01).nonzero()
    sig[ind] = 1.0 - (1.0 - expy[ind])**effm

    return sig
dataset/ETHPy150Open dwkim78/upsilon/upsilon/extract_features/period_LS_pyfftw.py/getSignificance/original