コード例 #1
0
def power_zero_cusp(L, b, zn=True, startpt=1, endpt=4):
    x = np.linspace(startpt, endpt, L)
    res = x**b
    res[len(res) // 2:] = 0
    if zn:
        return zero_norm(res)
    return res
コード例 #2
0
def power_law_cusp(L, b, zn=True, startpt=1, endpt=4):
    res = power_law_zero_cusp(
        L, b, zn=zn, startpt=startpt, endpt=endpt) + power_law_zero_cusp(
            L, b, zn=zn, startpt=startpt, endpt=endpt)[::-1]
    if zn:
        return zero_norm(res)
    return res
コード例 #3
0
def exp_zero_cusp(L, a, zn=True, startpt=1, endpt=4):
    x = np.linspace(startpt, endpt, L)
    res = np.exp(a * x)
    res[len(res) // 2:] = 0
    if zn:
        return zero_norm(res)
    return res
コード例 #4
0
def exp_cusp(L, a, zn=True, startpt=1, endpt=4):
    res = exp_zero_cusp(
        L,
        a,
        zn=zn,
        startpt=startpt,
        endpt=endpt,
    ) + exp_zero_cusp(
        L,
        a,
        zn=zn,
        startpt=startpt,
        endpt=endpt,
    )[::-1]
    if zn:
        return zero_norm(res)
    return res
コード例 #5
0
def pitchfork(L, b, zn=True, startpt=1, endpt=4):
    res = power_zero_cusp(
        L,
        2 * b,
        zn=zn,
        startpt=startpt,
        endpt=endpt,
    )[::-1] + power_cusp(L, b, zn=zn, startpt=startpt,
                         endpt=endpt) + power_zero_cusp(
                             L,
                             2 * b,
                             zn=zn,
                             startpt=startpt,
                             endpt=endpt,
                         )
    if zn:
        return zero_norm(res)
    return res
コード例 #6
0
def haar(L, zn=True):
    res = -1 * np.ones(L)
    res[len(res) // 2:] = 1
    if zn:
        return zero_norm(res)
    return res