Esempio n. 1
0
        #Ttheo = np.linspace(T[0],T[-1], 1000)
        Xtd, Ytd, Xt, Yt = fk.Curve(l_trans, l_ref, harmonic, phi,
                                    a * max(abs(Z)), offset, T[0], T[-1], 1000)

        delay = T
        X = Z.real
        X_s = Z_s.real
        Y = Z.imag
        Y_s = Z_s.imag

        T_d, X_d, Y_d = fk.CutDataSet(T, X, Y, data_window)
        Z = X_d + 1j * Y_d
        scaling = 1E-4  #max(Z.real)/max(Ttheo)

        # Fourier traffo
        Zg = fk.GaussWindow(T_d, Z, suscept)
        Td = T[1] - T[0]
        if gauss:
            wn, dft = fk.DFT(T_d,
                             Zg,
                             Td,
                             l_ref,
                             harmonic,
                             zeroPaddingFactor=zeroPaddingFactor)
        else:
            wn, dft = fk.DFT(T_d,
                             Z,
                             Td,
                             l_ref,
                             harmonic,
                             zeroPaddingFactor=zeroPaddingFactor)
            delay = T
            X = Z.real
            X_s = Z_s.real
            Y = Z.imag
            Y_s = Z_s.imag

            #print T
            T_d = T[:]
            X_d = X[:]
            Y_d = Y[:]

            T_d, X_d, Y_d = fk.CutDataSet(T, X, Y, data_window)
            Z = X_d + 1j * Y_d

            # Fourier traffo
            Zg = fk.GaussWindow(T_d, Z, False)
            Td = T[1] - T[0]
            wn, dft = fk.DFT(T_d,
                             Zg,
                             Td,
                             l_ref,
                             harmonic,
                             zeroPaddingFactor=zeroPaddingFactor)
            FWHM, peakFullWidth = fk.PeakWidth(T, 0.1, False,
                                               zeroPaddingFactor)
            FWHM = FWHM
            #print(FWHM)

            # Plot time domain
            figTD = plt.figure('scan_{0}_{1}_d{2}_TD_{3}'.format(
                run, dev, d, i),
Ttheo = np.linspace(delay[0],delay[-1], 30000)
Xtd,Ytd,Xt,Yt = fk.Curve(spc.h*spc.c/(spc.e*l_trans)*1e9, l_ref, harmonic, phi, a*max(abs(Z)), offset, delay[0], delay[-1], 30000) # theo curve for transition
Xtd,Ytd,Xt,Yt = fk.Curve(l_fel/harmonic, l_ref, harmonic, phi, a*max(abs(Z)), offset, delay[0], delay[-1], 30000) # theo curve for laser CWL

T_d,X_d,Y_d = fk.CutDataSet(delay, Z.real, Z.imag, data_window)
Z_cut = X_d + 1j*Y_d
Z_plot = Z_cut
Z_cut = fk.Phasing_TD(Z_cut,T_d,E_r) #time domain phasing of data set to take into account position of data window

scaling = 1 #max(Z.real)/max(Ttheo)

# Fourier traffo

Td = np.mean(np.unique(np.diff(delay)))
if gauss:
    Zg = fk.GaussWindow(T_d, Z_cut, suscept)
    wn, dft = fk.DFT(T_d, Zg, Td, l_ref , harmonic, zeroPaddingFactor = zeroPaddingFactor)
else:
    wn, dft = fk.DFT(T_d, Z_cut, Td, l_ref , harmonic, zeroPaddingFactor = zeroPaddingFactor)
#        dft = dft[::-1]
FWHM , peakFullWidth = fk.PeakWidth(T_d, 0.05, False, zeroPaddingFactor)

       
#Fouriert Trafo of the theoretical dataset
wn_theo, dft_theo = fk.DFT(t_fano_theo, I_fano_theo, t_fano_theo[1]-t_fano_theo[0], l_ref , harmonic, zeroPaddingFactor = zeroPaddingFactor)

''' Fitting the dephasing for 6th harmonic R'''

def decay(t,amp,tau):
    return amp*np.exp(-t/tau) + 0.001828
def decay_theo(t,amp,tau):
Esempio n. 4
0
# spectrogram
# =============================================================================

#analysing 5H
Z5 = Z[4]
Z5 *= np.exp(1j * np.pi / 180. * phas_corr)  #phasing data

T_d, X_d, Y_d = fk.CutDataSet(T, Z5.real, Z5.imag, data_window)
Z5_cut = X_d + 1j * Y_d
Z5_cut = fk.Phasing_TD(Z5_cut, T_d, E_r - E_undersamp)
scaling = 1E-4  #max(Z.real)/max(Ttheo)

# Fourier traffo
Td = np.mean(np.unique(np.diff(T)))
if gauss:
    Z5g = fk.GaussWindow(T_d, Z5_cut, suscept)
    wn, dft = fk.DFT(T_d,
                     Z5g,
                     Td,
                     l_ref,
                     harmonic,
                     zeroPaddingFactor=zeroPaddingFactor)
else:
    wn, dft = fk.DFT(T_d,
                     Z5_cut,
                     Td,
                     l_ref,
                     harmonic,
                     zeroPaddingFactor=zeroPaddingFactor)
FWHM, peakFullWidth = fk.PeakWidth(T_d, peakMargin, suscept, zeroPaddingFactor)