Commit 4ac0bd19 authored by Nicolas Nunez Barreto's avatar Nicolas Nunez Barreto
Browse files
parents 908f4b59 a9499f0b
Loading
Loading
Loading
Loading
+29 −30
Changes for analisis/plots/20221006_transitoriosv2/Transitorios_02.py: 29 added lines, 30 removed lines.
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@ import re
import ast
from scipy.optimize import curve_fit
import os
asdsad


# Solo levanto algunos experimentos
SP_files = [8445, 8457, 8458, 8459, 8460, 8461, 8462, 8463, 8464, 8465, 8466, 8467, 8468, 8469]
@@ -132,6 +132,11 @@ plt.xlim(-0.2, 3)

#%%

"""
Esto mira las curvas SP y les hace ajustes exponenciales a la ultima parte para plotear
el tiempo caracteristico
"""

bkgrvec = Calib_Bins[3][:-1]

Taus = []
@@ -170,57 +175,51 @@ plt.plot(UVampVec, Offsets,'o')

#%%
"""
Ploteo calibraciones largas
Defino los vectores de las mediciones largas para obtener branching fractions, 25 M de mediciones
"""

plt.figure()
for j in [2,3]:
    plt.plot([t*1e6 for t in Calib_Bins[j][:-1]], Calib_Heigths[j])
plt.xlim(-0.2, 2)
Bins_long = [t*1e6 for t in Long_Bins[0][:-1]]
DP_long_raw = Long_Heigths[3] #la 0 y la 2 salieron mal pero las dejo por las dudas. uso la 3
SP_long_raw = Long_Heigths[1]

DP_bkg_long_raw = Calib_Heigths[2] #calibracion del DP, esta al final ni la uso
SP_bkg_long_raw = Calib_Heigths[3] #calibracion del SP

#%%

"""
Ploteo las mediciones largas
"""

Bins_long = [t*1e6 for t in Long_Bins[0][:-1]]
DP_long_raw = Long_Heigths[2] #la 0 salio mal
SP_long_raw = Long_Heigths[1]

DP_bkg_long_raw = Calib_Heigths[2]
SP_bkg_long_raw = Calib_Heigths[3]

#%%
plt.figure()
#plt.plot(Bins_long, SP_long_raw)
plt.plot(Bins_long, DP_long_raw)
plt.plot(Bins_long, SP_long_raw)
plt.plot(Bins_long[0:475], DP_long_raw)
plt.xlim(-1, 2)


#%%
"""
aca se plotea la SP con su curva de calibracion sin ion para restar
"""
plt.figure()
plt.plot(Bins_long, SP_long_raw)
plt.plot(Bins_long, SP_bkg_long_raw)
plt.xlim(-1, 2)


#%%
#Raw
plt.figure()
plt.plot(Bins_long, DP_long_raw)
plt.plot(Bins_long, SP_long_raw)
plt.xlim(-0.2, 2)

"""
Restamos el fondo a ambas curvas. A la DP le restamos un promedio de la curva con el ion
apagado porque en ningun momento esta prendido el UV
"""
#Pruebo restar background directamente
DP_long_subs = [DP_long_raw[j]-DP_bkg_long_raw[j] for j in range(len(DP_long_raw))]
#DP_long_subs = [DP_long_raw[j]-DP_bkg_long_raw[j] for j in range(len(DP_long_raw))]
DP_long_subs = [d-np.mean(DP_long_raw[-100:]) for d in DP_long_raw]
SP_long_subs = [SP_long_raw[j]-SP_bkg_long_raw[j] for j in range(len(SP_long_raw))]

#%%
plt.figure()
plt.plot(Bins_long, DP_long_subs)
plt.plot(Bins_long, SP_long_subs)
plt.xlim(-0.2, 2)

plt.plot([b+0.25 for b in Bins_long[0:475]], DP_long_subs)
#plt.plot(Bins_long, SP_long_subs)
#plt.xlim(-0.2, 2)
plt.grid()



+2.11 MiB

File added.

No diff preview for this file type.

+1.51 MiB

File added.

No diff preview for this file type.

+2.09 MiB

File added.

No diff preview for this file type.

+2.15 MiB

File added.

No diff preview for this file type.

Loading