lime/signal/sos.py
def TPA2D_time_order(E, dip, omegaps, omega1s, g_idx, e_idx, f_idx, gamma):
    """
    2D two-photon-absorption signal with classical light scanning the omegap = omega1 + omega2 and omega1
    """

    g = 0

    signal = np.zeros((len(omegaps), len(omega1s)))

    for i in  range(len(omegaps)):
        omegap = omegaps[i]

        for j in range(len(omega1s)):
            omega1 = omega1s[j]

            omega2 = omegap - omega1

            for f in f_idx:

                tmp = 0.
                for m in e_idx:
                     tmp += dip[f, m] * dip[m, g] * 1./(omega1 - (E[m] - E[g]) + 1j * gamma[m])

                signal[i,j] += np.abs(tmp)**2 * lorentzian(omegap - E[f] + E[g], width=gamma[f])

    return signal

    2D two-photon-absorption signal with classical light scanning the omegap = omega1 + omega2 and omega1
    
2D two-photon-absorption signal with classical light scanning the omegap = omega1 + omega2 and omega1
2D two - photon - absorption signal with classical light scanning the omegap = omega1 + omega2 and omega1
def TPA2D_time_order(E, dip, omegaps, omega1s, g_idx, e_idx, f_idx, gamma):
    g = 0
    signal = np.zeros((len(omegaps), len(omega1s)))
    for i in  range(len(omegaps)):
        omegap = omegaps[i]
        for j in range(len(omega1s)):
            omega1 = omega1s[j]
            omega2 = omegap - omega1
            for f in f_idx:
                tmp = 0.
                for m in e_idx:
                     tmp += dip[f, m] * dip[m, g] * 1./(omega1 - (E[m] - E[g]) + 1j * gamma[m])
                signal[i,j] += np.abs(tmp)**2 * lorentzian(omegap - E[f] + E[g], width=gamma[f])
    return signal
def TPA2D_time_order ( E , dip , omegaps , omega1s , g_idx , e_idx , f_idx , gamma ) : g = 0 signal = np . zeros ( ( len ( omegaps ) , len ( omega1s ) ) ) for i in range ( len ( omegaps ) ) : omegap = omegaps [ i ] for j in range ( len ( omega1s ) ) : omega1 = omega1s [ j ] omega2 = omegap - omega1 for f in f_idx : tmp = 0. for m in e_idx : tmp += dip [ f , m ] * dip [ m , g ] * 1. / ( omega1 - ( E [ m ] - E [ g ] ) + 1j * gamma [ m ] ) signal [ i , j ] += np . abs ( tmp ) ** 2 * lorentzian ( omegap - E [ f ] + E [ g ] , width = gamma [ f ] ) return signal
2D two-photon-absorption signal with classical light scanning the omegap = omega1 + omega2 and omega1
2D two - photon - absorption signal with classical light scanning the omegap = omega1 + omega2 and omega1
"""
    2D two-photon-absorption signal with classical light scanning the omegap = omega1 + omega2 and omega1
    """
E
dip
omegaps
omega1s
g_idx
e_idx
f_idx
gamma