lime/signal/sos.py
def _etpa(omegaps, Es, edip, jta, t1, t2, g_idx, e_idx, f_idx):
    """
    internal function to compute the ETPA signal.

    The double time integrals are computed numerically.

    Parameters
    ----------
    omegaps: pump center frequencies
    Es: eigenenergies
    edip: electric dipole operator
    jta: 2d array
        joint temporal amplitude
    t1: 1d array
    t2: 1d array
    g_idx: ground-state manifold
    e_idx: intermediate states
    f_idx: final states

    Returns
    -------
    signal: 1d array

    """
    # setup the temporal grid
    T1, T2 = np.meshgrid(t1, t2)

    # discrete heaviside function
    theta = heaviside(T2 - T1, 0.5)

    signal = np.zeros(len(omegaps), dtype=complex)
    g = g_idx
    for j, omegap in enumerate(omegaps): # loop over pump frequencies

        omega1 = omega2 = omegap/2.

        for f in f_idx: # loop over final states
            for e in e_idx:

                detuning2 = Es[f] - Es[e] - omega2
                detuning1 = Es[e] - Es[g] - omega1

                D = edip[e, g] * edip[f, e]

                signal[j] += D * np.sum(theta * np.exp(1j * detuning2 * T2 +
                                                    1j * detuning1 * T1) * jta)

                detuning2 = Es[f] - Es[e] - omega1
                detuning1 = Es[e] - Es[g] - omega2
                signal[j] += D * np.sum(theta * np.exp(1j * detuning2 * T2 +
                                                    1j * detuning1 * T1) * jta.T)

    return signal

    internal function to compute the ETPA signal.

    The double time integrals are computed numerically.

    Parameters
    ----------
    omegaps: pump center frequencies
    Es: eigenenergies
    edip: electric dipole operator
    jta: 2d array
        joint temporal amplitude
    t1: 1d array
    t2: 1d array
    g_idx: ground-state manifold
    e_idx: intermediate states
    f_idx: final states

    Returns
    -------
    signal: 1d array

    
internal function to compute the ETPA signal.
The double time integrals are computed numerically.

Parameters



Returns

1d array
internal function to compute the ETPA signal . The double time integrals are computed numerically . Parameters Returns 1d array
def _etpa(omegaps, Es, edip, jta, t1, t2, g_idx, e_idx, f_idx):
    T1, T2 = np.meshgrid(t1, t2)
    theta = heaviside(T2 - T1, 0.5)
    signal = np.zeros(len(omegaps), dtype=complex)
    g = g_idx
    for j, omegap in enumerate(omegaps): 
        omega1 = omega2 = omegap/2.
        for f in f_idx: 
            for e in e_idx:
                detuning2 = Es[f] - Es[e] - omega2
                detuning1 = Es[e] - Es[g] - omega1
                D = edip[e, g] * edip[f, e]
                signal[j] += D * np.sum(theta * np.exp(1j * detuning2 * T2 +
                                                    1j * detuning1 * T1) * jta)
                detuning2 = Es[f] - Es[e] - omega1
                detuning1 = Es[e] - Es[g] - omega2
                signal[j] += D * np.sum(theta * np.exp(1j * detuning2 * T2 +
                                                    1j * detuning1 * T1) * jta.T)
    return signal
def _etpa ( omegaps , Es , edip , jta , t1 , t2 , g_idx , e_idx , f_idx ) : T1 , T2 = np . meshgrid ( t1 , t2 ) theta = heaviside ( T2 - T1 , 0.5 ) signal = np . zeros ( len ( omegaps ) , dtype = complex ) g = g_idx for j , omegap in enumerate ( omegaps ) : omega1 = omega2 = omegap / 2. for f in f_idx : for e in e_idx : detuning2 = Es [ f ] - Es [ e ] - omega2 detuning1 = Es [ e ] - Es [ g ] - omega1 D = edip [ e , g ] * edip [ f , e ] signal [ j ] += D * np . sum ( theta * np . exp ( 1j * detuning2 * T2 + 1j * detuning1 * T1 ) * jta ) detuning2 = Es [ f ] - Es [ e ] - omega1 detuning1 = Es [ e ] - Es [ g ] - omega2 signal [ j ] += D * np . sum ( theta * np . exp ( 1j * detuning2 * T2 + 1j * detuning1 * T1 ) * jta . T ) return signal
internal function to compute the ETPA signal.
internal function to compute the ETPA signal .
"""
    internal function to compute the ETPA signal.

    The double time integrals are computed numerically.

    Parameters
    ----------
    omegaps: pump center frequencies
    Es: eigenenergies
    edip: electric dipole operator
    jta: 2d array
        joint temporal amplitude
    t1: 1d array
    t2: 1d array
    g_idx: ground-state manifold
    e_idx: intermediate states
    f_idx: final states

    Returns
    -------
    signal: 1d array

    """ # setup the temporal grid # discrete heaviside function # loop over pump frequencies # loop over final states
omegaps
Es
edip
jta
t1
t2
g_idx
e_idx
f_idx