Commit d740fef6 authored by Nicolas Nunez Barreto's avatar Nicolas Nunez Barreto
parents 28fdba13 b5ff870c
......@@ -543,6 +543,15 @@ plt.savefig('CPT_3lasers.svg')
#%%
i = 0
for j in range(28):
plt.figure()
plt.plot([2*f*1e-6 for f in Freqs[j]], Counts[j], 'o-')
plt.xlabel('Frecuencia MHz)')
plt.ylabel('counts')
plt.grid()
plt.savefig(f'espectros_4_{j}.png',dpi = 200)
......@@ -360,4 +360,17 @@ plt.xlabel('Frecuencia (MHz)')
plt.ylabel('counts')
plt.grid()
#plt.ylim(2500, 6100)
plt.legend()
\ No newline at end of file
plt.legend()
#%%
i = 0
for j in range(28):
plt.figure()
plt.plot([2*f*1e-6 for f in Freqs[j]], Counts[j], 'o-')
plt.xlabel('Frecuencia MHz)')
plt.ylabel('counts')
plt.grid()
plt.savefig(f'espectros_5_{j}.png',dpi = 200)
......@@ -9,7 +9,7 @@ import os
from scipy import interpolate
# Solo levanto algunos experimentos
Calib_Files = """000007324-UV_Scan_withcalib_Haeffner
Calib_Files = """000007209-UV_Scan_withcalib_Haeffner
"""
"""
......@@ -18,10 +18,10 @@ No da bien, da 51 MHz de ancho
#carpeta pc nico labo escritorio:
#C:\Users\Usuario\Documents\artiq\artiq_experiments\analisis\plots\20220503_EspectrosUVnuevos\Data
carpeta = "./Data/"
def SeeKeys(files):
for i, fname in enumerate(files.split()):
data = h5py.File(fname+'.h5', 'r') # Leo el h5: Recordar que nuestros datos estan en 'datasets'
data = h5py.File(carpeta + fname+'.h5', 'r') # Leo el h5: Recordar que nuestros datos estan en 'datasets'
print(fname)
print(list(data['datasets'].keys()))
......@@ -35,7 +35,7 @@ for i, fname in enumerate(Calib_Files.split()):
print(SeeKeys(Calib_Files))
print(i)
print(fname)
data = h5py.File(fname+'.h5', 'r') # Leo el h5: Recordar que nuestros datos estan en 'datasets'
data = h5py.File(carpeta + fname+'.h5', 'r') # Leo el h5: Recordar que nuestros datos estan en 'datasets'
print(list(data['datasets'].keys()))
Amps.append(np.array(data['datasets']['UV_Amplitudes']))
Freqs.append(np.array(data['datasets']['UV_Frequencies']))
......
......@@ -315,7 +315,7 @@ def FullL(rabG, rabP, gPS = 0, gPD = 0, Detg = 0, Detp = 0, u = 0, lwg = 0, lwp
if betag !=0 and betap !=0:
#ESTA PARTE ES CUANDO AGREGAS MICROMOCION
nmax = 2*int(betag)
nmax = int(betag)
#print(nmax)
Ltemp, Omega = LtempCalculus(betag,betap, drivefreq)
#print(factor)
......
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Jul 20 17:30:37 2025
@author: muri
"""
import h5py
import matplotlib.pyplot as plt
import numpy as np
import os
from scipy.optimize import curve_fit
from scipy.stats import norm
def fit_gauss(x,A,B,mu,sigma):
return A*norm.pdf(x,mu,scale = sigma) + B
direc = './data/'
files = os.listdir(direc)
name = [f[4:9] for f in files ]
# f = h5py.File(direc + files[0], 'r')
index = [name.index('23002')]
nmin = 15
nmax = 110
volts = np.linspace(59,65,nmax-nmin)
x = (volts-62)*6.9
for i in index:
f = h5py.File(direc + files[i], 'r')
count = np.array(f['datasets']['counts_spectrum'])[nmin:nmax]
# count_base = f['datasets']['count_base']
# plt.plot(count,'.')
plt.plot(x,count,'.')
# plt.title(f'$4\sigma = $ {4*popt[-1]:.1f} $\mu$m')
plt.xlabel('x (aprox) (um)')
plt.ylabel('cuentas')
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment