Commit b64f60f8 authored by Nicolas Nunez Barreto's avatar Nicolas Nunez Barreto

vuelvo a meds de rde ahora con corrotantes

parent f0723a27
......@@ -57,7 +57,7 @@ class IR_LaserPowerCalibration_BS(EnvExperiment):
@rpc(flags={"async"})
def Binary_Search(self, pd_value, initial_amplitude, final_amplitude, current_freq):
mid_amplitude = round(0.5*(initial_amplitude+final_amplitude), 4)
mid_amplitude = round(0.5*(initial_amplitude+final_amplitude), 6)
#print(f'mid_amplitude: {mid_amplitude}')
if abs(initial_amplitude - mid_amplitude) < 0.00001 or abs(final_amplitude - mid_amplitude) < 0.00001:
#print('toco un borde jejox')
......
......@@ -29,7 +29,7 @@ class IR_Scan_withcal_optimized(EnvExperiment):
self.setattr_argument("Fine_scan", BooleanValue(1==0), "Experiment params")
self.setattr_argument("no_measures",
NumberValue(2000, min=1, ndecimals=0, step=1),
NumberValue(3000, min=1, ndecimals=0, step=1),
"Experiment params")
self.setattr_argument(f"IR1_cooling_freq",
......@@ -37,7 +37,7 @@ class IR_Scan_withcal_optimized(EnvExperiment):
"Cooling params")
self.setattr_argument(f"IR1_cooling_amp",
NumberValue(0.25, min=0.0, max=0.35),
NumberValue(0.2, min=0.0, max=0.35),
"Cooling params")
self.setattr_argument(f"UV_cooling_freq",
......@@ -45,23 +45,23 @@ class IR_Scan_withcal_optimized(EnvExperiment):
"Cooling params")
self.setattr_argument(f"UV_cooling_amp",
NumberValue(0.1, min=0.0, max=0.3),
NumberValue(0.15, min=0.0, max=0.3),
"Cooling params")
self.setattr_argument(f"IR2_cooling_freq",
NumberValue(80*MHz, unit='MHz', scale=MHz, min=1*MHz, max=400*MHz),
NumberValue(85*MHz, unit='MHz', scale=MHz, min=1*MHz, max=400*MHz),
"Cooling params")
self.setattr_argument(f"IR2_cooling_amp",
NumberValue(0.3, min=0.0, max=0.8),
NumberValue(0.2, min=0.0, max=0.8),
"Cooling params")
self.setattr_argument(f"UV_CPT_freq",
NumberValue(118*MHz, unit='MHz', scale=MHz, min=1*MHz, max=400*MHz),
NumberValue(115*MHz, unit='MHz', scale=MHz, min=1*MHz, max=400*MHz),
"CPT params")
self.setattr_argument(f"UV_CPT_amp",
NumberValue(0.1, min=0.000, max=0.300, step=0.001),
NumberValue(0.11, min=0.000, max=0.300, ndecimals=5, step=0.00001),
"CPT params")
self.setattr_argument(f"IR2_CPT_freq",
......@@ -69,7 +69,7 @@ class IR_Scan_withcal_optimized(EnvExperiment):
"CPT params")
self.setattr_argument(f"IR2_CPT_amp",
NumberValue(0.3, min=0., max=0.8),
NumberValue(0.15, min=0., max=0.8, ndecimals=5, step=0.00001),
"CPT params")
self.setattr_argument(f"IR1_final_freq",
......@@ -77,7 +77,7 @@ class IR_Scan_withcal_optimized(EnvExperiment):
"Final params")
self.setattr_argument(f"IR1_final_amp",
NumberValue(0.23, min=0.0, max=0.35),
NumberValue(0.19, min=0.0, max=0.35),
"Final params")
self.setattr_argument(f"UV_final_freq",
......@@ -85,11 +85,11 @@ class IR_Scan_withcal_optimized(EnvExperiment):
"Final params")
self.setattr_argument(f"UV_final_amp",
NumberValue(0.11, min=0.0, max=0.3),
NumberValue(0.15, min=0.0, max=0.3),
"Final params")
self.setattr_argument(f"IR2_final_freq",
NumberValue(80*MHz, unit='MHz', scale=MHz, min=1*MHz, max=400*MHz),
NumberValue(85*MHz, unit='MHz', scale=MHz, min=1*MHz, max=400*MHz),
"Final params")
self.setattr_argument(f"IR2_final_amp",
......@@ -105,7 +105,7 @@ class IR_Scan_withcal_optimized(EnvExperiment):
"Experiment params")
self.setattr_argument(f"t_readout",
NumberValue(50*us, unit='us', scale=us, min=1*us),
NumberValue(300*us, unit='us', scale=us, min=1*us),
"Experiment params")
self.setattr_argument(f"t_heating",
......@@ -118,6 +118,14 @@ class IR_Scan_withcal_optimized(EnvExperiment):
EnumerationValue(["Calibrated_scan", "Defined_scan"]),
"Scan params")
self.setattr_argument("Use_calibrated_amps",
EnumerationValue(["Yes", "No"]),
"Scan params")
self.setattr_argument(f"IR1_sweep_amp",
NumberValue(0.15, min=0.0, max=0.35, ndecimals=5, step=0.00001),
"Scan params")
self.setattr_argument("Scanning_frequencies", Scannable(
default=CenterScan(210*MHz, 20*MHz, 0.1*MHz),
......@@ -130,7 +138,7 @@ class IR_Scan_withcal_optimized(EnvExperiment):
self.setattr_argument("Sweep_type",
EnumerationValue(["heating_time", "volt_dcA", "volt_dcB", "volt_compOven"]),
EnumerationValue(["none", "heating_time", "volt_dcA", "volt_dcB", "volt_compOven"]),
"Scan params")
self.setattr_argument("Plot_type",
......@@ -322,6 +330,37 @@ class IR_Scan_withcal_optimized(EnvExperiment):
self.enfriar_ion()
Sweep_type = "nona"
if Sweep_type == "none":
iter_index = 0
temporal_freq_list=[0]*len(Freqs)
while iter_index < len(Freqs):
Accumulated_counts = 0
self.core.break_realtime()
delay(10000*us)
if self.Use_calibrated_amps=="Yes":
self.laserIR1.set_frequency(Freqs[iter_index], Amps[iter_index], profile=1) # Cambio la frec del perfil 1 (estoy en el 0)
else:
self.laserIR1.set_frequency(Freqs[iter_index], self.IR1_sweep_amp, profile=1) # Cambio la frec del perfil 1 (estoy en el 0)
for runN in range(self.no_measures):
if runN % 20 == 0:
delay(self.t_cool)
else:
delay(200*us)
if self.Heating:
self.laserUV.off()
delay(self.t_heating)
self.laserUV.on()
cuentas = self.readout() # Hago la medicion y vuelvo con las cuentas
Accumulated_counts = Accumulated_counts + cuentas
self.mutate_dataset("counts_spectrum", iter_index, Accumulated_counts)
iter_index = iter_index + 1
delay(500*us)
if not self.Sweep_type == "heating_time":
voltage_index = 0
while voltage_index < len(Voltages):
......@@ -333,7 +372,10 @@ class IR_Scan_withcal_optimized(EnvExperiment):
Accumulated_counts = 0
self.core.break_realtime()
delay(10000*us)
self.laserIR1.set_frequency(Freqs[iter_index], Amps[iter_index], profile=1) # Cambio la frec del perfil 1 (estoy en el 0)
if self.Use_calibrated_amps=="Yes":
self.laserIR1.set_frequency(Freqs[iter_index], Amps[iter_index], profile=1) # Cambio la frec del perfil 1 (estoy en el 0)
else:
self.laserIR1.set_frequency(Freqs[iter_index], self.IR1_sweep_amp, profile=1) # Cambio la frec del perfil 1 (estoy en el 0)
for runN in range(self.no_measures):
if runN % 20 == 0:
delay(self.t_cool)
......
......@@ -30,11 +30,21 @@ class PMTCalibration(EnvExperiment):
@rpc
def create_applets(self):
self.ccb.issue("create_applet", "ON_OFF_calibration_pmt_blinking",
"${python} -m pyLIAF.artiq.applets.realtime "
"40 "
"pmt_counts_on "
"--y2 pmt_counts_off")
if self.Blink:
self.ccb.issue("create_applet", "Trapping_on_off",
"${python} -m pyLIAF.artiq.applets.realtime "
"400 "
"pmt_counts_on "
"--y2 pmt_counts_off")
else:
self.ccb.issue("create_applet", "Monitoring_fluorescence",
"${python} -m pyLIAF.artiq.applets.realtime_lines "
"400 "
"pmt_counts_on "
"--y2 pmt_counts_off")
self.ccb.issue("create_applet", "DIFF_calibration_pmt_blinking",
"${python} -m pyLIAF.artiq.applets.realtime "
......@@ -98,19 +108,18 @@ class PMTCalibration(EnvExperiment):
@kernel
def measure_counts(self):
self.core.break_realtime()
self.laserUV.on()
#self.laserUV.on()
if self.Blink:
self.laserIR.off()
delay(10*us)
counts_off = self.readout()
self.mutate_dataset("pmt_counts_off", 0, counts_off)
at_mu(self.core.get_rtio_counter_mu() + 10000)
self.laserIR.on()
delay(10*us)
counts_off = self.readout()
self.mutate_dataset("pmt_counts_off", 0, counts_off)
at_mu(self.core.get_rtio_counter_mu() + 10000)
self.laserIR.on()
delay(10*us)
counts_on = self.readout()
self.mutate_dataset("pmt_counts_on", 0, counts_on)
at_mu(self.core.get_rtio_counter_mu() + 10000)
at_mu(self.core.get_rtio_counter_mu() + 1000)
#self.mutate_dataset("pmt_counts_diff", 0, counts_on/counts_off)
@kernel
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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