Commit 32f4f986 authored by Nicolas Nunez Barreto's avatar Nicolas Nunez Barreto

codigos

parent 282ee988
...@@ -214,8 +214,9 @@ popt_vec = [] ...@@ -214,8 +214,9 @@ popt_vec = []
pcov_vec = [] pcov_vec = []
plt.figure() plt.figure()
for j in range(len(SP_Heigths)): for j in range(len(SP_Heigths)-1):
#for j in [12]: #for j in [12]:
print(j)
BackgroundVector = SP_Bkgr_builder(np.mean(SP_Heigths[j][0:50]),np.mean(SP_Heigths[j][-50:]),59,67,965) BackgroundVector = SP_Bkgr_builder(np.mean(SP_Heigths[j][0:50]),np.mean(SP_Heigths[j][-50:]),59,67,965)
#CorrectedSP_Height = [SP_Heigths[j][k]-BackgroundVector[k] for k in range(len(BackgroundVector))] #CorrectedSP_Height = [SP_Heigths[j][k]-BackgroundVector[k] for k in range(len(BackgroundVector))]
...@@ -234,10 +235,15 @@ for j in range(len(SP_Heigths)): ...@@ -234,10 +235,15 @@ for j in range(len(SP_Heigths)):
#%% #%%
plt.figure() plt.figure()
plt.plot(UVpotVec, Taus,'o') plt.plot(UVpotVec[:-5], Taus[:-6],'o', markersize=10, color='purple')
plt.xlabel('UV power (mW)') #plt.errorbar(UVpotVec[:-5], Taus[:-6], yerr=1e1*np.array(ErrorTaus[:-6]), fmt='.', capsize=2, markersize=2)
plt.ylabel('Characteristic time (us)') plt.xlabel('UV power (mW)', fontsize=15)
plt.ylabel('Characteristic time (us)', fontsize=15)
plt.ylim(-0.1,3)
plt.grid()
#%%
plt.figure() plt.figure()
plt.plot(UVpotVec, Amps,'o') plt.plot(UVpotVec, Amps,'o')
plt.xlabel('UV power (mW)') plt.xlabel('UV power (mW)')
...@@ -262,8 +268,8 @@ plt.rcParams.update({ ...@@ -262,8 +268,8 @@ plt.rcParams.update({
"text.usetex": False, "text.usetex": False,
}) })
#plt.figure() plt.figure()
#plt.plot(Stat_Bins[0][:-1], Stat_Heigths[0]) plt.plot(Stat_Bins[0][:-1], Stat_Heigths[0])
#plot figuras papers #plot figuras papers
...@@ -309,30 +315,36 @@ pcov_vec_v2 = [] ...@@ -309,30 +315,36 @@ pcov_vec_v2 = []
ki = 80 ki = 80
selectedj = [2,5,10]
t0 = -0.2
plt.figure() plt.figure()
for j in range(len(SP_Heigths_v2)): for j in range(len(SP_Heigths_v2)):
#for j in [1]: #for j in [1]:
#BackgroundVector = SP_Bkgr_builder(np.mean(SP_Heigths_v2[j][0:50]),np.mean(SP_Heigths_v2[j][-50:]),59,67,965) if j in selectedj:
#BackgroundVector = SP_Bkgr_builder(np.mean(SP_Heigths_v2[j][0:50]),np.mean(SP_Heigths_v2[j][-50:]),59,67,965)
#CorrectedSP_Height_v2 = [SP_Heigths_v2[j][k]-BackgroundVector[k] for k in range(len(BackgroundVector))]
#CorrectedSP_Height_v2 = [SP_Heigths_v2[j][k]-BackgroundVector[k] for k in range(len(BackgroundVector))]
CorrectedSP_Height_v2 = SP_Heigths_v2[j]
CorrectedSP_Height_v2 = SP_Heigths_v2[j]
popt, pcov = curve_fit(expo, RefBins[ki:], CorrectedSP_Height_v2[ki:], p0=(5, 1000, 100), bounds=((0, 0, 0), (50, 1e5, 1e5)))
popt_vec_v2.append(popt) popt, pcov = curve_fit(expo, RefBins[ki:], CorrectedSP_Height_v2[ki:], p0=(5, 1000, 100), bounds=((0, 0, 0), (50, 1e5, 1e5)))
pcov_vec_v2.append(pcov) popt_vec_v2.append(popt)
plt.plot(RefBins, CorrectedSP_Height_v2) pcov_vec_v2.append(pcov)
plt.plot(RefBins[ki:], [expo(r, *popt) for r in RefBins][ki:]) plt.plot([r+t0 for r in RefBins], CorrectedSP_Height_v2)
plt.plot([r+t0 for r in RefBins[ki:]], [expo(r, *popt) for r in RefBins][ki:])
print(popt[0])
print(popt[0])
print(pcov[0][0])
print(pcov[0][0])
Taus_v2.append(popt[0])
Amps_v2.append(popt[1]) Taus_v2.append(popt[0])
Offsets_v2.append(popt[2]) Amps_v2.append(popt[1])
ErrorTaus_v2.append(np.sqrt(pcov)[0][0]) Offsets_v2.append(popt[2])
ErrorTaus_v2.append(np.sqrt(pcov)[0][0])
plt.xlim(-0.2,2)
#%% #%%
plt.figure() plt.figure()
...@@ -397,7 +409,7 @@ plt.savefig('fig3_01.pdf') ...@@ -397,7 +409,7 @@ plt.savefig('fig3_01.pdf')
plt.savefig('fig3_01.svg') plt.savefig('fig3_01.svg')
#%% #%%
""" """
VEMOS UNA DP CON POTENCIA ALTA A VER SI DA LO QUE TIENE QUE DAR EL ANCHO DE LINEA VEMOS UNA DP CON POTENCIA ALTA A VER SI DA LO QUE TIENE QUE DAR EL ANCHO DE LINEA
...@@ -449,10 +461,16 @@ initi=0.10 ...@@ -449,10 +461,16 @@ initi=0.10
popt_UV, pcov_UV = curve_fit(expo, BinsUVhigh[int(initi*len(BinsUVhigh)):], HeightsUVhigh[int(initi*len(BinsUVhigh)):], p0=(1, 1000, 1800, 1), bounds=((0,0,0,0),(20, 1e7, 1e5, 1e3))) popt_UV, pcov_UV = curve_fit(expo, BinsUVhigh[int(initi*len(BinsUVhigh)):], HeightsUVhigh[int(initi*len(BinsUVhigh)):], p0=(1, 1000, 1800, 1), bounds=((0,0,0,0),(20, 1e7, 1e5, 1e3)))
plt.figure() plt.figure()
plt.plot(BinsUVhigh, HeightsUVhigh) plt.plot(BinsUVhigh, HeightsUVhigh,linewidth=4)
plt.plot(BinsUVhigh, [expo(r, *popt_UV) for r in BinsUVhigh]) plt.plot(BinsUVhigh[80:], [expo(r, *popt_UV) for r in BinsUVhigh][80:], color='fuchsia', linewidth=3, label='Exponential fit')
plt.plot(BinsUVhigh[int(initi*len(BinsUVhigh))], HeightsUVhigh[int(initi*len(BinsUVhigh))],'o',markersize=5) #plt.plot(BinsUVhigh[int(initi*len(BinsUVhigh))], HeightsUVhigh[int(initi*len(BinsUVhigh))],'o',markersize=5)
#plt.ylim(-1000,20000) #plt.ylim(-1000,20000)
plt.grid()
plt.xlabel(r'Time ($\mu$s)', fontsize=15)
plt.ylabel('Counts', fontsize=15)
plt.xlim(-0.5, 5)
plt.legend(fontsize=15)
tauUV = popt_UV[0] tauUV = popt_UV[0]
print(tauUV) print(tauUV)
......
<?xml version="1.0" encoding="utf-8" standalone="no"?> <?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns:xlink="http://www.w3.org/1999/xlink" width="432pt" height="288pt" viewBox="0 0 432 288" xmlns="http://www.w3.org/2000/svg" version="1.1"> <svg xmlns:xlink="http://www.w3.org/1999/xlink" width="252pt" height="216pt" viewBox="0 0 252 216" xmlns="http://www.w3.org/2000/svg" version="1.1">
<metadata> <metadata>
<rdf:RDF xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:RDF xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<cc:Work> <cc:Work>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:date>2022-11-24T14:47:42.479334</dc:date> <dc:date>2023-04-27T16:04:44.519667</dc:date>
<dc:format>image/svg+xml</dc:format> <dc:format>image/svg+xml</dc:format>
<dc:creator> <dc:creator>
<cc:Agent> <cc:Agent>
...@@ -21,45 +21,43 @@ ...@@ -21,45 +21,43 @@
</defs> </defs>
<g id="figure_1"> <g id="figure_1">
<g id="patch_1"> <g id="patch_1">
<path d="M 0 288 <path d="M 0 216
L 432 288 L 252 216
L 432 0 L 252 0
L 0 0 L 0 0
z z
" style="fill: #ffffff"/> " style="fill: #ffffff"/>
</g> </g>
<g id="axes_1"> <g id="axes_1">
<g id="patch_2"> <g id="patch_2">
<path d="M 54 252 <path d="M 31.5 189
L 388.8 252 L 226.8 189
L 388.8 34.56 L 226.8 25.92
L 54 34.56 L 31.5 25.92
z z
" style="fill: #ffffff"/> " style="fill: #ffffff"/>
</g> </g>
<g id="matplotlib.axis_1"> <g id="matplotlib.axis_1">
<g id="xtick_1"> <g id="xtick_1">
<g id="line2d_1"> <g id="line2d_1">
<path d="M 56.973913 189
L 56.973913 25.92
" clip-path="url(#pe427f866f0)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
</g>
<g id="line2d_2">
<defs> <defs>
<path id="m61f7d63982" d="M 0 0 <path id="m974d739213" d="M 0 0
L 0 3.5 L 0 3.5
" style="stroke: #000000; stroke-width: 0.8"/> " style="stroke: #000000; stroke-width: 0.8"/>
</defs> </defs>
<g> <g>
<use xlink:href="#m61f7d63982" x="54" y="252" style="stroke: #000000; stroke-width: 0.8"/> <use xlink:href="#m974d739213" x="56.973913" y="189" style="stroke: #000000; stroke-width: 0.8"/>
</g> </g>
</g> </g>
<g id="text_1"> <g id="text_1">
<!-- −0.5 --> <!-- 0.0 -->
<g transform="translate(44.325 265.829687)scale(0.1 -0.1)"> <g transform="translate(49.473913 204.195625)scale(0.12 -0.12)">
<defs> <defs>
<path id="STIXGeneral-Regular-2212" d="M 3974 1408
L 410 1408
L 410 1830
L 3974 1830
L 3974 1408
z
" transform="scale(0.015625)"/>
<path id="STIXGeneral-Regular-30" d="M 3046 2112 <path id="STIXGeneral-Regular-30" d="M 3046 2112
Q 3046 1683 2963 1302 Q 3046 1683 2963 1302
Q 2880 922 2717 602 Q 2880 922 2717 602
...@@ -97,6 +95,28 @@ Q 947 640 1052 531 ...@@ -97,6 +95,28 @@ Q 947 640 1052 531
Q 1158 422 1158 275 Q 1158 422 1158 275
z z
" transform="scale(0.015625)"/> " transform="scale(0.015625)"/>
</defs>
<use xlink:href="#STIXGeneral-Regular-30"/>
<use xlink:href="#STIXGeneral-Regular-2e" x="49.999985"/>
<use xlink:href="#STIXGeneral-Regular-30" x="74.999969"/>
</g>
</g>
</g>
<g id="xtick_2">
<g id="line2d_3">
<path d="M 99.430435 189
L 99.430435 25.92
" clip-path="url(#pe427f866f0)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
</g>
<g id="line2d_4">
<g>
<use xlink:href="#m974d739213" x="99.430435" y="189" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_2">
<!-- 0.5 -->
<g transform="translate(91.930435 204.195625)scale(0.12 -0.12)">
<defs>
<path id="STIXGeneral-Regular-35" d="M 2803 4358 <path id="STIXGeneral-Regular-35" d="M 2803 4358
L 2573 3814 L 2573 3814
Q 2534 3731 2400 3731 Q 2534 3731 2400 3731
...@@ -127,52 +147,26 @@ L 2803 4358 ...@@ -127,52 +147,26 @@ L 2803 4358
z z
" transform="scale(0.015625)"/> " transform="scale(0.015625)"/>
</defs> </defs>
<use xlink:href="#STIXGeneral-Regular-2212"/>
<use xlink:href="#STIXGeneral-Regular-30" x="68.499985"/>
<use xlink:href="#STIXGeneral-Regular-2e" x="118.499969"/>
<use xlink:href="#STIXGeneral-Regular-35" x="143.499954"/>
</g>
</g>
</g>
<g id="xtick_2">
<g id="line2d_2">
<g>
<use xlink:href="#m61f7d63982" x="101.828571" y="252" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_2">
<!-- 0.0 -->
<g transform="translate(95.578571 265.829687)scale(0.1 -0.1)">
<use xlink:href="#STIXGeneral-Regular-30"/> <use xlink:href="#STIXGeneral-Regular-30"/>
<use xlink:href="#STIXGeneral-Regular-2e" x="49.999985"/> <use xlink:href="#STIXGeneral-Regular-2e" x="49.999985"/>
<use xlink:href="#STIXGeneral-Regular-30" x="74.999969"/> <use xlink:href="#STIXGeneral-Regular-35" x="74.999969"/>
</g> </g>
</g> </g>
</g> </g>
<g id="xtick_3"> <g id="xtick_3">
<g id="line2d_3"> <g id="line2d_5">
<g> <path d="M 141.886957 189
<use xlink:href="#m61f7d63982" x="149.657143" y="252" style="stroke: #000000; stroke-width: 0.8"/> L 141.886957 25.92
</g> " clip-path="url(#pe427f866f0)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
</g>
<g id="text_3">
<!-- 0.5 -->
<g transform="translate(143.407143 265.829687)scale(0.1 -0.1)">
<use xlink:href="#STIXGeneral-Regular-30"/>
<use xlink:href="#STIXGeneral-Regular-2e" x="49.999985"/>
<use xlink:href="#STIXGeneral-Regular-35" x="74.999969"/>
</g>
</g> </g>
</g> <g id="line2d_6">
<g id="xtick_4">
<g id="line2d_4">
<g> <g>
<use xlink:href="#m61f7d63982" x="197.485714" y="252" style="stroke: #000000; stroke-width: 0.8"/> <use xlink:href="#m974d739213" x="141.886957" y="189" style="stroke: #000000; stroke-width: 0.8"/>
</g> </g>
</g> </g>
<g id="text_4"> <g id="text_3">
<!-- 1.0 --> <!-- 1.0 -->
<g transform="translate(191.235714 265.829687)scale(0.1 -0.1)"> <g transform="translate(134.386957 204.195625)scale(0.12 -0.12)">
<defs> <defs>
<path id="STIXGeneral-Regular-31" d="M 2522 0 <path id="STIXGeneral-Regular-31" d="M 2522 0
L 755 0 L 755 0
...@@ -199,30 +193,40 @@ z ...@@ -199,30 +193,40 @@ z
</g> </g>
</g> </g>
</g> </g>
<g id="xtick_5"> <g id="xtick_4">
<g id="line2d_5"> <g id="line2d_7">
<path d="M 184.343478 189
L 184.343478 25.92
" clip-path="url(#pe427f866f0)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
</g>
<g id="line2d_8">
<g> <g>
<use xlink:href="#m61f7d63982" x="245.314286" y="252" style="stroke: #000000; stroke-width: 0.8"/> <use xlink:href="#m974d739213" x="184.343478" y="189" style="stroke: #000000; stroke-width: 0.8"/>
</g> </g>
</g> </g>
<g id="text_5"> <g id="text_4">
<!-- 1.5 --> <!-- 1.5 -->
<g transform="translate(239.064286 265.829687)scale(0.1 -0.1)"> <g transform="translate(176.843478 204.195625)scale(0.12 -0.12)">
<use xlink:href="#STIXGeneral-Regular-31"/> <use xlink:href="#STIXGeneral-Regular-31"/>
<use xlink:href="#STIXGeneral-Regular-2e" x="49.999985"/> <use xlink:href="#STIXGeneral-Regular-2e" x="49.999985"/>
<use xlink:href="#STIXGeneral-Regular-35" x="74.999969"/> <use xlink:href="#STIXGeneral-Regular-35" x="74.999969"/>
</g> </g>
</g> </g>
</g> </g>
<g id="xtick_6"> <g id="xtick_5">
<g id="line2d_6"> <g id="line2d_9">
<path d="M 226.8 189
L 226.8 25.92
" clip-path="url(#pe427f866f0)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
</g>
<g id="line2d_10">
<g> <g>
<use xlink:href="#m61f7d63982" x="293.142857" y="252" style="stroke: #000000; stroke-width: 0.8"/> <use xlink:href="#m974d739213" x="226.8" y="189" style="stroke: #000000; stroke-width: 0.8"/>
</g> </g>
</g> </g>
<g id="text_6"> <g id="text_5">
<!-- 2.0 --> <!-- 2.0 -->
<g transform="translate(286.892857 265.829687)scale(0.1 -0.1)"> <g transform="translate(219.3 204.195625)scale(0.12 -0.12)">
<defs> <defs>
<path id="STIXGeneral-Regular-32" d="M 3034 877 <path id="STIXGeneral-Regular-32" d="M 3034 877
L 2688 0 L 2688 0
...@@ -255,70 +259,9 @@ z ...@@ -255,70 +259,9 @@ z
</g> </g>
</g> </g>
</g> </g>
<g id="xtick_7"> <g id="text_6">
<g id="line2d_7">
<g>
<use xlink:href="#m61f7d63982" x="340.971429" y="252" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_7">
<!-- 2.5 -->
<g transform="translate(334.721429 265.829687)scale(0.1 -0.1)">
<use xlink:href="#STIXGeneral-Regular-32"/>
<use xlink:href="#STIXGeneral-Regular-2e" x="49.999985"/>
<use xlink:href="#STIXGeneral-Regular-35" x="74.999969"/>
</g>
</g>
</g>
<g id="xtick_8">
<g id="line2d_8">
<g>
<use xlink:href="#m61f7d63982" x="388.8" y="252" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_8">
<!-- 3.0 -->
<g transform="translate(382.55 265.829687)scale(0.1 -0.1)">
<defs>
<path id="STIXGeneral-Regular-33" d="M 390 3264
L 288 3290
Q 435 3770 748 4048
Q 1062 4326 1542 4326
Q 1990 4326 2265 4083
Q 2541 3840 2541 3450
Q 2541 2925 1946 2566
Q 2298 2413 2477 2227
Q 2758 1914 2758 1402
Q 2758 890 2464 506
Q 2246 211 1840 60
Q 1434 -90 979 -90
Q 262 -90 262 275
Q 262 378 339 442
Q 416 506 525 506
Q 685 506 915 339
Q 1197 141 1466 141
Q 1818 141 2058 425
Q 2298 710 2298 1120
Q 2298 1856 1632 2048
Q 1434 2112 979 2112
L 979 2202
Q 1338 2323 1517 2432
Q 2035 2726 2035 3290
Q 2035 3610 1852 3776
Q 1670 3942 1344 3942
Q 768 3942 390 3264
z
" transform="scale(0.015625)"/>
</defs>
<use xlink:href="#STIXGeneral-Regular-33"/>
<use xlink:href="#STIXGeneral-Regular-2e" x="49.999985"/>
<use xlink:href="#STIXGeneral-Regular-30" x="74.999969"/>
</g>
</g>
</g>
<g id="text_9">
<!-- Time (us) --> <!-- Time (us) -->
<g transform="translate(201.820312 278.829687)scale(0.1 -0.1)"> <g transform="translate(101.738438 220.361562)scale(0.14 -0.14)">
<defs> <defs>
<path id="STIXGeneral-Regular-54" d="M 3795 3149 <path id="STIXGeneral-Regular-54" d="M 3795 3149
L 3642 3149 L 3642 3149
...@@ -553,47 +496,42 @@ z ...@@ -553,47 +496,42 @@ z
</g> </g>
<g id="matplotlib.axis_2"> <g id="matplotlib.axis_2">
<g id="ytick_1"> <g id="ytick_1">
<g id="line2d_9"> <g id="line2d_11">
<path d="M 31.5 184.358386
L 226.8 184.358386
" clip-path="url(#pe427f866f0)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
</g>
<g id="line2d_12">
<defs> <defs>
<path id="m43969f1a0a" d="M 0 0 <path id="m16703b3497" d="M 0 0
L -3.5 0 L -3.5 0
" style="stroke: #000000; stroke-width: 0.8"/> " style="stroke: #000000; stroke-width: 0.8"/>
</defs> </defs>
<g> <g>
<use xlink:href="#m43969f1a0a" x="54" y="247.184895" style="stroke: #000000; stroke-width: 0.8"/> <use xlink:href="#m16703b3497" x="31.5" y="184.358386" style="stroke: #000000; stroke-width: 0.8"/>
</g> </g>
</g> </g>
<g id="text_10"> <g id="text_7">
<!-- 0 --> <!-- 0 -->
<g transform="translate(42 250.599739)scale(0.1 -0.1)"> <g transform="translate(18.5 188.456198)scale(0.12 -0.12)">
<use xlink:href="#STIXGeneral-Regular-30"/> <use xlink:href="#STIXGeneral-Regular-30"/>
</g> </g>
</g> </g>
</g> </g>
<g id="ytick_2"> <g id="ytick_2">
<g id="line2d_10"> <g id="line2d_13">
<g> <path d="M 31.5 149.719473
<use xlink:href="#m43969f1a0a" x="54" y="212.938061" style="stroke: #000000; stroke-width: 0.8"/> L 226.8 149.719473
</g> " clip-path="url(#pe427f866f0)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
</g>
<g id="text_11">
<!-- 500 -->
<g transform="translate(32 216.352905)scale(0.1 -0.1)">
<use xlink:href="#STIXGeneral-Regular-35"/>
<use xlink:href="#STIXGeneral-Regular-30" x="49.999985"/>
<use xlink:href="#STIXGeneral-Regular-30" x="99.999969"/>
</g>
</g> </g>
</g> <g id="line2d_14">
<g id="ytick_3">
<g id="line2d_11">
<g> <g>
<use xlink:href="#m43969f1a0a" x="54" y="178.691227" style="stroke: #000000; stroke-width: 0.8"/> <use xlink:href="#m16703b3497" x="31.5" y="149.719473" style="stroke: #000000; stroke-width: 0.8"/>
</g> </g>
</g> </g>
<g id="text_12"> <g id="text_8">
<!-- 1000 --> <!-- 1000 -->
<g transform="translate(27 182.10607)scale(0.1 -0.1)"> <g transform="translate(0.5 153.817286)scale(0.12 -0.12)">
<use xlink:href="#STIXGeneral-Regular-31"/> <use xlink:href="#STIXGeneral-Regular-31"/>
<use xlink:href="#STIXGeneral-Regular-30" x="49.999985"/> <use xlink:href="#STIXGeneral-Regular-30" x="49.999985"/>
<use xlink:href="#STIXGeneral-Regular-30" x="99.999969"/> <use xlink:href="#STIXGeneral-Regular-30" x="99.999969"/>
...@@ -601,31 +539,20 @@ L -3.5 0 ...@@ -601,31 +539,20 @@ L -3.5 0
</g> </g>
</g> </g>
</g> </g>
<g id="ytick_4"> <g id="ytick_3">
<g id="line2d_12"> <g id="line2d_15">
<g> <path d="M 31.5 115.080561
<use xlink:href="#m43969f1a0a" x="54" y="144.444392" style="stroke: #000000; stroke-width: 0.8"/> L 226.8 115.080561
</g> " clip-path="url(#pe427f866f0)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
</g>
<g id="text_13">
<!-- 1500 -->
<g transform="translate(27 147.859236)scale(0.1 -0.1)">
<use xlink:href="#STIXGeneral-Regular-31"/>
<use xlink:href="#STIXGeneral-Regular-35" x="49.999985"/>
<use xlink:href="#STIXGeneral-Regular-30" x="99.999969"/>
<use xlink:href="#STIXGeneral-Regular-30" x="149.999954"/>
</g>
</g> </g>
</g> <g id="line2d_16">
<g id="ytick_5">
<g id="line2d_13">
<g> <g>
<use xlink:href="#m43969f1a0a" x="54" y="110.197558" style="stroke: #000000; stroke-width: 0.8"/> <use xlink:href="#m16703b3497" x="31.5" y="115.080561" style="stroke: #000000; stroke-width: 0.8"/>
</g> </g>
</g> </g>
<g id="text_14"> <g id="text_9">
<!-- 2000 --> <!-- 2000 -->
<g transform="translate(27 113.612402)scale(0.1 -0.1)"> <g transform="translate(0.5 119.178373)scale(0.12 -0.12)">
<use xlink:href="#STIXGeneral-Regular-32"/> <use xlink:href="#STIXGeneral-Regular-32"/>
<use xlink:href="#STIXGeneral-Regular-30" x="49.999985"/> <use xlink:href="#STIXGeneral-Regular-30" x="49.999985"/>
<use xlink:href="#STIXGeneral-Regular-30" x="99.999969"/> <use xlink:href="#STIXGeneral-Regular-30" x="99.999969"/>
...@@ -633,41 +560,103 @@ L -3.5 0 ...@@ -633,41 +560,103 @@ L -3.5 0
</g> </g>
</g> </g>
</g> </g>
<g id="ytick_6"> <g id="ytick_4">
<g id="line2d_14"> <g id="line2d_17">
<path d="M 31.5 80.441648
L 226.8 80.441648
" clip-path="url(#pe427f866f0)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
</g>
<g id="line2d_18">
<g> <g>
<use xlink:href="#m43969f1a0a" x="54" y="75.950724" style="stroke: #000000; stroke-width: 0.8"/> <use xlink:href="#m16703b3497" x="31.5" y="80.441648" style="stroke: #000000; stroke-width: 0.8"/>
</g> </g>
</g> </g>
<g id="text_15"> <g id="text_10">
<!-- 2500 --> <!-- 3000 -->
<g transform="translate(27 79.365568)scale(0.1 -0.1)"> <g transform="translate(0.5 84.539461)scale(0.12 -0.12)">
<use xlink:href="#STIXGeneral-Regular-32"/> <defs>
<use xlink:href="#STIXGeneral-Regular-35" x="49.999985"/> <path id="STIXGeneral-Regular-33" d="M 390 3264
L 288 3290
Q 435 3770 748 4048
Q 1062 4326 1542 4326
Q 1990 4326 2265 4083
Q 2541 3840 2541 3450
Q 2541 2925 1946 2566
Q 2298 2413 2477 2227
Q 2758 1914 2758 1402
Q 2758 890 2464 506
Q 2246 211 1840 60
Q 1434 -90 979 -90
Q 262 -90 262 275
Q 262 378 339 442
Q 416 506 525 506
Q 685 506 915 339
Q 1197 141 1466 141
Q 1818 141 2058 425
Q 2298 710 2298 1120
Q 2298 1856 1632 2048
Q 1434 2112 979 2112
L 979 2202
Q 1338 2323 1517 2432
Q 2035 2726 2035 3290
Q 2035 3610 1852 3776
Q 1670 3942 1344 3942
Q 768 3942 390 3264
z
" transform="scale(0.015625)"/>
</defs>
<use xlink:href="#STIXGeneral-Regular-33"/>
<use xlink:href="#STIXGeneral-Regular-30" x="49.999985"/>
<use xlink:href="#STIXGeneral-Regular-30" x="99.999969"/> <use xlink:href="#STIXGeneral-Regular-30" x="99.999969"/>
<use xlink:href="#STIXGeneral-Regular-30" x="149.999954"/> <use xlink:href="#STIXGeneral-Regular-30" x="149.999954"/>
</g> </g>
</g> </g>
</g> </g>
<g id="ytick_7"> <g id="ytick_5">
<g id="line2d_15"> <g id="line2d_19">
<path d="M 31.5 45.802736
L 226.8 45.802736
" clip-path="url(#pe427f866f0)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
</g>
<g id="line2d_20">
<g> <g>
<use xlink:href="#m43969f1a0a" x="54" y="41.70389" style="stroke: #000000; stroke-width: 0.8"/> <use xlink:href="#m16703b3497" x="31.5" y="45.802736" style="stroke: #000000; stroke-width: 0.8"/>
</g> </g>
</g> </g>
<g id="text_16"> <g id="text_11">
<!-- 3000 --> <!-- 4000 -->
<g transform="translate(27 45.118733)scale(0.1 -0.1)"> <g transform="translate(0.5 49.900548)scale(0.12 -0.12)">
<use xlink:href="#STIXGeneral-Regular-33"/> <defs>
<path id="STIXGeneral-Regular-34" d="M 3027 1069
L 2368 1069
L 2368 0
L 1869 0
L 1869 1069
L 77 1069
L 77 1478
L 2086 4326
L 2368 4326
L 2368 1478
L 3027 1478
L 3027 1069
z
M 1869 1478
L 1869 3674
L 333 1478
L 1869 1478
z
" transform="scale(0.015625)"/>
</defs>
<use xlink:href="#STIXGeneral-Regular-34"/>
<use xlink:href="#STIXGeneral-Regular-30" x="49.999985"/> <use xlink:href="#STIXGeneral-Regular-30" x="49.999985"/>
<use xlink:href="#STIXGeneral-Regular-30" x="99.999969"/> <use xlink:href="#STIXGeneral-Regular-30" x="99.999969"/>
<use xlink:href="#STIXGeneral-Regular-30" x="149.999954"/> <use xlink:href="#STIXGeneral-Regular-30" x="149.999954"/>
</g> </g>
</g> </g>
</g> </g>
<g id="text_17"> <g id="text_12">
<!-- Counts --> <!-- Counts -->
<g transform="translate(20.829687 157.450312)rotate(-90)scale(0.1 -0.1)"> <g transform="translate(-6.538438 127.298437)rotate(-90)scale(0.14 -0.14)">
<defs> <defs>
<path id="STIXGeneral-Regular-43" d="M 3930 838 <path id="STIXGeneral-Regular-43" d="M 3930 838
L 4051 723 L 4051 723
...@@ -780,1291 +769,926 @@ z ...@@ -780,1291 +769,926 @@ z
</g> </g>
</g> </g>
</g> </g>
<g id="line2d_16"> <g id="line2d_21">
<path d="M 46.825714 239.787579 <path d="M 8.148913 180.617383
L 47.782286 239.308123 L 8.998043 180.374911
L 48.738857 239.856073 L 10.696304 181.03305
L 49.695429 240.609503 L 11.545435 180.7213
L 50.652 239.99306 L 12.394565 181.067689
L 51.608571 240.677997 L 13.243696 180.40955
L 52.565143 239.376617 L 14.092826 181.3448
L 53.521714 241.225946 L 14.941957 181.136967
L 54.478286 240.814984 L 15.791087 180.513466
L 55.434857 239.582098 L 16.640217 180.825217
L 56.391429 240.198541 L 19.187609 180.859856
L 59.261143 240.267035 L 20.88587 180.444189
L 60.217714 239.924566 L 21.735 180.755939
L 61.174286 239.445111 L 22.58413 180.513466
L 62.130857 240.061554 L 23.433261 180.825217
L 63.087429 239.582098 L 24.282391 180.652022
L 64.044 240.198541 L 25.131522 180.686661
L 65.000571 239.856073 L 25.980652 181.171606
L 65.957143 239.924566 L 26.829783 180.652022
L 66.913714 240.883478 L 27.678913 180.548105
L 67.870286 239.856073 L 28.528043 181.587273
L 68.826857 239.650592 L 29.377174 180.374911
L 69.783429 241.705402 L 30.226304 180.097799
L 70.74 239.308123 L 31.075435 181.03305
L 71.696571 238.760174 L 31.924565 181.067689
L 72.653143 240.609503 L 32.773696 180.063161
L 73.609714 240.677997 L 33.622826 180.790578
L 74.566286 238.69168 L 34.471957 181.136967
L 75.522857 240.130047 L 35.321087 180.444189
L 76.479429 240.814984 L 36.170217 181.171606
L 77.436 239.445111 L 37.019348 181.206245
L 78.392571 240.883478 L 38.717609 180.40955
L 79.349143 240.951971 L 39.566739 180.998411
L 80.305714 240.061554 L 40.41587 179.855327
L 81.262286 239.376617 L 41.265 180.617383
L 82.218857 240.541009 L 42.11413 180.7213
L 83.175429 238.280718 L 42.963261 180.201716
L 84.132 239.787579 L 43.812391 180.236355
L 85.088571 239.99306 L 44.661522 180.859856
L 86.045143 238.965655 L 45.510652 180.478828
L 87.001714 239.034149 L 46.359783 180.513466
L 87.958286 240.267035 L 47.208913 181.067689
L 88.914857 239.513604 L 48.058043 180.652022
L 89.871429 239.582098 L 48.907174 180.755939
L 90.828 240.677997 L 49.756304 180.513466
L 91.784571 239.856073 L 50.605435 180.825217
L 92.741143 240.061554 L 51.454565 180.478828
L 93.697714 239.582098 L 52.303696 180.548105
L 94.654286 240.198541 L 53.152826 181.379439
L 95.610857 239.513604 L 54.001957 180.652022
L 96.567429 239.650592 L 54.851087 180.617383
L 97.524 241.29444 L 55.700217 180.028522
L 98.480571 239.856073 L 56.549348 180.963772
L 99.437143 239.787579 L 58.247609 180.755939
L 100.393714 238.623187 L 59.096739 179.889966
L 101.350286 240.472516 L 59.94587 178.539048
L 102.306857 240.335528 L 60.795 174.694129
L 103.263429 240.061554 L 63.342391 167.246763
L 104.22 238.349212 L 64.191522 166.657901
L 105.176571 235.677959 L 65.040652 164.371733
L 106.133143 228.075162 L 66.738913 162.88226
L 107.089714 223.212111 L 67.588043 162.709065
L 108.046286 218.965504 L 68.437174 164.47565
L 109.002857 213.349023 L 69.286304 163.678955
L 109.959429 212.184631 L 70.135435 164.995234
L 110.916 207.664048 L 70.984565 164.1639
L 111.872571 206.294175 L 71.833696 162.466593
L 112.829143 204.718821 L 72.682826 163.297927
L 113.785714 204.376352 L 73.531957 162.639788
L 114.742286 207.869529 L 74.381087 164.510289
L 115.698857 206.294175 L 75.230217 163.990705
L 116.655429 208.896934 L 76.079348 165.203067
L 117.612 207.253086 L 76.928478 163.85215
L 118.568571 203.896897 L 77.777609 165.341623
L 119.525143 205.540745 L 78.626739 163.436483
L 120.481714 204.239365 L 79.47587 163.575038
L 121.438286 207.938023 L 80.325 164.1639
L 122.394857 206.910618 L 81.17413 165.09915
L 123.351429 209.307896 L 82.872391 164.995234
L 124.308 206.636643 L 83.721522 165.376262
L 125.264571 209.581871 L 84.570652 163.263288
L 126.221143 205.814719 L 85.419783 164.371733
L 127.177714 206.088694 L 86.268913 163.713594
L 128.134286 207.253086 L 87.118043 165.791929
L 129.090857 209.102415 L 87.967174 164.718122
L 131.004 208.896934 L 88.816304 165.965123
L 131.960571 209.650365 L 89.665435 164.267816
L 132.917143 205.472251 L 90.514565 165.306984
L 133.873714 207.664048 L 91.363696 166.138318
L 134.830286 206.362669 L 92.212826 164.752761
L 135.786857 210.472289 L 93.061957 164.1639
L 136.743429 208.348985 L 93.911087 167.142846
L 137.7 210.814757 L 94.760217 165.861206
L 138.656571 207.458567 L 95.609348 164.925956
L 139.613143 209.513377 L 96.458478 165.722651
L 140.569714 211.157225 L 97.307609 166.138318
L 141.526286 208.417479 L 98.156739 165.861206
L 142.482857 207.253086 L 99.00587 164.925956
L 143.439429 213.143542 L 99.855 165.965123
L 144.396 210.609276 L 101.553261 166.138318
L 145.352571 208.759947 L 102.402391 167.212124
L 146.309143 210.335301 L 103.251522 164.891317
L 147.265714 211.157225 L 104.100652 166.276873
L 148.222286 210.609276 L 104.949783 166.172957
L 149.178857 208.759947 L 105.798913 166.415429
L 150.135429 210.814757 L 106.648043 167.281402
L 152.048571 211.157225 L 107.497174 166.761818
L 153.005143 213.280529 L 108.346304 167.627791
L 153.961714 208.691453 L 110.044565 165.376262
L 154.918286 211.4312 L 110.893696 167.385319
L 155.874857 211.225719 L 111.742826 167.108207
L 156.831429 211.705175 L 112.591957 166.207596
L 157.788 213.417517 L 113.441087 166.935013
L 158.744571 212.390112 L 114.290217 167.904902
L 159.701143 214.102453 L 115.139348 167.835624
L 160.657714 212.047643 L 115.988478 167.489235
L 161.614286 209.650365 L 116.837609 166.415429
L 162.570857 213.622998 L 117.686739 167.454596
L 163.527429 213.075048 L 118.53587 166.831096
L 164.484 211.294213 L 119.385 168.043458
L 165.440571 212.73258 L 120.23413 167.35068
L 166.397143 214.650403 L 121.083261 169.740765
L 167.353714 214.513415 L 121.932391 168.770875
L 168.310286 213.828479 L 122.781522 168.28593
L 169.266857 211.705175 L 123.630652 168.216653
L 170.223429 213.759985 L 124.479783 168.874792
L 171.18 212.527099 L 126.178043 167.835624
L 172.136571 214.924377 L 127.027174 168.94407
L 173.093143 213.554504 L 127.876304 168.28593
L 174.049714 218.280567 L 128.725435 168.666958
L 175.006286 216.362744 L 129.574565 169.429014
L 175.962857 215.403833 L 130.423696 168.94407
L 176.919429 215.266846 L 131.272826 169.047986
L 177.876 216.568225 L 132.121957 168.078097
L 179.789143 214.513415 L 132.971087 168.805514
L 180.745714 216.705213 L 133.820217 168.840153
L 181.702286 215.403833 L 134.669348 169.290459
L 182.658857 216.157263 L 135.518478 169.047986
L 183.615429 217.664124 L 136.367609 169.463653
L 184.572 216.705213 L 137.216739 169.429014
L 185.528571 216.910694 L 138.06587 168.909431
L 186.485143 214.992871 L 138.915 168.147375
L 187.441714 216.431238 L 139.76413 170.364265
L 188.398286 216.499732 L 140.613261 170.953127
L 189.354857 217.390149 L 141.462391 169.325098
L 190.311429 216.910694 L 142.311522 170.329626
L 191.268 217.732618 L 143.160652 170.918488
L 192.224571 217.664124 L 144.009783 170.502821
L 193.181143 216.636719 L 144.858913 168.909431
L 194.137714 215.129858 L 145.708043 170.745293
L 195.094286 219.513453 L 146.557174 168.216653
L 196.050857 220.677845 L 147.406304 170.814571
L 197.007429 217.458643 L 148.255435 171.022404
L 197.964 219.444959 L 149.104565 171.403432
L 198.920571 220.609352 L 149.953696 169.844681
L 199.877143 219.787428 L 150.802826 170.84921
L 200.833714 216.636719 L 151.651957 170.779932
L 201.790286 220.266883 L 152.501087 171.645905
L 202.746857 215.266846 L 153.350217 169.740765
L 203.703429 220.403871 L 154.199348 170.364265
L 204.66 220.814833 L 155.048478 170.814571
L 205.616571 221.568263 L 155.897609 170.814571
L 206.573143 218.486048 L 156.746739 169.740765
L 207.529714 220.472364 L 157.59587 171.680544
L 208.486286 220.335377 L 159.29413 171.230238
L 209.442857 222.047719 L 160.992391 171.611266
L 210.399429 218.280567 L 161.841522 170.710654
L 211.356 219.513453 L 162.690652 171.680544
L 212.312571 220.403871 L 163.539783 172.892906
L 213.269143 220.403871 L 164.388913 171.403432
L 214.225714 218.280567 L 165.238043 171.230238
L 215.182286 222.116212 L 166.087174 171.47271
L 217.095429 221.225795 L 166.936304 171.334155
L 219.008571 221.979225 L 167.785435 171.541988
L 219.965143 220.19839 L 168.634565 170.987766
L 220.921714 222.116212 L 169.483696 171.992294
L 221.878286 224.513491 L 170.332826 170.987766
L 222.834857 221.568263 L 171.181957 171.853738
L 223.791429 221.225795 L 172.031087 171.645905
L 224.748 221.70525 L 172.880217 172.477239
L 225.704571 221.431276 L 173.729348 171.16096
L 226.661143 221.842238 L 174.578478 172.407961
L 227.617714 220.746339 L 176.276739 172.13085
L 228.574286 222.732655 L 177.12587 172.788989
L 229.530857 220.746339 L 177.975 171.853738
L 230.487429 222.458681 L 178.82413 172.096211
L 231.444 222.047719 L 179.673261 174.486296
L 232.400571 223.691567 L 180.522391 171.992294
L 233.357143 221.088807 L 181.371522 171.78446
L 234.313714 223.554579 L 182.220652 172.4426
L 236.226857 223.00663 L 183.069783 173.72424
L 237.183429 224.30801 L 183.918913 172.581155
L 238.14 222.458681 L 184.768043 171.888377
L 239.096571 222.938136 L 185.617174 172.650433
L 240.053143 227.6642 L 186.466304 173.828156
L 241.009714 222.732655 L 187.315435 172.373322
L 241.966286 222.321693 L 188.164565 172.026933
L 242.922857 223.623073 L 189.013696 172.13085
L 243.879429 226.157339 L 189.862826 173.170017
L 244.836 223.897048 L 190.711957 173.031461
L 245.792571 222.527174 L 191.561087 173.239295
L 246.749143 224.034035 L 192.410217 172.719711
L 247.705714 226.36282 L 193.259348 172.4426
L 248.662286 223.486086 L 194.108478 173.100739
L 249.618857 222.801149 L 194.957609 172.338683
L 250.575429 223.00663 L 195.806739 172.892906
L 251.532 225.06144 L 196.65587 171.78446
L 252.488571 224.787466 L 197.505 173.0661
L 253.445143 225.198428 L 198.35413 173.447128
L 254.401714 224.171022 L 199.203261 173.343212
L 255.358286 223.623073 L 200.052391 173.585684
L 256.314857 224.924453 L 200.901522 172.996822
L 257.271429 223.417592 L 201.750652 173.135378
L 258.228 224.513491 L 202.599783 174.243823
L 259.184571 222.321693 L 203.448913 172.996822
L 260.141143 224.855959 L 204.298043 173.966712
L 261.097714 225.60939 L 205.147174 174.243823
L 262.054286 225.403909 L 205.996304 174.798046
L 263.010857 225.883364 L 206.845435 173.585684
L 263.967429 224.718972 L 207.694565 174.520935
L 264.924 224.992947 L 208.543696 174.694129
L 265.880571 227.184744 L 209.392826 174.65949
L 266.837143 224.718972 L 210.241957 173.585684
L 267.793714 226.636795 L 211.091087 173.308573
L 268.750286 227.184744 L 211.940217 174.728768
L 269.706857 228.280643 L 212.789348 174.03599
L 270.663429 225.883364 L 213.638478 174.03599
L 271.62 227.732693 L 214.487609 174.209184
L 272.576571 228.075162 L 215.336739 173.793517
L 273.533143 228.006668 L 217.035 175.386907
L 274.489714 225.883364 L 217.88413 173.0661
L 275.446286 225.335415 L 218.733261 174.728768
L 276.402857 228.143655 L 219.582391 175.213713
L 277.359429 226.773782 L 220.431522 174.486296
L 278.316 226.773782 L 221.280652 174.936602
L 279.272571 227.11625 L 222.129783 172.927545
L 280.229143 226.294326 L 222.978913 174.139907
L 282.142286 229.445035 L 223.828043 174.728768
L 283.098857 224.855959 L 224.677174 174.243823
L 284.055429 228.143655 L 225.526304 175.664019
L 285.012 229.102567 L 226.375435 173.447128
L 285.968571 227.6642 L 227.224565 174.590212
L 286.925143 228.554617 L 228.073696 175.075157
L 287.881714 224.581985 L 228.922826 173.966712
L 288.838286 226.979263 L 229.771957 175.144435
L 289.794857 228.143655 L 230.621087 174.65949
L 290.751429 227.184744 L 231.470217 175.075157
L 291.708 229.992984 L 232.319348 174.34774
L 292.664571 225.60939 L 233.168478 175.213713
L 293.621143 227.869681 L 234.017609 174.139907
L 294.577714 228.828592 L 234.866739 175.560102
L 295.534286 226.636795 L 236.565 175.144435
L 296.490857 228.965579 L 237.41413 175.386907
L 297.447429 228.006668 L 238.263261 174.278462
L 298.404 228.828592 L 239.961522 175.698658
L 299.360571 227.390225 L 240.810652 175.767935
L 300.317143 229.102567 L 241.659783 174.832685
L 301.273714 226.979263 L 242.508913 176.356797
L 302.230286 229.787503 L 243.358043 175.421546
L 303.186857 229.308048 L 244.207174 175.248352
L 304.143429 228.965579 L 245.056304 175.62938
L 305.1 229.445035 L 245.905435 175.421546
L 306.056571 227.253238 L 246.754565 175.802574
L 307.969714 230.061478 L 247.603696 176.980297
L 308.926286 230.198465 L 248.452826 175.421546
L 309.882857 228.349136 L 249.301957 175.109796
L 310.839429 231.362858 L 250.151087 176.148963
L 311.796 229.513529 L 251.000217 175.005879
L 312.752571 229.17106 L 251.849348 175.248352
L 313.709143 229.924491 L 252.698478 176.148963
L 314.665714 229.513529 L 253 176.259664
L 315.622286 230.266959 L 253 176.259664
L 316.578857 232.595744 " clip-path="url(#pe427f866f0)" style="fill: none; stroke: #f6a47c; stroke-opacity: 0.7; stroke-width: 1.5; stroke-linecap: square"/>
L 317.535429 229.513529
L 318.492 228.897086
L 319.448571 230.951896
L 320.405143 228.691605
L 321.361714 229.17106
L 322.318286 230.951896
L 323.274857 231.568339
L 324.231429 230.951896
L 326.144571 231.020389
L 327.101143 229.992984
L 328.057714 230.746415
L 329.014286 231.157377
L 329.970857 231.157377
L 330.927429 229.308048
L 331.884 231.020389
L 332.840571 229.855997
L 333.797143 231.157377
L 334.753714 231.294364
L 335.710286 230.266959
L 336.666857 230.266959
L 337.623429 232.047794
L 338.58 231.088883
L 339.536571 230.746415
L 340.493143 230.746415
L 341.449714 230.883402
L 342.406286 231.362858
L 343.362857 232.184782
L 344.319429 230.883402
L 345.276 229.376541
L 346.232571 232.869718
L 347.189143 231.77382
L 348.145714 233.006706
L 349.102286 232.458756
L 350.058857 231.22587
L 351.015429 230.746415
L 352.928571 232.253275
L 353.885143 231.77382
L 354.841714 231.157377
L 355.798286 230.746415
L 356.754857 231.294364
L 357.711429 231.362858
L 358.668 232.732731
L 359.624571 232.253275
L 360.581143 232.184782
L 361.537714 232.458756
L 362.494286 232.253275
L 363.450857 231.842313
L 364.407429 231.020389
L 365.364 232.047794
L 366.320571 231.362858
L 367.277143 231.020389
L 368.233714 232.116288
L 369.190286 234.445073
L 370.146857 232.184782
L 371.103429 234.034111
L 372.06 232.458756
L 373.016571 232.801225
L 373.973143 233.417668
L 374.929714 231.157377
L 376.842857 232.869718
L 377.799429 232.52725
L 378.756 232.390263
L 379.712571 232.869718
L 380.669143 233.212187
L 381.625714 233.28068
L 382.582286 232.664237
L 383.538857 232.732731
L 384.495429 235.061516
L 385.452 232.869718
L 386.408571 232.938212
L 387.365143 232.595744
L 388.321714 232.047794
L 389.278286 230.951896
L 390.234857 234.308085
L 391.191429 233.143693
L 392.148 234.650554
L 393.104571 234.787541
L 394.061143 235.266997
L 395.017714 234.376579
L 395.974286 232.184782
L 396.930857 233.486161
L 397.887429 233.417668
L 398.844 234.034111
L 400.757143 233.006706
L 401.713714 233.554655
L 402.670286 235.609465
L 403.626857 233.417668
L 404.583429 233.623149
L 405.54 234.239592
L 406.496571 234.171098
L 407.453143 235.951933
L 408.409714 234.719047
L 409.366286 234.650554
L 410.322857 233.075199
L 411.279429 233.760136
L 412.236 234.239592
L 413.192571 234.034111
L 414.149143 235.33549
L 415.105714 233.965617
L 416.062286 235.403984
L 417.975429 232.732731
L 418.932 233.760136
L 419.888571 235.061516
L 420.845143 234.993022
L 421.801714 235.677959
L 422.758286 235.130009
L 423.714857 233.897123
L 426.584571 235.88344
L 427.541143 235.677959
L 428.497714 234.239592
L 429.454286 235.814946
L 430.410857 234.856035
L 431.367429 233.006706
L 432.324 236.157414
L 433 235.576569
L 433 235.576569
" clip-path="url(#pa5519df51f)" style="fill: none; stroke: #003fff; stroke-width: 1.5; stroke-linecap: square"/>
</g> </g>
<g id="line2d_17"> <g id="line2d_22">
<path d="M 133.0128 207.470467 <path d="M 71.918609 162.714169
L 146.4048 210.106893 L 88.052087 164.666377
L 160.753371 212.694383 L 105.034696 166.492643
L 175.101943 215.057279 L 122.866435 168.186543
L 190.407086 217.352083 L 142.396435 169.810662
L 206.6688 219.55866 L 162.775565 171.280782
L 223.887086 221.660306 L 184.852957 172.649954
L 242.061943 223.643796 L 208.628609 173.902326
L 261.193371 225.499327 L 232.404261 174.959443
L 281.281371 227.22037 L 232.404261 174.959443
L 299.456229 228.599783 " clip-path="url(#pe427f866f0)" style="fill: none; stroke: #f6a47c; stroke-width: 1.5; stroke-linecap: square"/>
L 299.456229 228.599783
" clip-path="url(#pa5519df51f)" style="fill: none; stroke: #03ed3a; stroke-width: 1.5; stroke-linecap: square"/>
</g> </g>
<g id="line2d_18"> <g id="line2d_23">
<path d="M 46.825714 238.554693 <path d="M 8.148913 155.746644
L 47.782286 240.198541 L 8.998043 156.577978
L 48.738857 240.74649 L 9.847174 156.855089
L 49.695429 240.130047 L 10.696304 156.543339
L 50.652 238.897161 L 11.545435 155.919839
L 51.608571 240.404022 L 12.394565 156.681895
L 52.565143 240.198541 L 13.243696 156.577978
L 53.521714 240.541009 L 14.092826 156.751172
L 54.478286 239.719085 L 14.941957 156.335506
L 55.434857 239.23963 L 15.791087 156.093033
L 57.348 239.582098 L 17.489348 156.266228
L 58.304571 237.801263 L 18.338478 155.365616
L 59.261143 238.760174 L 19.187609 155.850561
L 60.217714 238.349212 L 20.036739 155.642727
L 61.174286 239.924566 L 20.88587 156.439422
L 63.087429 240.130047 L 22.58413 156.543339
L 64.044 238.760174 L 23.433261 155.850561
L 65.000571 239.787579 L 25.131522 156.785811
L 65.957143 240.609503 L 25.980652 156.058394
L 66.913714 239.171136 L 26.829783 156.751172
L 67.870286 240.541009 L 27.678913 156.023755
L 68.826857 239.102642 L 28.528043 156.5087
L 69.783429 240.061554 L 29.377174 156.19695
L 70.74 239.445111 L 30.226304 156.543339
L 71.696571 240.130047 L 31.075435 156.612617
L 72.653143 240.267035 L 31.924565 156.231589
L 73.609714 239.513604 L 32.773696 156.5087
L 74.566286 240.061554 L 33.622826 156.300867
L 75.522857 239.650592 L 34.471957 157.201478
L 76.479429 241.431427 L 36.170217 156.19695
L 77.436 240.541009 L 37.019348 155.504172
L 78.392571 239.445111 L 37.868478 156.370144
L 79.349143 238.075237 L 40.41587 156.439422
L 80.305714 239.787579 L 41.265 157.166839
L 81.262286 239.856073 L 42.11413 156.093033
L 82.218857 239.787579 L 42.963261 156.681895
L 83.175429 239.924566 L 43.812391 156.093033
L 84.132 241.362933 L 45.510652 156.474061
L 85.088571 239.23963 L 46.359783 156.82045
L 86.045143 240.404022 L 47.208913 156.993645
L 87.001714 239.23963 L 48.058043 155.850561
L 88.914857 239.99306 L 49.756304 155.954477
L 89.871429 240.677997 L 50.605435 156.543339
L 90.828 241.020465 L 51.454565 156.439422
L 91.784571 238.760174 L 52.303696 156.82045
L 92.741143 238.760174 L 53.152826 155.919839
L 93.697714 238.965655 L 54.001957 156.127672
L 94.654286 240.130047 L 54.851087 156.751172
L 95.610857 239.924566 L 55.700217 156.959006
L 96.567429 240.677997 L 56.549348 156.127672
L 97.524 238.897161 L 57.398478 156.162311
L 98.480571 239.308123 L 58.247609 154.257171
L 99.437143 240.541009 L 59.096739 148.368556
L 100.393714 240.951971 L 59.94587 139.570272
L 101.350286 239.308123 L 61.64413 120.51887
L 102.306857 239.376617 L 62.493261 114.353144
L 103.263429 235.609465 L 63.342391 109.988641
L 104.22 223.965541 L 64.191522 110.231113
L 105.176571 206.56815 L 65.040652 107.633195
L 107.089714 168.896632 L 65.889783 106.386194
L 108.046286 156.704759 L 66.738913 107.113611
L 109.002857 148.074557 L 67.588043 105.347026
L 109.959429 148.554012 L 68.437174 109.330501
L 110.916 143.416987 L 69.286304 109.607613
L 111.872571 140.951215 L 70.135435 110.854613
L 112.829143 142.389582 L 70.984565 108.914834
L 113.785714 138.896405 L 71.833696 108.845556
L 114.742286 146.773177 L 72.682826 111.027808
L 115.698857 147.321126 L 73.531957 112.794393
L 116.655429 149.786899 L 75.230217 113.313976
L 117.612 145.951253 L 76.079348 115.392311
L 118.568571 145.814266 L 76.928478 115.981172
L 119.525143 150.129367 L 77.777609 114.595616
L 120.481714 153.622544 L 78.626739 118.336619
L 121.438286 154.033506 L 80.325 117.02034
L 122.394857 154.649949 L 81.17413 119.89537
L 123.351429 158.759569 L 82.023261 118.856202
L 124.308 159.923961 L 82.872391 120.033925
L 125.264571 157.184215 L 83.721522 119.583619
L 126.221143 164.581531 L 85.419783 124.052039
L 127.177714 163.143164 L 86.268913 122.597205
L 128.134286 161.978771 L 87.967174 122.597205
L 129.090857 167.663746 L 88.816304 122.770399
L 130.047429 165.608936 L 89.665435 123.567094
L 131.004 167.937721 L 90.514565 124.952651
L 131.960571 167.047303 L 91.363696 125.680068
L 132.917143 171.773366 L 92.212826 125.887901
L 133.873714 175.882986 L 93.061957 124.467706
L 134.830286 173.006252 L 93.911087 128.48582
L 135.786857 172.937758 L 94.760217 126.199652
L 136.743429 173.006252 L 95.609348 128.243347
L 137.7 173.34872 L 96.458478 129.386432
L 138.656571 174.924075 L 97.307609 132.053628
L 139.613143 177.663822 L 98.156739 131.326211
L 140.569714 179.102189 L 99.00587 129.317154
L 141.526286 179.513151 L 99.855 130.564155
L 142.482857 176.70491 L 100.70413 132.538573
L 143.439429 184.650176 L 101.553261 131.256933
L 144.396 180.129594 L 102.402391 131.98435
L 145.352571 184.17072 L 103.251522 132.365378
L 146.309143 186.431011 L 104.100652 132.400017
L 147.265714 191.705024 L 104.949783 134.374435
L 148.222286 190.266657 L 105.798913 135.309686
L 149.178857 186.294024 L 106.648043 134.755463
L 150.135429 188.759796 L 107.497174 134.478352
L 151.092 192.663935 L 108.346304 136.591325
L 152.048571 190.129669 L 110.044565 134.790102
L 153.005143 191.568036 L 110.893696 135.032574
L 153.961714 192.321467 L 113.441087 139.778105
L 154.918286 192.38996 L 115.139348 137.561215
L 155.874857 196.294099 L 116.837609 138.600382
L 156.831429 198.143428 L 117.686739 138.150076
L 157.788 197.04753 L 118.53587 139.847383
L 158.744571 196.49958 L 119.385 139.847383
L 159.701143 200.677694 L 120.23413 140.159133
L 160.657714 198.759871 L 121.083261 139.882022
L 161.614286 197.116023 L 121.932391 141.54469
L 162.570857 197.595479 L 122.781522 140.713356
L 165.440571 206.979112 L 123.630652 142.098912
L 167.353714 202.595517 L 124.479783 141.094384
L 169.266857 204.650327 L 125.328913 142.860969
L 170.223429 203.759909 L 126.178043 142.895607
L 171.18 207.116099 L 127.027174 142.098912
L 172.136571 207.116099 L 127.876304 142.029635
L 173.093143 207.732542 L 128.725435 143.068802
L 174.049714 207.184593 L 129.574565 143.519108
L 175.006286 210.472289 L 130.423696 142.82633
L 175.962857 208.828441 L 131.272826 143.76158
L 176.919429 211.568187 L 132.121957 143.830858
L 177.876 209.581871 L 132.971087 144.558275
L 178.832571 213.075048 L 133.820217 143.276636
L 179.789143 213.143542 L 134.669348 145.251054
L 180.745714 211.568187 L 135.518478 145.805276
L 181.702286 211.4312 L 136.367609 144.592914
L 182.658857 213.48601 L 137.216739 143.76158
L 183.615429 214.376428 L 138.06587 144.558275
L 184.572 213.006555 L 138.915 145.597443
L 185.528571 214.855884 L 139.76413 146.255582
L 186.485143 214.992871 L 140.613261 145.424248
L 187.441714 216.431238 L 141.462391 146.463415
L 188.398286 213.896972 L 142.311522 146.359499
L 189.354857 217.801111 L 143.160652 145.04322
L 190.311429 218.89701 L 144.009783 146.94836
L 191.268 216.499732 L 144.858913 146.01311
L 192.224571 214.855884 L 145.708043 147.987528
L 193.181143 216.431238 L 146.557174 145.978471
L 194.137714 218.486048 L 147.406304 148.23
L 195.094286 219.787428 L 148.255435 147.156194
L 196.050857 218.14358 L 149.104565 146.94836
L 197.007429 220.19839 L 149.953696 147.086916
L 197.964 219.992909 L 151.651957 148.784223
L 198.920571 217.390149 L 152.501087 148.160722
L 199.877143 221.157301 L 153.350217 148.264639
L 200.833714 219.307972 L 154.199348 149.130612
L 201.790286 223.212111 L 155.048478 148.888139
L 202.746857 219.239478 L 155.897609 149.269167
L 203.703429 223.691567 L 156.746739 148.368556
L 204.66 221.568263 L 157.59587 148.472472
L 205.616571 221.157301 L 158.445 149.373084
L 206.573143 221.431276 L 160.143261 149.338445
L 208.486286 224.787466 L 160.992391 150.100501
L 209.442857 223.554579 L 161.841522 150.100501
L 210.399429 223.76006 L 162.690652 148.749584
L 211.356 225.472402 L 163.539783 151.070391
L 212.312571 224.992947 L 164.388913 149.719473
L 213.269143 225.746377 L 165.238043 150.550807
L 214.225714 223.965541 L 166.087174 151.035752
L 215.182286 224.171022 L 166.936304 150.377613
L 216.138857 225.951858 L 167.785435 150.862557
L 218.052 225.883364 L 169.483696 151.347502
L 219.008571 227.390225 L 170.332826 150.308335
L 219.965143 227.390225 L 171.181957 150.931835
L 220.921714 224.718972 L 172.031087 150.550807
L 221.878286 229.308048 L 172.880217 151.10503
L 222.834857 226.636795 L 173.729348 152.213475
L 223.791429 228.280643 L 174.578478 151.797808
L 224.748 229.239554 L 175.427609 151.832447
L 225.704571 227.938174 L 176.276739 151.693891
L 226.661143 228.897086 L 177.12587 151.001113
L 228.574286 229.855997 L 177.975 152.906253
L 229.530857 227.801187 L 178.82413 152.005641
L 230.487429 229.034073 L 179.673261 151.451419
L 231.444 228.280643 L 180.522391 152.04028
L 232.400571 229.376541 L 181.371522 151.867086
L 233.357143 231.568339 L 182.220652 152.559864
L 234.313714 230.746415 L 183.069783 151.867086
L 235.270286 230.814908 L 183.918913 152.455947
L 236.226857 230.540934 L 184.768043 153.495115
L 237.183429 229.17106 L 185.617174 153.183364
L 238.14 232.938212 L 186.466304 151.451419
L 239.096571 231.157377 L 187.315435 151.624613
L 240.053143 230.061478 L 188.164565 152.629142
L 241.009714 231.22587 L 189.013696 152.69842
L 241.966286 230.883402 L 189.862826 151.832447
L 242.922857 232.253275 L 190.711957 152.248114
L 243.879429 230.883402 L 191.561087 153.772226
L 244.836 232.047794 L 192.410217 152.144197
L 245.792571 234.102604 L 193.259348 151.971003
L 246.749143 233.486161 L 194.108478 153.806865
L 247.705714 230.061478 L 194.957609 153.356559
L 248.662286 230.403946 L 195.806739 152.733059
L 249.618857 232.390263 L 196.65587 152.559864
L 250.575429 232.52725 L 197.505 152.213475
L 251.532 230.814908 L 198.35413 153.980059
L 252.488571 231.636832 L 199.203261 153.356559
L 253.445143 234.650554 L 200.052391 152.525225
L 254.401714 231.431351 L 200.901522 153.876143
L 255.358286 231.088883 L 201.750652 152.906253
L 256.314857 234.719047 L 202.599783 153.876143
L 257.271429 233.82863 L 203.448913 153.287281
L 258.228 232.595744 L 204.298043 153.529754
L 259.184571 232.253275 L 205.147174 152.871614
L 260.141143 231.568339 L 205.996304 154.187893
L 261.097714 235.061516 L 206.845435 154.395726
L 262.054286 233.82863 L 207.694565 154.083976
L 263.010857 232.184782 L 208.543696 153.356559
L 263.967429 234.856035 L 209.392826 153.01017
L 264.924 232.938212 L 210.241957 154.083976
L 265.880571 234.856035 L 211.091087 154.049337
L 266.837143 233.691642 L 211.940217 153.148726
L 267.793714 234.171098 L 212.789348 154.014698
L 268.750286 232.869718 L 213.638478 154.361088
L 269.706857 235.472478 L 214.487609 154.29181
L 270.663429 235.88344 L 215.336739 153.876143
L 271.62 235.266997 L 216.18587 154.60356
L 272.576571 233.82863 L 217.035 154.846032
L 273.533143 233.143693 L 217.88413 154.430365
L 274.489714 235.266997 L 218.733261 155.192421
L 275.446286 235.198503 L 219.582391 154.257171
L 276.402857 233.417668 L 220.431522 154.187893
L 277.359429 235.130009 L 221.280652 154.638199
L 278.316 235.814946 L 222.129783 154.29181
L 279.272571 235.677959 L 222.978913 154.60356
L 280.229143 234.856035 L 224.677174 154.257171
L 281.185714 236.294402 L 226.375435 154.29181
L 282.142286 236.773857 L 227.224565 153.806865
L 283.098857 235.951933 L 228.073696 155.192421
L 284.055429 237.458794 L 228.922826 155.22706
L 285.012 235.609465 L 229.771957 154.049337
L 285.968571 235.472478 L 230.621087 154.187893
L 286.925143 236.362895 L 231.470217 154.465004
L 287.881714 235.677959 L 232.319348 155.053866
L 288.838286 236.294402 L 233.168478 154.153254
L 290.751429 235.609465 L 234.017609 154.222532
L 291.708 235.746452 L 234.866739 155.123144
L 292.664571 235.677959 L 235.71587 155.192421
L 293.621143 234.719047 L 236.565 154.60356
L 294.577714 237.458794 L 237.41413 155.123144
L 295.534286 237.527288 L 238.263261 155.019227
L 296.490857 235.198503 L 239.112391 155.053866
L 297.447429 235.472478 L 239.961522 156.023755
L 298.404 236.020427 L 240.810652 155.157782
L 299.360571 237.18482 L 241.659783 154.880671
L 300.317143 235.403984 L 242.508913 155.088505
L 301.273714 235.540971 L 243.358043 155.088505
L 302.230286 237.321807 L 244.207174 154.534282
L 303.186857 237.458794 L 245.056304 154.742116
L 304.143429 236.294402 L 245.905435 155.157782
L 305.1 237.321807 L 246.754565 155.22706
L 306.056571 237.116326 L 247.603696 155.434894
L 307.013143 237.18482 L 248.452826 155.504172
L 307.969714 239.102642 L 251.000217 154.60356
L 308.926286 237.390301 L 251.849348 155.365616
L 309.882857 236.842351 L 253 154.888449
L 310.839429 237.253313 L 253 154.888449
L 311.796 237.253313 " clip-path="url(#pe427f866f0)" style="fill: none; stroke: #921c5b; stroke-opacity: 0.7; stroke-width: 1.5; stroke-linecap: square"/>
L 312.752571 236.157414
L 313.709143 236.568376
L 314.665714 237.390301
L 315.622286 237.527288
L 316.578857 237.93825
L 317.535429 238.075237
L 319.448571 236.979338
L 320.405143 236.294402
L 321.361714 237.801263
L 322.318286 236.979338
L 323.274857 236.63687
L 324.231429 236.842351
L 325.188 236.910845
L 326.144571 238.349212
L 327.101143 236.157414
L 328.057714 236.705364
L 329.014286 238.006744
L 329.970857 237.18482
L 330.927429 239.787579
L 331.884 236.842351
L 332.840571 238.554693
L 333.797143 236.088921
L 334.753714 238.006744
L 335.710286 237.253313
L 336.666857 238.075237
L 337.623429 235.403984
L 338.58 238.006744
L 339.536571 238.554693
L 340.493143 237.527288
L 341.449714 237.527288
L 342.406286 238.143731
L 343.362857 239.034149
L 344.319429 237.595782
L 345.276 237.732769
L 346.232571 238.623187
L 347.189143 237.869756
L 348.145714 237.732769
L 349.102286 237.93825
L 350.058857 237.047832
L 351.015429 237.18482
L 351.972 238.69168
L 352.928571 238.212225
L 353.885143 239.513604
L 354.841714 237.047832
L 355.798286 238.554693
L 356.754857 237.047832
L 357.711429 237.93825
L 358.668 237.801263
L 359.624571 237.390301
L 360.581143 239.445111
L 361.537714 239.445111
L 362.494286 237.253313
L 363.450857 238.965655
L 364.407429 238.623187
L 365.364 239.308123
L 366.320571 238.280718
L 367.277143 239.445111
L 368.233714 238.417706
L 369.190286 238.623187
L 370.146857 238.554693
L 371.103429 237.732769
L 372.06 238.828668
L 373.016571 238.212225
L 373.973143 238.623187
L 374.929714 237.869756
L 375.886286 239.308123
L 376.842857 238.897161
L 377.799429 237.869756
L 378.756 238.349212
L 379.712571 237.116326
L 380.669143 238.623187
L 381.625714 237.390301
L 382.582286 237.321807
L 383.538857 238.554693
L 384.495429 237.047832
L 385.452 238.006744
L 386.408571 239.99306
L 387.365143 237.527288
L 388.321714 238.075237
L 389.278286 238.280718
L 390.234857 238.69168
L 391.191429 238.69168
L 392.148 240.541009
L 393.104571 238.897161
L 394.061143 238.965655
L 395.017714 237.93825
L 395.974286 239.034149
L 396.930857 238.828668
L 397.887429 237.869756
L 398.844 238.349212
L 399.800571 239.102642
L 401.713714 238.075237
L 402.670286 238.897161
L 403.626857 238.623187
L 404.583429 238.212225
L 405.54 237.664275
L 406.496571 239.171136
L 407.453143 238.828668
L 408.409714 239.102642
L 409.366286 238.554693
L 410.322857 238.965655
L 411.279429 238.349212
L 412.236 239.308123
L 413.192571 239.582098
L 414.149143 238.349212
L 415.105714 239.102642
L 416.062286 239.034149
L 417.018857 239.23963
L 417.975429 239.23963
L 418.932 238.69168
L 419.888571 237.93825
L 420.845143 237.869756
L 422.758286 238.760174
L 423.714857 237.527288
L 424.671429 239.582098
L 425.628 238.760174
L 426.584571 239.445111
L 427.541143 237.664275
L 428.497714 239.445111
L 429.454286 238.349212
L 430.410857 238.280718
L 431.367429 237.664275
L 432.324 237.664275
L 433 238.051506
L 433 238.051506
" clip-path="url(#pa5519df51f)" style="fill: none; stroke: #e8000b; stroke-width: 1.5; stroke-linecap: square"/>
</g> </g>
<g id="line2d_19"> <g id="line2d_24">
<path d="M 133.0128 169.570847 <path d="M 71.918609 109.245793
L 136.839086 174.664451 L 75.31513 112.674321
L 140.665371 179.384142 L 79.560783 116.608247
L 144.491657 183.757369 L 83.806435 120.18457
L 148.317943 187.809564 L 88.052087 123.435796
L 152.144229 191.564293 L 92.297739 126.391478
L 155.970514 195.043395 L 96.543391 129.07848
L 159.7968 198.267101 L 100.789043 131.521228
L 164.579657 201.966013 L 105.034696 133.741923
L 169.362514 205.328684 L 110.129478 136.141939
L 174.145371 208.385681 L 115.224261 138.282593
L 178.928229 211.164789 L 120.319043 140.191915
L 183.711086 213.691268 L 126.262957 142.160277
L 188.493943 215.988085 L 132.20687 143.882779
L 194.233371 218.470368 L 138.150783 145.39013
L 199.9728 220.6844 L 144.943826 146.883682
L 205.712229 222.65917 L 152.586 148.312979
L 211.451657 224.420534 L 160.228174 149.516965
L 218.147657 226.236362 L 168.719478 150.633477
L 224.843657 227.825383 L 178.059913 151.639195
L 232.496229 229.399857 L 188.249478 152.52069
L 240.1488 230.751657 L 200.137304 153.324023
L 248.757943 232.0453 L 213.723391 154.014441
L 258.323657 233.244956 L 229.85687 154.602705
L 268.845943 234.325567 L 232.404261 154.67762
L 280.3248 235.272704 L 232.404261 154.67762
L 293.7168 236.135859 " clip-path="url(#pe427f866f0)" style="fill: none; stroke: #921c5b; stroke-width: 1.5; stroke-linecap: square"/>
L 299.456229 236.440846
L 299.456229 236.440846
" clip-path="url(#pa5519df51f)" style="fill: none; stroke: #8a2be2; stroke-width: 1.5; stroke-linecap: square"/>
</g> </g>
<g id="line2d_20"> <g id="line2d_25">
<path d="M 46.825714 240.267035 <path d="M 8.148913 132.365378
L 47.782286 239.102642 L 8.998043 131.776517
L 48.738857 239.99306 L 9.847174 132.226822
L 49.695429 239.719085 L 10.696304 132.088267
L 50.652 240.472516 L 11.545435 132.469295
L 51.608571 239.308123 L 12.394565 131.880433
L 52.565143 239.787579 L 13.243696 132.122906
L 53.521714 239.99306 L 14.092826 132.226822
L 54.478286 241.29444 L 14.941957 132.884962
L 55.434857 239.856073 L 15.791087 132.157545
L 56.391429 239.034149 L 16.640217 131.741878
L 57.348 238.623187 L 17.489348 131.534044
L 59.261143 239.787579 L 19.187609 132.122906
L 60.217714 240.130047 L 20.036739 132.2961
L 62.130857 239.376617 L 21.735 131.915072
L 63.087429 240.404022 L 22.58413 132.434656
L 64.044 239.171136 L 23.433261 131.811155
L 65.000571 241.088959 L 24.282391 132.781045
L 65.957143 240.404022 L 25.131522 132.434656
L 66.913714 240.883478 L 25.980652 132.677128
L 67.870286 240.951971 L 26.829783 132.711767
L 68.826857 239.650592 L 27.678913 132.053628
L 69.783429 240.74649 L 28.528043 132.60785
L 70.74 238.486199 L 29.377174 131.464766
L 71.696571 239.650592 L 30.226304 132.053628
L 72.653143 239.856073 L 31.075435 132.157545
L 73.609714 239.445111 L 31.924565 131.949711
L 74.566286 242.116364 L 32.773696 133.300629
L 75.522857 240.541009 L 33.622826 132.503934
L 76.479429 239.513604 L 34.471957 131.98435
L 77.436 240.130047 L 35.321087 132.2961
L 78.392571 240.267035 L 37.019348 132.330739
L 79.349143 240.198541 L 37.868478 131.776517
L 80.305714 239.102642 L 38.717609 131.845794
L 81.262286 239.23963 L 40.41587 132.538573
L 83.175429 240.609503 L 42.11413 132.088267
L 85.088571 239.719085 L 42.963261 132.815684
L 86.045143 241.157452 L 43.812391 133.092795
L 87.001714 241.705402 L 44.661522 131.534044
L 87.958286 238.623187 L 45.510652 132.226822
L 88.914857 239.99306 L 46.359783 132.088267
L 89.871429 239.719085 L 47.208913 131.741878
L 90.828 239.034149 L 48.058043 132.884962
L 91.784571 241.29444 L 48.907174 131.603322
L 92.741143 238.760174 L 49.756304 132.884962
L 93.697714 241.29444 L 50.605435 132.330739
L 94.654286 240.198541 L 51.454565 132.400017
L 95.610857 240.335528 L 52.303696 131.845794
L 96.567429 239.23963 L 53.152826 132.192184
L 97.524 239.924566 L 54.001957 131.915072
L 98.480571 239.376617 L 54.851087 132.365378
L 99.437143 240.267035 L 55.700217 132.192184
L 100.393714 239.924566 L 56.549348 132.226822
L 101.350286 239.99306 L 57.398478 127.827681
L 102.306857 231.294364 L 58.247609 103.268692
L 103.263429 182.732353 L 59.096739 66.967111
L 104.22 110.950988 L 59.94587 47.846432
L 105.176571 73.142483 L 60.795 42.373483
L 106.133143 62.320484 L 61.64413 33.332727
L 107.089714 44.443636 L 62.493261 36.865896
L 108.046286 51.429991 L 63.342391 41.091844
L 109.002857 59.786218 L 64.191522 40.918649
L 109.959429 59.44375 L 65.040652 44.036151
L 110.916 65.60818 L 65.889783 48.954877
L 111.872571 75.334281 L 66.738913 45.872014
L 112.829143 69.238344 L 67.588043 54.150714
L 113.785714 85.608331 L 68.437174 55.22452
L 114.742286 87.731635 L 69.286304 60.143246
L 115.698857 97.457736 L 70.135435 61.009218
L 116.655429 99.170077 L 70.984565 61.701997
L 117.612 100.539951 L 71.833696 63.364664
L 118.568571 103.827647 L 73.531957 71.15842
L 119.525143 111.087976 L 74.381087 68.352668
L 120.481714 119.238722 L 76.079348 73.894894
L 121.438286 113.690735 L 76.928478 77.913008
L 123.351429 124.649722 L 77.777609 78.294036
L 124.308 132.594988 L 78.626739 80.788037
L 125.264571 133.348418 L 79.47587 81.584732
L 126.221143 138.279962 L 80.325 84.944707
L 127.177714 139.855317 L 81.17413 83.351317
L 128.134286 146.499202 L 82.023261 86.849847
L 129.090857 143.348494 L 82.872391 87.369431
L 130.047429 150.266354 L 83.721522 89.066737
L 131.004 151.293759 L 84.570652 91.318267
L 131.960571 154.649949 L 85.419783 93.223407
L 132.917143 159.102037 L 86.268913 91.145072
L 133.873714 162.869189 L 87.118043 95.197825
L 134.830286 158.759569 L 87.967174 94.366491
L 135.786857 166.773328 L 88.816304 95.232464
L 136.743429 165.12948 L 89.665435 97.968938
L 137.7 166.841822 L 90.514565 98.107494
L 138.656571 172.252822 L 91.363696 100.843968
L 139.613143 172.526796 L 92.212826 100.289745
L 140.569714 177.937796 L 93.061957 101.328912
L 141.526286 176.841898 L 93.911087 103.130136
L 142.482857 178.896708 L 94.760217 103.684359
L 143.439429 182.458378 L 95.609348 105.277749
L 144.396 183.554277 L 96.458478 106.386194
L 145.352571 186.704986 L 97.307609 105.069915
L 146.309143 188.896783 L 98.156739 104.481054
L 147.265714 186.294024 L 99.00587 107.563917
L 148.222286 185.129631 L 99.855 108.845556
L 149.178857 191.225568 L 100.70413 109.711529
L 150.135429 193.759834 L 101.553261 111.547392
L 151.092 195.472175 L 102.402391 111.512753
L 152.048571 199.10234 L 103.251522 111.685947
L 153.005143 199.033846 L 104.100652 110.854613
L 153.961714 199.376314 L 104.949783 110.612141
L 154.918286 197.732466 L 105.798913 111.685947
L 155.874857 197.253011 L 106.648043 113.244698
L 156.831429 199.376314 L 107.497174 113.695004
L 157.788 202.45853 L 109.195435 115.045922
L 158.744571 203.348947 L 110.044565 114.942005
L 159.701143 204.581833 L 110.893696 115.911895
L 160.657714 206.0202 L 111.742826 116.500756
L 161.614286 205.814719 L 112.591957 117.33209
L 162.570857 207.732542 L 113.441087 116.085089
L 163.527429 208.896934 L 114.290217 118.92548
L 164.484 210.540782 L 115.139348 118.128785
L 165.440571 208.07501 L 115.988478 118.267341
L 166.397143 213.691491 L 116.837609 118.267341
L 167.353714 212.116137 L 118.53587 119.722175
L 168.310286 212.390112 L 119.385 119.618258
L 169.266857 212.390112 L 121.083261 118.024868
L 171.18 215.266846 L 121.932391 120.137842
L 172.136571 215.061365 L 122.781522 119.375786
L 173.093143 213.349023 L 123.630652 121.592676
L 174.049714 211.910656 L 124.479783 122.42401
L 175.006286 216.08877 L 125.328913 120.795981
L 175.962857 214.581909 L 126.178043 121.14237
L 176.919429 218.965504 L 127.027174 122.320093
L 177.876 220.609352 L 127.876304 120.865259
L 178.832571 217.390149 L 128.725435 122.562566
L 179.789143 218.075086 L 129.574565 122.285455
L 180.745714 220.403871 L 130.423696 122.458649
L 181.702286 217.527137 L 131.272826 122.458649
L 182.658857 220.883326 L 132.121957 124.363789
L 183.615429 220.335377 L 132.971087 123.220705
L 184.572 220.677845 L 133.820217 123.567094
L 185.528571 220.677845 L 134.669348 124.363789
L 186.485143 224.444997 L 135.518478 124.32915
L 187.441714 222.184706 L 136.367609 123.774928
L 188.398286 222.869643 L 137.216739 124.155956
L 189.354857 224.444997 L 138.06587 123.878845
L 190.311429 224.376503 L 138.915 124.571623
L 191.268 223.280605 L 139.76413 124.398428
L 192.224571 224.034035 L 140.613261 125.021929
L 193.181143 223.486086 L 141.462391 125.264401
L 194.137714 224.855959 L 142.311522 124.710178
L 195.094286 224.513491 L 143.160652 126.372846
L 196.050857 225.746377 L 144.009783 125.472234
L 197.007429 226.225833 L 144.858913 125.749346
L 197.964 225.129934 L 145.708043 126.719235
L 198.920571 228.41763 L 146.557174 125.680068
L 199.877143 226.636795 L 147.406304 126.511402
L 200.833714 227.184744 L 148.255435 126.961708
L 201.790286 229.102567 L 149.104565 126.026457
L 202.746857 227.047757 L 149.953696 125.783985
L 203.703429 228.691605 L 150.802826 126.026457
L 204.66 229.582022 L 152.501087 126.996347
L 205.616571 227.732693 L 153.350217 126.095735
L 206.573143 227.253238 L 154.199348 125.541512
L 207.529714 227.732693 L 155.048478 126.788513
L 209.442857 229.650516 L 155.897609 126.615319
L 210.399429 227.869681 L 156.746739 126.649958
L 211.356 226.773782 L 157.59587 127.308097
L 212.312571 229.239554 L 158.445 125.680068
L 213.269143 228.897086 L 159.29413 127.412014
L 214.225714 228.965579 L 160.992391 127.169541
L 215.182286 230.266959 L 161.841522 127.342736
L 216.138857 227.047757 L 162.690652 127.169541
L 217.095429 230.47244 L 163.539783 126.546041
L 219.008571 229.992984 L 164.388913 128.381903
L 219.965143 230.335453 L 165.238043 127.827681
L 220.921714 229.992984 L 166.087174 127.550569
L 221.878286 228.760098 L 166.936304 128.070153
L 222.834857 232.390263 L 167.785435 127.377375
L 223.791429 231.294364 L 168.634565 127.20418
L 224.748 230.746415 L 169.483696 127.446653
L 225.704571 231.77382 L 170.332826 126.996347
L 226.661143 230.403946 L 171.181957 126.823152
L 227.617714 230.061478 L 172.031087 127.896958
L 228.574286 230.540934 L 172.880217 128.312625
L 229.530857 229.650516 L 173.729348 127.446653
L 230.487429 229.308048 L 174.578478 127.065624
L 231.444 231.431351 L 175.427609 127.308097
L 232.400571 232.253275 L 176.276739 127.896958
L 233.357143 230.540934 L 177.12587 126.615319
L 234.313714 229.787503 L 177.975 127.100263
L 235.270286 230.266959 L 178.82413 128.381903
L 236.226857 231.431351 L 179.673261 127.342736
L 237.183429 228.897086 L 180.522391 128.555098
L 238.14 229.855997 L 181.371522 128.17407
L 239.096571 232.390263 L 182.220652 127.169541
L 240.053143 230.335453 L 183.069783 128.035514
L 241.009714 232.732731 L 185.617174 128.48582
L 241.966286 231.979301 L 186.466304 127.827681
L 242.922857 229.992984 L 187.315435 126.996347
L 243.879429 231.705326 L 188.164565 127.412014
L 244.836 232.047794 L 189.013696 128.624376
L 245.792571 232.253275 L 189.862826 128.79757
L 246.749143 232.595744 L 190.711957 128.17407
L 247.705714 231.294364 L 191.561087 127.20418
L 248.662286 229.650516 L 192.410217 127.827681
L 249.618857 230.47244 L 193.259348 129.143959
L 250.575429 232.869718 L 194.108478 128.451181
L 251.532 233.212187 L 194.957609 128.451181
L 252.488571 231.979301 L 195.806739 128.693653
L 253.445143 230.061478 L 196.65587 128.000875
L 254.401714 231.294364 L 197.505 127.896958
L 255.358286 233.897123 L 198.35413 128.070153
L 256.314857 232.52725 L 199.203261 128.104792
L 257.271429 232.52725 L 200.901522 129.76746
L 258.228 233.006706 L 201.750652 128.104792
L 259.184571 231.636832 L 202.599783 127.723764
L 260.141143 231.431351 L 203.448913 127.51593
L 261.097714 231.77382 L 204.298043 128.693653
L 262.054286 231.842313 L 205.996304 128.901487
L 263.967429 235.130009 L 206.845435 128.832209
L 264.924 231.842313 L 208.543696 127.689125
L 265.880571 231.088883 L 209.392826 127.585208
L 266.837143 230.677921 L 210.241957 128.866848
L 267.793714 233.006706 L 211.091087 128.728292
L 269.706857 233.417668 L 211.940217 128.451181
L 270.663429 233.28068 L 212.789348 128.451181
L 272.576571 231.020389 L 213.638478 128.866848
L 273.533143 230.814908 L 214.487609 128.589737
L 274.489714 233.349174 L 215.336739 129.386432
L 275.446286 233.075199 L 216.18587 128.139431
L 276.402857 232.52725 L 217.035 127.966236
L 277.359429 232.52725 L 217.88413 128.451181
L 278.316 233.349174 L 218.733261 129.074681
L 279.272571 232.801225 L 219.582391 128.901487
L 280.229143 234.376579 L 220.431522 128.48582
L 281.185714 231.910807 L 221.280652 127.931597
L 282.142286 231.568339 L 222.129783 127.169541
L 283.098857 232.52725 L 222.978913 129.351793
L 284.055429 233.760136 L 223.828043 128.832209
L 285.012 233.417668 L 224.677174 128.520459
L 285.968571 232.595744 L 225.526304 127.896958
L 286.925143 231.499845 L 226.375435 128.035514
L 287.881714 229.992984 L 227.224565 128.000875
L 288.838286 234.308085 L 228.073696 128.936126
L 289.794857 233.28068 L 228.922826 128.762931
L 290.751429 232.664237 L 229.771957 128.277986
L 291.708 231.431351 L 230.621087 129.282515
L 292.664571 231.705326 L 231.470217 128.762931
L 293.621143 231.636832 L 232.319348 127.758403
L 294.577714 233.486161 L 233.168478 128.208709
L 295.534286 233.143693 L 234.017609 128.347264
L 296.490857 232.184782 L 234.866739 129.10932
L 297.447429 234.171098 L 235.71587 128.48582
L 298.404 233.143693 L 236.565 127.723764
L 299.360571 231.157377 L 237.41413 128.866848
L 300.317143 232.047794 L 238.263261 127.51593
L 301.273714 232.321769 L 239.961522 129.455709
L 302.230286 233.82863 L 240.810652 128.070153
L 303.186857 232.595744 L 241.659783 129.074681
L 304.143429 231.088883 L 242.508913 127.723764
L 305.1 233.349174 L 243.358043 128.970765
L 306.056571 230.677921 L 244.207174 128.555098
L 307.013143 232.458756 L 245.056304 128.970765
L 307.969714 234.513566 L 245.905435 129.247876
L 308.926286 231.77382 L 246.754565 128.624376
L 309.882857 233.760136 L 247.603696 128.901487
L 310.839429 231.088883 L 248.452826 127.862319
L 311.796 233.554655 L 249.301957 128.104792
L 312.752571 232.732731 L 250.151087 128.659014
L 313.709143 233.554655 L 251.000217 128.17407
L 314.665714 234.102604 L 251.849348 128.000875
L 315.622286 232.869718 L 252.698478 129.10932
L 316.578857 233.417668 L 253 128.998619
L 317.535429 231.362858 L 253 128.998619
L 318.492 231.842313 " clip-path="url(#pe427f866f0)" style="fill: none; stroke: #221331; stroke-opacity: 0.7; stroke-width: 1.5; stroke-linecap: square"/>
L 319.448571 232.938212
L 320.405143 231.979301
L 321.361714 231.636832
L 322.318286 233.82863
L 323.274857 233.212187
L 324.231429 232.938212
L 325.188 234.171098
L 326.144571 233.417668
L 327.101143 233.28068
L 328.057714 233.897123
L 329.014286 233.28068
L 329.970857 231.568339
L 330.927429 232.595744
L 331.884 233.006706
L 332.840571 233.554655
L 333.797143 231.157377
L 334.753714 233.349174
L 335.710286 234.308085
L 336.666857 234.102604
L 337.623429 232.116288
L 340.493143 234.445073
L 341.449714 233.075199
L 342.406286 233.897123
L 343.362857 233.760136
L 344.319429 232.047794
L 345.276 232.116288
L 346.232571 232.595744
L 347.189143 234.308085
L 348.145714 233.486161
L 349.102286 232.321769
L 350.058857 234.650554
L 351.015429 232.732731
L 351.972 234.171098
L 352.928571 232.184782
L 353.885143 233.212187
L 354.841714 231.979301
L 355.798286 232.047794
L 356.754857 233.554655
L 357.711429 233.417668
L 358.668 232.047794
L 359.624571 233.897123
L 360.581143 233.417668
L 361.537714 231.22587
L 362.494286 231.979301
L 363.450857 233.075199
L 364.407429 233.897123
L 366.320571 231.842313
L 367.277143 232.664237
L 368.233714 231.77382
L 369.190286 232.52725
L 370.146857 233.075199
L 371.103429 233.28068
L 372.06 231.22587
L 373.016571 231.842313
L 373.973143 232.116288
L 374.929714 232.595744
L 375.886286 232.801225
L 376.842857 231.499845
L 377.799429 233.075199
L 378.756 233.075199
L 379.712571 234.650554
L 380.669143 233.623149
L 381.625714 233.075199
L 382.582286 234.102604
L 383.538857 231.362858
L 384.495429 233.965617
L 385.452 234.171098
L 386.408571 234.034111
L 387.365143 232.52725
L 388.321714 232.321769
L 389.278286 234.239592
L 390.234857 233.897123
L 391.191429 232.253275
L 392.148 232.184782
L 393.104571 232.664237
L 394.061143 232.664237
L 395.017714 233.075199
L 395.974286 233.075199
L 396.930857 233.417668
L 397.887429 231.362858
L 398.844 231.910807
L 399.800571 234.102604
L 400.757143 233.623149
L 401.713714 231.842313
L 402.670286 233.075199
L 403.626857 234.58206
L 404.583429 231.705326
L 405.54 233.623149
L 406.496571 231.499845
L 407.453143 234.034111
L 408.409714 233.212187
L 409.366286 234.376579
L 410.322857 232.732731
L 411.279429 232.458756
L 412.236 232.52725
L 413.192571 232.390263
L 414.149143 233.28068
L 415.105714 231.77382
L 416.062286 235.266997
L 417.018857 231.77382
L 418.932 233.417668
L 420.845143 234.376579
L 421.801714 232.664237
L 422.758286 233.075199
L 423.714857 233.897123
L 424.671429 232.938212
L 425.628 234.719047
L 427.541143 232.732731
L 428.497714 232.938212
L 429.454286 234.376579
L 430.410857 233.075199
L 431.367429 232.595744
L 432.324 233.897123
L 433 232.735432
L 433 232.735432
" clip-path="url(#pa5519df51f)" style="fill: none; stroke: #ffc400; stroke-width: 1.5; stroke-linecap: square"/>
</g> </g>
<g id="line2d_21"> <g id="line2d_26">
<path d="M 133.0128 157.690378 <path d="M 71.918609 64.400286
L 135.882514 165.174674 L 74.466 70.793023
L 138.752229 171.914156 L 77.013391 76.549575
L 141.621943 177.982946 L 79.560783 81.733254
L 144.491657 183.447788 L 82.108174 86.401068
L 147.361371 188.368787 L 84.655565 90.604356
L 150.231086 192.800063 L 87.202957 94.389347
L 153.1008 196.790353 L 89.750348 97.797666
L 155.970514 200.383541 L 92.297739 100.866801
L 158.840229 203.619147 L 94.84513 103.630505
L 161.709943 206.532755 L 97.392522 106.119173
L 164.579657 209.15641 L 99.939913 108.360177
L 167.449371 211.518967 L 103.336435 111.005168
L 170.319086 213.64641 L 106.732957 113.305153
L 174.145371 216.157367 L 110.129478 115.305133
L 177.971657 218.340802 L 113.526 117.044241
L 181.797943 220.239435 L 116.922522 118.556504
L 185.624229 221.890414 L 121.168174 120.172534
L 189.450514 223.326044 L 125.413826 121.52952
L 194.233371 224.860183 L 129.659478 122.668985
L 199.016229 226.148404 L 134.754261 123.797908
L 204.755657 227.424706 L 140.698174 124.848082
L 210.495086 228.45962 L 146.642087 125.670396
L 217.191086 229.422345 L 153.43513 126.394082
L 224.843657 230.269599 L 161.926435 127.055811
L 233.4528 230.978451 L 172.116 127.597698
L 243.018514 231.544131 L 184.003826 128.000163
L 255.453943 232.037901 L 200.137304 128.309615
L 270.759086 232.405675 L 223.912957 128.514556
L 291.803657 232.669042 L 232.404261 128.550962
L 299.456229 232.724553 L 232.404261 128.550962
L 299.456229 232.724553 " clip-path="url(#pe427f866f0)" style="fill: none; stroke: #221331; stroke-width: 1.5; stroke-linecap: square"/>
" clip-path="url(#pa5519df51f)" style="fill: none; stroke: #00d7ff; stroke-width: 1.5; stroke-linecap: square"/>
</g> </g>
<g id="patch_3"> <g id="patch_3">
<path d="M 54 252 <path d="M 31.5 189
L 54 34.56 L 31.5 25.92
" style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/> " style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/>
</g> </g>
<g id="patch_4"> <g id="patch_4">
<path d="M 388.8 252 <path d="M 226.8 189
L 388.8 34.56 L 226.8 25.92
" style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/> " style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/>
</g> </g>
<g id="patch_5"> <g id="patch_5">
<path d="M 54 252 <path d="M 31.5 189
L 388.8 252 L 226.8 189
" style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/> " style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/>
</g> </g>
<g id="patch_6"> <g id="patch_6">
<path d="M 54 34.56 <path d="M 31.5 25.92
L 388.8 34.56 L 226.8 25.92
" style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/> " style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/>
</g> </g>
</g> </g>
</g> </g>
<defs> <defs>
<clipPath id="pa5519df51f"> <clipPath id="pe427f866f0">
<rect x="54" y="34.56" width="334.8" height="217.44"/> <rect x="31.5" y="25.92" width="195.3" height="163.08"/>
</clipPath> </clipPath>
</defs> </defs>
</svg> </svg>
...@@ -12,6 +12,8 @@ from scipy import interpolate ...@@ -12,6 +12,8 @@ from scipy import interpolate
#C:\Users\Usuario\Documents\artiq\artiq_experiments\analisis\plots\20220106_CPT_DosLaseres_v08_TISA_DR\Data #C:\Users\Usuario\Documents\artiq\artiq_experiments\analisis\plots\20220106_CPT_DosLaseres_v08_TISA_DR\Data
os.chdir('/home/nico/Documents/artiq_experiments/analisis/plots/20230321_heatingrate/Data/')
CPT_FILES = """000010420-IR_Scan_withcal_optimized CPT_FILES = """000010420-IR_Scan_withcal_optimized
000010436-IR_Scan_withcal_optimized 000010436-IR_Scan_withcal_optimized
000010437-IR_Scan_withcal_optimized 000010437-IR_Scan_withcal_optimized
...@@ -19,6 +21,12 @@ CPT_FILES = """000010420-IR_Scan_withcal_optimized ...@@ -19,6 +21,12 @@ CPT_FILES = """000010420-IR_Scan_withcal_optimized
000010439-IR_Scan_withcal_optimized 000010439-IR_Scan_withcal_optimized
000010440-IR_Scan_withcal_optimized 000010440-IR_Scan_withcal_optimized
000010441-IR_Scan_withcal_optimized 000010441-IR_Scan_withcal_optimized
000010425-IR_Scan_withcal_optimized
000010426-IR_Scan_withcal_optimized
000010427-IR_Scan_withcal_optimized
000010428-IR_Scan_withcal_optimized
000010429-IR_Scan_withcal_optimized
000010430-IR_Scan_withcal_optimized
""" """
HEATING_FILES = """000010422-HeatingRate""" HEATING_FILES = """000010422-HeatingRate"""
...@@ -81,7 +89,7 @@ for i, fname in enumerate(HEATING_FILES.split()): ...@@ -81,7 +89,7 @@ for i, fname in enumerate(HEATING_FILES.split()):
#%% #%%
""" """
Ploteo la cpt de referencia Ploteo la cpt de referencia / plotting the reference CPT
""" """
jvec = [0] jvec = [0]
...@@ -103,6 +111,7 @@ from scipy.optimize import curve_fit ...@@ -103,6 +111,7 @@ from scipy.optimize import curve_fit
""" """
Ajusto un cpt para obtener todos los parámetros relevantes primero. Ajusto un cpt para obtener todos los parámetros relevantes primero.
I fit a cpt curve to retrieve all the relevant parameters first.
""" """
phidoppler, titadoppler = 0, 90 phidoppler, titadoppler = 0, 90
...@@ -160,9 +169,10 @@ def FitEITpi(freqs, SG, SP, scale, offset, temp): ...@@ -160,9 +169,10 @@ def FitEITpi(freqs, SG, SP, scale, offset, temp):
#esos valores anteriores dan mal la ordenada al origen, cambie correccion y ahora da #esos valores anteriores dan mal la ordenada al origen, cambie correccion y ahora da
#[4.71134671e-01, 7.63142299e+00, 7.30866544e+04, 1.80899906e+02, 1.20863371e-03] #[4.71134671e-01, 7.63142299e+00, 7.30866544e+04, 1.80899906e+02, 1.20863371e-03]
popt_fullcpt, pcov_fullcpt = curve_fit(FitEITpi, FreqsDRpi, CountsDRpi, p0=[0.5, 4.5, 1e4, 1e3, 1e-3], bounds=((0, 0, 0, 0, 0), (2, 10, 1e5, 1e5, 10e-3)))
print(f'Temperatura: ({round(1e3*popt_fullcpt[-1],2)} +- {round(1e3*np.sqrt(pcov_fullcpt[-1][-1]),2)}) mK') print(f'Temperatura: ({round(1e3*popt_fullcpt[-1],2)} +- {round(1e3*np.sqrt(pcov_fullcpt[-1][-1]),2)}) mK')
popt_fullcpt, pcov_fullcpt = curve_fit(FitEITpi, FreqsDRpi, CountsDRpi, p0=[0.5, 4.5, 1e4, 1e3, 1e-3], bounds=((0, 0, 0, 0, 0), (2, 10, 1e5, 1e5, 10e-3)))
print(popt_fullcpt) print(popt_fullcpt)
...@@ -171,26 +181,44 @@ Det = popt_fullcpt[1] ...@@ -171,26 +181,44 @@ Det = popt_fullcpt[1]
FittedEITpi = FitEITpi(freqslongpi, *popt_fullcpt) FittedEITpi = FitEITpi(freqslongpi, *popt_fullcpt)
#%%
"""
Ploteo la CPT de referencia junto al ajuste y a la resonancia oscura de interes
I plot the reference CPT along with the fit to the model and the dark resonance of interest
"""
i_DR = 955
plt.figure() plt.figure()
plt.errorbar(FreqsDRpi, CountsDRpi, yerr=2*np.sqrt(CountsDRpi), fmt='o', capsize=2, markersize=2) plt.errorbar(FreqsDRpi, CountsDRpi, yerr=2*np.sqrt(CountsDRpi), fmt='o', capsize=2, markersize=2)
plt.plot(freqslongpi, FittedEITpi) plt.plot(freqslongpi, FittedEITpi)
plt.plot(freqslongpi[i_DR], FittedEITpi[i_DR],'o', color='red', markersize=12)
plt.xlabel('Detuning (MHz)')
plt.ylabel('Counts')
#plt.title(f'Sdop: {round(popt[0], 2)}, Spr: {round(popt[1], 2)}, T: {round(popt[2]*1e3, 2)} mK, detDop: {DetDoppler} MHz') #plt.title(f'Sdop: {round(popt[0], 2)}, Spr: {round(popt[1], 2)}, T: {round(popt[2]*1e3, 2)} mK, detDop: {DetDoppler} MHz')
#%% #%%
""" """
Simulo CPTs con todos esos parámetros para distintas temperaturas Simulo CPTs con todos esos parámetros para distintas temperaturas
I simulate CPT curves with all the previous parameters but with varying temperatures
""" """
TempVecTeorico = list(np.arange(0, 31, 1)) TempVecTeorico = list(np.arange(0.3,1,0.1))+list(np.arange(1, 31, 1))
CurvasTeoricas = [] CurvasTeoricas = []
for tempi in TempVecTeorico: for tempi in TempVecTeorico:
CurvasTeoricas.append(FitEITpi(freqslongpi, *popt_fullcpt[:-1], tempi*1e-3)) CurvasTeoricas.append(FitEITpi(freqslongpi, *popt_fullcpt[:-1], tempi*1e-3))
#%% #%%
""" """
Acá agarro la primera y busco el valor i_DR que corresponde a la resonancia oscura de interés Acá agarro la primera y busco el valor i_DR que corresponde a la resonancia oscura de interés
With the first one, I look for the value i_DR which corresponds to the dark resonance of interest
""" """
curva_ref = CurvasTeoricas[0] curva_ref = CurvasTeoricas[0]
...@@ -201,12 +229,33 @@ plt.figure() ...@@ -201,12 +229,33 @@ plt.figure()
plt.plot(freqslongpi, curva_ref) plt.plot(freqslongpi, curva_ref)
plt.plot(freqslongpi[i_DR], curva_ref[i_DR],'o') plt.plot(freqslongpi[i_DR], curva_ref[i_DR],'o')
#%%
"""
ploteo algunos CPTs teoricos para algunas temperaturas
Plotting some theory cpt curves for some temperatures
"""
plt.plot(freqslongpi, CurvasTeoricas[0])
plt.plot(freqslongpi[i_DR], CurvasTeoricas[0][i_DR],'o',markersize=10)
plt.plot(freqslongpi, CurvasTeoricas[10])
plt.plot(freqslongpi[i_DR], CurvasTeoricas[10][i_DR],'o',markersize=10)
plt.plot(freqslongpi, CurvasTeoricas[20])
plt.plot(freqslongpi[i_DR], CurvasTeoricas[20][i_DR],'o',markersize=10)
plt.xlabel('Detuning (MHz)')
plt.ylabel('Fluorescence')
plt.grid()
#%% #%%
""" """
Ahora interpolo los valores teóricos de las profundidades de esas resonancias Ahora interpolo los valores teóricos de las profundidades de esas resonancias
y aplico la interpolación a las mediciones para obtener temperaturas. y aplico la interpolación a las mediciones para obtener temperaturas.
Luego, grafico las temperaturas en función de los tiempos de calentamiento. Luego, grafico las temperaturas en función de los tiempos de calentamiento.
Now I interpolate the theoretical values of the depths of those resonances
and apply the interpolation to the measurements to obtain temperatures.
After that, I plot the temperatures with respect to the heating times
""" """
from scipy.interpolate import interp1d from scipy.interpolate import interp1d
...@@ -235,7 +284,7 @@ plt.ylabel('Temperatura (mK)') ...@@ -235,7 +284,7 @@ plt.ylabel('Temperatura (mK)')
plt.figure() plt.figure()
#plt.plot(Heating_med, Heating_tim, 'o', color='blue') #plt.plot(Heating_med, Heating_tim, 'o', color='blue')
plt.errorbar(Heating_tim, Heating_med, yerr=ErrorHeating_med, fmt='o', capsize=2, markersize=2) plt.errorbar([t*1e3 for t in Heating_tim], Heating_med, yerr=ErrorHeating_med, fmt='o', capsize=2, markersize=5)
plt.ylabel('Cuentas de DR medidas') plt.ylabel('Cuentas de DR medidas')
plt.xlabel('Heating time (s)') plt.xlabel('Heating time (s)')
...@@ -250,6 +299,7 @@ p1,p2 = curve_fit(lineal, Heating_tim_ms, Temperaturas_interpoladas) ...@@ -250,6 +299,7 @@ p1,p2 = curve_fit(lineal, Heating_tim_ms, Temperaturas_interpoladas)
#%% #%%
""" """
Grafico finalmente el plot del heating rate de la trampa Grafico finalmente el plot del heating rate de la trampa
Finally I plot the heating rate of the trap
""" """
...@@ -271,6 +321,7 @@ print(f'Heating rate: ({round(p1[0],2)} +- {round(np.sqrt(p2[0][0]),2)}) mK/ms') ...@@ -271,6 +321,7 @@ print(f'Heating rate: ({round(p1[0],2)} +- {round(np.sqrt(p2[0][0]),2)}) mK/ms')
#%% #%%
""" """
Ahora voy a ver CPT enteras con tiempos de calentamiento distintos. Ahora voy a ver CPT enteras con tiempos de calentamiento distintos.
Now I see whole CPT curves with different heating times
""" """
jvec = [3, 4] jvec = [3, 4]
...@@ -306,10 +357,14 @@ plt.ylim(1000,2900) ...@@ -306,10 +357,14 @@ plt.ylim(1000,2900)
plt.grid() plt.grid()
plt.legend() plt.legend()
#%%
""" """
La siguiente curva probablemente no este bien medida ya que inmediatamente La siguiente curva probablemente no este bien medida ya que inmediatamente
despues, los laseres se deslockearon. La dejo por las dudas. despues, los laseres se deslockearon. La dejo por las dudas.
This curve is probably not well measured...
""" """
jvec = [5, 6] jvec = [5, 6]
...@@ -330,4 +385,27 @@ plt.legend() ...@@ -330,4 +385,27 @@ plt.legend()
plt.title('Ojo: medicion condicionada por derivas') plt.title('Ojo: medicion condicionada por derivas')
#%%
"""
Ahora ploteo 6 curvas cpt para distintos valores de potencia del UV
This is a plot of 6 different cpt curves for 6 different UV powers. I should fit them
to obtain saturation parameters
"""
jvec = [7,8,9,10,11,12]
plt.figure()
for j in jvec:
plt.errorbar([2*f*1e-6 for f in Freqs[j]], Counts[j], yerr=np.sqrt(Counts[j]), fmt='o', capsize=2, markersize=2, label='Without heating')
plt.xlabel('Frecuencia (MHz)')
plt.ylabel('counts')
#plt.ylim(1000,2900)
plt.grid()
#plt.legend()
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns:xlink="http://www.w3.org/1999/xlink" width="432pt" height="288pt" viewBox="0 0 432 288" xmlns="http://www.w3.org/2000/svg" version="1.1">
<metadata>
<rdf:RDF xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<cc:Work>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:date>2023-03-24T14:25:50.668982</dc:date>
<dc:format>image/svg+xml</dc:format>
<dc:creator>
<cc:Agent>
<dc:title>Matplotlib v3.5.2, https://matplotlib.org/</dc:title>
</cc:Agent>
</dc:creator>
</cc:Work>
</rdf:RDF>
</metadata>
<defs>
<style type="text/css">*{stroke-linejoin: round; stroke-linecap: butt}</style>
</defs>
<g id="figure_1">
<g id="patch_1">
<path d="M 0 288
L 432 288
L 432 0
L 0 0
z
" style="fill: #ffffff"/>
</g>
<g id="axes_1">
<g id="patch_2">
<path d="M 50.190625 239.41875
L 421.2 239.41875
L 421.2 27.190625
L 50.190625 27.190625
z
" style="fill: #ffffff"/>
</g>
<g id="matplotlib.axis_1">
<g id="xtick_1">
<g id="line2d_1">
<path d="M 67.054688 239.41875
L 67.054688 27.190625
" clip-path="url(#p360dd42aee)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
</g>
<g id="line2d_2">
<defs>
<path id="mb4c8f58a6a" d="M 0 0
L 0 3.5
" style="stroke: #000000; stroke-width: 0.8"/>
</defs>
<g>
<use xlink:href="#mb4c8f58a6a" x="67.054688" y="239.41875" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_1">
<!-- 0 -->
<g transform="translate(63.304688 256.663281)scale(0.15 -0.15)">
<defs>
<path id="STIXGeneral-Regular-30" d="M 3046 2112
Q 3046 1683 2963 1302
Q 2880 922 2717 602
Q 2554 282 2266 96
Q 1978 -90 1600 -90
Q 1210 -90 915 108
Q 621 307 461 640
Q 301 973 227 1350
Q 154 1728 154 2150
Q 154 2746 301 3222
Q 448 3699 790 4012
Q 1133 4326 1626 4326
Q 2253 4326 2649 3712
Q 3046 3098 3046 2112
z
M 2432 2080
Q 2432 3091 2217 3625
Q 2003 4160 1587 4160
Q 1190 4160 979 3622
Q 768 3085 768 2106
Q 768 1120 979 598
Q 1190 77 1600 77
Q 2003 77 2217 598
Q 2432 1120 2432 2080
z
" transform="scale(0.015625)"/>
</defs>
<use xlink:href="#STIXGeneral-Regular-30"/>
</g>
</g>
</g>
<g id="xtick_2">
<g id="line2d_3">
<path d="M 116.241536 239.41875
L 116.241536 27.190625
" clip-path="url(#p360dd42aee)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
</g>
<g id="line2d_4">
<g>
<use xlink:href="#mb4c8f58a6a" x="116.241536" y="239.41875" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_2">
<!-- 5 -->
<g transform="translate(112.491536 256.663281)scale(0.15 -0.15)">
<defs>
<path id="STIXGeneral-Regular-35" d="M 2803 4358
L 2573 3814
Q 2534 3731 2400 3731
L 1158 3731
L 902 3187
Q 1606 3053 1920 2896
Q 2234 2739 2502 2368
Q 2726 2061 2726 1555
Q 2726 1094 2576 780
Q 2426 467 2099 224
Q 1664 -90 1011 -90
Q 646 -90 422 19
Q 198 128 198 307
Q 198 550 486 550
Q 717 550 960 352
Q 1210 147 1414 147
Q 1747 147 2012 480
Q 2278 813 2278 1229
Q 2278 1843 1850 2189
Q 1293 2637 486 2637
Q 410 2637 410 2688
L 416 2720
L 1114 4237
L 2438 4237
Q 2547 4237 2608 4269
Q 2669 4301 2746 4403
L 2803 4358
z
" transform="scale(0.015625)"/>
</defs>
<use xlink:href="#STIXGeneral-Regular-35"/>
</g>
</g>
</g>
<g id="xtick_3">
<g id="line2d_5">
<path d="M 165.428385 239.41875
L 165.428385 27.190625
" clip-path="url(#p360dd42aee)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
</g>
<g id="line2d_6">
<g>
<use xlink:href="#mb4c8f58a6a" x="165.428385" y="239.41875" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_3">
<!-- 10 -->
<g transform="translate(157.928385 256.663281)scale(0.15 -0.15)">
<defs>
<path id="STIXGeneral-Regular-31" d="M 2522 0
L 755 0
L 755 96
Q 1107 115 1235 227
Q 1363 339 1363 608
L 1363 3482
Q 1363 3795 1171 3795
Q 1082 3795 883 3718
L 710 3654
L 710 3744
L 1856 4326
L 1914 4307
L 1914 486
Q 1914 275 2042 185
Q 2170 96 2522 96
L 2522 0
z
" transform="scale(0.015625)"/>
</defs>
<use xlink:href="#STIXGeneral-Regular-31"/>
<use xlink:href="#STIXGeneral-Regular-30" x="49.999985"/>
</g>
</g>
</g>
<g id="xtick_4">
<g id="line2d_7">
<path d="M 214.615234 239.41875
L 214.615234 27.190625
" clip-path="url(#p360dd42aee)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
</g>
<g id="line2d_8">
<g>
<use xlink:href="#mb4c8f58a6a" x="214.615234" y="239.41875" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_4">
<!-- 15 -->
<g transform="translate(207.115234 256.663281)scale(0.15 -0.15)">
<use xlink:href="#STIXGeneral-Regular-31"/>
<use xlink:href="#STIXGeneral-Regular-35" x="49.999985"/>
</g>
</g>
</g>
<g id="xtick_5">
<g id="line2d_9">
<path d="M 263.802083 239.41875
L 263.802083 27.190625
" clip-path="url(#p360dd42aee)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
</g>
<g id="line2d_10">
<g>
<use xlink:href="#mb4c8f58a6a" x="263.802083" y="239.41875" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_5">
<!-- 20 -->
<g transform="translate(256.302083 256.663281)scale(0.15 -0.15)">
<defs>
<path id="STIXGeneral-Regular-32" d="M 3034 877
L 2688 0
L 186 0
L 186 77
L 1325 1286
Q 1773 1754 1965 2144
Q 2157 2534 2157 2950
Q 2157 3379 1920 3616
Q 1683 3853 1267 3853
Q 922 3853 720 3673
Q 518 3494 326 3021
L 192 3053
Q 301 3648 630 3987
Q 960 4326 1523 4326
Q 2054 4326 2380 4006
Q 2707 3686 2707 3200
Q 2707 2477 1888 1613
L 832 486
L 2330 486
Q 2541 486 2665 569
Q 2790 653 2944 915
L 3034 877
z
" transform="scale(0.015625)"/>
</defs>
<use xlink:href="#STIXGeneral-Regular-32"/>
<use xlink:href="#STIXGeneral-Regular-30" x="49.999985"/>
</g>
</g>
</g>
<g id="xtick_6">
<g id="line2d_11">
<path d="M 312.988932 239.41875
L 312.988932 27.190625
" clip-path="url(#p360dd42aee)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
</g>
<g id="line2d_12">
<g>
<use xlink:href="#mb4c8f58a6a" x="312.988932" y="239.41875" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_6">
<!-- 25 -->
<g transform="translate(305.488932 256.663281)scale(0.15 -0.15)">
<use xlink:href="#STIXGeneral-Regular-32"/>
<use xlink:href="#STIXGeneral-Regular-35" x="49.999985"/>
</g>
</g>
</g>
<g id="xtick_7">
<g id="line2d_13">
<path d="M 362.175781 239.41875
L 362.175781 27.190625
" clip-path="url(#p360dd42aee)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
</g>
<g id="line2d_14">
<g>
<use xlink:href="#mb4c8f58a6a" x="362.175781" y="239.41875" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_7">
<!-- 30 -->
<g transform="translate(354.675781 256.663281)scale(0.15 -0.15)">
<defs>
<path id="STIXGeneral-Regular-33" d="M 390 3264
L 288 3290
Q 435 3770 748 4048
Q 1062 4326 1542 4326
Q 1990 4326 2265 4083
Q 2541 3840 2541 3450
Q 2541 2925 1946 2566
Q 2298 2413 2477 2227
Q 2758 1914 2758 1402
Q 2758 890 2464 506
Q 2246 211 1840 60
Q 1434 -90 979 -90
Q 262 -90 262 275
Q 262 378 339 442
Q 416 506 525 506
Q 685 506 915 339
Q 1197 141 1466 141
Q 1818 141 2058 425
Q 2298 710 2298 1120
Q 2298 1856 1632 2048
Q 1434 2112 979 2112
L 979 2202
Q 1338 2323 1517 2432
Q 2035 2726 2035 3290
Q 2035 3610 1852 3776
Q 1670 3942 1344 3942
Q 768 3942 390 3264
z
" transform="scale(0.015625)"/>
</defs>
<use xlink:href="#STIXGeneral-Regular-33"/>
<use xlink:href="#STIXGeneral-Regular-30" x="49.999985"/>
</g>
</g>
</g>
<g id="xtick_8">
<g id="line2d_15">
<path d="M 411.36263 239.41875
L 411.36263 27.190625
" clip-path="url(#p360dd42aee)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
</g>
<g id="line2d_16">
<g>
<use xlink:href="#mb4c8f58a6a" x="411.36263" y="239.41875" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_8">
<!-- 35 -->
<g transform="translate(403.86263 256.663281)scale(0.15 -0.15)">
<use xlink:href="#STIXGeneral-Regular-33"/>
<use xlink:href="#STIXGeneral-Regular-35" x="49.999985"/>
</g>
</g>
</g>
<g id="text_9">
<!-- Heating time (ms) -->
<g transform="translate(181.117578 274.163281)scale(0.15 -0.15)">
<defs>
<path id="STIXGeneral-Regular-48" d="M 4499 0
L 2714 0
L 2714 122
Q 3085 147 3181 265
Q 3277 384 3277 794
L 3277 2016
L 1338 2016
L 1338 723
Q 1338 371 1440 256
Q 1542 141 1894 122
L 1901 0
L 115 0
L 115 122
Q 493 147 589 259
Q 685 371 685 781
L 685 3507
Q 685 3878 585 3980
Q 486 4083 115 4115
L 115 4237
L 1907 4237
L 1907 4115
Q 1549 4083 1443 3977
Q 1338 3872 1338 3507
L 1338 2298
L 3277 2298
L 3277 3507
Q 3277 3878 3177 3980
Q 3078 4083 2707 4115
L 2707 4237
L 4499 4237
L 4499 4115
Q 4141 4083 4035 3977
Q 3930 3872 3930 3507
L 3930 710
Q 3930 371 4035 259
Q 4141 147 4499 122
L 4499 0
z
" transform="scale(0.015625)"/>
<path id="STIXGeneral-Regular-65" d="M 2611 1050
L 2714 1005
Q 2330 -64 1376 -64
Q 813 -64 486 329
Q 160 723 160 1389
Q 160 2074 525 2509
Q 890 2944 1485 2944
Q 2061 2944 2374 2502
Q 2560 2246 2592 1773
L 621 1773
Q 646 1370 700 1158
Q 755 947 915 730
Q 1184 378 1626 378
Q 1939 378 2153 531
Q 2368 685 2611 1050
z
M 634 1978
L 1939 1978
Q 1882 2381 1750 2547
Q 1619 2714 1312 2714
Q 1043 2714 864 2525
Q 685 2336 634 1978
z
" transform="scale(0.015625)"/>
<path id="STIXGeneral-Regular-61" d="M 2829 422
L 2829 243
Q 2586 -64 2253 -64
Q 1888 -64 1843 403
L 1837 403
Q 1427 -64 909 -64
Q 608 -64 422 112
Q 237 288 237 602
Q 237 1050 685 1350
Q 992 1555 1837 1869
L 1837 2214
Q 1837 2502 1699 2646
Q 1562 2790 1338 2790
Q 1146 2790 1018 2697
Q 890 2605 890 2477
Q 890 2419 909 2348
Q 928 2278 928 2208
Q 928 2112 841 2029
Q 755 1946 634 1946
Q 525 1946 441 2029
Q 358 2112 358 2240
Q 358 2547 685 2752
Q 986 2944 1421 2944
Q 1939 2944 2176 2656
Q 2291 2522 2323 2384
Q 2355 2246 2355 1946
L 2355 723
Q 2355 301 2554 301
Q 2682 301 2829 422
z
M 1837 813
L 1837 1715
Q 1248 1510 1018 1293
Q 800 1094 800 800
Q 800 557 921 432
Q 1043 307 1242 307
Q 1453 307 1613 410
Q 1747 506 1792 589
Q 1837 672 1837 813
z
" transform="scale(0.015625)"/>
<path id="STIXGeneral-Regular-74" d="M 1702 493
L 1786 422
Q 1478 -64 1011 -64
Q 448 -64 448 749
L 448 2675
L 109 2675
Q 83 2694 83 2720
Q 83 2771 192 2842
Q 435 2982 813 3526
Q 826 3546 874 3606
Q 922 3667 941 3706
Q 986 3706 986 3622
L 986 2880
L 1632 2880
L 1632 2675
L 986 2675
L 986 845
Q 986 538 1062 403
Q 1139 269 1318 269
Q 1510 269 1702 493
z
" transform="scale(0.015625)"/>
<path id="STIXGeneral-Regular-69" d="M 1152 4045
Q 1152 3904 1056 3811
Q 960 3718 819 3718
Q 685 3718 592 3811
Q 499 3904 499 4045
Q 499 4179 595 4275
Q 691 4371 826 4371
Q 966 4371 1059 4275
Q 1152 4179 1152 4045
z
M 1619 0
L 102 0
L 102 96
Q 435 115 521 211
Q 608 307 608 666
L 608 2118
Q 608 2342 563 2432
Q 518 2522 397 2522
Q 243 2522 128 2490
L 128 2592
L 1120 2944
L 1146 2918
L 1146 672
Q 1146 314 1226 218
Q 1306 122 1619 96
L 1619 0
z
" transform="scale(0.015625)"/>
<path id="STIXGeneral-Regular-6e" d="M 3104 0
L 1773 0
L 1779 96
Q 2016 115 2096 233
Q 2176 352 2176 672
L 2176 1946
Q 2176 2592 1709 2592
Q 1549 2592 1408 2515
Q 1267 2438 1050 2227
L 1050 461
Q 1050 269 1136 192
Q 1222 115 1466 96
L 1466 0
L 115 0
L 115 96
Q 358 115 435 214
Q 512 314 512 602
L 512 2157
Q 512 2394 467 2483
Q 422 2573 288 2573
Q 160 2573 102 2547
L 102 2656
Q 550 2784 979 2944
L 1030 2925
L 1030 2426
L 1037 2426
Q 1491 2944 1958 2944
Q 2323 2944 2518 2688
Q 2714 2432 2714 1958
L 2714 544
Q 2714 288 2790 205
Q 2867 122 3104 96
L 3104 0
z
" transform="scale(0.015625)"/>
<path id="STIXGeneral-Regular-67" d="M 3008 2483
L 2477 2483
Q 2598 2208 2598 1946
Q 2598 1453 2265 1203
Q 1933 954 1600 954
Q 1530 954 1357 973
L 1235 986
Q 1107 947 979 812
Q 851 678 851 582
Q 851 435 1350 410
L 2176 371
Q 2528 358 2739 172
Q 2950 -13 2950 -314
Q 2950 -685 2566 -986
Q 2035 -1395 1286 -1395
Q 826 -1395 502 -1212
Q 179 -1030 179 -774
Q 179 -595 320 -419
Q 461 -243 806 6
Q 602 102 534 172
Q 467 243 467 346
Q 467 531 762 787
Q 909 915 1037 1043
Q 717 1203 579 1401
Q 442 1600 442 1901
Q 442 2336 752 2640
Q 1062 2944 1510 2944
Q 1766 2944 2022 2848
L 2163 2797
Q 2349 2733 2515 2733
L 3008 2733
L 3008 2483
z
M 973 2163
L 973 2144
Q 973 1683 1155 1398
Q 1338 1114 1632 1114
Q 1850 1114 1978 1270
Q 2106 1427 2106 1690
Q 2106 2112 1914 2464
Q 1754 2765 1446 2765
Q 1222 2765 1097 2605
Q 973 2445 973 2163
z
M 2771 -410
Q 2771 -230 2595 -163
Q 2419 -96 1978 -96
Q 1344 -96 941 -13
Q 749 -243 688 -348
Q 627 -454 627 -563
Q 627 -774 880 -902
Q 1133 -1030 1555 -1030
Q 2099 -1030 2435 -860
Q 2771 -691 2771 -410
z
" transform="scale(0.015625)"/>
<path id="STIXGeneral-Regular-20" transform="scale(0.015625)"/>
<path id="STIXGeneral-Regular-6d" d="M 4960 0
L 3565 0
L 3565 96
Q 3834 122 3907 208
Q 3981 294 3981 576
L 3981 1894
Q 3981 2278 3869 2444
Q 3757 2611 3488 2611
Q 3264 2611 3107 2521
Q 2950 2432 2803 2221
L 2803 608
Q 2803 301 2896 201
Q 2989 102 3264 96
L 3264 0
L 1830 0
L 1830 96
Q 2112 115 2189 188
Q 2266 262 2266 550
L 2266 1901
Q 2266 2611 1850 2611
Q 1670 2611 1468 2531
Q 1267 2451 1171 2336
Q 1088 2240 1088 2227
L 1088 448
Q 1088 243 1177 176
Q 1267 109 1523 96
L 1523 0
L 102 0
L 102 96
Q 371 102 460 195
Q 550 288 550 563
L 550 2150
Q 550 2387 499 2480
Q 448 2573 326 2573
Q 230 2573 122 2547
L 122 2656
Q 557 2778 1011 2944
L 1062 2925
L 1062 2451
L 1075 2451
Q 1363 2752 1584 2848
Q 1805 2944 2054 2944
Q 2560 2944 2733 2406
Q 3232 2944 3776 2944
Q 4518 2944 4518 1792
L 4518 493
Q 4518 282 4582 202
Q 4646 122 4794 109
L 4960 96
L 4960 0
z
" transform="scale(0.015625)"/>
<path id="STIXGeneral-Regular-28" d="M 1946 -1030
L 1869 -1133
Q 1126 -710 716 32
Q 307 774 307 1613
Q 307 3386 1888 4326
L 1946 4224
Q 1293 3667 1075 3126
Q 858 2586 858 1632
Q 858 685 1082 96
Q 1306 -493 1946 -1030
z
" transform="scale(0.015625)"/>
<path id="STIXGeneral-Regular-73" d="M 998 1926
L 1664 1523
Q 1984 1331 2105 1164
Q 2227 998 2227 736
Q 2227 416 1961 176
Q 1696 -64 1331 -64
Q 1030 -64 864 -6
Q 691 51 570 51
Q 461 51 416 -26
L 333 -26
L 333 979
L 435 979
Q 538 512 730 294
Q 922 77 1248 77
Q 1485 77 1632 211
Q 1779 346 1779 550
Q 1779 845 1440 1030
L 1094 1222
Q 326 1651 326 2150
Q 326 2522 566 2730
Q 806 2938 1210 2938
Q 1491 2938 1638 2867
Q 1754 2816 1818 2816
Q 1862 2816 1920 2880
L 1990 2880
L 2022 2010
L 1926 2010
Q 1818 2445 1654 2621
Q 1491 2797 1203 2797
Q 986 2797 854 2688
Q 723 2579 723 2362
Q 723 2253 796 2128
Q 870 2003 998 1926
z
" transform="scale(0.015625)"/>
<path id="STIXGeneral-Regular-29" d="M 186 4224
L 262 4326
Q 992 3891 1408 3148
Q 1824 2406 1824 1581
Q 1824 -166 243 -1133
L 186 -1030
Q 845 -486 1059 54
Q 1274 595 1274 1562
Q 1274 2534 1059 3120
Q 845 3706 186 4224
z
" transform="scale(0.015625)"/>
</defs>
<use xlink:href="#STIXGeneral-Regular-48"/>
<use xlink:href="#STIXGeneral-Regular-65" x="72.199982"/>
<use xlink:href="#STIXGeneral-Regular-61" x="116.599976"/>
<use xlink:href="#STIXGeneral-Regular-74" x="160.999969"/>
<use xlink:href="#STIXGeneral-Regular-69" x="188.799957"/>
<use xlink:href="#STIXGeneral-Regular-6e" x="216.599945"/>
<use xlink:href="#STIXGeneral-Regular-67" x="266.59993"/>
<use xlink:href="#STIXGeneral-Regular-20" x="316.599915"/>
<use xlink:href="#STIXGeneral-Regular-74" x="341.599899"/>
<use xlink:href="#STIXGeneral-Regular-69" x="369.399887"/>
<use xlink:href="#STIXGeneral-Regular-6d" x="397.199875"/>
<use xlink:href="#STIXGeneral-Regular-65" x="474.999863"/>
<use xlink:href="#STIXGeneral-Regular-20" x="519.399857"/>
<use xlink:href="#STIXGeneral-Regular-28" x="544.399841"/>
<use xlink:href="#STIXGeneral-Regular-6d" x="577.699829"/>
<use xlink:href="#STIXGeneral-Regular-73" x="655.499817"/>
<use xlink:href="#STIXGeneral-Regular-29" x="694.399811"/>
</g>
</g>
</g>
<g id="matplotlib.axis_2">
<g id="ytick_1">
<g id="line2d_17">
<path d="M 50.190625 230.50226
L 421.2 230.50226
" clip-path="url(#p360dd42aee)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
</g>
<g id="line2d_18">
<defs>
<path id="md62f64acd0" d="M 0 0
L -3.5 0
" style="stroke: #000000; stroke-width: 0.8"/>
</defs>
<g>
<use xlink:href="#md62f64acd0" x="50.190625" y="230.50226" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_10">
<!-- 0 -->
<g transform="translate(35.690625 235.624526)scale(0.15 -0.15)">
<use xlink:href="#STIXGeneral-Regular-30"/>
</g>
</g>
</g>
<g id="ytick_2">
<g id="line2d_19">
<path d="M 50.190625 166.623979
L 421.2 166.623979
" clip-path="url(#p360dd42aee)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
</g>
<g id="line2d_20">
<g>
<use xlink:href="#md62f64acd0" x="50.190625" y="166.623979" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_11">
<!-- 5 -->
<g transform="translate(35.690625 171.746245)scale(0.15 -0.15)">
<use xlink:href="#STIXGeneral-Regular-35"/>
</g>
</g>
</g>
<g id="ytick_3">
<g id="line2d_21">
<path d="M 50.190625 102.745699
L 421.2 102.745699
" clip-path="url(#p360dd42aee)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
</g>
<g id="line2d_22">
<g>
<use xlink:href="#md62f64acd0" x="50.190625" y="102.745699" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_12">
<!-- 10 -->
<g transform="translate(28.190625 107.867965)scale(0.15 -0.15)">
<use xlink:href="#STIXGeneral-Regular-31"/>
<use xlink:href="#STIXGeneral-Regular-30" x="49.999985"/>
</g>
</g>
</g>
<g id="ytick_4">
<g id="line2d_23">
<path d="M 50.190625 38.867418
L 421.2 38.867418
" clip-path="url(#p360dd42aee)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
</g>
<g id="line2d_24">
<g>
<use xlink:href="#md62f64acd0" x="50.190625" y="38.867418" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_13">
<!-- 15 -->
<g transform="translate(28.190625 43.989684)scale(0.15 -0.15)">
<use xlink:href="#STIXGeneral-Regular-31"/>
<use xlink:href="#STIXGeneral-Regular-35" x="49.999985"/>
</g>
</g>
</g>
<g id="text_14">
<!-- Temperature (mK) -->
<g transform="translate(20.935156 189.742187)rotate(-90)scale(0.15 -0.15)">
<defs>
<path id="STIXGeneral-Regular-54" d="M 3795 3149
L 3642 3149
Q 3539 3674 3353 3821
Q 3168 3968 2656 3968
L 2278 3968
L 2278 710
Q 2278 346 2387 243
Q 2496 141 2893 122
L 2893 0
L 1024 0
L 1024 122
Q 1427 147 1526 256
Q 1626 365 1626 787
L 1626 3968
L 1242 3968
Q 723 3968 540 3817
Q 358 3667 262 3149
L 109 3149
L 154 4237
L 3750 4237
L 3795 3149
z
" transform="scale(0.015625)"/>
<path id="STIXGeneral-Regular-70" d="M 1018 2931
L 1018 2438
Q 1421 2944 1939 2944
Q 2406 2944 2707 2560
Q 3008 2176 3008 1581
Q 3008 883 2621 409
Q 2234 -64 1664 -64
Q 1466 -64 1328 -6
Q 1190 51 1018 211
L 1018 -794
Q 1018 -1094 1120 -1180
Q 1222 -1267 1581 -1274
L 1581 -1389
L 32 -1389
L 32 -1280
Q 314 -1254 397 -1171
Q 480 -1088 480 -838
L 480 2157
Q 480 2381 429 2451
Q 378 2522 218 2522
Q 115 2522 58 2515
L 58 2618
Q 506 2752 979 2944
L 1018 2931
z
M 1018 2138
L 1018 563
Q 1018 422 1238 281
Q 1459 141 1683 141
Q 2029 141 2243 467
Q 2458 794 2458 1325
Q 2458 1888 2243 2224
Q 2029 2560 1670 2560
Q 1446 2560 1232 2419
Q 1018 2278 1018 2138
z
" transform="scale(0.015625)"/>
<path id="STIXGeneral-Regular-72" d="M 1024 2931
L 1024 2342
Q 1267 2688 1430 2816
Q 1594 2944 1792 2944
Q 1958 2944 2051 2854
Q 2144 2765 2144 2605
Q 2144 2470 2077 2393
Q 2010 2317 1894 2317
Q 1773 2317 1638 2445
Q 1536 2541 1472 2541
Q 1338 2541 1181 2355
Q 1024 2170 1024 2016
L 1024 576
Q 1024 301 1133 205
Q 1242 109 1568 96
L 1568 0
L 32 0
L 32 96
Q 339 154 412 224
Q 486 294 486 538
L 486 2138
Q 486 2349 438 2435
Q 390 2522 269 2522
Q 166 2522 45 2496
L 45 2598
Q 448 2726 992 2944
L 1024 2931
z
" transform="scale(0.015625)"/>
<path id="STIXGeneral-Regular-75" d="M 3072 320
L 3072 230
Q 2573 96 2195 -58
L 2163 -38
L 2163 486
L 2150 486
Q 1747 -64 1235 -64
Q 870 -64 662 160
Q 454 384 454 755
L 454 2362
Q 454 2598 371 2688
Q 288 2778 58 2790
L 58 2880
L 992 2880
L 992 813
Q 992 595 1123 451
Q 1254 307 1446 307
Q 1760 307 1984 506
Q 2067 582 2099 649
Q 2131 717 2131 877
L 2131 2355
Q 2131 2605 2041 2678
Q 1952 2752 1658 2771
L 1658 2880
L 2669 2880
L 2669 685
Q 2669 461 2742 390
Q 2816 320 3034 320
L 3072 320
z
" transform="scale(0.015625)"/>
<path id="STIXGeneral-Regular-4b" d="M 4627 0
L 2688 0
L 2688 122
L 2861 128
Q 3130 134 3130 282
Q 3130 397 2922 643
Q 2714 890 2253 1370
L 1613 2029
L 1446 1894
L 1446 710
Q 1446 352 1548 253
Q 1651 154 2016 122
L 2016 0
L 211 0
L 211 122
Q 589 141 691 262
Q 794 384 794 800
L 794 3514
Q 794 3872 691 3981
Q 589 4090 218 4115
L 218 4237
L 2022 4237
L 2022 4115
Q 1632 4090 1539 3987
Q 1446 3885 1446 3507
L 1446 2227
L 2586 3277
Q 2861 3533 2973 3667
Q 3085 3802 3085 3910
Q 3085 4013 3030 4057
Q 2976 4102 2822 4109
L 2662 4115
L 2662 4237
L 4320 4237
L 4320 4115
Q 3994 4090 3824 4003
Q 3654 3917 3322 3597
L 2131 2458
L 3629 819
Q 4026 384 4214 253
Q 4403 122 4627 122
L 4627 0
z
" transform="scale(0.015625)"/>
</defs>
<use xlink:href="#STIXGeneral-Regular-54"/>
<use xlink:href="#STIXGeneral-Regular-65" x="61.099991"/>
<use xlink:href="#STIXGeneral-Regular-6d" x="105.499985"/>
<use xlink:href="#STIXGeneral-Regular-70" x="183.299973"/>
<use xlink:href="#STIXGeneral-Regular-65" x="233.299957"/>
<use xlink:href="#STIXGeneral-Regular-72" x="277.699951"/>
<use xlink:href="#STIXGeneral-Regular-61" x="310.999939"/>
<use xlink:href="#STIXGeneral-Regular-74" x="355.399933"/>
<use xlink:href="#STIXGeneral-Regular-75" x="383.199921"/>
<use xlink:href="#STIXGeneral-Regular-72" x="433.199905"/>
<use xlink:href="#STIXGeneral-Regular-65" x="466.499893"/>
<use xlink:href="#STIXGeneral-Regular-20" x="510.899887"/>
<use xlink:href="#STIXGeneral-Regular-28" x="535.899872"/>
<use xlink:href="#STIXGeneral-Regular-6d" x="569.19986"/>
<use xlink:href="#STIXGeneral-Regular-4b" x="646.999847"/>
<use xlink:href="#STIXGeneral-Regular-29" x="719.199829"/>
</g>
</g>
</g>
<g id="LineCollection_1">
<path d="M 67.054688 218.930523
L 67.054688 216.592725
" clip-path="url(#p360dd42aee)" style="fill: none; stroke: #000000; stroke-width: 1.5"/>
<path d="M 109.214844 207.604196
L 109.214844 202.807197
" clip-path="url(#p360dd42aee)" style="fill: none; stroke: #000000; stroke-width: 1.5"/>
<path d="M 151.375 203.547566
L 151.375 198.271906
" clip-path="url(#p360dd42aee)" style="fill: none; stroke: #000000; stroke-width: 1.5"/>
<path d="M 193.535156 187.30716
L 193.535156 178.781642
" clip-path="url(#p360dd42aee)" style="fill: none; stroke: #000000; stroke-width: 1.5"/>
<path d="M 235.695312 159.215753
L 235.695312 140.635918
" clip-path="url(#p360dd42aee)" style="fill: none; stroke: #000000; stroke-width: 1.5"/>
<path d="M 277.855469 154.560562
L 277.855469 133.473405
" clip-path="url(#p360dd42aee)" style="fill: none; stroke: #000000; stroke-width: 1.5"/>
<path d="M 320.015625 123.497704
L 320.015625 88.563794
" clip-path="url(#p360dd42aee)" style="fill: none; stroke: #000000; stroke-width: 1.5"/>
<path d="M 362.175781 117.580718
L 362.175781 79.483266
" clip-path="url(#p360dd42aee)" style="fill: none; stroke: #000000; stroke-width: 1.5"/>
<path d="M 404.335938 90.863592
L 404.335938 36.837358
" clip-path="url(#p360dd42aee)" style="fill: none; stroke: #000000; stroke-width: 1.5"/>
</g>
<g id="line2d_25">
<defs>
<path id="m4a69a88263" d="M 2 0
L -2 -0
" style="stroke: #000000"/>
</defs>
<g clip-path="url(#p360dd42aee)">
<use xlink:href="#m4a69a88263" x="67.054688" y="218.930523" style="stroke: #000000"/>
<use xlink:href="#m4a69a88263" x="109.214844" y="207.604196" style="stroke: #000000"/>
<use xlink:href="#m4a69a88263" x="151.375" y="203.547566" style="stroke: #000000"/>
<use xlink:href="#m4a69a88263" x="193.535156" y="187.30716" style="stroke: #000000"/>
<use xlink:href="#m4a69a88263" x="235.695312" y="159.215753" style="stroke: #000000"/>
<use xlink:href="#m4a69a88263" x="277.855469" y="154.560562" style="stroke: #000000"/>
<use xlink:href="#m4a69a88263" x="320.015625" y="123.497704" style="stroke: #000000"/>
<use xlink:href="#m4a69a88263" x="362.175781" y="117.580718" style="stroke: #000000"/>
<use xlink:href="#m4a69a88263" x="404.335938" y="90.863592" style="stroke: #000000"/>
</g>
</g>
<g id="line2d_26">
<g clip-path="url(#p360dd42aee)">
<use xlink:href="#m4a69a88263" x="67.054688" y="216.592725" style="stroke: #000000"/>
<use xlink:href="#m4a69a88263" x="109.214844" y="202.807197" style="stroke: #000000"/>
<use xlink:href="#m4a69a88263" x="151.375" y="198.271906" style="stroke: #000000"/>
<use xlink:href="#m4a69a88263" x="193.535156" y="178.781642" style="stroke: #000000"/>
<use xlink:href="#m4a69a88263" x="235.695312" y="140.635918" style="stroke: #000000"/>
<use xlink:href="#m4a69a88263" x="277.855469" y="133.473405" style="stroke: #000000"/>
<use xlink:href="#m4a69a88263" x="320.015625" y="88.563794" style="stroke: #000000"/>
<use xlink:href="#m4a69a88263" x="362.175781" y="79.483266" style="stroke: #000000"/>
<use xlink:href="#m4a69a88263" x="404.335938" y="36.837358" style="stroke: #000000"/>
</g>
</g>
<g id="line2d_27">
<path d="M 67.054688 229.772017
L 109.214844 210.364499
L 151.375 190.95698
L 193.535156 171.549462
L 235.695312 152.141944
L 277.855469 132.734425
L 320.015625 113.326907
L 362.175781 93.919388
L 404.335938 74.51187
" clip-path="url(#p360dd42aee)" style="fill: none; stroke: #ff0000; stroke-width: 1.5; stroke-linecap: square"/>
</g>
<g id="line2d_28">
<defs>
<path id="mfc4d9b0610" d="M 0 3.5
C 0.928211 3.5 1.81853 3.131218 2.474874 2.474874
C 3.131218 1.81853 3.5 0.928211 3.5 0
C 3.5 -0.928211 3.131218 -1.81853 2.474874 -2.474874
C 1.81853 -3.131218 0.928211 -3.5 0 -3.5
C -0.928211 -3.5 -1.81853 -3.131218 -2.474874 -2.474874
C -3.131218 -1.81853 -3.5 -0.928211 -3.5 0
C -3.5 0.928211 -3.131218 1.81853 -2.474874 2.474874
C -1.81853 3.131218 -0.928211 3.5 0 3.5
z
" style="stroke: #000000"/>
</defs>
<g clip-path="url(#p360dd42aee)">
<use xlink:href="#mfc4d9b0610" x="67.054688" y="217.761624" style="stroke: #000000"/>
<use xlink:href="#mfc4d9b0610" x="109.214844" y="205.205697" style="stroke: #000000"/>
<use xlink:href="#mfc4d9b0610" x="151.375" y="200.909736" style="stroke: #000000"/>
<use xlink:href="#mfc4d9b0610" x="193.535156" y="183.044401" style="stroke: #000000"/>
<use xlink:href="#mfc4d9b0610" x="235.695312" y="149.925835" style="stroke: #000000"/>
<use xlink:href="#mfc4d9b0610" x="277.855469" y="144.016984" style="stroke: #000000"/>
<use xlink:href="#mfc4d9b0610" x="320.015625" y="106.030749" style="stroke: #000000"/>
<use xlink:href="#mfc4d9b0610" x="362.175781" y="98.531992" style="stroke: #000000"/>
<use xlink:href="#mfc4d9b0610" x="404.335938" y="63.850475" style="stroke: #000000"/>
</g>
</g>
<g id="patch_3">
<path d="M 50.190625 239.41875
L 50.190625 27.190625
" style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/>
</g>
<g id="patch_4">
<path d="M 421.2 239.41875
L 421.2 27.190625
" style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/>
</g>
<g id="patch_5">
<path d="M 50.190625 239.41875
L 421.2 239.41875
" style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/>
</g>
<g id="patch_6">
<path d="M 50.190625 27.190625
L 421.2 27.190625
" style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/>
</g>
<g id="text_15">
<!-- Heating rate: (0.35 +- 0.02) mK/ms -->
<g transform="translate(128.280078 21.190625)scale(0.15 -0.15)">
<defs>
<path id="STIXGeneral-Regular-3a" d="M 1123 2832
Q 1229 2726 1229 2579
Q 1229 2432 1126 2329
Q 1024 2227 877 2227
Q 730 2227 624 2332
Q 518 2438 518 2579
Q 518 2733 620 2835
Q 723 2938 877 2938
Q 1018 2938 1123 2832
z
M 1229 282
Q 1229 141 1126 35
Q 1024 -70 877 -70
Q 730 -70 624 35
Q 518 141 518 282
Q 518 435 620 537
Q 723 640 877 640
Q 1018 640 1123 534
Q 1229 429 1229 282
z
" transform="scale(0.015625)"/>
<path id="STIXGeneral-Regular-2e" d="M 1158 275
Q 1158 134 1052 32
Q 947 -70 800 -70
Q 653 -70 550 32
Q 448 134 448 281
Q 448 429 553 534
Q 659 640 806 640
Q 947 640 1052 531
Q 1158 422 1158 275
z
" transform="scale(0.015625)"/>
<path id="STIXGeneral-Regular-2b" d="M 4070 1408
L 2400 1408
L 2400 -262
L 1978 -262
L 1978 1408
L 307 1408
L 307 1830
L 1978 1830
L 1978 3501
L 2400 3501
L 2400 1830
L 4070 1830
L 4070 1408
z
" transform="scale(0.015625)"/>
<path id="STIXGeneral-Regular-2d" d="M 1824 1242
L 250 1242
L 250 1645
L 1824 1645
L 1824 1242
z
" transform="scale(0.015625)"/>
<path id="STIXGeneral-Regular-2f" d="M 1837 4326
L 378 -90
L -58 -90
L 1408 4326
L 1837 4326
z
" transform="scale(0.015625)"/>
</defs>
<use xlink:href="#STIXGeneral-Regular-48"/>
<use xlink:href="#STIXGeneral-Regular-65" x="72.199982"/>
<use xlink:href="#STIXGeneral-Regular-61" x="116.599976"/>
<use xlink:href="#STIXGeneral-Regular-74" x="160.999969"/>
<use xlink:href="#STIXGeneral-Regular-69" x="188.799957"/>
<use xlink:href="#STIXGeneral-Regular-6e" x="216.599945"/>
<use xlink:href="#STIXGeneral-Regular-67" x="266.59993"/>
<use xlink:href="#STIXGeneral-Regular-20" x="316.599915"/>
<use xlink:href="#STIXGeneral-Regular-72" x="341.599899"/>
<use xlink:href="#STIXGeneral-Regular-61" x="374.899887"/>
<use xlink:href="#STIXGeneral-Regular-74" x="419.299881"/>
<use xlink:href="#STIXGeneral-Regular-65" x="447.099869"/>
<use xlink:href="#STIXGeneral-Regular-3a" x="491.499863"/>
<use xlink:href="#STIXGeneral-Regular-20" x="519.29985"/>
<use xlink:href="#STIXGeneral-Regular-28" x="544.299835"/>
<use xlink:href="#STIXGeneral-Regular-30" x="577.599823"/>
<use xlink:href="#STIXGeneral-Regular-2e" x="627.599808"/>
<use xlink:href="#STIXGeneral-Regular-33" x="652.599792"/>
<use xlink:href="#STIXGeneral-Regular-35" x="702.599777"/>
<use xlink:href="#STIXGeneral-Regular-20" x="752.599762"/>
<use xlink:href="#STIXGeneral-Regular-2b" x="777.599747"/>
<use xlink:href="#STIXGeneral-Regular-2d" x="846.099731"/>
<use xlink:href="#STIXGeneral-Regular-20" x="879.399719"/>
<use xlink:href="#STIXGeneral-Regular-30" x="904.399704"/>
<use xlink:href="#STIXGeneral-Regular-2e" x="954.399689"/>
<use xlink:href="#STIXGeneral-Regular-30" x="979.399673"/>
<use xlink:href="#STIXGeneral-Regular-32" x="1029.399658"/>
<use xlink:href="#STIXGeneral-Regular-29" x="1079.399643"/>
<use xlink:href="#STIXGeneral-Regular-20" x="1112.699631"/>
<use xlink:href="#STIXGeneral-Regular-6d" x="1137.699615"/>
<use xlink:href="#STIXGeneral-Regular-4b" x="1215.499603"/>
<use xlink:href="#STIXGeneral-Regular-2f" x="1287.699585"/>
<use xlink:href="#STIXGeneral-Regular-6d" x="1315.499573"/>
<use xlink:href="#STIXGeneral-Regular-73" x="1393.299561"/>
</g>
</g>
</g>
</g>
<defs>
<clipPath id="p360dd42aee">
<rect x="50.190625" y="27.190625" width="371.009375" height="212.228125"/>
</clipPath>
</defs>
</svg>
import h5py
import matplotlib.pyplot as plt
import numpy as np
import sys
import re
import ast
from scipy.optimize import curve_fit
import os
from scipy import interpolate
#Mediciones barriendo angulo del TISA y viendo kicking de resonancias oscuras
#C:\Users\Usuario\Documents\artiq\artiq_experiments\analisis\plots\20220106_CPT_DosLaseres_v08_TISA_DR\Data
os.chdir('/home/nico/Documents/artiq_experiments/analisis/plots/20230421_CPTconmicromocion/Data/')
CPT_FILES = """000011071-IR_Scan_withcal_optimized
000011072-IR_Scan_withcal_optimized
000011073-IR_Scan_withcal_optimized
"""
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'
print(fname)
print(list(data['datasets'].keys()))
print(SeeKeys(CPT_FILES))
#carpeta pc nico labo escritorio:
#C:\Users\Usuario\Documents\artiq\artiq_experiments\analisis\plots\20211101_CPT_DosLaseres_v03\Data
Counts = []
Freqs = []
AmpTisa = []
UVCPTAmp = []
No_measures = []
for i, fname in enumerate(CPT_FILES.split()):
print(str(i) + ' - ' + fname)
#print(fname)
data = h5py.File(fname+'.h5', 'r') # Leo el h5: Recordar que nuestros datos estan en 'datasets'
# Aca hago algo repugnante para poder levantar los strings que dejamos
# que además tenian un error de tipeo al final. Esto no deberá ser necesario
# cuando se solucione el error este del guardado.
Freqs.append(np.array(data['datasets']['IR1_Frequencies']))
Counts.append(np.array(data['datasets']['counts_spectrum']))
#AmpTisa.append(np.array(data['datasets']['TISA_CPT_amp']))
UVCPTAmp.append(np.array(data['datasets']['UV_CPT_amp']))
No_measures.append(np.array(data['datasets']['no_measures']))
#%%
"""
Ploteo la cpt de referencia / plotting the reference CPT
"""
jvec = [0]
plt.figure()
i = 0
for j in jvec:
plt.errorbar([2*f*1e-6 for f in Freqs[j]], Counts[j], yerr=np.sqrt(Counts[j]), fmt='o', capsize=2, markersize=2)
i = i + 1
plt.xlabel('Frecuencia (MHz)')
plt.ylabel('counts')
plt.grid()
plt.legend()
#%%
"""
Intento mergear 0 1 y 2
"""
jvec = [0]
#f1 = 8.8
#f2 = 17.5
f1 = 8
f2 = 18
Freqs0 = Freqs[0]
Freqs1 = [f+f1*1e6 for f in Freqs[1]]
Freqs2 = [f+f2*1e6 for f in Freqs[2]]
plt.figure()
plt.errorbar([2*f*1e-6 for f in Freqs0], Counts[0], yerr=np.sqrt(Counts[0]), fmt='o', capsize=2, markersize=2)
plt.errorbar([2*f*1e-6 for f in Freqs1], Counts[1], yerr=np.sqrt(Counts[1]), fmt='o', capsize=2, markersize=2)
plt.errorbar([2*f*1e-6 for f in Freqs2], Counts[2], yerr=np.sqrt(Counts[2]), fmt='o', capsize=2, markersize=2)
plt.xlabel('Frecuencia (MHz)')
plt.ylabel('counts')
plt.grid()
plt.legend()
Freqs_merged = list(Freqs0) + Freqs1[125:] + Freqs2[126:]
Counts_merged = list(Counts[0]) + list(Counts[1][125:]) + list(Counts[2][126:])
plt.figure()
plt.errorbar([2*f*1e-6 for f in Freqs_merged], Counts_merged, yerr=np.sqrt(np.array(Counts_merged)), fmt='o', capsize=2, markersize=2)
#%%
#from EITfit.MM_eightLevel_2repumps_AnalysisFunctions import PerformExperiment_8levels_MM, GenerateNoisyCPT_MM_fit
from scipy.optimize import curve_fit
"""
Ajusto un cpt para obtener todos los parámetros relevantes primero.
I fit a cpt curve to retrieve all the relevant parameters first.
"""
phidoppler, titadoppler = 0, 90
phirepump, titarepump = 0, 0
phiprobe = 0
titaprobe = 90
gPS, gPD, = 2*np.pi*21.58e6, 2*np.pi*1.35e6
alpha = 0
noiseamplitude = 0
T = 0.6e-3
sg = 0.544
sp = 4.5
sr = 0
DetRepump = 0
lw = 0.1
DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth = lw, lw, lw #ancho de linea de los laseres
u = 33.5e6
beta = 0
drivefreq = 22.135e6
correccion = 12
offsetxpi = 458+correccion
DetDoppler = -2.5 -correccion
FreqsDRpi = [2*f*1e-6-offsetxpi+14 for f in Freqs_merged]
CountsDRpi = Counts_merged
freqslongpi = np.arange(min(FreqsDRpi), max(FreqsDRpi)+FreqsDRpi[1]-FreqsDRpi[0], 0.1*(FreqsDRpi[1]-FreqsDRpi[0]))
#[1.71811842e+04 3.34325038e-17]
def FitEITpi(freqs, SG, SP, BETA, scale, offset):
temp = 1e-3
MeasuredFreq, MeasuredFluo = GenerateNoisyCPT_MM_fit(SG, SP, gPS, gPD, DetDoppler, u, DopplerLaserLinewidth, ProbeLaserLinewidth, temp, alpha, phidoppler, titadoppler, phiprobe, titaprobe, BETA, drivefreq, freqs, plot=False, solvemode=1, detpvec=None, noiseamplitude=noiseamplitude)
#scale = 0.3*2e+04
#offset = 0.3*2e+03
FinalFluo = [f*scale + offset for f in MeasuredFluo]
return FinalFluo
popt_fullcpt, pcov_fullcpt = curve_fit(FitEITpi, FreqsDRpi, CountsDRpi, p0=[0.5, 4.5, 1, 1e4, 1e3], bounds=((0, 0, 0, 1e1, 0), (2, 10, 1000, 1e5, 1e5)))
#print(f'Temperatura: ({round(1e3*popt_fullcpt[-1],2)} +- {round(1e3*np.sqrt(pcov_fullcpt[-1][-1]),2)}) mK')
print(popt_fullcpt)
FittedEITpi = FitEITpi(freqslongpi, popt_fullcpt[0], popt_fullcpt[1], 20, popt_fullcpt[3],popt_fullcpt[4])
#FittedEITpi = FitEITpi(freqslongpi, *popt_fullcpt)
"""
Ploteo la CPT de referencia junto al ajuste y a la resonancia oscura de interes
I plot the reference CPT along with the fit to the model and the dark resonance of interest
"""
#%%
#i_DR = 955
DRs = [-31, -22, -16.5, -8]
plt.figure()
plt.errorbar(FreqsDRpi, CountsDRpi, yerr=2*np.sqrt(CountsDRpi), fmt='o', capsize=2, markersize=2)
plt.plot(freqslongpi[:-1], FittedEITpi)
for dr in DRs:
dr = dr+4.7
plt.axvline(dr, color='red',alpha=0.2)
plt.axvline(dr+22.1, color='green',alpha=0.2)
plt.axvline(dr-22.1, color='black',alpha=0.2)
#plt.axvline(DetDoppler-22.1)
#plt.axvline(DetDoppler+22.1)
#plt.plot(freqslongpi[i_DR], FittedEITpi[i_DR],'o', color='red', markersize=12)
plt.xlabel('Detuning (MHz)')
plt.ylabel('Counts')
#plt.title(f'Sdop: {round(popt[0], 2)}, Spr: {round(popt[1], 2)}, T: {round(popt[2]*1e3, 2)} mK, detDop: {DetDoppler} MHz')
#%%
"""
Simulo CPTs con todos esos parámetros para distintas temperaturas
I simulate CPT curves with all the previous parameters but with varying temperatures
"""
TempVecTeorico = list(np.arange(0.3,1,0.1))+list(np.arange(1, 31, 1))
CurvasTeoricas = []
for tempi in TempVecTeorico:
CurvasTeoricas.append(FitEITpi(freqslongpi, *popt_fullcpt[:-1], tempi*1e-3))
#%%
"""
Acá agarro la primera y busco el valor i_DR que corresponde a la resonancia oscura de interés
With the first one, I look for the value i_DR which corresponds to the dark resonance of interest
"""
curva_ref = CurvasTeoricas[0]
i_DR = 955
plt.figure()
plt.plot(freqslongpi, curva_ref)
plt.plot(freqslongpi[i_DR], curva_ref[i_DR],'o')
#%%
"""
ploteo algunos CPTs teoricos para algunas temperaturas
Plotting some theory cpt curves for some temperatures
"""
plt.plot(freqslongpi, CurvasTeoricas[0])
plt.plot(freqslongpi[i_DR], CurvasTeoricas[0][i_DR],'o',markersize=10)
plt.plot(freqslongpi, CurvasTeoricas[10])
plt.plot(freqslongpi[i_DR], CurvasTeoricas[10][i_DR],'o',markersize=10)
plt.plot(freqslongpi, CurvasTeoricas[20])
plt.plot(freqslongpi[i_DR], CurvasTeoricas[20][i_DR],'o',markersize=10)
plt.xlabel('Detuning (MHz)')
plt.ylabel('Fluorescence')
plt.grid()
#%%
"""
Ahora interpolo los valores teóricos de las profundidades de esas resonancias
y aplico la interpolación a las mediciones para obtener temperaturas.
Luego, grafico las temperaturas en función de los tiempos de calentamiento.
Now I interpolate the theoretical values of the depths of those resonances
and apply the interpolation to the measurements to obtain temperatures.
After that, I plot the temperatures with respect to the heating times
"""
from scipy.interpolate import interp1d
FluosDRTeo = [CurvasTeoricas[k][i_DR] for k in range(len(CurvasTeoricas))]
interpolado = interp1d(FluosDRTeo, TempVecTeorico) #creo funcion que interpola
meas = 0
maxi = 9 #valor maximo, dsp el ion se calento
Heating_tim = Times[meas][:maxi]
Heating_tim_ms = [t*1e3 for t in Heating_tim]
Heating_med = [2*c for c in Counts_heating[meas][:maxi]]
ErrorHeating_med = [2*np.sqrt(c) for c in Counts_heating[meas][:maxi]]
Temperaturas_interpoladas = [float(interpolado(h)) for h in Heating_med]
Error_Temperaturas_interpoladas = [float(interpolado(Heating_med[k]+0.5*ErrorHeating_med[k]))-Temperaturas_interpoladas[k] for k in range(len(Heating_med))]
plt.figure()
plt.plot(FluosDRTeo, [1*t for t in TempVecTeorico], 'o', color='orange')
plt.plot(np.linspace(FluosDRTeo[0],FluosDRTeo[-1],1000), interpolado(np.linspace(FluosDRTeo[0],FluosDRTeo[-1],1000)))
plt.xlabel('Cuentas de DR teoricas')
plt.ylabel('Temperatura (mK)')
plt.figure()
#plt.plot(Heating_med, Heating_tim, 'o', color='blue')
plt.errorbar([t*1e3 for t in Heating_tim], Heating_med, yerr=ErrorHeating_med, fmt='o', capsize=2, markersize=5)
plt.ylabel('Cuentas de DR medidas')
plt.xlabel('Heating time (s)')
def lineal(x,a,b):
return a*x+b
#p1,p2 = curve_fit(lineal, Heating_tim_ms, Temperaturas_interpoladas, sigma=Error_Temperaturas_interpoladas)
p1,p2 = curve_fit(lineal, Heating_tim_ms, Temperaturas_interpoladas)
#%%
"""
Grafico finalmente el plot del heating rate de la trampa
Finally I plot the heating rate of the trap
"""
plt.figure()
#plt.plot(Heating_tim_ms,Temperaturas_interpoladas,'o')
plt.errorbar(Heating_tim_ms,Temperaturas_interpoladas, yerr=np.array(Error_Temperaturas_interpoladas), fmt='o', capsize=2, markersize=7, color='black')
plt.plot(Heating_tim_ms, lineal(np.array(Heating_tim_ms), *p1), color='red')
plt.xlabel('Heating time (ms)', fontname='STIXGeneral', fontsize=15)
plt.ylabel('Temperature (mK)', fontname='STIXGeneral', fontsize=15)
plt.grid()
plt.xticks([0, 5, 10, 15, 20 ,25, 30, 35], fontname='STIXGeneral', fontsize=15)
plt.yticks([0, 5, 10, 15], fontname='STIXGeneral', fontsize=15)
plt.title(f'Heating rate: ({round(p1[0],2)} +- {round(np.sqrt(p2[0][0]),2)}) mK/ms', fontname='STIXGeneral', fontsize=15)
plt.tight_layout()
plt.savefig('Fig_heatingrate.svg')
print(f'Heating rate: ({round(p1[0],2)} +- {round(np.sqrt(p2[0][0]),2)}) mK/ms')
#%%
"""
Ahora voy a ver CPT enteras con tiempos de calentamiento distintos.
Now I see whole CPT curves with different heating times
"""
jvec = [3, 4]
plt.figure()
i = 0
for j in jvec:
if j==4:
plt.errorbar([2*f*1e-6 for f in Freqs[j]], Counts[j], yerr=np.sqrt(Counts[j]), fmt='o', capsize=2, markersize=2, label='Without heating')
elif j==3:
plt.errorbar([2*f*1e-6 for f in Freqs[j]], Counts[j], yerr=np.sqrt(Counts[j]), fmt='o', capsize=2, markersize=2, label='5 ms heating')
i = i + 1
plt.xlabel('Frecuencia (MHz)')
plt.ylabel('counts')
plt.ylim(1000,2900)
plt.grid()
plt.legend()
jvec = [1, 2]
plt.figure()
i = 0
for j in jvec:
if j==2:
plt.errorbar([2*f*1e-6 for f in Freqs[j]], Counts[j], yerr=np.sqrt(Counts[j]), fmt='o', capsize=2, markersize=2, label='Without heating')
elif j==1:
plt.errorbar([2*f*1e-6 for f in Freqs[j]], Counts[j], yerr=np.sqrt(Counts[j]), fmt='o', capsize=2, markersize=2, label='1 ms heating')
i = i + 1
plt.xlabel('Frecuencia (MHz)')
plt.ylabel('counts')
plt.ylim(1000,2900)
plt.grid()
plt.legend()
#%%
"""
La siguiente curva probablemente no este bien medida ya que inmediatamente
despues, los laseres se deslockearon. La dejo por las dudas.
This curve is probably not well measured...
"""
jvec = [5, 6]
plt.figure()
i = 0
for j in jvec:
if j==6:
plt.errorbar([2*f*1e-6 for f in Freqs[j]], Counts[j], yerr=np.sqrt(Counts[j]), fmt='o', capsize=2, markersize=2, label='Without heating')
elif j==5:
plt.errorbar([2*f*1e-6 for f in Freqs[j]], Counts[j], yerr=np.sqrt(Counts[j]), fmt='o', capsize=2, markersize=2, label='10 ms heating')
i = i + 1
plt.xlabel('Frecuencia (MHz)')
plt.ylabel('counts')
plt.ylim(1000,3900)
plt.grid()
plt.legend()
plt.title('Ojo: medicion condicionada por derivas')
#%%
"""
Ahora ploteo 6 curvas cpt para distintos valores de potencia del UV
This is a plot of 6 different cpt curves for 6 different UV powers. I should fit them
to obtain saturation parameters
"""
jvec = [7,8,9,10,11,12]
plt.figure()
for j in jvec:
plt.errorbar([2*f*1e-6 for f in Freqs[j]], Counts[j], yerr=np.sqrt(Counts[j]), fmt='o', capsize=2, markersize=2, label='Without heating')
plt.xlabel('Frecuencia (MHz)')
plt.ylabel('counts')
#plt.ylim(1000,2900)
plt.grid()
#plt.legend()
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Jul 2 16:30:09 2020
@author: oem
"""
import os
import numpy as np
import time
import matplotlib.pyplot as plt
from scipy.signal import argrelextrema
from EITfit.MM_eightLevel_2repumps_python_scripts import CPTspectrum8levels_MM
import random
from scipy.signal import savgol_filter as sf
def PerformExperiment_8levels_MM(sg, sp, gPS, gPD, DetDoppler, u, DopplerLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobe, beta, drivefreq, freqMin, freqMax, freqStep, circularityprobe=1, plot=False, solvemode=1, detpvec=None):
"""
solvemode=1: resuelve con np.linalg.solve
solvemode=2: resuelve invirtiendo L con la funcion np.linalg.inv
"""
tinicial = time.time()
ProbeDetuningVectorL, Fluovector = CPTspectrum8levels_MM(sg, sp, gPS, gPD, DetDoppler, u, DopplerLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobe, circularityprobe, beta, drivefreq, freqMin=freqMin, freqMax=freqMax, freqStep=freqStep, plot=False, solvemode=1)
tfinal = time.time()
#print('Done, Total time: ', round((tfinal-tinicial), 2), "s")
return ProbeDetuningVectorL, Fluovector
def GenerateNoisyCPT_MM(sg, sp, gPS, gPD, DetDoppler, u, DopplerLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobeVec, kg, kr, v0, drivefreq, freqMin, freqMax, freqStep, circularityprobe=1, plot=False, solvemode=1, detpvec=None, noiseamplitude=0.001):
Frequencyvector, Fluovector = PerformExperiment_8levels_MM(sg, sp, gPS, gPD, DetDoppler, u, DopplerLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobeVec, kg, kr, v0, drivefreq, freqMin, freqMax, freqStep, circularityprobe, plot=False, solvemode=1, detpvec=None)
NoisyFluovector = [fluo+noiseamplitude*(2*random.random()-1) for fluo in Fluovector]
return Frequencyvector, NoisyFluovector
def GenerateNoisyCPT_MM_fit(sg, sp, gPS, gPD, DetDoppler, u, DopplerLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobeVec, beta, drivefreq, freqs, circularityprobe=1, plot=False, solvemode=1, detpvec=None, noiseamplitude=0.001):
Frequencyvector, Fluovector = PerformExperiment_8levels_MM(sg, sp, gPS, gPD, DetDoppler, u, DopplerLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobeVec, beta, drivefreq, freqs[0], freqs[-1], freqs[1]-freqs[0], circularityprobe, plot=False, solvemode=1, detpvec=None)
NoisyFluovector = [fluo+noiseamplitude*(2*random.random()-1) for fluo in Fluovector]
return Frequencyvector, NoisyFluovector
def SmoothNoisyCPT(Fluo, window=11, poly=3):
SmoothenFluo = sf(Fluo, window, poly)
return SmoothenFluo
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Sep 1 17:58:39 2020
@author: nico
"""
import os
import numpy as np
#os.chdir('/home/oem/Nextcloud/G_liaf/liaf-TrampaAnular/Código General/EIT-CPT/Buenos Aires/Experiment Simulations/CPT scripts/Eight Level 2 repumps')
from MM_eightLevel_2repumps_AnalysisFunctions import PerformExperiment_8levels, GenerateNoisyCPT, SmoothNoisyCPT
import matplotlib.pyplot as plt
import time
#from threeLevel_2repumps_AnalysisFunctions import MeasureRelativeFluorescenceFromCPT, IdentifyPolarizationCoincidences, RetrieveAbsoluteCoincidencesBetweenMaps, GetClosestIndex
import seaborn as sns
#C:\Users\Usuario\Nextcloud\G_liaf\liaf-TrampaAnular\Código General\EIT-CPT\Buenos Aires\Experiment Simulations\CPT scripts\Eight Level 2 repumps
ub = 9.27e-24 #magneton de bohr
h = 6.63e-34 #cte de planck
c = (ub/h)*1e-4 #en unidades de MHz/G
u = 32e6 #proportional to the magnetic field of around 5 G
B = (u/(2*np.pi))/c
gPS, gPD, = 2*np.pi*21.58e6, 2*np.pi*1.35e6 #anchos de linea de las transiciones
lw = 0.1 #linewidth of the lasers, 0.1 MHz are the actual linewidths of both lasers
DopplerLaserLinewidth, ProbeLaserLinewidth = lw, lw #ancho de linea de los laseres
TempVec = [1e-3, 10e-3] #Temperature vector
alpha = 0 #angle between lasers, which is zero
#Polarization angles (we can keep it fixed in 90)
phidoppler, titadoppler = 0, 90
titaprobe = 90
phiprobe = 0
#este es el desfasaje exp(i.phi) de la componente de la polarizacion y respecto a la x. Con 1 la polarizacion es lineal
CircPr = 1 #this has to do with the circularity of the polarizations and since both are linear it is one
#Simulation parameters
center = -10
span = 120
freqMin = center-span*0.5
freqMax = center+span*0.5
freqStep = 2e-1
noiseamplitude = 0 #i dont know what it is
#parametros de saturacion de los laseres. g: doppler. p: probe (un rebombeo que scanea), r: repump (otro rebombeo fijo)
"""
Good case: sg=0.6, sp=9, DetDoppler=-15
"""
DetDoppler = -15 #nice range: -30 to 0
sgvec = [0.8] #nice range: 0.1 to 10 #g is for green but is the doppler
sp = 9 #nice range: 0.1 to 20 #p is for probe but is the repump
drivefreq=2*np.pi*22.135*1e6 #ignore it
#betavec = np.arange(0,1.1,0.1) #ignore it
betavec=[0] #ignore it
alphavec = [0] #ignore it
fig1, ax1 = plt.subplots()
FrequenciesVec = []
FluorescencesVec = []
for sg in sgvec:
for T in TempVec:
for alpha in alphavec:
for beta in betavec:
Frequencies, Fluorescence = PerformExperiment_8levels(sg, sp, gPS, gPD, DetDoppler, u, DopplerLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobe, beta, drivefreq, freqMin, freqMax, freqStep, circularityprobe=CircPr, plot=False, solvemode=1, detpvec=None)
FrequenciesVec.append(Frequencies)
FluorescencesVec.append(Fluorescence)
ax1.plot(Frequencies, [100*f for f in Fluorescence], label=fr'$\alpha={int(alpha*180/np.pi)}°$')
ax1.set_xlabel('Detuning Rebombeo (MHz)')
ax1.set_ylabel('Fluorescencia (AU)')
ax1.set_title(f'Sdop: {sg}, Spr: {sp}, Temp: {int(T*1e3)} mK')
#ax1.legend()
ax1.grid()
#%%
#Este bloque ajusta a las curvas con un beta de micromocion de 0
from scipy.optimize import curve_fit
def FitEIT_MM(freqs, Temp):
BETA = 0
scale=1
offset=0
Detunings, Fluorescence = PerformExperiment_8levels(sg, sp, gPS, gPD, DetDoppler, u, DopplerLaserLinewidth, ProbeLaserLinewidth, Temp, alpha, phidoppler, titadoppler, phiprobe, titaprobe, BETA, drivefreq, freqMin, freqMax, freqStep, circularityprobe=CircPr, plot=False, solvemode=1, detpvec=None)
ScaledFluo = [f*scale + offset for f in Fluorescence]
return ScaledFluo
TempMedidas = []
FittedEIT_fluosVec = []
for j in range(len(betavec)):
SelectedFluo = FluorescencesVec[j]
SelectedFreqs = FrequenciesVec[j]
popt_mm, pcov_mm = curve_fit(FitEIT_MM, SelectedFreqs, SelectedFluo, p0=[1e-3], bounds=((0), (10e-3)))
TempMedidas.append(1e3*popt_mm[2])
print(popt_mm)
FittedEIT_fluo = FitEIT_MM(SelectedFreqs, *popt_mm)
FittedEIT_fluosVec.append(FittedEIT_fluo)
plt.figure()
plt.plot(SelectedFreqs, SelectedFluo, 'o')
plt.plot(SelectedFreqs, FittedEIT_fluo)
plt.figure()
for i in range(len(FluorescencesVec)):
plt.plot(SelectedFreqs, FluorescencesVec[i], 'o', markersize=3)
plt.plot(SelectedFreqs, FittedEIT_fluosVec[i])
plt.figure()
plt.plot(betavec, TempMedidas, 'o', markersize=10)
plt.xlabel('Beta')
plt.ylabel('Temperatura medida (mK)')
plt.axhline(T*1e3, label='Temperatura real', linestyle='--', color='red')
plt.legend()
plt.grid()
\ No newline at end of file
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Apr 7 22:30:01 2020
@author: nico
"""
#ESTE CODIGO ES EL PRINCIPAL PARA PLOTEAR CPT TEORICOS
import numpy as np
import time
import matplotlib.pyplot as plt
from scipy.signal import argrelextrema
"""
Scripts para el calculo de la curva CPT
"""
def H0matrix(Detg, Detp, u):
"""
Calcula la matriz H0 en donde dr es el detuning del doppler, dp es el retuning del repump y u es el campo magnético en Hz/Gauss.
Para esto se toma la energía del nivel P como 0
"""
eigenEnergies = (Detg-u, Detg+u, -u/3, u/3, Detp-6*u/5, Detp-2*u/5, Detp+2*u/5, Detp+6*u/5) #pagina 26 de Oberst. los lande del calcio son iguales a Bario.
H0 = np.diag(eigenEnergies)
return H0
def HImatrix(rabG, rabP, phidoppler, titadoppler, phiprobe, titaprobe, circularityprobe=1):
"""
Calcula la matriz de interacción Hsp + Hpd, en donde rabR es la frecuencia de rabi de la transición Doppler SP,
rabP es la frecuencia de rabi de la transición repump DP, y las componentes ei_r y ei_p son las componentes de la polarización
del campo eléctrico incidente de doppler y repump respectivamente. Deben estar normalizadas a 1
"""
HI = np.zeros((8, 8), dtype=np.complex_)
i, j = 1, 3
HI[i-1, j-1] = (rabG/np.sqrt(3)) * np.cos(titadoppler)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 1, 4
HI[i-1, j-1] = -(rabG/np.sqrt(3)) * np.sin(titadoppler)*np.exp(1j*phidoppler)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 2, 3
HI[i-1, j-1] = -(rabG/np.sqrt(3)) * np.sin(titadoppler)*np.exp(-1j*phidoppler)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 2, 4
HI[i-1, j-1] = -(rabG/np.sqrt(3)) * np.cos(titadoppler)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 3, 5
HI[i-1, j-1] = -(rabP/2) * np.sin(titaprobe)*(np.cos(phiprobe)-1j*np.sin(phiprobe)*circularityprobe)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 3, 6
HI[i-1, j-1] = -(rabP/np.sqrt(3)) * np.cos(titaprobe)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 3, 7
HI[i-1, j-1] = rabP/np.sqrt(12) * np.sin(titaprobe)*(np.cos(phiprobe)+1j*np.sin(phiprobe)*circularityprobe)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 4, 6
HI[i-1, j-1] = -(rabP/np.sqrt(12)) * np.sin(titaprobe)*(np.cos(phiprobe)-1j*np.sin(phiprobe)*circularityprobe)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 4, 7
HI[i-1, j-1] = -(rabP/np.sqrt(3)) * np.cos(titaprobe)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 4, 8
HI[i-1, j-1] = (rabP/2) * np.sin(titaprobe)*(np.cos(phiprobe)+1j*np.sin(phiprobe)*circularityprobe)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
return HI
def LtempCalculus(beta, drivefreq, forma=1):
Hint = np.zeros((8, 8), dtype=np.complex_)
ampg=beta*drivefreq
ampr=beta*drivefreq
Hint[0,0] = ampg
Hint[1,1] = ampg
Hint[4,4] = ampr
Hint[5,5] = ampr
Hint[6,6] = ampr
Hint[7,7] = ampr
if forma==1:
Ltemp = np.zeros((64, 64), dtype=np.complex_)
"""
for r in range(8):
for q in range(8):
for k in range(8):
for j in range(8):
Ltemp[r*8+q][k*8+j] = (-1j)*(Hint[r,k]*int(j==q) - Hint[j,q]*int(r==k))
"""
"""
for r in range(8):
for q in range(8):
for k in range(8):
for j in range(8):
if r==k and j==q:
Ltemp[r*8+q][k*8+j] = (-1j)*(Hint[r,k] - Hint[j,q])
"""
for r in range(8):
for q in range(8):
if r!=q:
Ltemp[r*8+q][r*8+q] = (-1j)*(Hint[r,r] - Hint[q,q])
if forma==2:
deltaKro = np.diag([1, 1, 1, 1, 1, 1, 1, 1])
Ltemp = (-1j)*(np.kron(Hint, deltaKro) - np.kron(deltaKro, Hint))
Omega = np.zeros((64, 64), dtype=np.complex_)
for i in range(64):
Omega[i, i] = (1j)*drivefreq
return np.matrix(Ltemp), np.matrix(Omega)
def GetL1(Ltemp, L0, Omega, nmax):
"""
Devuelve Splus0 y Sminus0
"""
Sp = (-1)*(np.matrix(np.linalg.inv(L0 - (nmax+1)*Omega))*0.5*np.matrix(Ltemp))
Sm = (-1)*(np.matrix(np.linalg.inv(L0 + (nmax+1)*Omega))*0.5*np.matrix(Ltemp))
for n in list(range(nmax+1))[(nmax+1)::-1][0:len(list(range(nmax+1))[(nmax+1)::-1])-1]: #jaja esto solo es para que vaya de nmax a 1 bajando. debe haber algo mas facil pero kcio
Sp = (-1)*(np.matrix(np.linalg.inv(L0 - n*Omega + (0.5*Ltemp*np.matrix(Sp))))*0.5*np.matrix(Ltemp))
Sm = (-1)*(np.matrix(np.linalg.inv(L0 + n*Omega + (0.5*Ltemp*np.matrix(Sm))))*0.5*np.matrix(Ltemp))
L1 = 0.5*np.matrix(Ltemp)*(np.matrix(Sp) + np.matrix(Sm))
return L1
def EffectiveL(gPS, gPD, lwg, lwp):
"""
Siendo Heff = H + EffectiveL, calcula dicho EffectiveL que es (-0.5j)*sumatoria(CmDaga*Cm) que luego sirve para calcular el Liouvilliano
"""
Leff = np.zeros((8, 8), dtype=np.complex_)
Leff[0, 0] = 2*lwg
Leff[1, 1] = 2*lwg
Leff[2, 2] = ((2/3)+(1/3))*gPS + ((1/2) + (1/6) + (1/3))*gPD
Leff[3, 3] = ((2/3)+(1/3))*gPS + ((1/2) + (1/6) + (1/3))*gPD
Leff[4, 4] = 2*lwp
Leff[5, 5] = 2*lwp
Leff[6, 6] = 2*lwp
Leff[7, 7] = 2*lwp
return (-0.5j)*Leff
def CalculateSingleMmatrix(gPS, gPD, lwg, lwp):
"""
Si tomamos el Liuvilliano como L = (-j)*(Heff*deltak - Heffdaga*deltak) + sum(Mm),
esta funcion calcula dichos Mm, que tienen dimensión 64x64 ya que esa es la dimensión del L. Estas componentes
salen de hacer la cuenta a mano conociendo los Cm y considerando que Mm[8*(r-1)+s, 8*(k-1)+j] = Cm[r,l] + Cmdaga[j,s] = Cm[r,l] + Cm[s,j]
ya que los componentes de Cm son reales.
Esta M es la suma de las 8 matrices M.
"""
M = np.matrix(np.zeros((64, 64), dtype=np.complex_))
M[0,27] = (2/3)*gPS
M[9,18] = (2/3)*gPS
M[0,18] = (1/3)*gPS
M[1,19] = -(1/3)*gPS
M[8,26] = -(1/3)*gPS
M[9,27] = (1/3)*gPS
M[36,18] = (1/2)*gPD
M[37,19] = (1/np.sqrt(12))*gPD
M[44,26] = (1/np.sqrt(12))*gPD
M[45,27] = (1/6)*gPD
M[54,18] = (1/6)*gPD
M[55,19] = (1/np.sqrt(12))*gPD
M[62,26] = (1/np.sqrt(12))*gPD
M[63,27] = (1/2)*gPD
M[45,18] = (1/3)*gPD
M[46,19] = (1/3)*gPD
M[53,26] = (1/3)*gPD
M[54,27] = (1/3)*gPD
M[0,0] = 2*lwg
M[1,1] = 2*lwg
M[8,8] = 2*lwg
M[9,9] = 2*lwg
#M[36, 45] = lwp
for k in [36, 37, 38, 39, 44, 45, 46, 47, 52, 53, 54, 55, 60, 61, 62, 63]:
M[k,k]=2*lwp
return M
def dopplerBroadening(wlg, wlp, alpha, T, mcalcio = 6.655e-23*1e-3):
"""
Calcula el broadening extra semiclásico por temperatura considerando que el ion atrapado se mueve.
wlg es la longitud de onda doppler, wlp la longitud de onda repump, T la temperatura del ion en kelvin, y alpha (en rads) el ángulo
que forman ambos láseres.
"""
kboltzmann = 1.38e-23 #J/K
gammaD = (2*np.pi)*np.sqrt((1/(wlg*wlg)) + (1/(wlp*wlp)) - 2*(1/(wlg*wlp))*np.cos(alpha))*np.sqrt(kboltzmann*T/(2*mcalcio))
return gammaD
def FullL_MM(rabG, rabP, gPS = 0, gPD = 0, Detg = 0, Detp = 0, u = 0, lwg = 0, lwp = 0,
phidoppler=0, titadoppler=0, phiprobe=0, titaprobe=0, beta=0, drivefreq=2*np.pi*22.135*1e6, T = 0, alpha = 0, circularityprobe=1):
"""
Calcula el Liouvilliano total de manera explícita índice a índice. Suma aparte las componentes de las matrices M.
Es la más eficiente hasta ahora.
"""
db = dopplerBroadening(0.397e-6, 0.866e-6, alpha, T)
lwg = np.sqrt(lwg**2 + db**2)
lwp = np.sqrt(lwp**2 + db**2)
CC = EffectiveL(gPS, gPD, lwg, lwp)
Heff = H0matrix(Detg, Detp, u) + HImatrix(rabG, rabP, phidoppler, titadoppler, phiprobe, titaprobe, circularityprobe) + CC
Heffdaga = np.matrix(Heff).getH()
Lfullpartial = np.zeros((64, 64), dtype=np.complex_)
for r in range(8):
for q in range(8):
for k in range(8):
for j in range(8):
if j!=q and r!=k:
pass
elif j==q and r!=k:
if (r < 2 and k > 3) or (k < 2 and r > 3) or (r > 3 and k > 3) or (r==0 and k==1) or (r==1 and k==0) or (r==2 and k==3) or (r==3 and k==2): #todo esto sale de analizar explicitamente la matriz y tratar de no calcular cosas de más que dan cero
pass
else:
Lfullpartial[r*8+q][k*8+j] = (-1j)*(Heff[r,k])
elif j!=q and r==k:
if (j < 2 and q > 3) or (q < 2 and j > 3) or (j > 3 and q > 3) or (j==0 and q==1) or (j==1 and q==0) or (j==2 and q==3) or (j==3 and q==2):
pass
else:
Lfullpartial[r*8+q][k*8+j] = (-1j)*(-Heffdaga[j,q])
else:
if Heff[r,k] == Heffdaga[j,q]:
pass
else:
Lfullpartial[r*8+q][k*8+j] = (-1j)*(Heff[r,k]-Heffdaga[j,q])
M = CalculateSingleMmatrix(gPS, gPD, lwg, lwp)
L0 = np.array(np.matrix(Lfullpartial) + M)
#ESTA PARTE ES CUANDO AGREGAS MICROMOCION
nmax = 3
#print(nmax)
Ltemp, Omega = LtempCalculus(beta, drivefreq)
#print(factor)
L1 = GetL1(Ltemp, L0, Omega, nmax)
Lfull = L0 + L1 #ESA CORRECCION ESTA EN L1
#HASTA ACA
#NORMALIZACION DE RHO
i = 0
while i < 64:
if i%9 == 0:
Lfull[0, i] = 1
else:
Lfull[0, i] = 0
i = i + 1
return Lfull
"""
Scripts para correr un experimento y hacer el análisis de los datos
"""
def CPTspectrum8levels_MM(sg, sp, gPS, gPD, Detg, u, lwg, lwp, Temp, alpha, phidoppler, titadoppler, phiprobe, titaprobe, Circularityprobe, beta, drivefreq, freqMin=-100, freqMax=100, freqStep=1e-1, plot=False, solvemode=1):
"""
ESTA ES LA FUNCION QUE ESTAMOS USANDO
Hace un experimento barriendo ángulos de repump con el angulo de doppler fijo.
solvemode=1: resuelve con np.linalg.solve
solvemode=2: resuelve invirtiendo L con la funcion np.linalg.inv
"""
phidoppler, titadoppler = phidoppler*(np.pi/180), titadoppler*(np.pi/180)
phiprobe, titaprobe = phiprobe*(np.pi/180), titaprobe*(np.pi/180)
DetProbeVector = 2*np.pi*np.arange(freqMin*1e6, freqMax*1e6, freqStep*1e6)
Detg = 2*np.pi*Detg*1e6
#lwg, lwr, lwp = 2*np.pi*lwg*1e6, 2*np.pi*lwr*1e6, 2*np.pi*lwp*1e6
lwg, lwp = lwg*1e6, lwp*1e6
rabG = sg*gPS
rabP = sp*gPD
#u = 2*np.pi*u*1e6
Fluovector = []
tinicial = time.time()
for Detp in DetProbeVector:
L = FullL_MM(rabG, rabP, gPS, gPD, Detg, Detp, u, lwg, lwp, phidoppler, titadoppler, phiprobe, titaprobe, beta, drivefreq, Temp, alpha, Circularityprobe)
if solvemode == 1:
rhovectorized = np.linalg.solve(L, np.array([int(i==0) for i in range(64)]))
Fluo = np.real(rhovectorized[18] + np.real(rhovectorized[27]))
Fluovector.append(Fluo)
if solvemode == 2:
Linv = np.linalg.inv(L)
rhovectorized = [Linv[j][0] for j in range(len(Linv))]
Fluo = np.real(rhovectorized[18] + np.real(rhovectorized[27])) #estos son los rho33 + rho44
Fluovector.append(Fluo)
tfinal = time.time()
print('Done, Total time: ', round((tfinal-tinicial), 2), "s")
DetProbeVectorMHz = np.arange(freqMin, freqMax, freqStep)
if plot:
plt.xlabel('Probe detuning (MHz)')
plt.ylabel('Fluorescence (A.U.)')
plt.plot(DetProbeVectorMHz, [100*f for f in Fluovector], label=str(titaprobe) + 'º, T: ' + str(Temp*1e3) + ' mK')
plt.legend()
return DetProbeVectorMHz, Fluovector
if __name__ == "__main__":
ub = 9.27e-24
h = 6.63e-34
c = (ub/h)*1e-4 #en unidades de MHz/G
B = 25 #campo magnetico en gauss
u = c*B
sg, sr, sp = 0.5, 1.5, 4 #parámetros de saturación del doppler y repump
gPS, gPD, = 2*np.pi*21.58e6, 2*np.pi*1.35e6 #anchos de linea de las transiciones
rabG, rabR, rabP = sg*gPS, sr*gPD, sp*gPD #frecuencias de rabi
lwg, lwr, lwp = 0.3, 0.3, 0.3 #ancho de linea de los laseres
Detg = -25
Detr = 20 #detuning del doppler y repump
Temp = 0.0e-3 #temperatura en K
alpha = 0*(np.pi/180) #angulo entre los láseres
phidoppler, titadoppler = 0, 90
phirepump, titarepump = 0, 90
phiprobe, titaprobe = 0, 90
plotCPT = False
freqMin = -50
freqMax = 50
freqStep = 5e-2
Frequencyvector, Fluovector = CPTspectrum8levels_MM(rabG, rabR, rabP, gPS, gPD, Detg, Detr, u, lwg, lwr, lwp, Temp, alpha, phidoppler, titadoppler, phiprobe, titaprobe, phirepump, titarepump, freqMin=freqMin, freqMax=freqMax, freqStep=freqStep, plot=plotCPT, solvemode=1)
plt.plot(Frequencyvector, [100*f for f in Fluovector], label=str(titaprobe) + 'º, T: ' + str(Temp*1e3) + ' mK')
plt.xlabel('Probe detuning (MHz)')
plt.ylabel('Fluorescence (A.U.)')
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Jul 2 16:30:09 2020
@author: oem
"""
import os
import numpy as np
import time
import matplotlib.pyplot as plt
from scipy.signal import argrelextrema
from EITfit.threeLevel_2repumps_linealpol_python_scripts import CPTspectrum8levels, CPTspectrum8levels_fixedRabi
import random
from scipy.signal import savgol_filter as sf
def CalculoTeoricoDarkResonances_8levels(u, titadoppler, detuningdoppler, detuningrepump):
if titadoppler==0:
NegativeDR = [(-7/5)*u, (-3/5)*u, (-1/5)*u, (1/5)*u, (3/5)*u, (7/5)*u]
elif titadoppler==90:
NegativeDR = [(-11/5)*u, (-7/5)*u, (-3/5)*u, (3/5)*u, (7/5)*u, (11/5)*u]
else:
NegativeDR = [(-11/5)*u, (-7/5)*u, (-3/5)*u, (-1/5)*u, (1/5)*u, (3/5)*u, (7/5)*u, (11/5)*u]
PositiveDR = [(-8/5)*u, (-4/5)*u, 0, (4/5)*u, (8/5)*u]
return [detuningdoppler + dr for dr in NegativeDR], [detuningrepump + dr for dr in PositiveDR]
def GetClosestIndex(Vector, value, tolerance=1e-3):
i = 0
while i<len(Vector):
if abs(Vector[i] - value) < tolerance:
return i
else:
i = i + 1
return GetClosestIndex(Vector, value, tolerance=2*tolerance)
def FindDRFrequencies(Freq, Fluo, TeoDR, entorno=3):
"""
Busca los indices y la frecuencia de los minimos en un entorno cercano al de la DR.
Si no encuentra, devuelve el valor teórico.
"""
IndiceDRteo1, IndiceEntornoinicialDRteo1, IndiceEntornofinalDRteo1 = GetClosestIndex(Freq, TeoDR[0]), GetClosestIndex(Freq, TeoDR[0]-entorno), GetClosestIndex(Freq, TeoDR[0]+entorno)
IndiceDRteo2, IndiceEntornoinicialDRteo2, IndiceEntornofinalDRteo2 = GetClosestIndex(Freq, TeoDR[1]), GetClosestIndex(Freq, TeoDR[1]-entorno), GetClosestIndex(Freq, TeoDR[1]+entorno)
IndiceDRteo3, IndiceEntornoinicialDRteo3, IndiceEntornofinalDRteo3 = GetClosestIndex(Freq, TeoDR[2]), GetClosestIndex(Freq, TeoDR[2]-entorno), GetClosestIndex(Freq, TeoDR[2]+entorno)
IndiceDRteo4, IndiceEntornoinicialDRteo4, IndiceEntornofinalDRteo4 = GetClosestIndex(Freq, TeoDR[3]), GetClosestIndex(Freq, TeoDR[3]-entorno), GetClosestIndex(Freq, TeoDR[3]+entorno)
IndiceDRteo5, IndiceEntornoinicialDRteo5, IndiceEntornofinalDRteo5 = GetClosestIndex(Freq, TeoDR[4]), GetClosestIndex(Freq, TeoDR[4]-entorno), GetClosestIndex(Freq, TeoDR[4]+entorno)
IndiceDRteo6, IndiceEntornoinicialDRteo6, IndiceEntornofinalDRteo6 = GetClosestIndex(Freq, TeoDR[5]), GetClosestIndex(Freq, TeoDR[5]-entorno), GetClosestIndex(Freq, TeoDR[5]+entorno)
EntornoFreqDR1, EntornoFreqDR2 = Freq[IndiceEntornoinicialDRteo1:IndiceEntornofinalDRteo1], Freq[IndiceEntornoinicialDRteo2:IndiceEntornofinalDRteo2]
EntornoFreqDR3, EntornoFreqDR4 = Freq[IndiceEntornoinicialDRteo3:IndiceEntornofinalDRteo3], Freq[IndiceEntornoinicialDRteo4:IndiceEntornofinalDRteo4]
EntornoFreqDR5, EntornoFreqDR6 = Freq[IndiceEntornoinicialDRteo5:IndiceEntornofinalDRteo5], Freq[IndiceEntornoinicialDRteo6:IndiceEntornofinalDRteo6]
EntornoFluoDR1, EntornoFluoDR2 = Fluo[IndiceEntornoinicialDRteo1:IndiceEntornofinalDRteo1], Fluo[IndiceEntornoinicialDRteo2:IndiceEntornofinalDRteo2]
EntornoFluoDR3, EntornoFluoDR4 = Fluo[IndiceEntornoinicialDRteo3:IndiceEntornofinalDRteo3], Fluo[IndiceEntornoinicialDRteo4:IndiceEntornofinalDRteo4]
EntornoFluoDR5, EntornoFluoDR6 = Fluo[IndiceEntornoinicialDRteo5:IndiceEntornofinalDRteo5], Fluo[IndiceEntornoinicialDRteo6:IndiceEntornofinalDRteo6]
IndiceFluoMinimaEntorno1, IndiceFluoMinimaEntorno2 = argrelextrema(np.array(EntornoFluoDR1), np.less)[0], argrelextrema(np.array(EntornoFluoDR2), np.less)[0]
IndiceFluoMinimaEntorno3, IndiceFluoMinimaEntorno4 = argrelextrema(np.array(EntornoFluoDR3), np.less)[0], argrelextrema(np.array(EntornoFluoDR4), np.less)[0]
IndiceFluoMinimaEntorno5, IndiceFluoMinimaEntorno6 = argrelextrema(np.array(EntornoFluoDR5), np.less)[0], argrelextrema(np.array(EntornoFluoDR6), np.less)[0]
try:
FreqDR1 = EntornoFreqDR1[int(IndiceFluoMinimaEntorno1)]
IndiceDR1 = GetClosestIndex(Freq, FreqDR1)
except:
FreqDR1 = TeoDR[0]
IndiceDR1 = IndiceDRteo1
try:
FreqDR2 = EntornoFreqDR2[int(IndiceFluoMinimaEntorno2)]
IndiceDR2 = GetClosestIndex(Freq, FreqDR2)
except:
FreqDR2 = TeoDR[1]
IndiceDR2 = IndiceDRteo2
try:
FreqDR3 = EntornoFreqDR3[int(IndiceFluoMinimaEntorno3)]
IndiceDR3 = GetClosestIndex(Freq, FreqDR3)
except:
FreqDR3 = TeoDR[2]
IndiceDR3 = IndiceDRteo3
try:
FreqDR4 = EntornoFreqDR4[int(IndiceFluoMinimaEntorno4)]
IndiceDR4 = GetClosestIndex(Freq, FreqDR4)
except:
FreqDR4 = TeoDR[3]
IndiceDR4 = IndiceDRteo4
try:
FreqDR5 = EntornoFreqDR5[int(IndiceFluoMinimaEntorno5)]
IndiceDR5 = GetClosestIndex(Freq, FreqDR5)
except:
FreqDR5 = TeoDR[4]
IndiceDR5 = IndiceDRteo5
try:
FreqDR6 = EntornoFreqDR6[int(IndiceFluoMinimaEntorno6)]
IndiceDR6 = GetClosestIndex(Freq, FreqDR6)
except:
FreqDR6 = TeoDR[5]
IndiceDR6 = IndiceDRteo6
return [IndiceDR1, IndiceDR2, IndiceDR3, IndiceDR4, IndiceDR5, IndiceDR6], [FreqDR1, FreqDR2, FreqDR3, FreqDR4, FreqDR5, FreqDR6]
def FindRelativeFluorescencesOfDR(Freq, Fluo, IndicesDR, detuningdoppler, NormalizationCriterium=1, frecuenciareferenciacriterioasintotico=-100, getindices=False):
"""
Toma los indices donde estan las DR y evalua su fluorescencia. Esos indices son minimos locales en un entorno
cercano a las DR teoricas y, si no hay ningun minimo, toma la teorica.
Luego, hace el cociente de esa fluorescencia y un factor de normalización segun NormalizationCriterium:
1: Devuelve la fluorescencia absoluta de los minimos
2: Devuelve el cociente entre la fluorescencia del minimo y un valor medio entre dos puntos lejanos, como si no
hubiera una resonancia oscura y hubiera una recta. Ese valor esta a DistanciaFrecuenciaCociente del detuning del azul (el punto medio entre las dos DR en este caso)
3: Devuelve el cociente entre la fluorescencia del minimo y el valor a -100 MHz (si se hizo de -100 a 100),
o el valor limite por izquierda de la curva
4: Deuelve el cociente entre la fluorescencia del minimo y el valor de fluorescencia a detuning 0 MHz
"""
IndiceDR1, IndiceDR2, IndiceDR3, IndiceDR4, IndiceDR5, IndiceDR6 = IndicesDR[0], IndicesDR[1], IndicesDR[2], IndicesDR[3], IndicesDR[4], IndicesDR[5]
FluorescenceOfMinimums = [Fluo[IndiceDR1], Fluo[IndiceDR2], Fluo[IndiceDR3], Fluo[IndiceDR4], Fluo[IndiceDR5], Fluo[IndiceDR6]]
FrequencyOfMinimums = [Freq[IndiceDR1], Freq[IndiceDR2], Freq[IndiceDR3], Freq[IndiceDR4], Freq[IndiceDR5], Freq[IndiceDR6]]
DistanciaFrecuenciaCociente = 25
if NormalizationCriterium==0:
print('che')
return FrequencyOfMinimums, FluorescenceOfMinimums
if NormalizationCriterium==1:
Fluorescenciacerodetuning = Fluo[GetClosestIndex(Freq, 0)]
Fluorescenciaasintotica = Fluo[GetClosestIndex(Freq, frecuenciareferenciacriterioasintotico)]
return FrequencyOfMinimums, np.array([Fluorescenciacerodetuning/Fluorescenciaasintotica, Fluorescenciacerodetuning/Fluorescenciaasintotica, Fluorescenciacerodetuning/Fluorescenciaasintotica, Fluorescenciacerodetuning/Fluorescenciaasintotica, Fluorescenciacerodetuning/Fluorescenciaasintotica, Fluorescenciacerodetuning/Fluorescenciaasintotica])
if NormalizationCriterium==2:
k = 0
while k < len(Freq):
if Freq[k] < detuningdoppler-DistanciaFrecuenciaCociente + 2 and Freq[k] > detuningdoppler-DistanciaFrecuenciaCociente - 2:
FluoIzquierda = Fluo[k]
indiceizquierda = k
print('Izq:', Freq[k])
break
else:
k = k + 1
l = 0
while l < len(Freq):
if Freq[l] < detuningdoppler+DistanciaFrecuenciaCociente + 2 and Freq[l] > detuningdoppler+DistanciaFrecuenciaCociente - 2:
FluoDerecha = Fluo[l]
indicederecha = l
print('Der: ', Freq[l])
break
else:
l = l + 1
FluoNormDivisor = 0.5*(FluoDerecha+FluoIzquierda)
print(FluoNormDivisor)
if NormalizationCriterium==3:
#asintotico
FluoNormDivisor = Fluo[GetClosestIndex(Freq, frecuenciareferenciacriterioasintotico)]
if NormalizationCriterium==4:
#este te tira la fluorescencia de detuning 0
FluoNormDivisor = Fluo[GetClosestIndex(Freq, 0)]
RelativeFluorescenceOfMinimums = np.array([Fluore/FluoNormDivisor for Fluore in FluorescenceOfMinimums])
print('Esto: ', RelativeFluorescenceOfMinimums)
if NormalizationCriterium==2 and getindices==True:
return FrequencyOfMinimums, RelativeFluorescenceOfMinimums, indiceizquierda, indicederecha
return FrequencyOfMinimums, RelativeFluorescenceOfMinimums
def GetFinalMaps(MapasDR1, MapasDR2, MapasDR3, MapasDR4, MapasDR5, MapasDR6):
"""
Nota: esto vale para polarizacion del 397 sigma+ + sigma-. Sino hay que cambiar los coeficientes.
La estructura es:
MapasDRi = [MapaMedido_criterio1_DRi, MapaMedido_criterio2_DRi, MapaMedido_criterio3_DRi, MapaMedido_criterio4_DRi]
"""
Mapa1 = MapasDR1[0]
Mapa2pi = np.sqrt(3)*(MapasDR2[1] + MapasDR5[1])
Mapa2smas = np.sqrt(12/2)*MapasDR3[1] + (2/np.sqrt(2))*MapasDR6[1]
Mapa2smenos = (2/np.sqrt(2))*MapasDR1[1] + np.sqrt(12/2)*MapasDR4[1]
Mapa3pi = np.sqrt(3)*(MapasDR2[2] + MapasDR5[2])
Mapa3smas = np.sqrt(12/2)*MapasDR3[2] + (2/np.sqrt(2))*MapasDR6[2]
Mapa3smenos = (2/np.sqrt(2))*MapasDR1[2] + np.sqrt(12/2)*MapasDR4[2]
return Mapa1, [Mapa2pi, Mapa2smas, Mapa2smenos], [Mapa3pi, Mapa3smas, Mapa3smenos]
def CombinateDRwithCG(RelMinMedido1, RelMinMedido2, RelMinMedido3, RelMinMedido4):
Fluo1 = RelMinMedido1[0]
Fluo2pi = np.sqrt(3)*(RelMinMedido2[1] + RelMinMedido2[4])
Fluo2smas = np.sqrt(12/2)*RelMinMedido2[2] + (2/np.sqrt(2))*RelMinMedido2[5]
Fluo2smenos = (2/np.sqrt(2))*RelMinMedido2[0] + np.sqrt(12/2)*RelMinMedido2[3]
Fluo3pi = np.sqrt(3)*(RelMinMedido3[1] + RelMinMedido3[4])
Fluo3smas = np.sqrt(12/2)*RelMinMedido3[2] + (2/np.sqrt(2))*RelMinMedido3[5]
Fluo3smenos = (2/np.sqrt(2))*RelMinMedido3[0] + np.sqrt(12/2)*RelMinMedido3[3]
return Fluo1, [Fluo2pi, Fluo2smas, Fluo2smenos], [Fluo3pi, Fluo3smas, Fluo3smenos]
def IdentifyPolarizationCoincidences(theoricalmap, target, tolerance=1e-1):
"""
Busca en un mapa 2D la presencia de un valor target (medido) con tolerancia tolerance.
Si lo encuentra, pone un 1. Sino, un 0. Al plotear con pcolor se verá
en blanco la zona donde el valor medido se puede hallar.
"""
CoincidenceMatrix = np.zeros((len(theoricalmap), len(theoricalmap[0])))
i = 0
while i<len(theoricalmap):
j = 0
while j<len(theoricalmap[0]):
if abs(theoricalmap[i][j]-target) < tolerance:
CoincidenceMatrix[i][j] = 1
j=j+1
i=i+1
return CoincidenceMatrix
def RetrieveAbsoluteCoincidencesBetweenMaps(MapsVectors):
MatrixSum = np.zeros((len(MapsVectors[0]), len(MapsVectors[0][0])))
AbsoluteCoincidencesMatrix = np.zeros((len(MapsVectors[0]), len(MapsVectors[0][0])))
MatrixMapsVectors = []
for i in range(len(MapsVectors)):
MatrixMapsVectors.append(np.matrix(MapsVectors[i]))
for i in range(len(MatrixMapsVectors)):
MatrixSum = MatrixSum + MatrixMapsVectors[i]
MaxNumberOfCoincidences = np.max(MatrixSum)
ListMatrixSum = [list(i) for i in list(np.array(MatrixSum))]
for i in range(len(ListMatrixSum)):
for j in range(len(ListMatrixSum[0])):
if ListMatrixSum[i][j] == MaxNumberOfCoincidences:
AbsoluteCoincidencesMatrix[i][j] = 1
return AbsoluteCoincidencesMatrix, MaxNumberOfCoincidences
def MeasureMeanValueOfEstimatedArea(AbsoluteCoincidencesMap, X, Y):
NonZeroIndices = np.nonzero(AbsoluteCoincidencesMap)
Xsum = 0
Xvec = []
Ysum = 0
Yvec = []
N = len(NonZeroIndices[0])
for i in range(N):
Xsum = Xsum + X[NonZeroIndices[1][i]]
Xvec.append(X[NonZeroIndices[1][i]])
Ysum = Ysum + Y[NonZeroIndices[0][i]]
Yvec.append(Y[NonZeroIndices[0][i]])
Xaverage = Xsum/N
Yaverage = Ysum/N
Xspread = np.std(Xvec)
Yspread = np.std(Yvec)
return Xaverage, Yaverage, N, Xspread, Yspread
def MeasureRelativeFluorescenceFromCPT(Freq, Fluo, u, titadoppler, detuningrepump, detuningdoppler, frefasint=-100, entorno=3):
ResonanciasTeoricas, ResonanciasPositivas = CalculoTeoricoDarkResonances_8levels(u, titadoppler, detuningdoppler, detuningrepump)
IndicesDR, FreqsDR = FindDRFrequencies(Freq, Fluo, ResonanciasTeoricas, entorno=entorno)
FrequencyOfMinimums, RelativeFluorescenceOfMinimums0 = FindRelativeFluorescencesOfDR(Freq, Fluo, IndicesDR, detuningdoppler, NormalizationCriterium=0, frecuenciareferenciacriterioasintotico=frefasint)
FrequencyOfMinimums, RelativeFluorescenceOfMinimums1 = FindRelativeFluorescencesOfDR(Freq, Fluo, IndicesDR, detuningdoppler, NormalizationCriterium=1, frecuenciareferenciacriterioasintotico=frefasint)
FrequencyOfMinimums, RelativeFluorescenceOfMinimums2, indiceizquierda, indicederecha = FindRelativeFluorescencesOfDR(Freq, Fluo, IndicesDR, detuningdoppler, NormalizationCriterium=2, frecuenciareferenciacriterioasintotico=frefasint, getindices=True)
FrequencyOfMinimums, RelativeFluorescenceOfMinimums3 = FindRelativeFluorescencesOfDR(Freq, Fluo, IndicesDR, detuningdoppler, NormalizationCriterium=3, frecuenciareferenciacriterioasintotico=frefasint)
FrequencyOfMinimums, RelativeFluorescenceOfMinimums4 = FindRelativeFluorescencesOfDR(Freq, Fluo, IndicesDR, detuningdoppler, NormalizationCriterium=4, frecuenciareferenciacriterioasintotico=frefasint)
print('hola')
print(RelativeFluorescenceOfMinimums0)
return RelativeFluorescenceOfMinimums0, RelativeFluorescenceOfMinimums1, RelativeFluorescenceOfMinimums2, RelativeFluorescenceOfMinimums3, RelativeFluorescenceOfMinimums4, IndicesDR, [indiceizquierda, indicederecha]
def GenerateNoisyCPT(rabG, rabR, rabP, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobeVec, phirepump, titarepump, freqMin, freqMax, freqStep, plot=False, solvemode=1, detpvec=None, noiseamplitude=0.001):
Frequencyvector, Fluovector = PerformExperiment_8levels(rabG, rabR, rabP, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobeVec, phirepump, titarepump, freqMin, freqMax, freqStep, plot=False, solvemode=1, detpvec=None)
NoisyFluovector = [fluo+noiseamplitude*(2*random.random()-1) for fluo in Fluovector]
return Frequencyvector, NoisyFluovector
def GenerateNoisyCPT_fixedRabi(sg, sr, sp, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobeVec, phirepump, titarepump, freqMin, freqMax, freqStep, plot=False, solvemode=1, detpvec=None, noiseamplitude=0.001):
Frequencyvector, Fluovector = PerformExperiment_8levels_fixedRabi(sg, sr, sp, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobeVec, phirepump, titarepump, freqMin, freqMax, freqStep, plot=False, solvemode=1, detpvec=None)
NoisyFluovector = [fluo+noiseamplitude*(2*random.random()-1) for fluo in Fluovector]
return Frequencyvector, NoisyFluovector
def GenerateNoisyCPT_fit(sg, sr, sp, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobeVec, phirepump, titarepump, freqs, plot=False, solvemode=1, detpvec=None, noiseamplitude=0.001):
Frequencyvector, Fluovector = PerformExperiment_8levels_fixedRabi(sg, sr, sp, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobeVec, phirepump, titarepump, min(freqs), max(freqs) + freqs[1]-freqs[0], freqs[1]-freqs[0], plot=False, solvemode=1, detpvec=None)
NoisyFluovector = [fluo+noiseamplitude*(2*random.random()-1) for fluo in Fluovector]
return Frequencyvector, NoisyFluovector
def AddNoiseToCPT(Fluo, noisefactor):
return [f+noisefactor*(2*random.random()-1) for f in Fluo]
def SmoothNoisyCPT(Fluo, window=11, poly=3):
SmoothenFluo = sf(Fluo, window, poly)
return SmoothenFluo
def GetMinimaInfo(Freq, Fluo, u, titadoppler, detuningdoppler, detuningrepump, MinimumCriterium=2, NormalizationCriterium=1):
"""
FUNCION VIEJA
Esta funcion devuelve valores de frecuencias y fluorescencia relativa de los minimos.
Minimumcriterion:
1: Saca los minimos con funcion argelextrema
2: Directamente con las frecuencias teoricas busca las fluorescencias
Normalizationcriterium:
1: Devuelve la fluorescencia absoluta de los minimos
2: Devuelve el cociente entre la fluorescencia del minimo y un valor medio entre dos puntos lejanos, como si no
hubiera una resonancia oscura y hubiera una recta. Ese valor esta a DistanciaFrecuenciaCociente del detuning del azul (el punto medio entre las dos DR en este caso)
3: Devuelve el cociente entre la fluorescencia del minimo y el valor a -100 MHz (si se hizo de -100 a 100),
o el valor limite por izquierda de la curva
"""
FluorescenceOfMaximum = max(Fluo)
FrequencyOfMaximum = Freq[Fluo.index(FluorescenceOfMaximum)]
#criterio para encontrar los minimos
#criterio usando minimos de la fluorescencia calculados con la curva
if MinimumCriterium == 1:
LocationOfMinimums = argrelextrema(np.array(Fluo), np.less)[0]
FluorescenceOfMinimums = np.array([Fluo[i] for i in LocationOfMinimums])
FrequencyOfMinimums = np.array([Freq[j] for j in LocationOfMinimums])
#criterio con las DR teoricas
if MinimumCriterium == 2:
FrecuenciasDRTeoricas, FrecuenciasDRTeoricasPositivas = [darkresonance for darkresonance in CalculoTeoricoDarkResonances_8levels(u, titadoppler, detuningdoppler, detuningrepump)[0]]
FrequencyOfMinimums = []
FluorescenceOfMinimums =[]
print(FrecuenciasDRTeoricas)
k=0
ventanita = 0.001
while k < len(Freq):
if Freq[k] < FrecuenciasDRTeoricas[0] + ventanita and Freq[k] > FrecuenciasDRTeoricas[0] - ventanita:
FrequencyOfMinimums.append(Freq[k])
FluorescenceOfMinimums.append(Fluo[k])
elif Freq[k] < FrecuenciasDRTeoricas[1] + ventanita and Freq[k] > FrecuenciasDRTeoricas[1] - ventanita:
FrequencyOfMinimums.append(Freq[k])
FluorescenceOfMinimums.append(Fluo[k])
elif Freq[k] < FrecuenciasDRTeoricas[2] + ventanita and Freq[k] > FrecuenciasDRTeoricas[2] - ventanita:
FrequencyOfMinimums.append(Freq[k])
FluorescenceOfMinimums.append(Fluo[k])
elif Freq[k] < FrecuenciasDRTeoricas[3] + ventanita and Freq[k] > FrecuenciasDRTeoricas[3] - ventanita:
FrequencyOfMinimums.append(Freq[k])
FluorescenceOfMinimums.append(Fluo[k])
elif Freq[k] < FrecuenciasDRTeoricas[4] + ventanita and Freq[k] > FrecuenciasDRTeoricas[4] - ventanita:
FrequencyOfMinimums.append(Freq[k])
FluorescenceOfMinimums.append(Fluo[k])
elif Freq[k] < FrecuenciasDRTeoricas[5] + ventanita and Freq[k] > FrecuenciasDRTeoricas[5] - ventanita:
FrequencyOfMinimums.append(Freq[k])
FluorescenceOfMinimums.append(Fluo[k])
k = k + 1
print(FrequencyOfMinimums)
if len(FrequencyOfMinimums) != len(FrecuenciasDRTeoricas):
print('NO ANDA BIEN ESTO PAPI, revisalo')
#esto es para establecer un criterio para la fluorescencia relativa
DistanciaFrecuenciaCociente = 15
if NormalizationCriterium==1:
FluoNormDivisor = 1
if NormalizationCriterium==2:
k = 0
while k < len(Freq):
if Freq[k] < detuningdoppler-DistanciaFrecuenciaCociente + 2 and Freq[k] > detuningdoppler-DistanciaFrecuenciaCociente - 2:
FluoIzquierda = Fluo[k]
print('Izq:', Freq[k])
break
else:
k = k + 1
l = 0
while l < len(Freq):
if Freq[l] < detuningdoppler+DistanciaFrecuenciaCociente + 2 and Freq[l] > detuningdoppler+DistanciaFrecuenciaCociente - 2:
FluoDerecha = Fluo[l]
print('Der: ', Freq[l])
break
else:
l = l + 1
FluoNormDivisor = 0.5*(FluoDerecha+FluoIzquierda)
print(FluoNormDivisor)
if NormalizationCriterium==3:
FluoNormDivisor = Fluo[0]
RelativeFluorescenceOfMinimums = np.array([Fluore/FluoNormDivisor for Fluore in FluorescenceOfMinimums])
return FrequencyOfMinimums, RelativeFluorescenceOfMinimums
def GetPlotsofFluovsAngle_8levels(FrequencyOfMinimumsVector, RelativeFluorescenceOfMinimumsVector, u, titadoppler, detuningdoppler, detuningrepump, ventana=0.25, taketheoricalDR=False):
#primero buscamos las frecuencias referencia que se parezcan a las 6:
i = 0
FrecuenciasReferenciaBase = FrequencyOfMinimumsVector[0]
FrecuenciasDRTeoricas = [darkresonance for darkresonance in CalculoTeoricoDarkResonances_8levels(u, titadoppler, detuningdoppler, detuningrepump)[0]]
while i < len(FrequencyOfMinimumsVector):
if len(FrequencyOfMinimumsVector[i])==len(FrecuenciasDRTeoricas):
FrecuenciasReferenciaBase = FrequencyOfMinimumsVector[i]
print('Cool! Taking the DR identified with any curve')
break
else:
i = i + 1
if i==len(FrequencyOfMinimumsVector):
print('No hay ningun plot con 5 resonancias oscuras. Tomo las teóricas')
FrecuenciasReferenciaBase = FrecuenciasDRTeoricas
if taketheoricalDR:
FrecuenciasReferenciaBase = FrecuenciasDRTeoricas
Ventana = abs(ventana*(FrecuenciasReferenciaBase[1] - FrecuenciasReferenciaBase[0])) #ventana separadora de resonancias
print('Ventana = ', Ventana)
DarkResonance1Frequency = []
DarkResonance1Fluorescence = []
DarkResonance2Frequency = []
DarkResonance2Fluorescence = []
DarkResonance3Frequency = []
DarkResonance3Fluorescence = []
DarkResonance4Frequency = []
DarkResonance4Fluorescence = []
DarkResonance5Frequency = []
DarkResonance5Fluorescence = []
DarkResonance6Frequency = []
DarkResonance6Fluorescence = []
i = 0
while i < len(FrequencyOfMinimumsVector):
j = 0
FrecuenciasReferencia = [i for i in FrecuenciasReferenciaBase]
while j < len(FrequencyOfMinimumsVector[i]):
if abs(FrequencyOfMinimumsVector[i][j]) < (abs(FrecuenciasReferencia[0])+Ventana) and abs(FrequencyOfMinimumsVector[i][j]) >= (abs(FrecuenciasReferencia[0])-Ventana):
DarkResonance1Frequency.append(FrequencyOfMinimumsVector[i][j])
DarkResonance1Fluorescence.append(RelativeFluorescenceOfMinimumsVector[i][j])
FrecuenciasReferencia[0] = 0
elif abs(FrequencyOfMinimumsVector[i][j]) < (abs(FrecuenciasReferencia[1])+Ventana) and abs(FrequencyOfMinimumsVector[i][j]) >= (abs(FrecuenciasReferencia[1])-Ventana):
DarkResonance2Frequency.append(FrequencyOfMinimumsVector[i][j])
DarkResonance2Fluorescence.append(RelativeFluorescenceOfMinimumsVector[i][j])
FrecuenciasReferencia[1] = 0
elif abs(FrequencyOfMinimumsVector[i][j]) < (abs(FrecuenciasReferencia[2])+Ventana) and abs(FrequencyOfMinimumsVector[i][j]) >= (abs(FrecuenciasReferencia[2])-Ventana):
DarkResonance3Frequency.append(FrequencyOfMinimumsVector[i][j])
DarkResonance3Fluorescence.append(RelativeFluorescenceOfMinimumsVector[i][j])
FrecuenciasReferencia[2] = 0
elif abs(FrequencyOfMinimumsVector[i][j]) < (abs(FrecuenciasReferencia[3])+Ventana) and abs(FrequencyOfMinimumsVector[i][j]) >= (abs(FrecuenciasReferencia[3])-Ventana):
DarkResonance4Frequency.append(FrequencyOfMinimumsVector[i][j])
DarkResonance4Fluorescence.append(RelativeFluorescenceOfMinimumsVector[i][j])
FrecuenciasReferencia[3] = 0
elif abs(FrequencyOfMinimumsVector[i][j]) < (abs(FrecuenciasReferencia[4])+Ventana) and abs(FrequencyOfMinimumsVector[i][j]) >= (abs(FrecuenciasReferencia[4])-Ventana):
DarkResonance5Frequency.append(FrequencyOfMinimumsVector[i][j])
DarkResonance5Fluorescence.append(RelativeFluorescenceOfMinimumsVector[i][j])
FrecuenciasReferencia[4] = 0
elif abs(FrequencyOfMinimumsVector[i][j]) < (abs(FrecuenciasReferencia[5])+Ventana) and abs(FrequencyOfMinimumsVector[i][j]) >= (abs(FrecuenciasReferencia[5])-Ventana):
DarkResonance6Frequency.append(FrequencyOfMinimumsVector[i][j])
DarkResonance6Fluorescence.append(RelativeFluorescenceOfMinimumsVector[i][j])
FrecuenciasReferencia[5] = 0
else:
#print('Algo anduvo mal, por ahi tenes que cambiar la ventana che')
pass
j = j + 1
if np.count_nonzero(FrecuenciasReferencia) > 0:
if FrecuenciasReferencia[0] != 0:
DarkResonance1Frequency.append(FrecuenciasReferencia[0])
DarkResonance1Fluorescence.append()
if FrecuenciasReferencia[1] != 0:
DarkResonance2Frequency.append(FrecuenciasReferencia[1])
DarkResonance2Fluorescence.append(0)
if FrecuenciasReferencia[2] != 0:
DarkResonance3Frequency.append(FrecuenciasReferencia[2])
DarkResonance3Fluorescence.append(0)
if FrecuenciasReferencia[3] != 0:
DarkResonance4Frequency.append(FrecuenciasReferencia[3])
DarkResonance4Fluorescence.append(0)
if FrecuenciasReferencia[4] != 0:
DarkResonance5Frequency.append(FrecuenciasReferencia[4])
DarkResonance5Fluorescence.append(0)
if FrecuenciasReferencia[5] != 0:
DarkResonance6Frequency.append(FrecuenciasReferencia[5])
DarkResonance6Fluorescence.append(0)
i = i + 1
return DarkResonance1Frequency, DarkResonance1Fluorescence, DarkResonance2Frequency, DarkResonance2Fluorescence, DarkResonance3Frequency, DarkResonance3Fluorescence, DarkResonance4Frequency, DarkResonance4Fluorescence, DarkResonance5Frequency, DarkResonance5Fluorescence, DarkResonance6Frequency, DarkResonance6Fluorescence, FrecuenciasReferenciaBase
def PerformExperiment_8levels(rabG, rabR, rabP, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobeVec, phirepump, titarepump, freqMin, freqMax, freqStep, plot=False, solvemode=1, detpvec=None):
"""
Hace un experimento barriendo ángulos de repump con el angulo de doppler fijo.
solvemode=1: resuelve con np.linalg.solve
solvemode=2: resuelve invirtiendo L con la funcion np.linalg.inv
"""
Fluovectors = []
for titaprobe in titaprobeVec:
tinicial = time.time()
ProbeDetuningVectorL, Fluovector = CPTspectrum8levels(rabG, rabR, rabP, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobe, phirepump, titarepump, freqMin=freqMin, freqMax=freqMax, freqStep=freqStep, plot=False, solvemode=1)
tfinal = time.time()
print('Done angle ', titarepump, ' Total time: ', round((tfinal-tinicial), 2), "s")
if plot:
plt.figure()
plt.xlabel('Repump detuning (MHz')
plt.ylabel('Fluorescence (A.U.)')
plt.plot(ProbeDetuningVectorL, Fluovector, label=str(titarepump)+'º tita repump, T: ' + str(T*1e3) + ' mK')
plt.legend()
Fluovectors.append(Fluovector)
if len(titaprobeVec) == 1: #esto es para que no devuelva un vector de vectores si solo fijamos un angulo
Fluovectors = Fluovector
return ProbeDetuningVectorL, Fluovectors
def PerformExperiment_8levels_fixedRabi(sg, sr, sp, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobeVec, phirepump, titarepump, freqMin, freqMax, freqStep, plot=False, solvemode=1, detpvec=None):
"""
Hace un experimento barriendo ángulos de repump con el angulo de doppler fijo.
solvemode=1: resuelve con np.linalg.solve
solvemode=2: resuelve invirtiendo L con la funcion np.linalg.inv
"""
Fluovectors = []
for titaprobe in titaprobeVec:
tinicial = time.time()
ProbeDetuningVectorL, Fluovector = CPTspectrum8levels_fixedRabi(sg, sr, sp, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobe, phirepump, titarepump, freqMin=freqMin, freqMax=freqMax, freqStep=freqStep, plot=False, solvemode=1)
tfinal = time.time()
print('Done angle ', titarepump, ' Total time: ', round((tfinal-tinicial), 2), "s")
if plot:
plt.figure()
plt.xlabel('Repump detuning (MHz')
plt.ylabel('Fluorescence (A.U.)')
plt.plot(ProbeDetuningVectorL, Fluovector, label=str(titarepump)+'º tita repump, T: ' + str(T*1e3) + ' mK')
plt.legend()
Fluovectors.append(Fluovector)
if len(titaprobeVec) == 1: #esto es para que no devuelva un vector de vectores si solo fijamos un angulo
Fluovectors = Fluovector
return ProbeDetuningVectorL, Fluovectors
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Sep 1 17:58:39 2020
@author: oem
"""
import os
import numpy as np
#os.chdir('/home/oem/Nextcloud/G_liaf/liaf-TrampaAnular/Código General/EIT-CPT/Buenos Aires/Experiment Simulations/CPT scripts/Eight Level 2 repumps')
from threeLevel_2repumps_AnalysisFunctions import CalculoTeoricoDarkResonances_8levels, GetMinimaInfo, GetPlotsofFluovsAngle_8levels, PerformExperiment_8levels, FindDRFrequencies, FindRelativeFluorescencesOfDR, GenerateNoisyCPT, SmoothNoisyCPT, GetFinalMaps, GenerateNoisyCPT_fixedRabi, GenerateNoisyCPT_fit
import matplotlib.pyplot as plt
import time
from threeLevel_2repumps_AnalysisFunctions import MeasureRelativeFluorescenceFromCPT, IdentifyPolarizationCoincidences, RetrieveAbsoluteCoincidencesBetweenMaps, GetClosestIndex
#C:\Users\Usuario\Nextcloud\G_liaf\liaf-TrampaAnular\Código General\EIT-CPT\Buenos Aires\Experiment Simulations\CPT scripts\Eight Level 2 repumps
ub = 9.27e-24
h = 6.63e-34
c = (ub/h)*1e-4 #en unidades de MHz/G
#u = 1e6
u = 33.5e6
B = (u/(2*np.pi))/c
#sg, sp = 0.6, 5 #parámetros de control, saturación del doppler y repump
#rabG, rabP = sg*gPS, sp*gPD #frecuencias de rabi
gPS, gPD, = 2*np.pi*21.58e6, 2*np.pi*1.35e6 #anchos de linea de las transiciones
lw = 0.1
DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth = lw, lw, lw #ancho de linea de los laseres
DetDoppler = -36 #42
DetRepumpVec = [DetDoppler+29.6]
Tvec = [0.7] #temperatura en mK
alpha = 0*(np.pi/180) #angulo entre los láseres
phidoppler, titadoppler = 0, 90
phirepump, titarepump = 0, 0
phiprobe = 0
titaprobe = 90
#Calculo las resonancias oscuras teóricas
#ResonanciasTeoricas, DRPositivas = CalculoTeoricoDarkResonances_8levels(u/(2*np.pi*1e6), titadoppler, DetDoppler, DetRepump)
#Parametros de la simulacion cpt
center = -45
span = 80
freqMin = center-span*0.5
freqMax = center+span*0.5
""" parametros para tener espectros coherentes
freqMin = -56
freqMax = 14
"""
freqStep = 1e-1
noiseamplitude = 0
RelMinMedido0Vector = []
RelMinMedido1Vector = []
RelMinMedido2Vector = []
RelMinMedido3Vector = []
RelMinMedido4Vector = []
#Sr = np.arange(0, 10, 0.2)
#Sg = np.arange(0.01, 1, 0.05)
#Sp = np.arange(0.1, 6.1, 1)
#Sg = [0.6**2]
#Sp = [2.3**2]
Sg = [1.4]
Sp = [6]
Sr = [11]
i = 0
save = False
showFigures = True
if not showFigures:
plt.ioff()
else:
plt.ion()
fig1, ax1 = plt.subplots()
offsetx = 464
ax1.plot([f-offsetx for f in FreqsDR], CountsDR, 'o')
run = True
Scale = 730
Offset = 600 #600 para 20k cuentas aprox
MaxCoherenceValue = []
for sg in Sg:
for sp in Sp:
rabG, rabP = sg*gPS, sp*gPD
for Ti in Tvec:
T = Ti*1e-3
for DetRepump in DetRepumpVec:
print(T)
for sr in Sr:
rabR = sr*gPD
#MeasuredFreq, MeasuredFluo = GenerateNoisyCPT(rabG, rabR, rabP, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, [titaprobe], phirepump, titarepump, freqMin, freqMax, freqStep, plot=False, solvemode=1, detpvec=None, noiseamplitude=noiseamplitude)
if run:
MeasuredFreq4, MeasuredFluo4 = GenerateNoisyCPT_fixedRabi(sg, sr, sp, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, [titaprobe], phirepump, titarepump, freqMin, freqMax, freqStep, plot=False, solvemode=1, detpvec=None, noiseamplitude=noiseamplitude)
#SmoothFluo = SmoothNoisyCPT(MeasuredFluo, window=9, poly=2)
SmoothFluo4 = MeasuredFluo4
#Scale = max(BestC)/max([100*s for s in SmoothFluo4])
ax1.plot(MeasuredFreq4, [Scale*100*f + Offset for f in SmoothFluo4], label=f'Sr = {sr}')
ax1.axvline(DetDoppler, linestyle='--', linewidth=1)
#if sr != 0:
#ax1.axvline(DetRepump, linestyle='--', linewidth=1)
MaxCoherenceValue.append(np.max(SmoothFluo4))
#print(titaprobe)
ax1.set_xlabel('Detuning Rebombeo (MHz)')
ax1.set_ylabel('Fluorescencia (AU)')
ax1.set_title(f'B: {round(B, 2)} G, Sdop: {round(sg, 2)}, Sp: {round(sp, 2)}, Sr: {round(sr, 2)}, lw: {lw} MHz, T: {Ti} mK')
#ax1.set_ylim(0, 8)
#ax1.axvline(DetDoppler, linestyle='dashed', color='red', linewidth=1)
#ax1.axvline(DetRepump, linestyle='dashed', color='black', linewidth=1)
#ax1.set_title('Pol Doppler y Repump: Sigma+ Sigma-, Pol Probe: PI')
#ax1.legend()
ax1.grid()
print (f'{i+1}/{len(Sg)*len(Sp)}')
i = i + 1
if save:
plt.savefig(f'Mapa_plots_100k_1mk/CPT_SMSM_sdop{round(sg, 2)}_sp{round(sp, 2)}_sr{round(sr, 2)}.jpg')
ax1.legend()
"""
plt.figure()
plt.plot(Sr, MaxCoherenceValue, 'o')
plt.xlabel('Sr')
plt.ylabel('Coherence')
"""
"""
plt.figure()
plt.plot(MeasuredFreq, [100*f for f in SmoothFluo], color='darkred')
plt.xlabel('Desintonía 866 (MHz)')
plt.ylabel('Fluorescencia (A.U.)')
plt.axvline(-30, color='darkblue', linewidth=1.2, linestyle='--')
plt.yticks(np.arange(0.4, 1.8, 0.2))
plt.ylim(0.5, 1.6)
plt.grid()
plt.figure()
plt.plot(MeasuredFreq4, [100*f for f in SmoothFluo4], color='darkred')
plt.xlabel('Desintonía 866 (MHz)')
plt.ylabel('Fluorescencia (A.U.)')
plt.axvline(-30, color='darkblue', linewidth=1.2, linestyle='--')
plt.yticks(np.arange(0.8, 2.4, 0.4))
plt.grid()
"""
#%%
from scipy.optimize import curve_fit
T = 0.5e-3
sg = 0.7
sp = 6
sr = 0
DetDoppler = -14
DetRepump = 0
FitsSp = []
FitsOffset = []
Sg = [0.87]
def FitEIT(freqs, SP, offset):
MeasuredFreq, MeasuredFluo = GenerateNoisyCPT_fit(0.87, sr, SP, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, [titaprobe], phirepump, titarepump, freqs, plot=False, solvemode=1, detpvec=None, noiseamplitude=noiseamplitude)
FinalFluo = [f*43000 + 2685 for f in MeasuredFluo]
return FinalFluo
freqs = [f-offsetx+32 for f in FreqsDR]
freqslong = np.arange(min(freqs), max(freqs)+freqs[1]-freqs[0], 0.1*(freqs[1]-freqs[0]))
popt, pcov = curve_fit(FitEIT, freqs, CountsDR, p0=[5, 700], bounds=(0, [10, 1e6]))
FitsSp.append(popt[0])
FitsOffset.append(popt[1])
print(popt)
FittedEIT = FitEIT(freqslong, *popt)
plt.figure()
plt.errorbar(freqs, CountsDR, yerr=2*np.sqrt(CountsDR), fmt='o', capsize=2, markersize=2)
plt.plot(freqslong, FitEIT(freqslong, *popt))
plt.title(f'Sdop: {round(popt[0], 2)}, Spr: {round(popt[1], 2)}, T: {T*1e3} mK, detDop: {DetDoppler} MHz')
np.savetxt('CPT_measured.txt', np.transpose([freqs, CountsDR]))
np.savetxt('CPT_fitted.txt', np.transpose([freqslong, FittedEIT]))
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Apr 7 22:30:01 2020
@author: nico
"""
import numpy as np
import time
import matplotlib.pyplot as plt
from scipy.signal import argrelextrema
"""
Scripts para el calculo de la curva CPT
"""
def H0matrix(Detg, Detp, u):
"""
Calcula la matriz H0 en donde dr es el detuning del doppler, dp es el retuning del repump y u es el campo magnético en Hz/Gauss.
Para esto se toma la energía del nivel P como 0
"""
eigenEnergies = (Detg-u, Detg+u, -u/3, u/3, Detp-6*u/5, Detp-2*u/5, Detp+2*u/5, Detp+6*u/5) #pagina 26 de Oberst. los lande del calcio son iguales a Bario.
H0 = np.diag(eigenEnergies)
return H0
def HImatrix(rabG, rabP, phidoppler, titadoppler, phiprobe, titaprobe):
"""
Calcula la matriz de interacción Hsp + Hpd, en donde rabR es la frecuencia de rabi de la transición Doppler SP,
rabP es la frecuencia de rabi de la transición repump DP, y las componentes ei_r y ei_p son las componentes de la polarización
del campo eléctrico incidente de doppler y repump respectivamente. Deben estar normalizadas a 1
"""
HI = np.zeros((8, 8), dtype=np.complex_)
i, j = 1, 3
HI[i-1, j-1] = (rabG/np.sqrt(3)) * np.cos(titadoppler)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 1, 4
HI[i-1, j-1] = -(rabG/np.sqrt(3)) * np.sin(titadoppler)*np.exp(1j*phidoppler)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 2, 3
HI[i-1, j-1] = -(rabG/np.sqrt(3)) * np.sin(titadoppler)*np.exp(-1j*phidoppler)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 2, 4
HI[i-1, j-1] = -(rabG/np.sqrt(3)) * np.cos(titadoppler)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 3, 5
HI[i-1, j-1] = -(rabP/2) * np.sin(titaprobe)*np.exp(-1j*phiprobe)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 3, 6
HI[i-1, j-1] = -(rabP/np.sqrt(3)) * np.cos(titaprobe)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 3, 7
HI[i-1, j-1] = rabP/np.sqrt(12) * np.sin(titaprobe)*np.exp(1j*phiprobe)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 4, 6
HI[i-1, j-1] = -(rabP/np.sqrt(12)) * np.sin(titaprobe)*np.exp(-1j*phiprobe)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 4, 7
HI[i-1, j-1] = -(rabP/np.sqrt(3)) * np.cos(titaprobe)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 4, 8
HI[i-1, j-1] = (rabP/2) * np.sin(titaprobe)*np.exp(1j*phiprobe)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
return HI
def Lplusminus(detr, detp, phirepump, titarepump, forma=1):
Hintplus = np.zeros((8, 8), dtype=np.complex_)
Hintminus = np.zeros((8, 8), dtype=np.complex_)
Hintplus[4, 2] = (-1/2)*np.sin(titarepump)*np.exp(1j*phirepump)
Hintplus[5, 2] = (-1/np.sqrt(3))*np.cos(titarepump)
Hintplus[6, 2] = (1/(2*np.sqrt(3)))*np.sin(titarepump)*np.exp(-1j*phirepump)
Hintplus[5, 3] = (-1/(2*np.sqrt(3)))*np.sin(titarepump)*np.exp(1j*phirepump)
Hintplus[6, 3] = (-1/np.sqrt(3))*np.cos(titarepump)
Hintplus[7, 3] = (1/2)*np.sin(titarepump)*np.exp(-1j*phirepump)
Hintminus[2, 4] = (-1/2)*np.sin(titarepump)*np.exp(-1j*phirepump)
Hintminus[2, 5] = (-1/np.sqrt(3))*np.cos(titarepump)
Hintminus[2, 6] = (1/(2*np.sqrt(3)))*np.sin(titarepump)*np.exp(1j*phirepump)
Hintminus[3, 5] = (-1/(2*np.sqrt(3)))*np.sin(titarepump)*np.exp(-1j*phirepump)
Hintminus[3, 6] = (-1/np.sqrt(3))*np.cos(titarepump)
Hintminus[3, 7] = (1/2)*np.sin(titarepump)*np.exp(1j*phirepump)
if forma==1:
Lplus = np.zeros((64, 64), dtype=np.complex_)
Lminus = np.zeros((64, 64), dtype=np.complex_)
DeltaBar = np.zeros((64, 64), dtype=np.complex_)
for r in range(8):
for q in range(8):
for k in range(8):
for j in range(8):
if j==q:
if (k==2 or k==3) and r > 3:
Lplus[r*8+q][k*8+j] = (-1j)*(Hintplus[r,k])
if (r==2 or r==3) and k > 3:
Lminus[r*8+q][k*8+j] = (-1j)*(Hintminus[r,k])
elif r==k:
if (q==2 or q==3) and j > 3:
Lplus[r*8+q][k*8+j] = (-1j)*(- Hintplus[j,q])
if (j==2 or j==3) and q > 3:
Lminus[r*8+q][k*8+j] = (-1j)*(- Hintminus[j,q])
if forma==2:
deltaKro = np.diag([1, 1, 1, 1, 1, 1, 1, 1])
Lplus = (-1j)*(np.kron(Hintplus, deltaKro) - np.kron(deltaKro, Hintplus))
Lminus = (-1j)*(np.kron(Hintminus, deltaKro) - np.kron(deltaKro, Hintminus))
DeltaBar = np.zeros((64, 64), dtype=np.complex_)
for i in range(64):
DeltaBar[i, i] = (1j)*(detr - detp)
return np.matrix(Lminus), np.matrix(Lplus), np.matrix(DeltaBar)
def GetL1(Lplus, Lminus, DeltaBar, L0, rabR, nmax):
"""
Devuelve Splus0 y Sminus0
"""
Sp = (-1)*(0.5*rabR)*(np.matrix(np.linalg.inv(L0 - (nmax+1)*DeltaBar))*np.matrix(Lplus))
Sm = (-1)*(0.5*rabR)*(np.matrix(np.linalg.inv(L0 + (nmax+1)*DeltaBar))*np.matrix(Lminus))
for n in list(range(nmax+1))[(nmax+1)::-1][0:len(list(range(nmax+1))[(nmax+1)::-1])-1]: #jaja esto solo es para que vaya de nmax a 1 bajando. debe haber algo mas facil pero kcio
Sp = (-1)*(rabR)*(np.matrix(np.linalg.inv(L0 - n*DeltaBar + rabR*(Lminus*np.matrix(Sp))))*np.matrix(Lplus))
Sm = (-1)*(rabR)*(np.matrix(np.linalg.inv(L0 + n*DeltaBar + rabR*(Lplus*np.matrix(Sm))))*np.matrix(Lminus))
L1 = 0.5*rabR*(np.matrix(Lminus)*np.matrix(Sp) + np.matrix(Lplus)*np.matrix(Sm))
return L1
def EffectiveL(gPS, gPD, lwg, lwr, lwp):
"""
Siendo Heff = H + EffectiveL, calcula dicho EffectiveL que es (-0.5j)*sumatoria(CmDaga*Cm) que luego sirve para calcular el Liouvilliano
"""
Leff = np.zeros((8, 8), dtype=np.complex_)
Leff[0, 0] = 2*lwg
Leff[1, 1] = 2*lwg
Leff[2, 2] = ((2/3)+(1/3))*gPS + ((1/2) + (1/6) + (1/3))*gPD
Leff[3, 3] = ((2/3)+(1/3))*gPS + ((1/2) + (1/6) + (1/3))*gPD
Leff[4, 4] = 2*(lwr + lwp)
Leff[5, 5] = 2*(lwr + lwp)
Leff[6, 6] = 2*(lwr + lwp)
Leff[7, 7] = 2*(lwr + lwp)
return (-0.5j)*Leff
def CalculateSingleMmatrix(gPS, gPD, lwg, lwr, lwp):
"""
Si tomamos el Liuvilliano como L = (-j)*(Heff*deltak - Heffdaga*deltak) + sum(Mm),
esta funcion calcula dichos Mm, que tienen dimensión 64x64 ya que esa es la dimensión del L. Estas componentes
salen de hacer la cuenta a mano conociendo los Cm y considerando que Mm[8*(r-1)+s, 8*(k-1)+j] = Cm[r,l] + Cmdaga[j,s] = Cm[r,l] + Cm[s,j]
ya que los componentes de Cm son reales.
Esta M es la suma de las 8 matrices M.
"""
M = np.matrix(np.zeros((64, 64), dtype=np.complex_))
M[0,27] = (2/3)*gPS
M[9,18] = (2/3)*gPS
M[0,18] = (1/3)*gPS
M[1,19] = -(1/3)*gPS
M[8,26] = -(1/3)*gPS
M[9,27] = (1/3)*gPS
M[36,18] = (1/2)*gPD
M[37,19] = (1/np.sqrt(12))*gPD
M[44,26] = (1/np.sqrt(12))*gPD
M[45,27] = (1/6)*gPD
M[54,18] = (1/6)*gPD
M[55,19] = (1/np.sqrt(12))*gPD
M[62,26] = (1/np.sqrt(12))*gPD
M[63,27] = (1/2)*gPD
M[45,18] = (1/3)*gPD
M[46,19] = (1/3)*gPD
M[53,26] = (1/3)*gPD
M[54,27] = (1/3)*gPD
M[0,0] = 2*lwg
M[1,1] = 2*lwg
M[8,8] = 2*lwg
M[9,9] = 2*lwg
factor1 = 1
factor2 = 1
factor3 = 1
factor4 = 1
#M[36, 45] = lwp
M[36,36] = 2*(lwr + factor1*lwp)
M[37,37] = 2*(lwr + factor1*lwp)
M[38,38] = 2*(lwr + factor1*lwp)
M[39,39] = 2*(lwr + factor1*lwp)
M[44,44] = 2*(lwr + factor2*lwp)
M[45,45] = 2*(lwr + factor2*lwp)
M[46,46] = 2*(lwr + factor2*lwp)
M[47,47] = 2*(lwr + factor2*lwp)
M[52,52] = 2*(lwr + factor3*lwp)
M[53,53] = 2*(lwr + factor3*lwp)
M[54,54] = 2*(lwr + factor3*lwp)
M[55,55] = 2*(lwr + factor3*lwp)
M[60,60] = 2*(lwr + factor4*lwp)
M[61,61] = 2*(lwr + factor4*lwp)
M[62,62] = 2*(lwr + factor4*lwp)
M[63,63] = 2*(lwr + factor4*lwp)
return M
def dopplerBroadening(wlg, wlp, alpha, T, mcalcio = 6.655e-23*1e-3):
"""
Calcula el broadening extra semiclásico por temperatura considerando que el ion atrapado se mueve.
wlg es la longitud de onda doppler, wlp la longitud de onda repump, T la temperatura del ion en kelvin, y alpha (en rads) el ángulo
que forman ambos láseres.
"""
kboltzmann = 1.38e-23 #J/K
gammaD = (2*np.pi)*np.sqrt((1/(wlg*wlg)) + (1/(wlp*wlp)) - 2*(1/(wlg*wlp))*np.cos(alpha))*np.sqrt(kboltzmann*T/(2*mcalcio))
return gammaD
def FullL_efficient(rabG, rabR, rabP, gPS = 0, gPD = 0, Detg = 0, Detr = 0, Detp = 0, u = 0, lwg = 0, lwr=0, lwp = 0,
phidoppler=0, titadoppler=0, phiprobe=0, titaprobe=0, phirepump=0, titarepump=0, T = 0, alpha = 0):
"""
Calcula el Liouvilliano total de manera explícita índice a índice. Suma aparte las componentes de las matrices M.
Es la más eficiente hasta ahora.
"""
db = dopplerBroadening(0.397e-6, 0.866e-6, alpha, T)
#lwr = np.sqrt(lwr**2 + dopplerBroadening(0.397e-6, 0.866e-6, alpha, T)**2)
lwg = np.sqrt(lwg**2 + db**2)
lwr = np.sqrt(lwr**2 + db**2)
CC = EffectiveL(gPS, gPD, lwg, lwr, lwp)
Heff = H0matrix(Detg, Detp, u) + HImatrix(rabG, rabP, phidoppler, titadoppler, phiprobe, titaprobe) + CC
Heffdaga = np.matrix(Heff).getH()
Lfullpartial = np.zeros((64, 64), dtype=np.complex_)
for r in range(8):
for q in range(8):
for k in range(8):
for j in range(8):
if j!=q and r!=k:
pass
elif j==q and r!=k:
if (r < 2 and k > 3) or (k < 2 and r > 3) or (r > 3 and k > 3) or (r==0 and k==1) or (r==1 and k==0) or (r==2 and k==3) or (r==3 and k==2): #todo esto sale de analizar explicitamente la matriz y tratar de no calcular cosas de más que dan cero
pass
else:
Lfullpartial[r*8+q][k*8+j] = (-1j)*(Heff[r,k])
elif j!=q and r==k:
if (j < 2 and q > 3) or (q < 2 and j > 3) or (j > 3 and q > 3) or (j==0 and q==1) or (j==1 and q==0) or (j==2 and q==3) or (j==3 and q==2):
pass
else:
Lfullpartial[r*8+q][k*8+j] = (-1j)*(-Heffdaga[j,q])
else:
if Heff[r,k] == Heffdaga[j,q]:
pass
else:
Lfullpartial[r*8+q][k*8+j] = (-1j)*(Heff[r,k]-Heffdaga[j,q])
M = CalculateSingleMmatrix(gPS, gPD, lwg, lwr, lwp)
L0 = np.array(np.matrix(Lfullpartial) + M)
nmax = 1
Lminus, Lplus, DeltaBar = Lplusminus(Detr, Detp, phirepump, titarepump)
factor1 = np.exp(1j*0.2*np.pi)
factor2 = np.exp(-1j*0.2*np.pi)
#print(factor)
L1 = GetL1(factor1*Lplus, factor2*Lminus, DeltaBar, L0, rabR, nmax)
Lfull = L0 + L1
#NORMALIZACION DE RHO
i = 0
while i < 64:
if i%9 == 0:
Lfull[0, i] = 1
else:
Lfull[0, i] = 0
i = i + 1
return Lfull
"""
Scripts para correr un experimento y hacer el análisis de los datos
"""
def CalculoTeoricoDarkResonances(u, titadoppler):
if titadoppler==0:
NegativeDR = [(-7/5)*u, (-3/5)*u, (-1/5)*u, (1/5)*u, (3/5)*u, (7/5)*u]
elif titadoppler==90:
NegativeDR = [(-11/5)*u, (-7/5)*u, (-3/5)*u, (3/5)*u, (7/5)*u, (11/5)*u]
PositiveDR = [(-8/5)*u, (-4/5)*u, 0, (4/5)*u, (8/5)*u]
return NegativeDR, PositiveDR
def CPTspectrum8levels(rabG, rabR, rabP, gPS, gPD, Detg, Detr, u, lwg, lwr, lwp, Temp, alpha, phidoppler, titadoppler, phiprobe, titaprobe, phirepump, titarepump,
freqMin=-100, freqMax=100, freqStep=1e-1, plot=False, solvemode=1):
"""
Hace un experimento barriendo ángulos de repump con el angulo de doppler fijo.
solvemode=1: resuelve con np.linalg.solve
solvemode=2: resuelve invirtiendo L con la funcion np.linalg.inv
"""
phidoppler, titadoppler = phidoppler*(np.pi/180), titadoppler*(np.pi/180)
phiprobe, titaprobe = phiprobe*(np.pi/180), titaprobe*(np.pi/180)
phirepump, titarepump = phirepump*(np.pi/180), titarepump*(np.pi/180)
DetProbeVector = 2*np.pi*np.arange(freqMin*1e6, freqMax*1e6, freqStep*1e6)
Detg, Detr = 2*np.pi*Detg*1e6, 2*np.pi*Detr*1e6
lwg, lwr, lwp = 2*np.pi*lwg*1e6, 2*np.pi*lwr*1e6, 2*np.pi*lwp*1e6
#u = 2*np.pi*u*1e6
Fluovector = []
tinicial = time.time()
for Detp in DetProbeVector:
L = FullL_efficient(rabG, rabR, rabP, gPS, gPD, Detg, Detr, Detp, u, lwg, lwr, lwp, phidoppler, titadoppler, phiprobe, titaprobe, phirepump, titarepump, Temp, alpha)
if solvemode == 1:
rhovectorized = np.linalg.solve(L, np.array([int(i==0) for i in range(64)]))
Fluo = np.real(rhovectorized[18] + np.real(rhovectorized[27])) #estos son los rho33 + rho44
Fluovector.append(Fluo)
if solvemode == 2:
Linv = np.linalg.inv(L)
rhovectorized = [Linv[j][0] for j in range(len(Linv))]
Fluo = np.real(rhovectorized[18] + np.real(rhovectorized[27])) #estos son los rho33 + rho44
Fluovector.append(Fluo)
tfinal = time.time()
print('Done, Total time: ', round((tfinal-tinicial), 2), "s")
DetProbeVectorMHz = np.arange(freqMin, freqMax, freqStep)
if plot:
plt.xlabel('Probe detuning (MHz)')
plt.ylabel('Fluorescence (A.U.)')
plt.plot(DetProbeVectorMHz, [100*f for f in Fluovector], label=str(titaprobe) + 'º, T: ' + str(Temp*1e3) + ' mK')
plt.legend()
return DetProbeVectorMHz, Fluovector
def CPTspectrum8levels_fixedRabi(sg, sr, sp, gPS, gPD, Detg, Detr, u, lwg, lwr, lwp, Temp, alpha, phidoppler, titadoppler, phiprobe, titaprobe, phirepump, titarepump,
freqMin=-100, freqMax=100, freqStep=1e-1, plot=False, solvemode=1):
"""
Hace un experimento barriendo ángulos de repump con el angulo de doppler fijo.
solvemode=1: resuelve con np.linalg.solve
solvemode=2: resuelve invirtiendo L con la funcion np.linalg.inv
"""
phidoppler, titadoppler = phidoppler*(np.pi/180), titadoppler*(np.pi/180)
phiprobe, titaprobe = phiprobe*(np.pi/180), titaprobe*(np.pi/180)
phirepump, titarepump = phirepump*(np.pi/180), titarepump*(np.pi/180)
DetProbeVector = 2*np.pi*np.arange(freqMin*1e6, freqMax*1e6, freqStep*1e6)
Detg, Detr = 2*np.pi*Detg*1e6, 2*np.pi*Detr*1e6
#lwg, lwr, lwp = 2*np.pi*lwg*1e6, 2*np.pi*lwr*1e6, 2*np.pi*lwp*1e6
lwg, lwr, lwp = lwg*1e6, lwr*1e6, lwp*1e6
rabG = sg*gPS
rabR = sr*gPD
rabP = sp*gPD
#u = 2*np.pi*u*1e6
Fluovector = []
tinicial = time.time()
for Detp in DetProbeVector:
L = FullL_efficient(rabG, rabR, rabP, gPS, gPD, Detg, Detr, Detp, u, lwg, lwr, lwp, phidoppler, titadoppler, phiprobe, titaprobe, phirepump, titarepump, Temp, alpha)
if solvemode == 1:
coh = 5
rhovectorized = np.linalg.solve(L, np.array([int(i==0) for i in range(64)]))
#Fluo = np.abs(rhovectorized[coh])
Fluo = np.real(rhovectorized[18] + np.real(rhovectorized[27])) #estos son los rho33 + rho44
Fluovector.append(Fluo)
if solvemode == 2:
Linv = np.linalg.inv(L)
rhovectorized = [Linv[j][0] for j in range(len(Linv))]
Fluo = np.real(rhovectorized[18] + np.real(rhovectorized[27])) #estos son los rho33 + rho44
Fluovector.append(Fluo)
tfinal = time.time()
print('Done, Total time: ', round((tfinal-tinicial), 2), "s")
DetProbeVectorMHz = np.arange(freqMin, freqMax, freqStep)
if plot:
plt.xlabel('Probe detuning (MHz)')
plt.ylabel('Fluorescence (A.U.)')
plt.plot(DetProbeVectorMHz, [100*f for f in Fluovector], label=str(titaprobe) + 'º, T: ' + str(Temp*1e3) + ' mK')
plt.legend()
return DetProbeVectorMHz, Fluovector
#%%
if __name__ == "__main__":
ub = 9.27e-24
h = 6.63e-34
c = (ub/h)*1e-4 #en unidades de MHz/G
B = 25 #campo magnetico en gauss
u = c*B
sg, sr, sp = 0.5, 1.5, 4 #parámetros de saturación del doppler y repump
gPS, gPD, = 2*np.pi*21.58e6, 2*np.pi*1.35e6 #anchos de linea de las transiciones
rabG, rabR, rabP = sg*gPS, sr*gPD, sp*gPD #frecuencias de rabi
lwg, lwr, lwp = 0.3, 0.3, 0.3 #ancho de linea de los laseres
Detg = -25
Detr = 20 #detuning del doppler y repump
Temp = 0.0e-3 #temperatura en K
alpha = 0*(np.pi/180) #angulo entre los láseres
phidoppler, titadoppler = 0, 90
phirepump, titarepump = 0, 90
phiprobe, titaprobe = 0, 90
plotCPT = False
freqMin = -50
freqMax = 50
freqStep = 5e-2
Frequencyvector, Fluovector = CPTspectrum8levels(rabG, rabR, rabP, gPS, gPD, Detg, Detr, u, lwg, lwr, lwp, Temp, alpha, phidoppler, titadoppler, phiprobe, titaprobe, phirepump, titarepump, freqMin=freqMin, freqMax=freqMax, freqStep=freqStep, plot=plotCPT, solvemode=1)
NegativeDR, PositiveDR = CalculoTeoricoDarkResonances(u/(2*np.pi*1e6), titadoppler)
plt.plot(Frequencyvector, [100*f for f in Fluovector], label=str(titaprobe) + 'º, T: ' + str(Temp*1e3) + ' mK')
plt.xlabel('Probe detuning (MHz)')
plt.ylabel('Fluorescence (A.U.)')
for PDR in PositiveDR:
plt.axvline(Detr+PDR, linestyle='--', linewidth=0.5, color='red')
for NDR in NegativeDR:
plt.axvline(Detg+NDR, linestyle='--', linewidth=0.5, color='blue')
#parametros que andan piola:
"""
ub = 9.27e-24
h = 6.63e-34
c = (ub/h)*1e-4 #en unidades de MHz/G
B = 17 #campo magnetico en gauss
u = c*B
#u = 80e6
sr, sp = 0.53, 4.2
gPS, gPD, = 2*np.pi*21.58e6, 2*np.pi*1.35e6
rabR, rabP = sr*gPS, sp*gPD
lw = 2*np.pi * 0.33e6
lwr, lwp = lw, lw #ancho de linea de los laseres
dr_spec = - 2*np.pi* 26e6
freqSteps = 500
freqMin = -100e6
freqMax = 100e6
dps = 2*np.pi*np.linspace(freqMin, freqMax, freqSteps)
#dps = [-30e6]
alfar = 90*(np.pi/180)
ex_r, ey_r, ez_r = np.sin(alfar)*np.cos(0), np.sin(alfar)*np.sin(0), np.cos(alfar)
alfap = 90*(np.pi/180)
ex_p, ey_p, ez_p = np.sin(alfap)*np.cos(0), np.sin(alfap)*np.sin(0), np.cos(alfap)
"""
import h5py
import matplotlib.pyplot as plt
import numpy as np
import sys
import re
import ast
from scipy.optimize import curve_fit
import os
from scipy import interpolate
#Mediciones barriendo angulo del TISA y viendo kicking de resonancias oscuras
#C:\Users\Usuario\Documents\artiq\artiq_experiments\analisis\plots\20220106_CPT_DosLaseres_v08_TISA_DR\Data
os.chdir('/home/nico/Documents/artiq_experiments/analisis/plots/20230424_CPT_TemperatureSens/Data/')
CPT_FILES = """000011345-IR_Scan_withcal_optimized
000011331-IR_Scan_withcal_optimized
"""
HEATING_FILES = """000011346-IR_Scan_withcal_optimized
000011347-IR_Scan_withcal_optimized
000011348-IR_Scan_withcal_optimized
000011349-IR_Scan_withcal_optimized
000011350-IR_Scan_withcal_optimized
000011334-IR_Scan_withcal_optimized
000011336-IR_Scan_withcal_optimized
000011337-IR_Scan_withcal_optimized
000011341-IR_Scan_withcal_optimized
000011342-IR_Scan_withcal_optimized
000011343-IR_Scan_withcal_optimized
000011344-IR_Scan_withcal_optimized
"""
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'
print(fname)
print(list(data['datasets'].keys()))
print(SeeKeys(CPT_FILES))
print(SeeKeys(HEATING_FILES))
#carpeta pc nico labo escritorio:
#C:\Users\Usuario\Documents\artiq\artiq_experiments\analisis\plots\20211101_CPT_DosLaseres_v03\Data
Counts = []
Freqs = []
AmpTisa = []
UVCPTAmp = []
No_measures = []
for i, fname in enumerate(CPT_FILES.split()):
print(str(i) + ' - ' + fname)
#print(fname)
data = h5py.File(fname+'.h5', 'r') # Leo el h5: Recordar que nuestros datos estan en 'datasets'
# Aca hago algo repugnante para poder levantar los strings que dejamos
# que además tenian un error de tipeo al final. Esto no deberá ser necesario
# cuando se solucione el error este del guardado.
Freqs.append(np.array(data['datasets']['IR1_Frequencies']))
Counts.append(np.array(data['datasets']['counts_spectrum']))
#AmpTisa.append(np.array(data['datasets']['TISA_CPT_amp']))
UVCPTAmp.append(np.array(data['datasets']['UV_CPT_amp']))
No_measures.append(np.array(data['datasets']['no_measures']))
Counts_heating = []
HeatTimes = []
AmpTisa_heating = []
UVCPTAmp_heating = []
No_measures_heating = []
Freqs_heating = []
for i, fname in enumerate(HEATING_FILES.split()):
print(str(i) + ' - ' + fname)
#print(fname)
data = h5py.File(fname+'.h5', 'r') # Leo el h5: Recordar que nuestros datos estan en 'datasets'
# Aca hago algo repugnante para poder levantar los strings que dejamos
# que además tenian un error de tipeo al final. Esto no deberá ser necesario
# cuando se solucione el error este del guardado.
HeatTimes.append(np.array(data['datasets']['t_heating']))
Freqs_heating.append(np.array(data['datasets']['IR1_Frequencies']))
Counts_heating.append(np.array(data['datasets']['counts_spectrum']))
#AmpTisa.append(np.array(data['datasets']['TISA_CPT_amp']))
UVCPTAmp_heating.append(np.array(data['datasets']['UV_CPT_amp']))
No_measures_heating.append(np.array(data['datasets']['no_measures']))
#%%
"""
Ploteo las cpt de referencia / plotting the reference CPT
"""
jvec = [0,1]
plt.figure()
i = 0
for j in jvec:
plt.errorbar([2*f*1e-6 for f in Freqs[j]], Counts[j], yerr=np.sqrt(Counts[j]), fmt='o', capsize=2, markersize=2)
i = i + 1
plt.xlabel('Frecuencia (MHz)')
plt.ylabel('counts')
plt.grid()
plt.legend()
#%%
from EITfit.threeLevel_2repumps_AnalysisFunctions import CalculoTeoricoDarkResonances_8levels, GetMinimaInfo, GetPlotsofFluovsAngle_8levels, PerformExperiment_8levels, FindDRFrequencies, FindRelativeFluorescencesOfDR, GenerateNoisyCPT, SmoothNoisyCPT, GetFinalMaps, GenerateNoisyCPT_fixedRabi, GenerateNoisyCPT_fit
from EITfit.threeLevel_2repumps_AnalysisFunctions import MeasureRelativeFluorescenceFromCPT, IdentifyPolarizationCoincidences, RetrieveAbsoluteCoincidencesBetweenMaps, GetClosestIndex
from scipy.optimize import curve_fit
"""
Ajusto un cpt para obtener todos los parámetros relevantes primero.
I fit a cpt curve to retrieve all the relevant parameters first.
"""
phidoppler, titadoppler = 0, 90
phirepump, titarepump = 0, 0
phiprobe = 0
titaprobe = 90
gPS, gPD, = 2*np.pi*21.58e6, 2*np.pi*1.35e6
alpha = 0
noiseamplitude = 0
T = 0.6e-3
sg = 0.544
sp = 4.5
sr = 0
DetRepump = 0
lw = 0.1
DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth = lw, lw, lw #ancho de linea de los laseres
u = 33.5e6
c=3e8
B = (u/(2*np.pi))/c
correccion = 6 #con 3 fitea bien
offsetxpi = 440+1+correccion
DetDoppler = -12-correccion
FreqsCPT = [2*f*1e-6-offsetxpi+14 for f in Freqs[0]]
CountsCPT = Counts[0]
freqslongCPT = np.arange(min(FreqsCPT), max(FreqsCPT)+FreqsCPT[1]-FreqsCPT[0], 0.1*(FreqsCPT[1]-FreqsCPT[0]))
#[1.71811842e+04 3.34325038e-17]
def FitEIT(freqs, SG, SP, scale, offset, temp):
#temp = 2.9e-4
MeasuredFreq, MeasuredFluo = GenerateNoisyCPT_fit(SG, sr, SP, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, temp, alpha, phidoppler, titadoppler, phiprobe, [titaprobe], phirepump, titarepump, freqs, plot=False, solvemode=1, detpvec=None, noiseamplitude=noiseamplitude)
#scale = 2.85164232e+04
#offset = 2.16392191e+03
FinalFluo = [f*scale + offset for f in MeasuredFluo]
return FinalFluo
popt_fullcpt_noheat, pcov_fullcpt_noheat = curve_fit(FitEIT, FreqsCPT, CountsCPT, p0=[0.5, 4.5, 1e4, 1e3, 1e-3], bounds=((0, 0, 0, 0, 0), (2, 10, 1e5, 1e5, 10e-3)))
print(f'Temperatura: ({round(1e3*popt_fullcpt_noheat[-1],2)} +- {round(1e3*np.sqrt(pcov_fullcpt_noheat[-1][-1]),2)}) mK')
print(popt_fullcpt_noheat)
FittedEIT = FitEIT(freqslongCPT, *popt_fullcpt_noheat)
#%%
"""
Ploteo la CPT de referencia junto al ajuste
I plot the reference CPT along with the fit to the model
"""
plt.figure()
plt.errorbar(FreqsCPT, CountsCPT, yerr=2*np.sqrt(CountsCPT), fmt='o', capsize=2, markersize=2)
plt.plot(freqslongCPT, FittedEIT)
plt.xlabel('Detuning (MHz)')
plt.ylabel('Counts')
#plt.title(f'Sdop: {round(popt[0], 2)}, Spr: {round(popt[1], 2)}, T: {round(popt[2]*1e3, 2)} mK, detDop: {DetDoppler} MHz')
HeatTimes = [0,1,2,3,4]
#plt.figure()
for j in [0,1,2,3,4]:
plt.errorbar([2*f*1e-6-offsetxpi+14 for f in Freqs_heating[j]], Counts_heating[j], yerr=0.0*np.sqrt(Counts_heating[j]), fmt='-', capsize=2, markersize=2, label=f'Heating time {HeatTimes[j]} ms')
plt.legend()
plt.xlim(-25,10)
#%%
#Ahora lo mismo con otro set de mediciones
from EITfit.threeLevel_2repumps_AnalysisFunctions import CalculoTeoricoDarkResonances_8levels, GetMinimaInfo, GetPlotsofFluovsAngle_8levels, PerformExperiment_8levels, FindDRFrequencies, FindRelativeFluorescencesOfDR, GenerateNoisyCPT, SmoothNoisyCPT, GetFinalMaps, GenerateNoisyCPT_fixedRabi, GenerateNoisyCPT_fit
from EITfit.threeLevel_2repumps_AnalysisFunctions import MeasureRelativeFluorescenceFromCPT, IdentifyPolarizationCoincidences, RetrieveAbsoluteCoincidencesBetweenMaps, GetClosestIndex
from scipy.optimize import curve_fit
"""
Ajusto un cpt para obtener todos los parámetros relevantes primero.
I fit a cpt curve to retrieve all the relevant parameters first.
"""
phidoppler, titadoppler = 0, 90
phirepump, titarepump = 0, 0
phiprobe = 0
titaprobe = 90
gPS, gPD, = 2*np.pi*21.58e6, 2*np.pi*1.35e6
alpha = 0
noiseamplitude = 0
T = 0.6e-3
sg = 0.544
sp = 4.5
sr = 0
DetRepump = 0
lw = 0.1
DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth = lw, lw, lw #ancho de linea de los laseres
u = 33.5e6
c=3e8
B = (u/(2*np.pi))/c
correccion = 6 #con 3 fitea bien
offsetxpi = 440+1+correccion
DetDoppler = -12-correccion
FreqsCPT = [2*f*1e-6-offsetxpi+14 for f in Freqs[1]]
CountsCPT = Counts[1]
freqslongCPT = np.arange(min(FreqsCPT), max(FreqsCPT)+FreqsCPT[1]-FreqsCPT[0], 0.1*(FreqsCPT[1]-FreqsCPT[0]))
#[1.71811842e+04 3.34325038e-17]
def FitEIT(freqs, SG, SP, scale, offset, temp):
#temp = 2.9e-4
MeasuredFreq, MeasuredFluo = GenerateNoisyCPT_fit(SG, sr, SP, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, temp, alpha, phidoppler, titadoppler, phiprobe, [titaprobe], phirepump, titarepump, freqs, plot=False, solvemode=1, detpvec=None, noiseamplitude=noiseamplitude)
#scale = 2.85164232e+04
#offset = 2.16392191e+03
FinalFluo = [f*scale + offset for f in MeasuredFluo]
return FinalFluo
popt_fullcpt_noheat, pcov_fullcpt_noheat = curve_fit(FitEIT, FreqsCPT, CountsCPT, p0=[0.5, 4.5, 1e4, 1e3, 1e-3], bounds=((0, 0, 0, 0, 0), (2, 10, 1e5, 1e5, 10e-3)))
print(f'Temperatura: ({round(1e3*popt_fullcpt_noheat[-1],2)} +- {round(1e3*np.sqrt(pcov_fullcpt_noheat[-1][-1]),2)}) mK')
print(popt_fullcpt_noheat)
FittedEIT = FitEIT(freqslongCPT, *popt_fullcpt_noheat)
#%%
"""
Simulo CPTs con todos esos parámetros para distintas temperaturas
I simulate CPT curves with all the previous parameters but with varying temperatures
"""
TempVecTeorico = list(np.arange(0.3,1,0.1))+list(np.arange(1, 31, 1))
CurvasTeoricas = []
for tempi in TempVecTeorico:
CurvasTeoricas.append(FitEITpi(freqslongpi, *popt_fullcpt[:-1], tempi*1e-3))
#%%
"""
Acá agarro la primera y busco el valor i_DR que corresponde a la resonancia oscura de interés
With the first one, I look for the value i_DR which corresponds to the dark resonance of interest
"""
curva_ref = CurvasTeoricas[0]
i_DR = 955
plt.figure()
plt.plot(freqslongpi, curva_ref)
plt.plot(freqslongpi[i_DR], curva_ref[i_DR],'o')
#%%
"""
ploteo algunos CPTs teoricos para algunas temperaturas
Plotting some theory cpt curves for some temperatures
"""
plt.plot(freqslongpi, CurvasTeoricas[0])
plt.plot(freqslongpi[i_DR], CurvasTeoricas[0][i_DR],'o',markersize=10)
plt.plot(freqslongpi, CurvasTeoricas[10])
plt.plot(freqslongpi[i_DR], CurvasTeoricas[10][i_DR],'o',markersize=10)
plt.plot(freqslongpi, CurvasTeoricas[20])
plt.plot(freqslongpi[i_DR], CurvasTeoricas[20][i_DR],'o',markersize=10)
plt.xlabel('Detuning (MHz)')
plt.ylabel('Fluorescence')
plt.grid()
#%%
"""
Ahora interpolo los valores teóricos de las profundidades de esas resonancias
y aplico la interpolación a las mediciones para obtener temperaturas.
Luego, grafico las temperaturas en función de los tiempos de calentamiento.
Now I interpolate the theoretical values of the depths of those resonances
and apply the interpolation to the measurements to obtain temperatures.
After that, I plot the temperatures with respect to the heating times
"""
from scipy.interpolate import interp1d
FluosDRTeo = [CurvasTeoricas[k][i_DR] for k in range(len(CurvasTeoricas))]
interpolado = interp1d(FluosDRTeo, TempVecTeorico) #creo funcion que interpola
meas = 0
maxi = 9 #valor maximo, dsp el ion se calento
Heating_tim = Times[meas][:maxi]
Heating_tim_ms = [t*1e3 for t in Heating_tim]
Heating_med = [2*c for c in Counts_heating[meas][:maxi]]
ErrorHeating_med = [2*np.sqrt(c) for c in Counts_heating[meas][:maxi]]
Temperaturas_interpoladas = [float(interpolado(h)) for h in Heating_med]
Error_Temperaturas_interpoladas = [float(interpolado(Heating_med[k]+0.5*ErrorHeating_med[k]))-Temperaturas_interpoladas[k] for k in range(len(Heating_med))]
plt.figure()
plt.plot(FluosDRTeo, [1*t for t in TempVecTeorico], 'o', color='orange')
plt.plot(np.linspace(FluosDRTeo[0],FluosDRTeo[-1],1000), interpolado(np.linspace(FluosDRTeo[0],FluosDRTeo[-1],1000)))
plt.xlabel('Cuentas de DR teoricas')
plt.ylabel('Temperatura (mK)')
plt.figure()
#plt.plot(Heating_med, Heating_tim, 'o', color='blue')
plt.errorbar([t*1e3 for t in Heating_tim], Heating_med, yerr=ErrorHeating_med, fmt='o', capsize=2, markersize=5)
plt.ylabel('Cuentas de DR medidas')
plt.xlabel('Heating time (s)')
def lineal(x,a,b):
return a*x+b
#p1,p2 = curve_fit(lineal, Heating_tim_ms, Temperaturas_interpoladas, sigma=Error_Temperaturas_interpoladas)
p1,p2 = curve_fit(lineal, Heating_tim_ms, Temperaturas_interpoladas)
#%%
"""
Grafico finalmente el plot del heating rate de la trampa
Finally I plot the heating rate of the trap
"""
plt.figure()
#plt.plot(Heating_tim_ms,Temperaturas_interpoladas,'o')
plt.errorbar(Heating_tim_ms,Temperaturas_interpoladas, yerr=np.array(Error_Temperaturas_interpoladas), fmt='o', capsize=2, markersize=7, color='black')
plt.plot(Heating_tim_ms, lineal(np.array(Heating_tim_ms), *p1), color='red')
plt.xlabel('Heating time (ms)', fontname='STIXGeneral', fontsize=15)
plt.ylabel('Temperature (mK)', fontname='STIXGeneral', fontsize=15)
plt.grid()
plt.xticks([0, 5, 10, 15, 20 ,25, 30, 35], fontname='STIXGeneral', fontsize=15)
plt.yticks([0, 5, 10, 15], fontname='STIXGeneral', fontsize=15)
plt.title(f'Heating rate: ({round(p1[0],2)} +- {round(np.sqrt(p2[0][0]),2)}) mK/ms', fontname='STIXGeneral', fontsize=15)
plt.tight_layout()
plt.savefig('Fig_heatingrate.svg')
print(f'Heating rate: ({round(p1[0],2)} +- {round(np.sqrt(p2[0][0]),2)}) mK/ms')
#%%
"""
Ahora voy a ver CPT enteras con tiempos de calentamiento distintos.
Now I see whole CPT curves with different heating times
"""
jvec = [3, 4]
plt.figure()
i = 0
for j in jvec:
if j==4:
plt.errorbar([2*f*1e-6 for f in Freqs[j]], Counts[j], yerr=np.sqrt(Counts[j]), fmt='o', capsize=2, markersize=2, label='Without heating')
elif j==3:
plt.errorbar([2*f*1e-6 for f in Freqs[j]], Counts[j], yerr=np.sqrt(Counts[j]), fmt='o', capsize=2, markersize=2, label='5 ms heating')
i = i + 1
plt.xlabel('Frecuencia (MHz)')
plt.ylabel('counts')
plt.ylim(1000,2900)
plt.grid()
plt.legend()
jvec = [1, 2]
plt.figure()
i = 0
for j in jvec:
if j==2:
plt.errorbar([2*f*1e-6 for f in Freqs[j]], Counts[j], yerr=np.sqrt(Counts[j]), fmt='o', capsize=2, markersize=2, label='Without heating')
elif j==1:
plt.errorbar([2*f*1e-6 for f in Freqs[j]], Counts[j], yerr=np.sqrt(Counts[j]), fmt='o', capsize=2, markersize=2, label='1 ms heating')
i = i + 1
plt.xlabel('Frecuencia (MHz)')
plt.ylabel('counts')
plt.ylim(1000,2900)
plt.grid()
plt.legend()
#%%
"""
La siguiente curva probablemente no este bien medida ya que inmediatamente
despues, los laseres se deslockearon. La dejo por las dudas.
This curve is probably not well measured...
"""
jvec = [5, 6]
plt.figure()
i = 0
for j in jvec:
if j==6:
plt.errorbar([2*f*1e-6 for f in Freqs[j]], Counts[j], yerr=np.sqrt(Counts[j]), fmt='o', capsize=2, markersize=2, label='Without heating')
elif j==5:
plt.errorbar([2*f*1e-6 for f in Freqs[j]], Counts[j], yerr=np.sqrt(Counts[j]), fmt='o', capsize=2, markersize=2, label='10 ms heating')
i = i + 1
plt.xlabel('Frecuencia (MHz)')
plt.ylabel('counts')
plt.ylim(1000,3900)
plt.grid()
plt.legend()
plt.title('Ojo: medicion condicionada por derivas')
#%%
"""
Ahora ploteo 6 curvas cpt para distintos valores de potencia del UV
This is a plot of 6 different cpt curves for 6 different UV powers. I should fit them
to obtain saturation parameters
"""
jvec = [7,8,9,10,11,12]
plt.figure()
for j in jvec:
plt.errorbar([2*f*1e-6 for f in Freqs[j]], Counts[j], yerr=np.sqrt(Counts[j]), fmt='o', capsize=2, markersize=2, label='Without heating')
plt.xlabel('Frecuencia (MHz)')
plt.ylabel('counts')
#plt.ylim(1000,2900)
plt.grid()
#plt.legend()
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Jul 2 16:30:09 2020
@author: oem
"""
import os
import numpy as np
import time
import matplotlib.pyplot as plt
from scipy.signal import argrelextrema
from EITfit.threeLevel_2repumps_linealpol_python_scripts import CPTspectrum8levels, CPTspectrum8levels_fixedRabi
import random
from scipy.signal import savgol_filter as sf
def CalculoTeoricoDarkResonances_8levels(u, titadoppler, detuningdoppler, detuningrepump):
if titadoppler==0:
NegativeDR = [(-7/5)*u, (-3/5)*u, (-1/5)*u, (1/5)*u, (3/5)*u, (7/5)*u]
elif titadoppler==90:
NegativeDR = [(-11/5)*u, (-7/5)*u, (-3/5)*u, (3/5)*u, (7/5)*u, (11/5)*u]
else:
NegativeDR = [(-11/5)*u, (-7/5)*u, (-3/5)*u, (-1/5)*u, (1/5)*u, (3/5)*u, (7/5)*u, (11/5)*u]
PositiveDR = [(-8/5)*u, (-4/5)*u, 0, (4/5)*u, (8/5)*u]
return [detuningdoppler + dr for dr in NegativeDR], [detuningrepump + dr for dr in PositiveDR]
def GetClosestIndex(Vector, value, tolerance=1e-3):
i = 0
while i<len(Vector):
if abs(Vector[i] - value) < tolerance:
return i
else:
i = i + 1
return GetClosestIndex(Vector, value, tolerance=2*tolerance)
def FindDRFrequencies(Freq, Fluo, TeoDR, entorno=3):
"""
Busca los indices y la frecuencia de los minimos en un entorno cercano al de la DR.
Si no encuentra, devuelve el valor teórico.
"""
IndiceDRteo1, IndiceEntornoinicialDRteo1, IndiceEntornofinalDRteo1 = GetClosestIndex(Freq, TeoDR[0]), GetClosestIndex(Freq, TeoDR[0]-entorno), GetClosestIndex(Freq, TeoDR[0]+entorno)
IndiceDRteo2, IndiceEntornoinicialDRteo2, IndiceEntornofinalDRteo2 = GetClosestIndex(Freq, TeoDR[1]), GetClosestIndex(Freq, TeoDR[1]-entorno), GetClosestIndex(Freq, TeoDR[1]+entorno)
IndiceDRteo3, IndiceEntornoinicialDRteo3, IndiceEntornofinalDRteo3 = GetClosestIndex(Freq, TeoDR[2]), GetClosestIndex(Freq, TeoDR[2]-entorno), GetClosestIndex(Freq, TeoDR[2]+entorno)
IndiceDRteo4, IndiceEntornoinicialDRteo4, IndiceEntornofinalDRteo4 = GetClosestIndex(Freq, TeoDR[3]), GetClosestIndex(Freq, TeoDR[3]-entorno), GetClosestIndex(Freq, TeoDR[3]+entorno)
IndiceDRteo5, IndiceEntornoinicialDRteo5, IndiceEntornofinalDRteo5 = GetClosestIndex(Freq, TeoDR[4]), GetClosestIndex(Freq, TeoDR[4]-entorno), GetClosestIndex(Freq, TeoDR[4]+entorno)
IndiceDRteo6, IndiceEntornoinicialDRteo6, IndiceEntornofinalDRteo6 = GetClosestIndex(Freq, TeoDR[5]), GetClosestIndex(Freq, TeoDR[5]-entorno), GetClosestIndex(Freq, TeoDR[5]+entorno)
EntornoFreqDR1, EntornoFreqDR2 = Freq[IndiceEntornoinicialDRteo1:IndiceEntornofinalDRteo1], Freq[IndiceEntornoinicialDRteo2:IndiceEntornofinalDRteo2]
EntornoFreqDR3, EntornoFreqDR4 = Freq[IndiceEntornoinicialDRteo3:IndiceEntornofinalDRteo3], Freq[IndiceEntornoinicialDRteo4:IndiceEntornofinalDRteo4]
EntornoFreqDR5, EntornoFreqDR6 = Freq[IndiceEntornoinicialDRteo5:IndiceEntornofinalDRteo5], Freq[IndiceEntornoinicialDRteo6:IndiceEntornofinalDRteo6]
EntornoFluoDR1, EntornoFluoDR2 = Fluo[IndiceEntornoinicialDRteo1:IndiceEntornofinalDRteo1], Fluo[IndiceEntornoinicialDRteo2:IndiceEntornofinalDRteo2]
EntornoFluoDR3, EntornoFluoDR4 = Fluo[IndiceEntornoinicialDRteo3:IndiceEntornofinalDRteo3], Fluo[IndiceEntornoinicialDRteo4:IndiceEntornofinalDRteo4]
EntornoFluoDR5, EntornoFluoDR6 = Fluo[IndiceEntornoinicialDRteo5:IndiceEntornofinalDRteo5], Fluo[IndiceEntornoinicialDRteo6:IndiceEntornofinalDRteo6]
IndiceFluoMinimaEntorno1, IndiceFluoMinimaEntorno2 = argrelextrema(np.array(EntornoFluoDR1), np.less)[0], argrelextrema(np.array(EntornoFluoDR2), np.less)[0]
IndiceFluoMinimaEntorno3, IndiceFluoMinimaEntorno4 = argrelextrema(np.array(EntornoFluoDR3), np.less)[0], argrelextrema(np.array(EntornoFluoDR4), np.less)[0]
IndiceFluoMinimaEntorno5, IndiceFluoMinimaEntorno6 = argrelextrema(np.array(EntornoFluoDR5), np.less)[0], argrelextrema(np.array(EntornoFluoDR6), np.less)[0]
try:
FreqDR1 = EntornoFreqDR1[int(IndiceFluoMinimaEntorno1)]
IndiceDR1 = GetClosestIndex(Freq, FreqDR1)
except:
FreqDR1 = TeoDR[0]
IndiceDR1 = IndiceDRteo1
try:
FreqDR2 = EntornoFreqDR2[int(IndiceFluoMinimaEntorno2)]
IndiceDR2 = GetClosestIndex(Freq, FreqDR2)
except:
FreqDR2 = TeoDR[1]
IndiceDR2 = IndiceDRteo2
try:
FreqDR3 = EntornoFreqDR3[int(IndiceFluoMinimaEntorno3)]
IndiceDR3 = GetClosestIndex(Freq, FreqDR3)
except:
FreqDR3 = TeoDR[2]
IndiceDR3 = IndiceDRteo3
try:
FreqDR4 = EntornoFreqDR4[int(IndiceFluoMinimaEntorno4)]
IndiceDR4 = GetClosestIndex(Freq, FreqDR4)
except:
FreqDR4 = TeoDR[3]
IndiceDR4 = IndiceDRteo4
try:
FreqDR5 = EntornoFreqDR5[int(IndiceFluoMinimaEntorno5)]
IndiceDR5 = GetClosestIndex(Freq, FreqDR5)
except:
FreqDR5 = TeoDR[4]
IndiceDR5 = IndiceDRteo5
try:
FreqDR6 = EntornoFreqDR6[int(IndiceFluoMinimaEntorno6)]
IndiceDR6 = GetClosestIndex(Freq, FreqDR6)
except:
FreqDR6 = TeoDR[5]
IndiceDR6 = IndiceDRteo6
return [IndiceDR1, IndiceDR2, IndiceDR3, IndiceDR4, IndiceDR5, IndiceDR6], [FreqDR1, FreqDR2, FreqDR3, FreqDR4, FreqDR5, FreqDR6]
def FindRelativeFluorescencesOfDR(Freq, Fluo, IndicesDR, detuningdoppler, NormalizationCriterium=1, frecuenciareferenciacriterioasintotico=-100, getindices=False):
"""
Toma los indices donde estan las DR y evalua su fluorescencia. Esos indices son minimos locales en un entorno
cercano a las DR teoricas y, si no hay ningun minimo, toma la teorica.
Luego, hace el cociente de esa fluorescencia y un factor de normalización segun NormalizationCriterium:
1: Devuelve la fluorescencia absoluta de los minimos
2: Devuelve el cociente entre la fluorescencia del minimo y un valor medio entre dos puntos lejanos, como si no
hubiera una resonancia oscura y hubiera una recta. Ese valor esta a DistanciaFrecuenciaCociente del detuning del azul (el punto medio entre las dos DR en este caso)
3: Devuelve el cociente entre la fluorescencia del minimo y el valor a -100 MHz (si se hizo de -100 a 100),
o el valor limite por izquierda de la curva
4: Deuelve el cociente entre la fluorescencia del minimo y el valor de fluorescencia a detuning 0 MHz
"""
IndiceDR1, IndiceDR2, IndiceDR3, IndiceDR4, IndiceDR5, IndiceDR6 = IndicesDR[0], IndicesDR[1], IndicesDR[2], IndicesDR[3], IndicesDR[4], IndicesDR[5]
FluorescenceOfMinimums = [Fluo[IndiceDR1], Fluo[IndiceDR2], Fluo[IndiceDR3], Fluo[IndiceDR4], Fluo[IndiceDR5], Fluo[IndiceDR6]]
FrequencyOfMinimums = [Freq[IndiceDR1], Freq[IndiceDR2], Freq[IndiceDR3], Freq[IndiceDR4], Freq[IndiceDR5], Freq[IndiceDR6]]
DistanciaFrecuenciaCociente = 25
if NormalizationCriterium==0:
print('che')
return FrequencyOfMinimums, FluorescenceOfMinimums
if NormalizationCriterium==1:
Fluorescenciacerodetuning = Fluo[GetClosestIndex(Freq, 0)]
Fluorescenciaasintotica = Fluo[GetClosestIndex(Freq, frecuenciareferenciacriterioasintotico)]
return FrequencyOfMinimums, np.array([Fluorescenciacerodetuning/Fluorescenciaasintotica, Fluorescenciacerodetuning/Fluorescenciaasintotica, Fluorescenciacerodetuning/Fluorescenciaasintotica, Fluorescenciacerodetuning/Fluorescenciaasintotica, Fluorescenciacerodetuning/Fluorescenciaasintotica, Fluorescenciacerodetuning/Fluorescenciaasintotica])
if NormalizationCriterium==2:
k = 0
while k < len(Freq):
if Freq[k] < detuningdoppler-DistanciaFrecuenciaCociente + 2 and Freq[k] > detuningdoppler-DistanciaFrecuenciaCociente - 2:
FluoIzquierda = Fluo[k]
indiceizquierda = k
print('Izq:', Freq[k])
break
else:
k = k + 1
l = 0
while l < len(Freq):
if Freq[l] < detuningdoppler+DistanciaFrecuenciaCociente + 2 and Freq[l] > detuningdoppler+DistanciaFrecuenciaCociente - 2:
FluoDerecha = Fluo[l]
indicederecha = l
print('Der: ', Freq[l])
break
else:
l = l + 1
FluoNormDivisor = 0.5*(FluoDerecha+FluoIzquierda)
print(FluoNormDivisor)
if NormalizationCriterium==3:
#asintotico
FluoNormDivisor = Fluo[GetClosestIndex(Freq, frecuenciareferenciacriterioasintotico)]
if NormalizationCriterium==4:
#este te tira la fluorescencia de detuning 0
FluoNormDivisor = Fluo[GetClosestIndex(Freq, 0)]
RelativeFluorescenceOfMinimums = np.array([Fluore/FluoNormDivisor for Fluore in FluorescenceOfMinimums])
print('Esto: ', RelativeFluorescenceOfMinimums)
if NormalizationCriterium==2 and getindices==True:
return FrequencyOfMinimums, RelativeFluorescenceOfMinimums, indiceizquierda, indicederecha
return FrequencyOfMinimums, RelativeFluorescenceOfMinimums
def GetFinalMaps(MapasDR1, MapasDR2, MapasDR3, MapasDR4, MapasDR5, MapasDR6):
"""
Nota: esto vale para polarizacion del 397 sigma+ + sigma-. Sino hay que cambiar los coeficientes.
La estructura es:
MapasDRi = [MapaMedido_criterio1_DRi, MapaMedido_criterio2_DRi, MapaMedido_criterio3_DRi, MapaMedido_criterio4_DRi]
"""
Mapa1 = MapasDR1[0]
Mapa2pi = np.sqrt(3)*(MapasDR2[1] + MapasDR5[1])
Mapa2smas = np.sqrt(12/2)*MapasDR3[1] + (2/np.sqrt(2))*MapasDR6[1]
Mapa2smenos = (2/np.sqrt(2))*MapasDR1[1] + np.sqrt(12/2)*MapasDR4[1]
Mapa3pi = np.sqrt(3)*(MapasDR2[2] + MapasDR5[2])
Mapa3smas = np.sqrt(12/2)*MapasDR3[2] + (2/np.sqrt(2))*MapasDR6[2]
Mapa3smenos = (2/np.sqrt(2))*MapasDR1[2] + np.sqrt(12/2)*MapasDR4[2]
return Mapa1, [Mapa2pi, Mapa2smas, Mapa2smenos], [Mapa3pi, Mapa3smas, Mapa3smenos]
def CombinateDRwithCG(RelMinMedido1, RelMinMedido2, RelMinMedido3, RelMinMedido4):
Fluo1 = RelMinMedido1[0]
Fluo2pi = np.sqrt(3)*(RelMinMedido2[1] + RelMinMedido2[4])
Fluo2smas = np.sqrt(12/2)*RelMinMedido2[2] + (2/np.sqrt(2))*RelMinMedido2[5]
Fluo2smenos = (2/np.sqrt(2))*RelMinMedido2[0] + np.sqrt(12/2)*RelMinMedido2[3]
Fluo3pi = np.sqrt(3)*(RelMinMedido3[1] + RelMinMedido3[4])
Fluo3smas = np.sqrt(12/2)*RelMinMedido3[2] + (2/np.sqrt(2))*RelMinMedido3[5]
Fluo3smenos = (2/np.sqrt(2))*RelMinMedido3[0] + np.sqrt(12/2)*RelMinMedido3[3]
return Fluo1, [Fluo2pi, Fluo2smas, Fluo2smenos], [Fluo3pi, Fluo3smas, Fluo3smenos]
def IdentifyPolarizationCoincidences(theoricalmap, target, tolerance=1e-1):
"""
Busca en un mapa 2D la presencia de un valor target (medido) con tolerancia tolerance.
Si lo encuentra, pone un 1. Sino, un 0. Al plotear con pcolor se verá
en blanco la zona donde el valor medido se puede hallar.
"""
CoincidenceMatrix = np.zeros((len(theoricalmap), len(theoricalmap[0])))
i = 0
while i<len(theoricalmap):
j = 0
while j<len(theoricalmap[0]):
if abs(theoricalmap[i][j]-target) < tolerance:
CoincidenceMatrix[i][j] = 1
j=j+1
i=i+1
return CoincidenceMatrix
def RetrieveAbsoluteCoincidencesBetweenMaps(MapsVectors):
MatrixSum = np.zeros((len(MapsVectors[0]), len(MapsVectors[0][0])))
AbsoluteCoincidencesMatrix = np.zeros((len(MapsVectors[0]), len(MapsVectors[0][0])))
MatrixMapsVectors = []
for i in range(len(MapsVectors)):
MatrixMapsVectors.append(np.matrix(MapsVectors[i]))
for i in range(len(MatrixMapsVectors)):
MatrixSum = MatrixSum + MatrixMapsVectors[i]
MaxNumberOfCoincidences = np.max(MatrixSum)
ListMatrixSum = [list(i) for i in list(np.array(MatrixSum))]
for i in range(len(ListMatrixSum)):
for j in range(len(ListMatrixSum[0])):
if ListMatrixSum[i][j] == MaxNumberOfCoincidences:
AbsoluteCoincidencesMatrix[i][j] = 1
return AbsoluteCoincidencesMatrix, MaxNumberOfCoincidences
def MeasureMeanValueOfEstimatedArea(AbsoluteCoincidencesMap, X, Y):
NonZeroIndices = np.nonzero(AbsoluteCoincidencesMap)
Xsum = 0
Xvec = []
Ysum = 0
Yvec = []
N = len(NonZeroIndices[0])
for i in range(N):
Xsum = Xsum + X[NonZeroIndices[1][i]]
Xvec.append(X[NonZeroIndices[1][i]])
Ysum = Ysum + Y[NonZeroIndices[0][i]]
Yvec.append(Y[NonZeroIndices[0][i]])
Xaverage = Xsum/N
Yaverage = Ysum/N
Xspread = np.std(Xvec)
Yspread = np.std(Yvec)
return Xaverage, Yaverage, N, Xspread, Yspread
def MeasureRelativeFluorescenceFromCPT(Freq, Fluo, u, titadoppler, detuningrepump, detuningdoppler, frefasint=-100, entorno=3):
ResonanciasTeoricas, ResonanciasPositivas = CalculoTeoricoDarkResonances_8levels(u, titadoppler, detuningdoppler, detuningrepump)
IndicesDR, FreqsDR = FindDRFrequencies(Freq, Fluo, ResonanciasTeoricas, entorno=entorno)
FrequencyOfMinimums, RelativeFluorescenceOfMinimums0 = FindRelativeFluorescencesOfDR(Freq, Fluo, IndicesDR, detuningdoppler, NormalizationCriterium=0, frecuenciareferenciacriterioasintotico=frefasint)
FrequencyOfMinimums, RelativeFluorescenceOfMinimums1 = FindRelativeFluorescencesOfDR(Freq, Fluo, IndicesDR, detuningdoppler, NormalizationCriterium=1, frecuenciareferenciacriterioasintotico=frefasint)
FrequencyOfMinimums, RelativeFluorescenceOfMinimums2, indiceizquierda, indicederecha = FindRelativeFluorescencesOfDR(Freq, Fluo, IndicesDR, detuningdoppler, NormalizationCriterium=2, frecuenciareferenciacriterioasintotico=frefasint, getindices=True)
FrequencyOfMinimums, RelativeFluorescenceOfMinimums3 = FindRelativeFluorescencesOfDR(Freq, Fluo, IndicesDR, detuningdoppler, NormalizationCriterium=3, frecuenciareferenciacriterioasintotico=frefasint)
FrequencyOfMinimums, RelativeFluorescenceOfMinimums4 = FindRelativeFluorescencesOfDR(Freq, Fluo, IndicesDR, detuningdoppler, NormalizationCriterium=4, frecuenciareferenciacriterioasintotico=frefasint)
print('hola')
print(RelativeFluorescenceOfMinimums0)
return RelativeFluorescenceOfMinimums0, RelativeFluorescenceOfMinimums1, RelativeFluorescenceOfMinimums2, RelativeFluorescenceOfMinimums3, RelativeFluorescenceOfMinimums4, IndicesDR, [indiceizquierda, indicederecha]
def GenerateNoisyCPT(rabG, rabR, rabP, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobeVec, phirepump, titarepump, freqMin, freqMax, freqStep, plot=False, solvemode=1, detpvec=None, noiseamplitude=0.001):
Frequencyvector, Fluovector = PerformExperiment_8levels(rabG, rabR, rabP, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobeVec, phirepump, titarepump, freqMin, freqMax, freqStep, plot=False, solvemode=1, detpvec=None)
NoisyFluovector = [fluo+noiseamplitude*(2*random.random()-1) for fluo in Fluovector]
return Frequencyvector, NoisyFluovector
def GenerateNoisyCPT_fixedRabi(sg, sr, sp, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobeVec, phirepump, titarepump, freqMin, freqMax, freqStep, plot=False, solvemode=1, detpvec=None, noiseamplitude=0.001):
Frequencyvector, Fluovector = PerformExperiment_8levels_fixedRabi(sg, sr, sp, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobeVec, phirepump, titarepump, freqMin, freqMax, freqStep, plot=False, solvemode=1, detpvec=None)
NoisyFluovector = [fluo+noiseamplitude*(2*random.random()-1) for fluo in Fluovector]
return Frequencyvector, NoisyFluovector
def GenerateNoisyCPT_fit(sg, sr, sp, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobeVec, phirepump, titarepump, freqs, plot=False, solvemode=1, detpvec=None, noiseamplitude=0.001):
Frequencyvector, Fluovector = PerformExperiment_8levels_fixedRabi(sg, sr, sp, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobeVec, phirepump, titarepump, min(freqs), max(freqs) + freqs[1]-freqs[0], freqs[1]-freqs[0], plot=False, solvemode=1, detpvec=None)
NoisyFluovector = [fluo+noiseamplitude*(2*random.random()-1) for fluo in Fluovector]
return Frequencyvector, NoisyFluovector
def AddNoiseToCPT(Fluo, noisefactor):
return [f+noisefactor*(2*random.random()-1) for f in Fluo]
def SmoothNoisyCPT(Fluo, window=11, poly=3):
SmoothenFluo = sf(Fluo, window, poly)
return SmoothenFluo
def GetMinimaInfo(Freq, Fluo, u, titadoppler, detuningdoppler, detuningrepump, MinimumCriterium=2, NormalizationCriterium=1):
"""
FUNCION VIEJA
Esta funcion devuelve valores de frecuencias y fluorescencia relativa de los minimos.
Minimumcriterion:
1: Saca los minimos con funcion argelextrema
2: Directamente con las frecuencias teoricas busca las fluorescencias
Normalizationcriterium:
1: Devuelve la fluorescencia absoluta de los minimos
2: Devuelve el cociente entre la fluorescencia del minimo y un valor medio entre dos puntos lejanos, como si no
hubiera una resonancia oscura y hubiera una recta. Ese valor esta a DistanciaFrecuenciaCociente del detuning del azul (el punto medio entre las dos DR en este caso)
3: Devuelve el cociente entre la fluorescencia del minimo y el valor a -100 MHz (si se hizo de -100 a 100),
o el valor limite por izquierda de la curva
"""
FluorescenceOfMaximum = max(Fluo)
FrequencyOfMaximum = Freq[Fluo.index(FluorescenceOfMaximum)]
#criterio para encontrar los minimos
#criterio usando minimos de la fluorescencia calculados con la curva
if MinimumCriterium == 1:
LocationOfMinimums = argrelextrema(np.array(Fluo), np.less)[0]
FluorescenceOfMinimums = np.array([Fluo[i] for i in LocationOfMinimums])
FrequencyOfMinimums = np.array([Freq[j] for j in LocationOfMinimums])
#criterio con las DR teoricas
if MinimumCriterium == 2:
FrecuenciasDRTeoricas, FrecuenciasDRTeoricasPositivas = [darkresonance for darkresonance in CalculoTeoricoDarkResonances_8levels(u, titadoppler, detuningdoppler, detuningrepump)[0]]
FrequencyOfMinimums = []
FluorescenceOfMinimums =[]
print(FrecuenciasDRTeoricas)
k=0
ventanita = 0.001
while k < len(Freq):
if Freq[k] < FrecuenciasDRTeoricas[0] + ventanita and Freq[k] > FrecuenciasDRTeoricas[0] - ventanita:
FrequencyOfMinimums.append(Freq[k])
FluorescenceOfMinimums.append(Fluo[k])
elif Freq[k] < FrecuenciasDRTeoricas[1] + ventanita and Freq[k] > FrecuenciasDRTeoricas[1] - ventanita:
FrequencyOfMinimums.append(Freq[k])
FluorescenceOfMinimums.append(Fluo[k])
elif Freq[k] < FrecuenciasDRTeoricas[2] + ventanita and Freq[k] > FrecuenciasDRTeoricas[2] - ventanita:
FrequencyOfMinimums.append(Freq[k])
FluorescenceOfMinimums.append(Fluo[k])
elif Freq[k] < FrecuenciasDRTeoricas[3] + ventanita and Freq[k] > FrecuenciasDRTeoricas[3] - ventanita:
FrequencyOfMinimums.append(Freq[k])
FluorescenceOfMinimums.append(Fluo[k])
elif Freq[k] < FrecuenciasDRTeoricas[4] + ventanita and Freq[k] > FrecuenciasDRTeoricas[4] - ventanita:
FrequencyOfMinimums.append(Freq[k])
FluorescenceOfMinimums.append(Fluo[k])
elif Freq[k] < FrecuenciasDRTeoricas[5] + ventanita and Freq[k] > FrecuenciasDRTeoricas[5] - ventanita:
FrequencyOfMinimums.append(Freq[k])
FluorescenceOfMinimums.append(Fluo[k])
k = k + 1
print(FrequencyOfMinimums)
if len(FrequencyOfMinimums) != len(FrecuenciasDRTeoricas):
print('NO ANDA BIEN ESTO PAPI, revisalo')
#esto es para establecer un criterio para la fluorescencia relativa
DistanciaFrecuenciaCociente = 15
if NormalizationCriterium==1:
FluoNormDivisor = 1
if NormalizationCriterium==2:
k = 0
while k < len(Freq):
if Freq[k] < detuningdoppler-DistanciaFrecuenciaCociente + 2 and Freq[k] > detuningdoppler-DistanciaFrecuenciaCociente - 2:
FluoIzquierda = Fluo[k]
print('Izq:', Freq[k])
break
else:
k = k + 1
l = 0
while l < len(Freq):
if Freq[l] < detuningdoppler+DistanciaFrecuenciaCociente + 2 and Freq[l] > detuningdoppler+DistanciaFrecuenciaCociente - 2:
FluoDerecha = Fluo[l]
print('Der: ', Freq[l])
break
else:
l = l + 1
FluoNormDivisor = 0.5*(FluoDerecha+FluoIzquierda)
print(FluoNormDivisor)
if NormalizationCriterium==3:
FluoNormDivisor = Fluo[0]
RelativeFluorescenceOfMinimums = np.array([Fluore/FluoNormDivisor for Fluore in FluorescenceOfMinimums])
return FrequencyOfMinimums, RelativeFluorescenceOfMinimums
def GetPlotsofFluovsAngle_8levels(FrequencyOfMinimumsVector, RelativeFluorescenceOfMinimumsVector, u, titadoppler, detuningdoppler, detuningrepump, ventana=0.25, taketheoricalDR=False):
#primero buscamos las frecuencias referencia que se parezcan a las 6:
i = 0
FrecuenciasReferenciaBase = FrequencyOfMinimumsVector[0]
FrecuenciasDRTeoricas = [darkresonance for darkresonance in CalculoTeoricoDarkResonances_8levels(u, titadoppler, detuningdoppler, detuningrepump)[0]]
while i < len(FrequencyOfMinimumsVector):
if len(FrequencyOfMinimumsVector[i])==len(FrecuenciasDRTeoricas):
FrecuenciasReferenciaBase = FrequencyOfMinimumsVector[i]
print('Cool! Taking the DR identified with any curve')
break
else:
i = i + 1
if i==len(FrequencyOfMinimumsVector):
print('No hay ningun plot con 5 resonancias oscuras. Tomo las teóricas')
FrecuenciasReferenciaBase = FrecuenciasDRTeoricas
if taketheoricalDR:
FrecuenciasReferenciaBase = FrecuenciasDRTeoricas
Ventana = abs(ventana*(FrecuenciasReferenciaBase[1] - FrecuenciasReferenciaBase[0])) #ventana separadora de resonancias
print('Ventana = ', Ventana)
DarkResonance1Frequency = []
DarkResonance1Fluorescence = []
DarkResonance2Frequency = []
DarkResonance2Fluorescence = []
DarkResonance3Frequency = []
DarkResonance3Fluorescence = []
DarkResonance4Frequency = []
DarkResonance4Fluorescence = []
DarkResonance5Frequency = []
DarkResonance5Fluorescence = []
DarkResonance6Frequency = []
DarkResonance6Fluorescence = []
i = 0
while i < len(FrequencyOfMinimumsVector):
j = 0
FrecuenciasReferencia = [i for i in FrecuenciasReferenciaBase]
while j < len(FrequencyOfMinimumsVector[i]):
if abs(FrequencyOfMinimumsVector[i][j]) < (abs(FrecuenciasReferencia[0])+Ventana) and abs(FrequencyOfMinimumsVector[i][j]) >= (abs(FrecuenciasReferencia[0])-Ventana):
DarkResonance1Frequency.append(FrequencyOfMinimumsVector[i][j])
DarkResonance1Fluorescence.append(RelativeFluorescenceOfMinimumsVector[i][j])
FrecuenciasReferencia[0] = 0
elif abs(FrequencyOfMinimumsVector[i][j]) < (abs(FrecuenciasReferencia[1])+Ventana) and abs(FrequencyOfMinimumsVector[i][j]) >= (abs(FrecuenciasReferencia[1])-Ventana):
DarkResonance2Frequency.append(FrequencyOfMinimumsVector[i][j])
DarkResonance2Fluorescence.append(RelativeFluorescenceOfMinimumsVector[i][j])
FrecuenciasReferencia[1] = 0
elif abs(FrequencyOfMinimumsVector[i][j]) < (abs(FrecuenciasReferencia[2])+Ventana) and abs(FrequencyOfMinimumsVector[i][j]) >= (abs(FrecuenciasReferencia[2])-Ventana):
DarkResonance3Frequency.append(FrequencyOfMinimumsVector[i][j])
DarkResonance3Fluorescence.append(RelativeFluorescenceOfMinimumsVector[i][j])
FrecuenciasReferencia[2] = 0
elif abs(FrequencyOfMinimumsVector[i][j]) < (abs(FrecuenciasReferencia[3])+Ventana) and abs(FrequencyOfMinimumsVector[i][j]) >= (abs(FrecuenciasReferencia[3])-Ventana):
DarkResonance4Frequency.append(FrequencyOfMinimumsVector[i][j])
DarkResonance4Fluorescence.append(RelativeFluorescenceOfMinimumsVector[i][j])
FrecuenciasReferencia[3] = 0
elif abs(FrequencyOfMinimumsVector[i][j]) < (abs(FrecuenciasReferencia[4])+Ventana) and abs(FrequencyOfMinimumsVector[i][j]) >= (abs(FrecuenciasReferencia[4])-Ventana):
DarkResonance5Frequency.append(FrequencyOfMinimumsVector[i][j])
DarkResonance5Fluorescence.append(RelativeFluorescenceOfMinimumsVector[i][j])
FrecuenciasReferencia[4] = 0
elif abs(FrequencyOfMinimumsVector[i][j]) < (abs(FrecuenciasReferencia[5])+Ventana) and abs(FrequencyOfMinimumsVector[i][j]) >= (abs(FrecuenciasReferencia[5])-Ventana):
DarkResonance6Frequency.append(FrequencyOfMinimumsVector[i][j])
DarkResonance6Fluorescence.append(RelativeFluorescenceOfMinimumsVector[i][j])
FrecuenciasReferencia[5] = 0
else:
#print('Algo anduvo mal, por ahi tenes que cambiar la ventana che')
pass
j = j + 1
if np.count_nonzero(FrecuenciasReferencia) > 0:
if FrecuenciasReferencia[0] != 0:
DarkResonance1Frequency.append(FrecuenciasReferencia[0])
DarkResonance1Fluorescence.append()
if FrecuenciasReferencia[1] != 0:
DarkResonance2Frequency.append(FrecuenciasReferencia[1])
DarkResonance2Fluorescence.append(0)
if FrecuenciasReferencia[2] != 0:
DarkResonance3Frequency.append(FrecuenciasReferencia[2])
DarkResonance3Fluorescence.append(0)
if FrecuenciasReferencia[3] != 0:
DarkResonance4Frequency.append(FrecuenciasReferencia[3])
DarkResonance4Fluorescence.append(0)
if FrecuenciasReferencia[4] != 0:
DarkResonance5Frequency.append(FrecuenciasReferencia[4])
DarkResonance5Fluorescence.append(0)
if FrecuenciasReferencia[5] != 0:
DarkResonance6Frequency.append(FrecuenciasReferencia[5])
DarkResonance6Fluorescence.append(0)
i = i + 1
return DarkResonance1Frequency, DarkResonance1Fluorescence, DarkResonance2Frequency, DarkResonance2Fluorescence, DarkResonance3Frequency, DarkResonance3Fluorescence, DarkResonance4Frequency, DarkResonance4Fluorescence, DarkResonance5Frequency, DarkResonance5Fluorescence, DarkResonance6Frequency, DarkResonance6Fluorescence, FrecuenciasReferenciaBase
def PerformExperiment_8levels(rabG, rabR, rabP, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobeVec, phirepump, titarepump, freqMin, freqMax, freqStep, plot=False, solvemode=1, detpvec=None):
"""
Hace un experimento barriendo ángulos de repump con el angulo de doppler fijo.
solvemode=1: resuelve con np.linalg.solve
solvemode=2: resuelve invirtiendo L con la funcion np.linalg.inv
"""
Fluovectors = []
for titaprobe in titaprobeVec:
tinicial = time.time()
ProbeDetuningVectorL, Fluovector = CPTspectrum8levels(rabG, rabR, rabP, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobe, phirepump, titarepump, freqMin=freqMin, freqMax=freqMax, freqStep=freqStep, plot=False, solvemode=1)
tfinal = time.time()
print('Done angle ', titarepump, ' Total time: ', round((tfinal-tinicial), 2), "s")
if plot:
plt.figure()
plt.xlabel('Repump detuning (MHz')
plt.ylabel('Fluorescence (A.U.)')
plt.plot(ProbeDetuningVectorL, Fluovector, label=str(titarepump)+'º tita repump, T: ' + str(T*1e3) + ' mK')
plt.legend()
Fluovectors.append(Fluovector)
if len(titaprobeVec) == 1: #esto es para que no devuelva un vector de vectores si solo fijamos un angulo
Fluovectors = Fluovector
return ProbeDetuningVectorL, Fluovectors
def PerformExperiment_8levels_fixedRabi(sg, sr, sp, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobeVec, phirepump, titarepump, freqMin, freqMax, freqStep, plot=False, solvemode=1, detpvec=None):
"""
Hace un experimento barriendo ángulos de repump con el angulo de doppler fijo.
solvemode=1: resuelve con np.linalg.solve
solvemode=2: resuelve invirtiendo L con la funcion np.linalg.inv
"""
Fluovectors = []
for titaprobe in titaprobeVec:
tinicial = time.time()
ProbeDetuningVectorL, Fluovector = CPTspectrum8levels_fixedRabi(sg, sr, sp, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobe, phirepump, titarepump, freqMin=freqMin, freqMax=freqMax, freqStep=freqStep, plot=False, solvemode=1)
tfinal = time.time()
print('Done angle ', titarepump, ' Total time: ', round((tfinal-tinicial), 2), "s")
if plot:
plt.figure()
plt.xlabel('Repump detuning (MHz')
plt.ylabel('Fluorescence (A.U.)')
plt.plot(ProbeDetuningVectorL, Fluovector, label=str(titarepump)+'º tita repump, T: ' + str(T*1e3) + ' mK')
plt.legend()
Fluovectors.append(Fluovector)
if len(titaprobeVec) == 1: #esto es para que no devuelva un vector de vectores si solo fijamos un angulo
Fluovectors = Fluovector
return ProbeDetuningVectorL, Fluovectors
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Sep 1 17:58:39 2020
@author: oem
"""
import os
import numpy as np
#os.chdir('/home/oem/Nextcloud/G_liaf/liaf-TrampaAnular/Código General/EIT-CPT/Buenos Aires/Experiment Simulations/CPT scripts/Eight Level 2 repumps')
from threeLevel_2repumps_AnalysisFunctions import CalculoTeoricoDarkResonances_8levels, GetMinimaInfo, GetPlotsofFluovsAngle_8levels, PerformExperiment_8levels, FindDRFrequencies, FindRelativeFluorescencesOfDR, GenerateNoisyCPT, SmoothNoisyCPT, GetFinalMaps, GenerateNoisyCPT_fixedRabi, GenerateNoisyCPT_fit
import matplotlib.pyplot as plt
import time
from threeLevel_2repumps_AnalysisFunctions import MeasureRelativeFluorescenceFromCPT, IdentifyPolarizationCoincidences, RetrieveAbsoluteCoincidencesBetweenMaps, GetClosestIndex
#C:\Users\Usuario\Nextcloud\G_liaf\liaf-TrampaAnular\Código General\EIT-CPT\Buenos Aires\Experiment Simulations\CPT scripts\Eight Level 2 repumps
ub = 9.27e-24
h = 6.63e-34
c = (ub/h)*1e-4 #en unidades de MHz/G
#u = 1e6
u = 33.5e6
B = (u/(2*np.pi))/c
#sg, sp = 0.6, 5 #parámetros de control, saturación del doppler y repump
#rabG, rabP = sg*gPS, sp*gPD #frecuencias de rabi
gPS, gPD, = 2*np.pi*21.58e6, 2*np.pi*1.35e6 #anchos de linea de las transiciones
lw = 0.1
DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth = lw, lw, lw #ancho de linea de los laseres
DetDoppler = -36 #42
DetRepumpVec = [DetDoppler+29.6]
Tvec = [0.7] #temperatura en mK
alpha = 0*(np.pi/180) #angulo entre los láseres
phidoppler, titadoppler = 0, 90
phirepump, titarepump = 0, 0
phiprobe = 0
titaprobe = 90
#Calculo las resonancias oscuras teóricas
#ResonanciasTeoricas, DRPositivas = CalculoTeoricoDarkResonances_8levels(u/(2*np.pi*1e6), titadoppler, DetDoppler, DetRepump)
#Parametros de la simulacion cpt
center = -45
span = 80
freqMin = center-span*0.5
freqMax = center+span*0.5
""" parametros para tener espectros coherentes
freqMin = -56
freqMax = 14
"""
freqStep = 1e-1
noiseamplitude = 0
RelMinMedido0Vector = []
RelMinMedido1Vector = []
RelMinMedido2Vector = []
RelMinMedido3Vector = []
RelMinMedido4Vector = []
#Sr = np.arange(0, 10, 0.2)
#Sg = np.arange(0.01, 1, 0.05)
#Sp = np.arange(0.1, 6.1, 1)
#Sg = [0.6**2]
#Sp = [2.3**2]
Sg = [1.4]
Sp = [6]
Sr = [11]
i = 0
save = False
showFigures = True
if not showFigures:
plt.ioff()
else:
plt.ion()
fig1, ax1 = plt.subplots()
offsetx = 464
ax1.plot([f-offsetx for f in FreqsDR], CountsDR, 'o')
run = True
Scale = 730
Offset = 600 #600 para 20k cuentas aprox
MaxCoherenceValue = []
for sg in Sg:
for sp in Sp:
rabG, rabP = sg*gPS, sp*gPD
for Ti in Tvec:
T = Ti*1e-3
for DetRepump in DetRepumpVec:
print(T)
for sr in Sr:
rabR = sr*gPD
#MeasuredFreq, MeasuredFluo = GenerateNoisyCPT(rabG, rabR, rabP, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, [titaprobe], phirepump, titarepump, freqMin, freqMax, freqStep, plot=False, solvemode=1, detpvec=None, noiseamplitude=noiseamplitude)
if run:
MeasuredFreq4, MeasuredFluo4 = GenerateNoisyCPT_fixedRabi(sg, sr, sp, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, [titaprobe], phirepump, titarepump, freqMin, freqMax, freqStep, plot=False, solvemode=1, detpvec=None, noiseamplitude=noiseamplitude)
#SmoothFluo = SmoothNoisyCPT(MeasuredFluo, window=9, poly=2)
SmoothFluo4 = MeasuredFluo4
#Scale = max(BestC)/max([100*s for s in SmoothFluo4])
ax1.plot(MeasuredFreq4, [Scale*100*f + Offset for f in SmoothFluo4], label=f'Sr = {sr}')
ax1.axvline(DetDoppler, linestyle='--', linewidth=1)
#if sr != 0:
#ax1.axvline(DetRepump, linestyle='--', linewidth=1)
MaxCoherenceValue.append(np.max(SmoothFluo4))
#print(titaprobe)
ax1.set_xlabel('Detuning Rebombeo (MHz)')
ax1.set_ylabel('Fluorescencia (AU)')
ax1.set_title(f'B: {round(B, 2)} G, Sdop: {round(sg, 2)}, Sp: {round(sp, 2)}, Sr: {round(sr, 2)}, lw: {lw} MHz, T: {Ti} mK')
#ax1.set_ylim(0, 8)
#ax1.axvline(DetDoppler, linestyle='dashed', color='red', linewidth=1)
#ax1.axvline(DetRepump, linestyle='dashed', color='black', linewidth=1)
#ax1.set_title('Pol Doppler y Repump: Sigma+ Sigma-, Pol Probe: PI')
#ax1.legend()
ax1.grid()
print (f'{i+1}/{len(Sg)*len(Sp)}')
i = i + 1
if save:
plt.savefig(f'Mapa_plots_100k_1mk/CPT_SMSM_sdop{round(sg, 2)}_sp{round(sp, 2)}_sr{round(sr, 2)}.jpg')
ax1.legend()
"""
plt.figure()
plt.plot(Sr, MaxCoherenceValue, 'o')
plt.xlabel('Sr')
plt.ylabel('Coherence')
"""
"""
plt.figure()
plt.plot(MeasuredFreq, [100*f for f in SmoothFluo], color='darkred')
plt.xlabel('Desintonía 866 (MHz)')
plt.ylabel('Fluorescencia (A.U.)')
plt.axvline(-30, color='darkblue', linewidth=1.2, linestyle='--')
plt.yticks(np.arange(0.4, 1.8, 0.2))
plt.ylim(0.5, 1.6)
plt.grid()
plt.figure()
plt.plot(MeasuredFreq4, [100*f for f in SmoothFluo4], color='darkred')
plt.xlabel('Desintonía 866 (MHz)')
plt.ylabel('Fluorescencia (A.U.)')
plt.axvline(-30, color='darkblue', linewidth=1.2, linestyle='--')
plt.yticks(np.arange(0.8, 2.4, 0.4))
plt.grid()
"""
#%%
from scipy.optimize import curve_fit
T = 0.5e-3
sg = 0.7
sp = 6
sr = 0
DetDoppler = -14
DetRepump = 0
FitsSp = []
FitsOffset = []
Sg = [0.87]
def FitEIT(freqs, SP, offset):
MeasuredFreq, MeasuredFluo = GenerateNoisyCPT_fit(0.87, sr, SP, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, [titaprobe], phirepump, titarepump, freqs, plot=False, solvemode=1, detpvec=None, noiseamplitude=noiseamplitude)
FinalFluo = [f*43000 + 2685 for f in MeasuredFluo]
return FinalFluo
freqs = [f-offsetx+32 for f in FreqsDR]
freqslong = np.arange(min(freqs), max(freqs)+freqs[1]-freqs[0], 0.1*(freqs[1]-freqs[0]))
popt, pcov = curve_fit(FitEIT, freqs, CountsDR, p0=[5, 700], bounds=(0, [10, 1e6]))
FitsSp.append(popt[0])
FitsOffset.append(popt[1])
print(popt)
FittedEIT = FitEIT(freqslong, *popt)
plt.figure()
plt.errorbar(freqs, CountsDR, yerr=2*np.sqrt(CountsDR), fmt='o', capsize=2, markersize=2)
plt.plot(freqslong, FitEIT(freqslong, *popt))
plt.title(f'Sdop: {round(popt[0], 2)}, Spr: {round(popt[1], 2)}, T: {T*1e3} mK, detDop: {DetDoppler} MHz')
np.savetxt('CPT_measured.txt', np.transpose([freqs, CountsDR]))
np.savetxt('CPT_fitted.txt', np.transpose([freqslong, FittedEIT]))
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Apr 7 22:30:01 2020
@author: nico
"""
import numpy as np
import time
import matplotlib.pyplot as plt
from scipy.signal import argrelextrema
"""
Scripts para el calculo de la curva CPT
"""
def H0matrix(Detg, Detp, u):
"""
Calcula la matriz H0 en donde dr es el detuning del doppler, dp es el retuning del repump y u es el campo magnético en Hz/Gauss.
Para esto se toma la energía del nivel P como 0
"""
eigenEnergies = (Detg-u, Detg+u, -u/3, u/3, Detp-6*u/5, Detp-2*u/5, Detp+2*u/5, Detp+6*u/5) #pagina 26 de Oberst. los lande del calcio son iguales a Bario.
H0 = np.diag(eigenEnergies)
return H0
def HImatrix(rabG, rabP, phidoppler, titadoppler, phiprobe, titaprobe):
"""
Calcula la matriz de interacción Hsp + Hpd, en donde rabR es la frecuencia de rabi de la transición Doppler SP,
rabP es la frecuencia de rabi de la transición repump DP, y las componentes ei_r y ei_p son las componentes de la polarización
del campo eléctrico incidente de doppler y repump respectivamente. Deben estar normalizadas a 1
"""
HI = np.zeros((8, 8), dtype=np.complex_)
i, j = 1, 3
HI[i-1, j-1] = (rabG/np.sqrt(3)) * np.cos(titadoppler)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 1, 4
HI[i-1, j-1] = -(rabG/np.sqrt(3)) * np.sin(titadoppler)*np.exp(1j*phidoppler)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 2, 3
HI[i-1, j-1] = -(rabG/np.sqrt(3)) * np.sin(titadoppler)*np.exp(-1j*phidoppler)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 2, 4
HI[i-1, j-1] = -(rabG/np.sqrt(3)) * np.cos(titadoppler)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 3, 5
HI[i-1, j-1] = -(rabP/2) * np.sin(titaprobe)*np.exp(-1j*phiprobe)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 3, 6
HI[i-1, j-1] = -(rabP/np.sqrt(3)) * np.cos(titaprobe)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 3, 7
HI[i-1, j-1] = rabP/np.sqrt(12) * np.sin(titaprobe)*np.exp(1j*phiprobe)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 4, 6
HI[i-1, j-1] = -(rabP/np.sqrt(12)) * np.sin(titaprobe)*np.exp(-1j*phiprobe)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 4, 7
HI[i-1, j-1] = -(rabP/np.sqrt(3)) * np.cos(titaprobe)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 4, 8
HI[i-1, j-1] = (rabP/2) * np.sin(titaprobe)*np.exp(1j*phiprobe)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
return HI
def Lplusminus(detr, detp, phirepump, titarepump, forma=1):
Hintplus = np.zeros((8, 8), dtype=np.complex_)
Hintminus = np.zeros((8, 8), dtype=np.complex_)
Hintplus[4, 2] = (-1/2)*np.sin(titarepump)*np.exp(1j*phirepump)
Hintplus[5, 2] = (-1/np.sqrt(3))*np.cos(titarepump)
Hintplus[6, 2] = (1/(2*np.sqrt(3)))*np.sin(titarepump)*np.exp(-1j*phirepump)
Hintplus[5, 3] = (-1/(2*np.sqrt(3)))*np.sin(titarepump)*np.exp(1j*phirepump)
Hintplus[6, 3] = (-1/np.sqrt(3))*np.cos(titarepump)
Hintplus[7, 3] = (1/2)*np.sin(titarepump)*np.exp(-1j*phirepump)
Hintminus[2, 4] = (-1/2)*np.sin(titarepump)*np.exp(-1j*phirepump)
Hintminus[2, 5] = (-1/np.sqrt(3))*np.cos(titarepump)
Hintminus[2, 6] = (1/(2*np.sqrt(3)))*np.sin(titarepump)*np.exp(1j*phirepump)
Hintminus[3, 5] = (-1/(2*np.sqrt(3)))*np.sin(titarepump)*np.exp(-1j*phirepump)
Hintminus[3, 6] = (-1/np.sqrt(3))*np.cos(titarepump)
Hintminus[3, 7] = (1/2)*np.sin(titarepump)*np.exp(1j*phirepump)
if forma==1:
Lplus = np.zeros((64, 64), dtype=np.complex_)
Lminus = np.zeros((64, 64), dtype=np.complex_)
DeltaBar = np.zeros((64, 64), dtype=np.complex_)
for r in range(8):
for q in range(8):
for k in range(8):
for j in range(8):
if j==q:
if (k==2 or k==3) and r > 3:
Lplus[r*8+q][k*8+j] = (-1j)*(Hintplus[r,k])
if (r==2 or r==3) and k > 3:
Lminus[r*8+q][k*8+j] = (-1j)*(Hintminus[r,k])
elif r==k:
if (q==2 or q==3) and j > 3:
Lplus[r*8+q][k*8+j] = (-1j)*(- Hintplus[j,q])
if (j==2 or j==3) and q > 3:
Lminus[r*8+q][k*8+j] = (-1j)*(- Hintminus[j,q])
if forma==2:
deltaKro = np.diag([1, 1, 1, 1, 1, 1, 1, 1])
Lplus = (-1j)*(np.kron(Hintplus, deltaKro) - np.kron(deltaKro, Hintplus))
Lminus = (-1j)*(np.kron(Hintminus, deltaKro) - np.kron(deltaKro, Hintminus))
DeltaBar = np.zeros((64, 64), dtype=np.complex_)
for i in range(64):
DeltaBar[i, i] = (1j)*(detr - detp)
return np.matrix(Lminus), np.matrix(Lplus), np.matrix(DeltaBar)
def GetL1(Lplus, Lminus, DeltaBar, L0, rabR, nmax):
"""
Devuelve Splus0 y Sminus0
"""
Sp = (-1)*(0.5*rabR)*(np.matrix(np.linalg.inv(L0 - (nmax+1)*DeltaBar))*np.matrix(Lplus))
Sm = (-1)*(0.5*rabR)*(np.matrix(np.linalg.inv(L0 + (nmax+1)*DeltaBar))*np.matrix(Lminus))
for n in list(range(nmax+1))[(nmax+1)::-1][0:len(list(range(nmax+1))[(nmax+1)::-1])-1]: #jaja esto solo es para que vaya de nmax a 1 bajando. debe haber algo mas facil pero kcio
Sp = (-1)*(rabR)*(np.matrix(np.linalg.inv(L0 - n*DeltaBar + rabR*(Lminus*np.matrix(Sp))))*np.matrix(Lplus))
Sm = (-1)*(rabR)*(np.matrix(np.linalg.inv(L0 + n*DeltaBar + rabR*(Lplus*np.matrix(Sm))))*np.matrix(Lminus))
L1 = 0.5*rabR*(np.matrix(Lminus)*np.matrix(Sp) + np.matrix(Lplus)*np.matrix(Sm))
return L1
def EffectiveL(gPS, gPD, lwg, lwr, lwp):
"""
Siendo Heff = H + EffectiveL, calcula dicho EffectiveL que es (-0.5j)*sumatoria(CmDaga*Cm) que luego sirve para calcular el Liouvilliano
"""
Leff = np.zeros((8, 8), dtype=np.complex_)
Leff[0, 0] = 2*lwg
Leff[1, 1] = 2*lwg
Leff[2, 2] = ((2/3)+(1/3))*gPS + ((1/2) + (1/6) + (1/3))*gPD
Leff[3, 3] = ((2/3)+(1/3))*gPS + ((1/2) + (1/6) + (1/3))*gPD
Leff[4, 4] = 2*(lwr + lwp)
Leff[5, 5] = 2*(lwr + lwp)
Leff[6, 6] = 2*(lwr + lwp)
Leff[7, 7] = 2*(lwr + lwp)
return (-0.5j)*Leff
def CalculateSingleMmatrix(gPS, gPD, lwg, lwr, lwp):
"""
Si tomamos el Liuvilliano como L = (-j)*(Heff*deltak - Heffdaga*deltak) + sum(Mm),
esta funcion calcula dichos Mm, que tienen dimensión 64x64 ya que esa es la dimensión del L. Estas componentes
salen de hacer la cuenta a mano conociendo los Cm y considerando que Mm[8*(r-1)+s, 8*(k-1)+j] = Cm[r,l] + Cmdaga[j,s] = Cm[r,l] + Cm[s,j]
ya que los componentes de Cm son reales.
Esta M es la suma de las 8 matrices M.
"""
M = np.matrix(np.zeros((64, 64), dtype=np.complex_))
M[0,27] = (2/3)*gPS
M[9,18] = (2/3)*gPS
M[0,18] = (1/3)*gPS
M[1,19] = -(1/3)*gPS
M[8,26] = -(1/3)*gPS
M[9,27] = (1/3)*gPS
M[36,18] = (1/2)*gPD
M[37,19] = (1/np.sqrt(12))*gPD
M[44,26] = (1/np.sqrt(12))*gPD
M[45,27] = (1/6)*gPD
M[54,18] = (1/6)*gPD
M[55,19] = (1/np.sqrt(12))*gPD
M[62,26] = (1/np.sqrt(12))*gPD
M[63,27] = (1/2)*gPD
M[45,18] = (1/3)*gPD
M[46,19] = (1/3)*gPD
M[53,26] = (1/3)*gPD
M[54,27] = (1/3)*gPD
M[0,0] = 2*lwg
M[1,1] = 2*lwg
M[8,8] = 2*lwg
M[9,9] = 2*lwg
factor1 = 1
factor2 = 1
factor3 = 1
factor4 = 1
#M[36, 45] = lwp
M[36,36] = 2*(lwr + factor1*lwp)
M[37,37] = 2*(lwr + factor1*lwp)
M[38,38] = 2*(lwr + factor1*lwp)
M[39,39] = 2*(lwr + factor1*lwp)
M[44,44] = 2*(lwr + factor2*lwp)
M[45,45] = 2*(lwr + factor2*lwp)
M[46,46] = 2*(lwr + factor2*lwp)
M[47,47] = 2*(lwr + factor2*lwp)
M[52,52] = 2*(lwr + factor3*lwp)
M[53,53] = 2*(lwr + factor3*lwp)
M[54,54] = 2*(lwr + factor3*lwp)
M[55,55] = 2*(lwr + factor3*lwp)
M[60,60] = 2*(lwr + factor4*lwp)
M[61,61] = 2*(lwr + factor4*lwp)
M[62,62] = 2*(lwr + factor4*lwp)
M[63,63] = 2*(lwr + factor4*lwp)
return M
def dopplerBroadening(wlg, wlp, alpha, T, mcalcio = 6.655e-23*1e-3):
"""
Calcula el broadening extra semiclásico por temperatura considerando que el ion atrapado se mueve.
wlg es la longitud de onda doppler, wlp la longitud de onda repump, T la temperatura del ion en kelvin, y alpha (en rads) el ángulo
que forman ambos láseres.
"""
kboltzmann = 1.38e-23 #J/K
gammaD = (2*np.pi)*np.sqrt((1/(wlg*wlg)) + (1/(wlp*wlp)) - 2*(1/(wlg*wlp))*np.cos(alpha))*np.sqrt(kboltzmann*T/(2*mcalcio))
return gammaD
def FullL_efficient(rabG, rabR, rabP, gPS = 0, gPD = 0, Detg = 0, Detr = 0, Detp = 0, u = 0, lwg = 0, lwr=0, lwp = 0,
phidoppler=0, titadoppler=0, phiprobe=0, titaprobe=0, phirepump=0, titarepump=0, T = 0, alpha = 0):
"""
Calcula el Liouvilliano total de manera explícita índice a índice. Suma aparte las componentes de las matrices M.
Es la más eficiente hasta ahora.
"""
db = dopplerBroadening(0.397e-6, 0.866e-6, alpha, T)
#lwr = np.sqrt(lwr**2 + dopplerBroadening(0.397e-6, 0.866e-6, alpha, T)**2)
lwg = np.sqrt(lwg**2 + db**2)
lwr = np.sqrt(lwr**2 + db**2)
CC = EffectiveL(gPS, gPD, lwg, lwr, lwp)
Heff = H0matrix(Detg, Detp, u) + HImatrix(rabG, rabP, phidoppler, titadoppler, phiprobe, titaprobe) + CC
Heffdaga = np.matrix(Heff).getH()
Lfullpartial = np.zeros((64, 64), dtype=np.complex_)
for r in range(8):
for q in range(8):
for k in range(8):
for j in range(8):
if j!=q and r!=k:
pass
elif j==q and r!=k:
if (r < 2 and k > 3) or (k < 2 and r > 3) or (r > 3 and k > 3) or (r==0 and k==1) or (r==1 and k==0) or (r==2 and k==3) or (r==3 and k==2): #todo esto sale de analizar explicitamente la matriz y tratar de no calcular cosas de más que dan cero
pass
else:
Lfullpartial[r*8+q][k*8+j] = (-1j)*(Heff[r,k])
elif j!=q and r==k:
if (j < 2 and q > 3) or (q < 2 and j > 3) or (j > 3 and q > 3) or (j==0 and q==1) or (j==1 and q==0) or (j==2 and q==3) or (j==3 and q==2):
pass
else:
Lfullpartial[r*8+q][k*8+j] = (-1j)*(-Heffdaga[j,q])
else:
if Heff[r,k] == Heffdaga[j,q]:
pass
else:
Lfullpartial[r*8+q][k*8+j] = (-1j)*(Heff[r,k]-Heffdaga[j,q])
M = CalculateSingleMmatrix(gPS, gPD, lwg, lwr, lwp)
L0 = np.array(np.matrix(Lfullpartial) + M)
nmax = 1
Lminus, Lplus, DeltaBar = Lplusminus(Detr, Detp, phirepump, titarepump)
factor1 = np.exp(1j*0.2*np.pi)
factor2 = np.exp(-1j*0.2*np.pi)
#print(factor)
L1 = GetL1(factor1*Lplus, factor2*Lminus, DeltaBar, L0, rabR, nmax)
Lfull = L0 + L1
#NORMALIZACION DE RHO
i = 0
while i < 64:
if i%9 == 0:
Lfull[0, i] = 1
else:
Lfull[0, i] = 0
i = i + 1
return Lfull
"""
Scripts para correr un experimento y hacer el análisis de los datos
"""
def CalculoTeoricoDarkResonances(u, titadoppler):
if titadoppler==0:
NegativeDR = [(-7/5)*u, (-3/5)*u, (-1/5)*u, (1/5)*u, (3/5)*u, (7/5)*u]
elif titadoppler==90:
NegativeDR = [(-11/5)*u, (-7/5)*u, (-3/5)*u, (3/5)*u, (7/5)*u, (11/5)*u]
PositiveDR = [(-8/5)*u, (-4/5)*u, 0, (4/5)*u, (8/5)*u]
return NegativeDR, PositiveDR
def CPTspectrum8levels(rabG, rabR, rabP, gPS, gPD, Detg, Detr, u, lwg, lwr, lwp, Temp, alpha, phidoppler, titadoppler, phiprobe, titaprobe, phirepump, titarepump,
freqMin=-100, freqMax=100, freqStep=1e-1, plot=False, solvemode=1):
"""
Hace un experimento barriendo ángulos de repump con el angulo de doppler fijo.
solvemode=1: resuelve con np.linalg.solve
solvemode=2: resuelve invirtiendo L con la funcion np.linalg.inv
"""
phidoppler, titadoppler = phidoppler*(np.pi/180), titadoppler*(np.pi/180)
phiprobe, titaprobe = phiprobe*(np.pi/180), titaprobe*(np.pi/180)
phirepump, titarepump = phirepump*(np.pi/180), titarepump*(np.pi/180)
DetProbeVector = 2*np.pi*np.arange(freqMin*1e6, freqMax*1e6, freqStep*1e6)
Detg, Detr = 2*np.pi*Detg*1e6, 2*np.pi*Detr*1e6
lwg, lwr, lwp = 2*np.pi*lwg*1e6, 2*np.pi*lwr*1e6, 2*np.pi*lwp*1e6
#u = 2*np.pi*u*1e6
Fluovector = []
tinicial = time.time()
for Detp in DetProbeVector:
L = FullL_efficient(rabG, rabR, rabP, gPS, gPD, Detg, Detr, Detp, u, lwg, lwr, lwp, phidoppler, titadoppler, phiprobe, titaprobe, phirepump, titarepump, Temp, alpha)
if solvemode == 1:
rhovectorized = np.linalg.solve(L, np.array([int(i==0) for i in range(64)]))
Fluo = np.real(rhovectorized[18] + np.real(rhovectorized[27])) #estos son los rho33 + rho44
Fluovector.append(Fluo)
if solvemode == 2:
Linv = np.linalg.inv(L)
rhovectorized = [Linv[j][0] for j in range(len(Linv))]
Fluo = np.real(rhovectorized[18] + np.real(rhovectorized[27])) #estos son los rho33 + rho44
Fluovector.append(Fluo)
tfinal = time.time()
print('Done, Total time: ', round((tfinal-tinicial), 2), "s")
DetProbeVectorMHz = np.arange(freqMin, freqMax, freqStep)
if plot:
plt.xlabel('Probe detuning (MHz)')
plt.ylabel('Fluorescence (A.U.)')
plt.plot(DetProbeVectorMHz, [100*f for f in Fluovector], label=str(titaprobe) + 'º, T: ' + str(Temp*1e3) + ' mK')
plt.legend()
return DetProbeVectorMHz, Fluovector
def CPTspectrum8levels_fixedRabi(sg, sr, sp, gPS, gPD, Detg, Detr, u, lwg, lwr, lwp, Temp, alpha, phidoppler, titadoppler, phiprobe, titaprobe, phirepump, titarepump,
freqMin=-100, freqMax=100, freqStep=1e-1, plot=False, solvemode=1):
"""
Hace un experimento barriendo ángulos de repump con el angulo de doppler fijo.
solvemode=1: resuelve con np.linalg.solve
solvemode=2: resuelve invirtiendo L con la funcion np.linalg.inv
"""
phidoppler, titadoppler = phidoppler*(np.pi/180), titadoppler*(np.pi/180)
phiprobe, titaprobe = phiprobe*(np.pi/180), titaprobe*(np.pi/180)
phirepump, titarepump = phirepump*(np.pi/180), titarepump*(np.pi/180)
DetProbeVector = 2*np.pi*np.arange(freqMin*1e6, freqMax*1e6, freqStep*1e6)
Detg, Detr = 2*np.pi*Detg*1e6, 2*np.pi*Detr*1e6
#lwg, lwr, lwp = 2*np.pi*lwg*1e6, 2*np.pi*lwr*1e6, 2*np.pi*lwp*1e6
lwg, lwr, lwp = lwg*1e6, lwr*1e6, lwp*1e6
rabG = sg*gPS
rabR = sr*gPD
rabP = sp*gPD
#u = 2*np.pi*u*1e6
Fluovector = []
tinicial = time.time()
for Detp in DetProbeVector:
L = FullL_efficient(rabG, rabR, rabP, gPS, gPD, Detg, Detr, Detp, u, lwg, lwr, lwp, phidoppler, titadoppler, phiprobe, titaprobe, phirepump, titarepump, Temp, alpha)
if solvemode == 1:
coh = 5
rhovectorized = np.linalg.solve(L, np.array([int(i==0) for i in range(64)]))
#Fluo = np.abs(rhovectorized[coh])
Fluo = np.real(rhovectorized[18] + np.real(rhovectorized[27])) #estos son los rho33 + rho44
Fluovector.append(Fluo)
if solvemode == 2:
Linv = np.linalg.inv(L)
rhovectorized = [Linv[j][0] for j in range(len(Linv))]
Fluo = np.real(rhovectorized[18] + np.real(rhovectorized[27])) #estos son los rho33 + rho44
Fluovector.append(Fluo)
tfinal = time.time()
print('Done, Total time: ', round((tfinal-tinicial), 2), "s")
DetProbeVectorMHz = np.arange(freqMin, freqMax, freqStep)
if plot:
plt.xlabel('Probe detuning (MHz)')
plt.ylabel('Fluorescence (A.U.)')
plt.plot(DetProbeVectorMHz, [100*f for f in Fluovector], label=str(titaprobe) + 'º, T: ' + str(Temp*1e3) + ' mK')
plt.legend()
return DetProbeVectorMHz, Fluovector
#%%
if __name__ == "__main__":
ub = 9.27e-24
h = 6.63e-34
c = (ub/h)*1e-4 #en unidades de MHz/G
B = 25 #campo magnetico en gauss
u = c*B
sg, sr, sp = 0.5, 1.5, 4 #parámetros de saturación del doppler y repump
gPS, gPD, = 2*np.pi*21.58e6, 2*np.pi*1.35e6 #anchos de linea de las transiciones
rabG, rabR, rabP = sg*gPS, sr*gPD, sp*gPD #frecuencias de rabi
lwg, lwr, lwp = 0.3, 0.3, 0.3 #ancho de linea de los laseres
Detg = -25
Detr = 20 #detuning del doppler y repump
Temp = 0.0e-3 #temperatura en K
alpha = 0*(np.pi/180) #angulo entre los láseres
phidoppler, titadoppler = 0, 90
phirepump, titarepump = 0, 90
phiprobe, titaprobe = 0, 90
plotCPT = False
freqMin = -50
freqMax = 50
freqStep = 5e-2
Frequencyvector, Fluovector = CPTspectrum8levels(rabG, rabR, rabP, gPS, gPD, Detg, Detr, u, lwg, lwr, lwp, Temp, alpha, phidoppler, titadoppler, phiprobe, titaprobe, phirepump, titarepump, freqMin=freqMin, freqMax=freqMax, freqStep=freqStep, plot=plotCPT, solvemode=1)
NegativeDR, PositiveDR = CalculoTeoricoDarkResonances(u/(2*np.pi*1e6), titadoppler)
plt.plot(Frequencyvector, [100*f for f in Fluovector], label=str(titaprobe) + 'º, T: ' + str(Temp*1e3) + ' mK')
plt.xlabel('Probe detuning (MHz)')
plt.ylabel('Fluorescence (A.U.)')
for PDR in PositiveDR:
plt.axvline(Detr+PDR, linestyle='--', linewidth=0.5, color='red')
for NDR in NegativeDR:
plt.axvline(Detg+NDR, linestyle='--', linewidth=0.5, color='blue')
#parametros que andan piola:
"""
ub = 9.27e-24
h = 6.63e-34
c = (ub/h)*1e-4 #en unidades de MHz/G
B = 17 #campo magnetico en gauss
u = c*B
#u = 80e6
sr, sp = 0.53, 4.2
gPS, gPD, = 2*np.pi*21.58e6, 2*np.pi*1.35e6
rabR, rabP = sr*gPS, sp*gPD
lw = 2*np.pi * 0.33e6
lwr, lwp = lw, lw #ancho de linea de los laseres
dr_spec = - 2*np.pi* 26e6
freqSteps = 500
freqMin = -100e6
freqMax = 100e6
dps = 2*np.pi*np.linspace(freqMin, freqMax, freqSteps)
#dps = [-30e6]
alfar = 90*(np.pi/180)
ex_r, ey_r, ez_r = np.sin(alfar)*np.cos(0), np.sin(alfar)*np.sin(0), np.cos(alfar)
alfap = 90*(np.pi/180)
ex_p, ey_p, ez_p = np.sin(alfap)*np.cos(0), np.sin(alfap)*np.sin(0), np.cos(alfap)
"""
import h5py
import matplotlib.pyplot as plt
import numpy as np
import sys
import re
import ast
from scipy.optimize import curve_fit
import os
from scipy import interpolate
#Mediciones barriendo angulo del TISA y viendo kicking de resonancias oscuras
#C:\Users\Usuario\Documents\artiq\artiq_experiments\analisis\plots\20220106_CPT_DosLaseres_v08_TISA_DR\Data
os.chdir('/home/nico/Documents/artiq_experiments/analisis/plots/20230510_MotionalSpectrum/Data/')
MOTIONAL_FILES = """000011490-AD9910RAM
000011491-AD9910RAM
000011492-AD9910RAM
000011493-AD9910RAM
000011496-AD9910RAM
000011499-AD9910RAM
000011500-AD9910RAM
000011501-AD9910RAM
000011502-AD9910RAM
000011503-AD9910RAM
000011504-AD9910RAM
000011505-AD9910RAM
000011506-AD9910RAM
000011507-AD9910RAM
000011511-AD9910RAM
000011512-AD9910RAM
000011513-AD9910RAM
000011514-AD9910RAM
000011515-AD9910RAM
000011516-AD9910RAM
000011517-AD9910RAM
000011518-AD9910RAM
000011519-AD9910RAM
000011521-AD9910RAM
000011522-AD9910RAM
000011560-AD9910RAM
000011561-AD9910RAM
000011562-AD9910RAM
000011563-AD9910RAM
000011564-AD9910RAM
000011566-AD9910RAM
000011567-AD9910RAM
000011569-AD9910RAM
000011571-AD9910RAM
000011572-AD9910RAM
000011574-AD9910RAM
000011575-AD9910RAM
000011576-AD9910RAM
000011577-AD9910RAM
000011580-AD9910RAM
000011581-AD9910RAM
000011582-AD9910RAM
"""
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'
print(fname)
print(list(data['datasets'].keys()))
print(SeeKeys(MOTIONAL_FILES))
#%%
#carpeta pc nico labo escritorio:
#C:\Users\Usuario\Documents\artiq\artiq_experiments\analisis\plots\20211101_CPT_DosLaseres_v03\Data
Counts = []
RealFreqs = []
for i, fname in enumerate(MOTIONAL_FILES.split()):
print(str(i) + ' - ' + fname)
data = h5py.File(fname+'.h5', 'r')
RealFreqs.append(np.array(data['datasets']['real_freq']))
Counts.append(np.array(data['datasets']['counts']))
#%%
"""
Ploteo las curvas de referencia
"""
jvec = [29,30]
#jvec = [16]
plt.figure()
i = 0
for j in jvec:
if i==0:
plt.errorbar([1*f*1e-3 for f in RealFreqs[j]], Counts[j], yerr=np.sqrt(Counts[j]), color='red', fmt='-o', capsize=2, markersize=2)
else:
plt.errorbar([1*f*1e-3 for f in RealFreqs[j]], Counts[j], yerr=np.sqrt(Counts[j]), fmt='-o', capsize=2, markersize=2)
i = i + 1
plt.xlabel('Frecuencia (kHz)')
plt.ylabel('counts')
plt.xlim(851,856)
plt.ylim(600,1700)
plt.grid()
plt.legend()
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Jul 2 16:30:09 2020
@author: oem
"""
import os
import numpy as np
import time
import matplotlib.pyplot as plt
from scipy.signal import argrelextrema
from EITfit.threeLevel_2repumps_linealpol_python_scripts import CPTspectrum8levels, CPTspectrum8levels_fixedRabi
import random
from scipy.signal import savgol_filter as sf
def CalculoTeoricoDarkResonances_8levels(u, titadoppler, detuningdoppler, detuningrepump):
if titadoppler==0:
NegativeDR = [(-7/5)*u, (-3/5)*u, (-1/5)*u, (1/5)*u, (3/5)*u, (7/5)*u]
elif titadoppler==90:
NegativeDR = [(-11/5)*u, (-7/5)*u, (-3/5)*u, (3/5)*u, (7/5)*u, (11/5)*u]
else:
NegativeDR = [(-11/5)*u, (-7/5)*u, (-3/5)*u, (-1/5)*u, (1/5)*u, (3/5)*u, (7/5)*u, (11/5)*u]
PositiveDR = [(-8/5)*u, (-4/5)*u, 0, (4/5)*u, (8/5)*u]
return [detuningdoppler + dr for dr in NegativeDR], [detuningrepump + dr for dr in PositiveDR]
def GetClosestIndex(Vector, value, tolerance=1e-3):
i = 0
while i<len(Vector):
if abs(Vector[i] - value) < tolerance:
return i
else:
i = i + 1
return GetClosestIndex(Vector, value, tolerance=2*tolerance)
def FindDRFrequencies(Freq, Fluo, TeoDR, entorno=3):
"""
Busca los indices y la frecuencia de los minimos en un entorno cercano al de la DR.
Si no encuentra, devuelve el valor teórico.
"""
IndiceDRteo1, IndiceEntornoinicialDRteo1, IndiceEntornofinalDRteo1 = GetClosestIndex(Freq, TeoDR[0]), GetClosestIndex(Freq, TeoDR[0]-entorno), GetClosestIndex(Freq, TeoDR[0]+entorno)
IndiceDRteo2, IndiceEntornoinicialDRteo2, IndiceEntornofinalDRteo2 = GetClosestIndex(Freq, TeoDR[1]), GetClosestIndex(Freq, TeoDR[1]-entorno), GetClosestIndex(Freq, TeoDR[1]+entorno)
IndiceDRteo3, IndiceEntornoinicialDRteo3, IndiceEntornofinalDRteo3 = GetClosestIndex(Freq, TeoDR[2]), GetClosestIndex(Freq, TeoDR[2]-entorno), GetClosestIndex(Freq, TeoDR[2]+entorno)
IndiceDRteo4, IndiceEntornoinicialDRteo4, IndiceEntornofinalDRteo4 = GetClosestIndex(Freq, TeoDR[3]), GetClosestIndex(Freq, TeoDR[3]-entorno), GetClosestIndex(Freq, TeoDR[3]+entorno)
IndiceDRteo5, IndiceEntornoinicialDRteo5, IndiceEntornofinalDRteo5 = GetClosestIndex(Freq, TeoDR[4]), GetClosestIndex(Freq, TeoDR[4]-entorno), GetClosestIndex(Freq, TeoDR[4]+entorno)
IndiceDRteo6, IndiceEntornoinicialDRteo6, IndiceEntornofinalDRteo6 = GetClosestIndex(Freq, TeoDR[5]), GetClosestIndex(Freq, TeoDR[5]-entorno), GetClosestIndex(Freq, TeoDR[5]+entorno)
EntornoFreqDR1, EntornoFreqDR2 = Freq[IndiceEntornoinicialDRteo1:IndiceEntornofinalDRteo1], Freq[IndiceEntornoinicialDRteo2:IndiceEntornofinalDRteo2]
EntornoFreqDR3, EntornoFreqDR4 = Freq[IndiceEntornoinicialDRteo3:IndiceEntornofinalDRteo3], Freq[IndiceEntornoinicialDRteo4:IndiceEntornofinalDRteo4]
EntornoFreqDR5, EntornoFreqDR6 = Freq[IndiceEntornoinicialDRteo5:IndiceEntornofinalDRteo5], Freq[IndiceEntornoinicialDRteo6:IndiceEntornofinalDRteo6]
EntornoFluoDR1, EntornoFluoDR2 = Fluo[IndiceEntornoinicialDRteo1:IndiceEntornofinalDRteo1], Fluo[IndiceEntornoinicialDRteo2:IndiceEntornofinalDRteo2]
EntornoFluoDR3, EntornoFluoDR4 = Fluo[IndiceEntornoinicialDRteo3:IndiceEntornofinalDRteo3], Fluo[IndiceEntornoinicialDRteo4:IndiceEntornofinalDRteo4]
EntornoFluoDR5, EntornoFluoDR6 = Fluo[IndiceEntornoinicialDRteo5:IndiceEntornofinalDRteo5], Fluo[IndiceEntornoinicialDRteo6:IndiceEntornofinalDRteo6]
IndiceFluoMinimaEntorno1, IndiceFluoMinimaEntorno2 = argrelextrema(np.array(EntornoFluoDR1), np.less)[0], argrelextrema(np.array(EntornoFluoDR2), np.less)[0]
IndiceFluoMinimaEntorno3, IndiceFluoMinimaEntorno4 = argrelextrema(np.array(EntornoFluoDR3), np.less)[0], argrelextrema(np.array(EntornoFluoDR4), np.less)[0]
IndiceFluoMinimaEntorno5, IndiceFluoMinimaEntorno6 = argrelextrema(np.array(EntornoFluoDR5), np.less)[0], argrelextrema(np.array(EntornoFluoDR6), np.less)[0]
try:
FreqDR1 = EntornoFreqDR1[int(IndiceFluoMinimaEntorno1)]
IndiceDR1 = GetClosestIndex(Freq, FreqDR1)
except:
FreqDR1 = TeoDR[0]
IndiceDR1 = IndiceDRteo1
try:
FreqDR2 = EntornoFreqDR2[int(IndiceFluoMinimaEntorno2)]
IndiceDR2 = GetClosestIndex(Freq, FreqDR2)
except:
FreqDR2 = TeoDR[1]
IndiceDR2 = IndiceDRteo2
try:
FreqDR3 = EntornoFreqDR3[int(IndiceFluoMinimaEntorno3)]
IndiceDR3 = GetClosestIndex(Freq, FreqDR3)
except:
FreqDR3 = TeoDR[2]
IndiceDR3 = IndiceDRteo3
try:
FreqDR4 = EntornoFreqDR4[int(IndiceFluoMinimaEntorno4)]
IndiceDR4 = GetClosestIndex(Freq, FreqDR4)
except:
FreqDR4 = TeoDR[3]
IndiceDR4 = IndiceDRteo4
try:
FreqDR5 = EntornoFreqDR5[int(IndiceFluoMinimaEntorno5)]
IndiceDR5 = GetClosestIndex(Freq, FreqDR5)
except:
FreqDR5 = TeoDR[4]
IndiceDR5 = IndiceDRteo5
try:
FreqDR6 = EntornoFreqDR6[int(IndiceFluoMinimaEntorno6)]
IndiceDR6 = GetClosestIndex(Freq, FreqDR6)
except:
FreqDR6 = TeoDR[5]
IndiceDR6 = IndiceDRteo6
return [IndiceDR1, IndiceDR2, IndiceDR3, IndiceDR4, IndiceDR5, IndiceDR6], [FreqDR1, FreqDR2, FreqDR3, FreqDR4, FreqDR5, FreqDR6]
def FindRelativeFluorescencesOfDR(Freq, Fluo, IndicesDR, detuningdoppler, NormalizationCriterium=1, frecuenciareferenciacriterioasintotico=-100, getindices=False):
"""
Toma los indices donde estan las DR y evalua su fluorescencia. Esos indices son minimos locales en un entorno
cercano a las DR teoricas y, si no hay ningun minimo, toma la teorica.
Luego, hace el cociente de esa fluorescencia y un factor de normalización segun NormalizationCriterium:
1: Devuelve la fluorescencia absoluta de los minimos
2: Devuelve el cociente entre la fluorescencia del minimo y un valor medio entre dos puntos lejanos, como si no
hubiera una resonancia oscura y hubiera una recta. Ese valor esta a DistanciaFrecuenciaCociente del detuning del azul (el punto medio entre las dos DR en este caso)
3: Devuelve el cociente entre la fluorescencia del minimo y el valor a -100 MHz (si se hizo de -100 a 100),
o el valor limite por izquierda de la curva
4: Deuelve el cociente entre la fluorescencia del minimo y el valor de fluorescencia a detuning 0 MHz
"""
IndiceDR1, IndiceDR2, IndiceDR3, IndiceDR4, IndiceDR5, IndiceDR6 = IndicesDR[0], IndicesDR[1], IndicesDR[2], IndicesDR[3], IndicesDR[4], IndicesDR[5]
FluorescenceOfMinimums = [Fluo[IndiceDR1], Fluo[IndiceDR2], Fluo[IndiceDR3], Fluo[IndiceDR4], Fluo[IndiceDR5], Fluo[IndiceDR6]]
FrequencyOfMinimums = [Freq[IndiceDR1], Freq[IndiceDR2], Freq[IndiceDR3], Freq[IndiceDR4], Freq[IndiceDR5], Freq[IndiceDR6]]
DistanciaFrecuenciaCociente = 25
if NormalizationCriterium==0:
print('che')
return FrequencyOfMinimums, FluorescenceOfMinimums
if NormalizationCriterium==1:
Fluorescenciacerodetuning = Fluo[GetClosestIndex(Freq, 0)]
Fluorescenciaasintotica = Fluo[GetClosestIndex(Freq, frecuenciareferenciacriterioasintotico)]
return FrequencyOfMinimums, np.array([Fluorescenciacerodetuning/Fluorescenciaasintotica, Fluorescenciacerodetuning/Fluorescenciaasintotica, Fluorescenciacerodetuning/Fluorescenciaasintotica, Fluorescenciacerodetuning/Fluorescenciaasintotica, Fluorescenciacerodetuning/Fluorescenciaasintotica, Fluorescenciacerodetuning/Fluorescenciaasintotica])
if NormalizationCriterium==2:
k = 0
while k < len(Freq):
if Freq[k] < detuningdoppler-DistanciaFrecuenciaCociente + 2 and Freq[k] > detuningdoppler-DistanciaFrecuenciaCociente - 2:
FluoIzquierda = Fluo[k]
indiceizquierda = k
print('Izq:', Freq[k])
break
else:
k = k + 1
l = 0
while l < len(Freq):
if Freq[l] < detuningdoppler+DistanciaFrecuenciaCociente + 2 and Freq[l] > detuningdoppler+DistanciaFrecuenciaCociente - 2:
FluoDerecha = Fluo[l]
indicederecha = l
print('Der: ', Freq[l])
break
else:
l = l + 1
FluoNormDivisor = 0.5*(FluoDerecha+FluoIzquierda)
print(FluoNormDivisor)
if NormalizationCriterium==3:
#asintotico
FluoNormDivisor = Fluo[GetClosestIndex(Freq, frecuenciareferenciacriterioasintotico)]
if NormalizationCriterium==4:
#este te tira la fluorescencia de detuning 0
FluoNormDivisor = Fluo[GetClosestIndex(Freq, 0)]
RelativeFluorescenceOfMinimums = np.array([Fluore/FluoNormDivisor for Fluore in FluorescenceOfMinimums])
print('Esto: ', RelativeFluorescenceOfMinimums)
if NormalizationCriterium==2 and getindices==True:
return FrequencyOfMinimums, RelativeFluorescenceOfMinimums, indiceizquierda, indicederecha
return FrequencyOfMinimums, RelativeFluorescenceOfMinimums
def GetFinalMaps(MapasDR1, MapasDR2, MapasDR3, MapasDR4, MapasDR5, MapasDR6):
"""
Nota: esto vale para polarizacion del 397 sigma+ + sigma-. Sino hay que cambiar los coeficientes.
La estructura es:
MapasDRi = [MapaMedido_criterio1_DRi, MapaMedido_criterio2_DRi, MapaMedido_criterio3_DRi, MapaMedido_criterio4_DRi]
"""
Mapa1 = MapasDR1[0]
Mapa2pi = np.sqrt(3)*(MapasDR2[1] + MapasDR5[1])
Mapa2smas = np.sqrt(12/2)*MapasDR3[1] + (2/np.sqrt(2))*MapasDR6[1]
Mapa2smenos = (2/np.sqrt(2))*MapasDR1[1] + np.sqrt(12/2)*MapasDR4[1]
Mapa3pi = np.sqrt(3)*(MapasDR2[2] + MapasDR5[2])
Mapa3smas = np.sqrt(12/2)*MapasDR3[2] + (2/np.sqrt(2))*MapasDR6[2]
Mapa3smenos = (2/np.sqrt(2))*MapasDR1[2] + np.sqrt(12/2)*MapasDR4[2]
return Mapa1, [Mapa2pi, Mapa2smas, Mapa2smenos], [Mapa3pi, Mapa3smas, Mapa3smenos]
def CombinateDRwithCG(RelMinMedido1, RelMinMedido2, RelMinMedido3, RelMinMedido4):
Fluo1 = RelMinMedido1[0]
Fluo2pi = np.sqrt(3)*(RelMinMedido2[1] + RelMinMedido2[4])
Fluo2smas = np.sqrt(12/2)*RelMinMedido2[2] + (2/np.sqrt(2))*RelMinMedido2[5]
Fluo2smenos = (2/np.sqrt(2))*RelMinMedido2[0] + np.sqrt(12/2)*RelMinMedido2[3]
Fluo3pi = np.sqrt(3)*(RelMinMedido3[1] + RelMinMedido3[4])
Fluo3smas = np.sqrt(12/2)*RelMinMedido3[2] + (2/np.sqrt(2))*RelMinMedido3[5]
Fluo3smenos = (2/np.sqrt(2))*RelMinMedido3[0] + np.sqrt(12/2)*RelMinMedido3[3]
return Fluo1, [Fluo2pi, Fluo2smas, Fluo2smenos], [Fluo3pi, Fluo3smas, Fluo3smenos]
def IdentifyPolarizationCoincidences(theoricalmap, target, tolerance=1e-1):
"""
Busca en un mapa 2D la presencia de un valor target (medido) con tolerancia tolerance.
Si lo encuentra, pone un 1. Sino, un 0. Al plotear con pcolor se verá
en blanco la zona donde el valor medido se puede hallar.
"""
CoincidenceMatrix = np.zeros((len(theoricalmap), len(theoricalmap[0])))
i = 0
while i<len(theoricalmap):
j = 0
while j<len(theoricalmap[0]):
if abs(theoricalmap[i][j]-target) < tolerance:
CoincidenceMatrix[i][j] = 1
j=j+1
i=i+1
return CoincidenceMatrix
def RetrieveAbsoluteCoincidencesBetweenMaps(MapsVectors):
MatrixSum = np.zeros((len(MapsVectors[0]), len(MapsVectors[0][0])))
AbsoluteCoincidencesMatrix = np.zeros((len(MapsVectors[0]), len(MapsVectors[0][0])))
MatrixMapsVectors = []
for i in range(len(MapsVectors)):
MatrixMapsVectors.append(np.matrix(MapsVectors[i]))
for i in range(len(MatrixMapsVectors)):
MatrixSum = MatrixSum + MatrixMapsVectors[i]
MaxNumberOfCoincidences = np.max(MatrixSum)
ListMatrixSum = [list(i) for i in list(np.array(MatrixSum))]
for i in range(len(ListMatrixSum)):
for j in range(len(ListMatrixSum[0])):
if ListMatrixSum[i][j] == MaxNumberOfCoincidences:
AbsoluteCoincidencesMatrix[i][j] = 1
return AbsoluteCoincidencesMatrix, MaxNumberOfCoincidences
def MeasureMeanValueOfEstimatedArea(AbsoluteCoincidencesMap, X, Y):
NonZeroIndices = np.nonzero(AbsoluteCoincidencesMap)
Xsum = 0
Xvec = []
Ysum = 0
Yvec = []
N = len(NonZeroIndices[0])
for i in range(N):
Xsum = Xsum + X[NonZeroIndices[1][i]]
Xvec.append(X[NonZeroIndices[1][i]])
Ysum = Ysum + Y[NonZeroIndices[0][i]]
Yvec.append(Y[NonZeroIndices[0][i]])
Xaverage = Xsum/N
Yaverage = Ysum/N
Xspread = np.std(Xvec)
Yspread = np.std(Yvec)
return Xaverage, Yaverage, N, Xspread, Yspread
def MeasureRelativeFluorescenceFromCPT(Freq, Fluo, u, titadoppler, detuningrepump, detuningdoppler, frefasint=-100, entorno=3):
ResonanciasTeoricas, ResonanciasPositivas = CalculoTeoricoDarkResonances_8levels(u, titadoppler, detuningdoppler, detuningrepump)
IndicesDR, FreqsDR = FindDRFrequencies(Freq, Fluo, ResonanciasTeoricas, entorno=entorno)
FrequencyOfMinimums, RelativeFluorescenceOfMinimums0 = FindRelativeFluorescencesOfDR(Freq, Fluo, IndicesDR, detuningdoppler, NormalizationCriterium=0, frecuenciareferenciacriterioasintotico=frefasint)
FrequencyOfMinimums, RelativeFluorescenceOfMinimums1 = FindRelativeFluorescencesOfDR(Freq, Fluo, IndicesDR, detuningdoppler, NormalizationCriterium=1, frecuenciareferenciacriterioasintotico=frefasint)
FrequencyOfMinimums, RelativeFluorescenceOfMinimums2, indiceizquierda, indicederecha = FindRelativeFluorescencesOfDR(Freq, Fluo, IndicesDR, detuningdoppler, NormalizationCriterium=2, frecuenciareferenciacriterioasintotico=frefasint, getindices=True)
FrequencyOfMinimums, RelativeFluorescenceOfMinimums3 = FindRelativeFluorescencesOfDR(Freq, Fluo, IndicesDR, detuningdoppler, NormalizationCriterium=3, frecuenciareferenciacriterioasintotico=frefasint)
FrequencyOfMinimums, RelativeFluorescenceOfMinimums4 = FindRelativeFluorescencesOfDR(Freq, Fluo, IndicesDR, detuningdoppler, NormalizationCriterium=4, frecuenciareferenciacriterioasintotico=frefasint)
print('hola')
print(RelativeFluorescenceOfMinimums0)
return RelativeFluorescenceOfMinimums0, RelativeFluorescenceOfMinimums1, RelativeFluorescenceOfMinimums2, RelativeFluorescenceOfMinimums3, RelativeFluorescenceOfMinimums4, IndicesDR, [indiceizquierda, indicederecha]
def GenerateNoisyCPT(rabG, rabR, rabP, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobeVec, phirepump, titarepump, freqMin, freqMax, freqStep, plot=False, solvemode=1, detpvec=None, noiseamplitude=0.001):
Frequencyvector, Fluovector = PerformExperiment_8levels(rabG, rabR, rabP, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobeVec, phirepump, titarepump, freqMin, freqMax, freqStep, plot=False, solvemode=1, detpvec=None)
NoisyFluovector = [fluo+noiseamplitude*(2*random.random()-1) for fluo in Fluovector]
return Frequencyvector, NoisyFluovector
def GenerateNoisyCPT_fixedRabi(sg, sr, sp, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobeVec, phirepump, titarepump, freqMin, freqMax, freqStep, plot=False, solvemode=1, detpvec=None, noiseamplitude=0.001):
Frequencyvector, Fluovector = PerformExperiment_8levels_fixedRabi(sg, sr, sp, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobeVec, phirepump, titarepump, freqMin, freqMax, freqStep, plot=False, solvemode=1, detpvec=None)
NoisyFluovector = [fluo+noiseamplitude*(2*random.random()-1) for fluo in Fluovector]
return Frequencyvector, NoisyFluovector
def GenerateNoisyCPT_fit(sg, sr, sp, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobeVec, phirepump, titarepump, freqs, plot=False, solvemode=1, detpvec=None, noiseamplitude=0.001):
Frequencyvector, Fluovector = PerformExperiment_8levels_fixedRabi(sg, sr, sp, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobeVec, phirepump, titarepump, min(freqs), max(freqs) + freqs[1]-freqs[0], freqs[1]-freqs[0], plot=False, solvemode=1, detpvec=None)
NoisyFluovector = [fluo+noiseamplitude*(2*random.random()-1) for fluo in Fluovector]
return Frequencyvector, NoisyFluovector
def AddNoiseToCPT(Fluo, noisefactor):
return [f+noisefactor*(2*random.random()-1) for f in Fluo]
def SmoothNoisyCPT(Fluo, window=11, poly=3):
SmoothenFluo = sf(Fluo, window, poly)
return SmoothenFluo
def GetMinimaInfo(Freq, Fluo, u, titadoppler, detuningdoppler, detuningrepump, MinimumCriterium=2, NormalizationCriterium=1):
"""
FUNCION VIEJA
Esta funcion devuelve valores de frecuencias y fluorescencia relativa de los minimos.
Minimumcriterion:
1: Saca los minimos con funcion argelextrema
2: Directamente con las frecuencias teoricas busca las fluorescencias
Normalizationcriterium:
1: Devuelve la fluorescencia absoluta de los minimos
2: Devuelve el cociente entre la fluorescencia del minimo y un valor medio entre dos puntos lejanos, como si no
hubiera una resonancia oscura y hubiera una recta. Ese valor esta a DistanciaFrecuenciaCociente del detuning del azul (el punto medio entre las dos DR en este caso)
3: Devuelve el cociente entre la fluorescencia del minimo y el valor a -100 MHz (si se hizo de -100 a 100),
o el valor limite por izquierda de la curva
"""
FluorescenceOfMaximum = max(Fluo)
FrequencyOfMaximum = Freq[Fluo.index(FluorescenceOfMaximum)]
#criterio para encontrar los minimos
#criterio usando minimos de la fluorescencia calculados con la curva
if MinimumCriterium == 1:
LocationOfMinimums = argrelextrema(np.array(Fluo), np.less)[0]
FluorescenceOfMinimums = np.array([Fluo[i] for i in LocationOfMinimums])
FrequencyOfMinimums = np.array([Freq[j] for j in LocationOfMinimums])
#criterio con las DR teoricas
if MinimumCriterium == 2:
FrecuenciasDRTeoricas, FrecuenciasDRTeoricasPositivas = [darkresonance for darkresonance in CalculoTeoricoDarkResonances_8levels(u, titadoppler, detuningdoppler, detuningrepump)[0]]
FrequencyOfMinimums = []
FluorescenceOfMinimums =[]
print(FrecuenciasDRTeoricas)
k=0
ventanita = 0.001
while k < len(Freq):
if Freq[k] < FrecuenciasDRTeoricas[0] + ventanita and Freq[k] > FrecuenciasDRTeoricas[0] - ventanita:
FrequencyOfMinimums.append(Freq[k])
FluorescenceOfMinimums.append(Fluo[k])
elif Freq[k] < FrecuenciasDRTeoricas[1] + ventanita and Freq[k] > FrecuenciasDRTeoricas[1] - ventanita:
FrequencyOfMinimums.append(Freq[k])
FluorescenceOfMinimums.append(Fluo[k])
elif Freq[k] < FrecuenciasDRTeoricas[2] + ventanita and Freq[k] > FrecuenciasDRTeoricas[2] - ventanita:
FrequencyOfMinimums.append(Freq[k])
FluorescenceOfMinimums.append(Fluo[k])
elif Freq[k] < FrecuenciasDRTeoricas[3] + ventanita and Freq[k] > FrecuenciasDRTeoricas[3] - ventanita:
FrequencyOfMinimums.append(Freq[k])
FluorescenceOfMinimums.append(Fluo[k])
elif Freq[k] < FrecuenciasDRTeoricas[4] + ventanita and Freq[k] > FrecuenciasDRTeoricas[4] - ventanita:
FrequencyOfMinimums.append(Freq[k])
FluorescenceOfMinimums.append(Fluo[k])
elif Freq[k] < FrecuenciasDRTeoricas[5] + ventanita and Freq[k] > FrecuenciasDRTeoricas[5] - ventanita:
FrequencyOfMinimums.append(Freq[k])
FluorescenceOfMinimums.append(Fluo[k])
k = k + 1
print(FrequencyOfMinimums)
if len(FrequencyOfMinimums) != len(FrecuenciasDRTeoricas):
print('NO ANDA BIEN ESTO PAPI, revisalo')
#esto es para establecer un criterio para la fluorescencia relativa
DistanciaFrecuenciaCociente = 15
if NormalizationCriterium==1:
FluoNormDivisor = 1
if NormalizationCriterium==2:
k = 0
while k < len(Freq):
if Freq[k] < detuningdoppler-DistanciaFrecuenciaCociente + 2 and Freq[k] > detuningdoppler-DistanciaFrecuenciaCociente - 2:
FluoIzquierda = Fluo[k]
print('Izq:', Freq[k])
break
else:
k = k + 1
l = 0
while l < len(Freq):
if Freq[l] < detuningdoppler+DistanciaFrecuenciaCociente + 2 and Freq[l] > detuningdoppler+DistanciaFrecuenciaCociente - 2:
FluoDerecha = Fluo[l]
print('Der: ', Freq[l])
break
else:
l = l + 1
FluoNormDivisor = 0.5*(FluoDerecha+FluoIzquierda)
print(FluoNormDivisor)
if NormalizationCriterium==3:
FluoNormDivisor = Fluo[0]
RelativeFluorescenceOfMinimums = np.array([Fluore/FluoNormDivisor for Fluore in FluorescenceOfMinimums])
return FrequencyOfMinimums, RelativeFluorescenceOfMinimums
def GetPlotsofFluovsAngle_8levels(FrequencyOfMinimumsVector, RelativeFluorescenceOfMinimumsVector, u, titadoppler, detuningdoppler, detuningrepump, ventana=0.25, taketheoricalDR=False):
#primero buscamos las frecuencias referencia que se parezcan a las 6:
i = 0
FrecuenciasReferenciaBase = FrequencyOfMinimumsVector[0]
FrecuenciasDRTeoricas = [darkresonance for darkresonance in CalculoTeoricoDarkResonances_8levels(u, titadoppler, detuningdoppler, detuningrepump)[0]]
while i < len(FrequencyOfMinimumsVector):
if len(FrequencyOfMinimumsVector[i])==len(FrecuenciasDRTeoricas):
FrecuenciasReferenciaBase = FrequencyOfMinimumsVector[i]
print('Cool! Taking the DR identified with any curve')
break
else:
i = i + 1
if i==len(FrequencyOfMinimumsVector):
print('No hay ningun plot con 5 resonancias oscuras. Tomo las teóricas')
FrecuenciasReferenciaBase = FrecuenciasDRTeoricas
if taketheoricalDR:
FrecuenciasReferenciaBase = FrecuenciasDRTeoricas
Ventana = abs(ventana*(FrecuenciasReferenciaBase[1] - FrecuenciasReferenciaBase[0])) #ventana separadora de resonancias
print('Ventana = ', Ventana)
DarkResonance1Frequency = []
DarkResonance1Fluorescence = []
DarkResonance2Frequency = []
DarkResonance2Fluorescence = []
DarkResonance3Frequency = []
DarkResonance3Fluorescence = []
DarkResonance4Frequency = []
DarkResonance4Fluorescence = []
DarkResonance5Frequency = []
DarkResonance5Fluorescence = []
DarkResonance6Frequency = []
DarkResonance6Fluorescence = []
i = 0
while i < len(FrequencyOfMinimumsVector):
j = 0
FrecuenciasReferencia = [i for i in FrecuenciasReferenciaBase]
while j < len(FrequencyOfMinimumsVector[i]):
if abs(FrequencyOfMinimumsVector[i][j]) < (abs(FrecuenciasReferencia[0])+Ventana) and abs(FrequencyOfMinimumsVector[i][j]) >= (abs(FrecuenciasReferencia[0])-Ventana):
DarkResonance1Frequency.append(FrequencyOfMinimumsVector[i][j])
DarkResonance1Fluorescence.append(RelativeFluorescenceOfMinimumsVector[i][j])
FrecuenciasReferencia[0] = 0
elif abs(FrequencyOfMinimumsVector[i][j]) < (abs(FrecuenciasReferencia[1])+Ventana) and abs(FrequencyOfMinimumsVector[i][j]) >= (abs(FrecuenciasReferencia[1])-Ventana):
DarkResonance2Frequency.append(FrequencyOfMinimumsVector[i][j])
DarkResonance2Fluorescence.append(RelativeFluorescenceOfMinimumsVector[i][j])
FrecuenciasReferencia[1] = 0
elif abs(FrequencyOfMinimumsVector[i][j]) < (abs(FrecuenciasReferencia[2])+Ventana) and abs(FrequencyOfMinimumsVector[i][j]) >= (abs(FrecuenciasReferencia[2])-Ventana):
DarkResonance3Frequency.append(FrequencyOfMinimumsVector[i][j])
DarkResonance3Fluorescence.append(RelativeFluorescenceOfMinimumsVector[i][j])
FrecuenciasReferencia[2] = 0
elif abs(FrequencyOfMinimumsVector[i][j]) < (abs(FrecuenciasReferencia[3])+Ventana) and abs(FrequencyOfMinimumsVector[i][j]) >= (abs(FrecuenciasReferencia[3])-Ventana):
DarkResonance4Frequency.append(FrequencyOfMinimumsVector[i][j])
DarkResonance4Fluorescence.append(RelativeFluorescenceOfMinimumsVector[i][j])
FrecuenciasReferencia[3] = 0
elif abs(FrequencyOfMinimumsVector[i][j]) < (abs(FrecuenciasReferencia[4])+Ventana) and abs(FrequencyOfMinimumsVector[i][j]) >= (abs(FrecuenciasReferencia[4])-Ventana):
DarkResonance5Frequency.append(FrequencyOfMinimumsVector[i][j])
DarkResonance5Fluorescence.append(RelativeFluorescenceOfMinimumsVector[i][j])
FrecuenciasReferencia[4] = 0
elif abs(FrequencyOfMinimumsVector[i][j]) < (abs(FrecuenciasReferencia[5])+Ventana) and abs(FrequencyOfMinimumsVector[i][j]) >= (abs(FrecuenciasReferencia[5])-Ventana):
DarkResonance6Frequency.append(FrequencyOfMinimumsVector[i][j])
DarkResonance6Fluorescence.append(RelativeFluorescenceOfMinimumsVector[i][j])
FrecuenciasReferencia[5] = 0
else:
#print('Algo anduvo mal, por ahi tenes que cambiar la ventana che')
pass
j = j + 1
if np.count_nonzero(FrecuenciasReferencia) > 0:
if FrecuenciasReferencia[0] != 0:
DarkResonance1Frequency.append(FrecuenciasReferencia[0])
DarkResonance1Fluorescence.append()
if FrecuenciasReferencia[1] != 0:
DarkResonance2Frequency.append(FrecuenciasReferencia[1])
DarkResonance2Fluorescence.append(0)
if FrecuenciasReferencia[2] != 0:
DarkResonance3Frequency.append(FrecuenciasReferencia[2])
DarkResonance3Fluorescence.append(0)
if FrecuenciasReferencia[3] != 0:
DarkResonance4Frequency.append(FrecuenciasReferencia[3])
DarkResonance4Fluorescence.append(0)
if FrecuenciasReferencia[4] != 0:
DarkResonance5Frequency.append(FrecuenciasReferencia[4])
DarkResonance5Fluorescence.append(0)
if FrecuenciasReferencia[5] != 0:
DarkResonance6Frequency.append(FrecuenciasReferencia[5])
DarkResonance6Fluorescence.append(0)
i = i + 1
return DarkResonance1Frequency, DarkResonance1Fluorescence, DarkResonance2Frequency, DarkResonance2Fluorescence, DarkResonance3Frequency, DarkResonance3Fluorescence, DarkResonance4Frequency, DarkResonance4Fluorescence, DarkResonance5Frequency, DarkResonance5Fluorescence, DarkResonance6Frequency, DarkResonance6Fluorescence, FrecuenciasReferenciaBase
def PerformExperiment_8levels(rabG, rabR, rabP, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobeVec, phirepump, titarepump, freqMin, freqMax, freqStep, plot=False, solvemode=1, detpvec=None):
"""
Hace un experimento barriendo ángulos de repump con el angulo de doppler fijo.
solvemode=1: resuelve con np.linalg.solve
solvemode=2: resuelve invirtiendo L con la funcion np.linalg.inv
"""
Fluovectors = []
for titaprobe in titaprobeVec:
tinicial = time.time()
ProbeDetuningVectorL, Fluovector = CPTspectrum8levels(rabG, rabR, rabP, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobe, phirepump, titarepump, freqMin=freqMin, freqMax=freqMax, freqStep=freqStep, plot=False, solvemode=1)
tfinal = time.time()
print('Done angle ', titarepump, ' Total time: ', round((tfinal-tinicial), 2), "s")
if plot:
plt.figure()
plt.xlabel('Repump detuning (MHz')
plt.ylabel('Fluorescence (A.U.)')
plt.plot(ProbeDetuningVectorL, Fluovector, label=str(titarepump)+'º tita repump, T: ' + str(T*1e3) + ' mK')
plt.legend()
Fluovectors.append(Fluovector)
if len(titaprobeVec) == 1: #esto es para que no devuelva un vector de vectores si solo fijamos un angulo
Fluovectors = Fluovector
return ProbeDetuningVectorL, Fluovectors
def PerformExperiment_8levels_fixedRabi(sg, sr, sp, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobeVec, phirepump, titarepump, freqMin, freqMax, freqStep, plot=False, solvemode=1, detpvec=None):
"""
Hace un experimento barriendo ángulos de repump con el angulo de doppler fijo.
solvemode=1: resuelve con np.linalg.solve
solvemode=2: resuelve invirtiendo L con la funcion np.linalg.inv
"""
Fluovectors = []
for titaprobe in titaprobeVec:
tinicial = time.time()
ProbeDetuningVectorL, Fluovector = CPTspectrum8levels_fixedRabi(sg, sr, sp, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobe, phirepump, titarepump, freqMin=freqMin, freqMax=freqMax, freqStep=freqStep, plot=False, solvemode=1)
tfinal = time.time()
print('Done angle ', titarepump, ' Total time: ', round((tfinal-tinicial), 2), "s")
if plot:
plt.figure()
plt.xlabel('Repump detuning (MHz')
plt.ylabel('Fluorescence (A.U.)')
plt.plot(ProbeDetuningVectorL, Fluovector, label=str(titarepump)+'º tita repump, T: ' + str(T*1e3) + ' mK')
plt.legend()
Fluovectors.append(Fluovector)
if len(titaprobeVec) == 1: #esto es para que no devuelva un vector de vectores si solo fijamos un angulo
Fluovectors = Fluovector
return ProbeDetuningVectorL, Fluovectors
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Sep 1 17:58:39 2020
@author: oem
"""
import os
import numpy as np
#os.chdir('/home/oem/Nextcloud/G_liaf/liaf-TrampaAnular/Código General/EIT-CPT/Buenos Aires/Experiment Simulations/CPT scripts/Eight Level 2 repumps')
from threeLevel_2repumps_AnalysisFunctions import CalculoTeoricoDarkResonances_8levels, GetMinimaInfo, GetPlotsofFluovsAngle_8levels, PerformExperiment_8levels, FindDRFrequencies, FindRelativeFluorescencesOfDR, GenerateNoisyCPT, SmoothNoisyCPT, GetFinalMaps, GenerateNoisyCPT_fixedRabi, GenerateNoisyCPT_fit
import matplotlib.pyplot as plt
import time
from threeLevel_2repumps_AnalysisFunctions import MeasureRelativeFluorescenceFromCPT, IdentifyPolarizationCoincidences, RetrieveAbsoluteCoincidencesBetweenMaps, GetClosestIndex
#C:\Users\Usuario\Nextcloud\G_liaf\liaf-TrampaAnular\Código General\EIT-CPT\Buenos Aires\Experiment Simulations\CPT scripts\Eight Level 2 repumps
ub = 9.27e-24
h = 6.63e-34
c = (ub/h)*1e-4 #en unidades de MHz/G
#u = 1e6
u = 33.5e6
B = (u/(2*np.pi))/c
#sg, sp = 0.6, 5 #parámetros de control, saturación del doppler y repump
#rabG, rabP = sg*gPS, sp*gPD #frecuencias de rabi
gPS, gPD, = 2*np.pi*21.58e6, 2*np.pi*1.35e6 #anchos de linea de las transiciones
lw = 0.1
DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth = lw, lw, lw #ancho de linea de los laseres
DetDoppler = -36 #42
DetRepumpVec = [DetDoppler+29.6]
Tvec = [0.7] #temperatura en mK
alpha = 0*(np.pi/180) #angulo entre los láseres
phidoppler, titadoppler = 0, 90
phirepump, titarepump = 0, 0
phiprobe = 0
titaprobe = 90
#Calculo las resonancias oscuras teóricas
#ResonanciasTeoricas, DRPositivas = CalculoTeoricoDarkResonances_8levels(u/(2*np.pi*1e6), titadoppler, DetDoppler, DetRepump)
#Parametros de la simulacion cpt
center = -45
span = 80
freqMin = center-span*0.5
freqMax = center+span*0.5
""" parametros para tener espectros coherentes
freqMin = -56
freqMax = 14
"""
freqStep = 1e-1
noiseamplitude = 0
RelMinMedido0Vector = []
RelMinMedido1Vector = []
RelMinMedido2Vector = []
RelMinMedido3Vector = []
RelMinMedido4Vector = []
#Sr = np.arange(0, 10, 0.2)
#Sg = np.arange(0.01, 1, 0.05)
#Sp = np.arange(0.1, 6.1, 1)
#Sg = [0.6**2]
#Sp = [2.3**2]
Sg = [1.4]
Sp = [6]
Sr = [11]
i = 0
save = False
showFigures = True
if not showFigures:
plt.ioff()
else:
plt.ion()
fig1, ax1 = plt.subplots()
offsetx = 464
ax1.plot([f-offsetx for f in FreqsDR], CountsDR, 'o')
run = True
Scale = 730
Offset = 600 #600 para 20k cuentas aprox
MaxCoherenceValue = []
for sg in Sg:
for sp in Sp:
rabG, rabP = sg*gPS, sp*gPD
for Ti in Tvec:
T = Ti*1e-3
for DetRepump in DetRepumpVec:
print(T)
for sr in Sr:
rabR = sr*gPD
#MeasuredFreq, MeasuredFluo = GenerateNoisyCPT(rabG, rabR, rabP, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, [titaprobe], phirepump, titarepump, freqMin, freqMax, freqStep, plot=False, solvemode=1, detpvec=None, noiseamplitude=noiseamplitude)
if run:
MeasuredFreq4, MeasuredFluo4 = GenerateNoisyCPT_fixedRabi(sg, sr, sp, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, [titaprobe], phirepump, titarepump, freqMin, freqMax, freqStep, plot=False, solvemode=1, detpvec=None, noiseamplitude=noiseamplitude)
#SmoothFluo = SmoothNoisyCPT(MeasuredFluo, window=9, poly=2)
SmoothFluo4 = MeasuredFluo4
#Scale = max(BestC)/max([100*s for s in SmoothFluo4])
ax1.plot(MeasuredFreq4, [Scale*100*f + Offset for f in SmoothFluo4], label=f'Sr = {sr}')
ax1.axvline(DetDoppler, linestyle='--', linewidth=1)
#if sr != 0:
#ax1.axvline(DetRepump, linestyle='--', linewidth=1)
MaxCoherenceValue.append(np.max(SmoothFluo4))
#print(titaprobe)
ax1.set_xlabel('Detuning Rebombeo (MHz)')
ax1.set_ylabel('Fluorescencia (AU)')
ax1.set_title(f'B: {round(B, 2)} G, Sdop: {round(sg, 2)}, Sp: {round(sp, 2)}, Sr: {round(sr, 2)}, lw: {lw} MHz, T: {Ti} mK')
#ax1.set_ylim(0, 8)
#ax1.axvline(DetDoppler, linestyle='dashed', color='red', linewidth=1)
#ax1.axvline(DetRepump, linestyle='dashed', color='black', linewidth=1)
#ax1.set_title('Pol Doppler y Repump: Sigma+ Sigma-, Pol Probe: PI')
#ax1.legend()
ax1.grid()
print (f'{i+1}/{len(Sg)*len(Sp)}')
i = i + 1
if save:
plt.savefig(f'Mapa_plots_100k_1mk/CPT_SMSM_sdop{round(sg, 2)}_sp{round(sp, 2)}_sr{round(sr, 2)}.jpg')
ax1.legend()
"""
plt.figure()
plt.plot(Sr, MaxCoherenceValue, 'o')
plt.xlabel('Sr')
plt.ylabel('Coherence')
"""
"""
plt.figure()
plt.plot(MeasuredFreq, [100*f for f in SmoothFluo], color='darkred')
plt.xlabel('Desintonía 866 (MHz)')
plt.ylabel('Fluorescencia (A.U.)')
plt.axvline(-30, color='darkblue', linewidth=1.2, linestyle='--')
plt.yticks(np.arange(0.4, 1.8, 0.2))
plt.ylim(0.5, 1.6)
plt.grid()
plt.figure()
plt.plot(MeasuredFreq4, [100*f for f in SmoothFluo4], color='darkred')
plt.xlabel('Desintonía 866 (MHz)')
plt.ylabel('Fluorescencia (A.U.)')
plt.axvline(-30, color='darkblue', linewidth=1.2, linestyle='--')
plt.yticks(np.arange(0.8, 2.4, 0.4))
plt.grid()
"""
#%%
from scipy.optimize import curve_fit
T = 0.5e-3
sg = 0.7
sp = 6
sr = 0
DetDoppler = -14
DetRepump = 0
FitsSp = []
FitsOffset = []
Sg = [0.87]
def FitEIT(freqs, SP, offset):
MeasuredFreq, MeasuredFluo = GenerateNoisyCPT_fit(0.87, sr, SP, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, [titaprobe], phirepump, titarepump, freqs, plot=False, solvemode=1, detpvec=None, noiseamplitude=noiseamplitude)
FinalFluo = [f*43000 + 2685 for f in MeasuredFluo]
return FinalFluo
freqs = [f-offsetx+32 for f in FreqsDR]
freqslong = np.arange(min(freqs), max(freqs)+freqs[1]-freqs[0], 0.1*(freqs[1]-freqs[0]))
popt, pcov = curve_fit(FitEIT, freqs, CountsDR, p0=[5, 700], bounds=(0, [10, 1e6]))
FitsSp.append(popt[0])
FitsOffset.append(popt[1])
print(popt)
FittedEIT = FitEIT(freqslong, *popt)
plt.figure()
plt.errorbar(freqs, CountsDR, yerr=2*np.sqrt(CountsDR), fmt='o', capsize=2, markersize=2)
plt.plot(freqslong, FitEIT(freqslong, *popt))
plt.title(f'Sdop: {round(popt[0], 2)}, Spr: {round(popt[1], 2)}, T: {T*1e3} mK, detDop: {DetDoppler} MHz')
np.savetxt('CPT_measured.txt', np.transpose([freqs, CountsDR]))
np.savetxt('CPT_fitted.txt', np.transpose([freqslong, FittedEIT]))
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Apr 7 22:30:01 2020
@author: nico
"""
import numpy as np
import time
import matplotlib.pyplot as plt
from scipy.signal import argrelextrema
"""
Scripts para el calculo de la curva CPT
"""
def H0matrix(Detg, Detp, u):
"""
Calcula la matriz H0 en donde dr es el detuning del doppler, dp es el retuning del repump y u es el campo magnético en Hz/Gauss.
Para esto se toma la energía del nivel P como 0
"""
eigenEnergies = (Detg-u, Detg+u, -u/3, u/3, Detp-6*u/5, Detp-2*u/5, Detp+2*u/5, Detp+6*u/5) #pagina 26 de Oberst. los lande del calcio son iguales a Bario.
H0 = np.diag(eigenEnergies)
return H0
def HImatrix(rabG, rabP, phidoppler, titadoppler, phiprobe, titaprobe):
"""
Calcula la matriz de interacción Hsp + Hpd, en donde rabR es la frecuencia de rabi de la transición Doppler SP,
rabP es la frecuencia de rabi de la transición repump DP, y las componentes ei_r y ei_p son las componentes de la polarización
del campo eléctrico incidente de doppler y repump respectivamente. Deben estar normalizadas a 1
"""
HI = np.zeros((8, 8), dtype=np.complex_)
i, j = 1, 3
HI[i-1, j-1] = (rabG/np.sqrt(3)) * np.cos(titadoppler)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 1, 4
HI[i-1, j-1] = -(rabG/np.sqrt(3)) * np.sin(titadoppler)*np.exp(1j*phidoppler)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 2, 3
HI[i-1, j-1] = -(rabG/np.sqrt(3)) * np.sin(titadoppler)*np.exp(-1j*phidoppler)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 2, 4
HI[i-1, j-1] = -(rabG/np.sqrt(3)) * np.cos(titadoppler)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 3, 5
HI[i-1, j-1] = -(rabP/2) * np.sin(titaprobe)*np.exp(-1j*phiprobe)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 3, 6
HI[i-1, j-1] = -(rabP/np.sqrt(3)) * np.cos(titaprobe)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 3, 7
HI[i-1, j-1] = rabP/np.sqrt(12) * np.sin(titaprobe)*np.exp(1j*phiprobe)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 4, 6
HI[i-1, j-1] = -(rabP/np.sqrt(12)) * np.sin(titaprobe)*np.exp(-1j*phiprobe)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 4, 7
HI[i-1, j-1] = -(rabP/np.sqrt(3)) * np.cos(titaprobe)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 4, 8
HI[i-1, j-1] = (rabP/2) * np.sin(titaprobe)*np.exp(1j*phiprobe)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
return HI
def Lplusminus(detr, detp, phirepump, titarepump, forma=1):
Hintplus = np.zeros((8, 8), dtype=np.complex_)
Hintminus = np.zeros((8, 8), dtype=np.complex_)
Hintplus[4, 2] = (-1/2)*np.sin(titarepump)*np.exp(1j*phirepump)
Hintplus[5, 2] = (-1/np.sqrt(3))*np.cos(titarepump)
Hintplus[6, 2] = (1/(2*np.sqrt(3)))*np.sin(titarepump)*np.exp(-1j*phirepump)
Hintplus[5, 3] = (-1/(2*np.sqrt(3)))*np.sin(titarepump)*np.exp(1j*phirepump)
Hintplus[6, 3] = (-1/np.sqrt(3))*np.cos(titarepump)
Hintplus[7, 3] = (1/2)*np.sin(titarepump)*np.exp(-1j*phirepump)
Hintminus[2, 4] = (-1/2)*np.sin(titarepump)*np.exp(-1j*phirepump)
Hintminus[2, 5] = (-1/np.sqrt(3))*np.cos(titarepump)
Hintminus[2, 6] = (1/(2*np.sqrt(3)))*np.sin(titarepump)*np.exp(1j*phirepump)
Hintminus[3, 5] = (-1/(2*np.sqrt(3)))*np.sin(titarepump)*np.exp(-1j*phirepump)
Hintminus[3, 6] = (-1/np.sqrt(3))*np.cos(titarepump)
Hintminus[3, 7] = (1/2)*np.sin(titarepump)*np.exp(1j*phirepump)
if forma==1:
Lplus = np.zeros((64, 64), dtype=np.complex_)
Lminus = np.zeros((64, 64), dtype=np.complex_)
DeltaBar = np.zeros((64, 64), dtype=np.complex_)
for r in range(8):
for q in range(8):
for k in range(8):
for j in range(8):
if j==q:
if (k==2 or k==3) and r > 3:
Lplus[r*8+q][k*8+j] = (-1j)*(Hintplus[r,k])
if (r==2 or r==3) and k > 3:
Lminus[r*8+q][k*8+j] = (-1j)*(Hintminus[r,k])
elif r==k:
if (q==2 or q==3) and j > 3:
Lplus[r*8+q][k*8+j] = (-1j)*(- Hintplus[j,q])
if (j==2 or j==3) and q > 3:
Lminus[r*8+q][k*8+j] = (-1j)*(- Hintminus[j,q])
if forma==2:
deltaKro = np.diag([1, 1, 1, 1, 1, 1, 1, 1])
Lplus = (-1j)*(np.kron(Hintplus, deltaKro) - np.kron(deltaKro, Hintplus))
Lminus = (-1j)*(np.kron(Hintminus, deltaKro) - np.kron(deltaKro, Hintminus))
DeltaBar = np.zeros((64, 64), dtype=np.complex_)
for i in range(64):
DeltaBar[i, i] = (1j)*(detr - detp)
return np.matrix(Lminus), np.matrix(Lplus), np.matrix(DeltaBar)
def GetL1(Lplus, Lminus, DeltaBar, L0, rabR, nmax):
"""
Devuelve Splus0 y Sminus0
"""
Sp = (-1)*(0.5*rabR)*(np.matrix(np.linalg.inv(L0 - (nmax+1)*DeltaBar))*np.matrix(Lplus))
Sm = (-1)*(0.5*rabR)*(np.matrix(np.linalg.inv(L0 + (nmax+1)*DeltaBar))*np.matrix(Lminus))
for n in list(range(nmax+1))[(nmax+1)::-1][0:len(list(range(nmax+1))[(nmax+1)::-1])-1]: #jaja esto solo es para que vaya de nmax a 1 bajando. debe haber algo mas facil pero kcio
Sp = (-1)*(rabR)*(np.matrix(np.linalg.inv(L0 - n*DeltaBar + rabR*(Lminus*np.matrix(Sp))))*np.matrix(Lplus))
Sm = (-1)*(rabR)*(np.matrix(np.linalg.inv(L0 + n*DeltaBar + rabR*(Lplus*np.matrix(Sm))))*np.matrix(Lminus))
L1 = 0.5*rabR*(np.matrix(Lminus)*np.matrix(Sp) + np.matrix(Lplus)*np.matrix(Sm))
return L1
def EffectiveL(gPS, gPD, lwg, lwr, lwp):
"""
Siendo Heff = H + EffectiveL, calcula dicho EffectiveL que es (-0.5j)*sumatoria(CmDaga*Cm) que luego sirve para calcular el Liouvilliano
"""
Leff = np.zeros((8, 8), dtype=np.complex_)
Leff[0, 0] = 2*lwg
Leff[1, 1] = 2*lwg
Leff[2, 2] = ((2/3)+(1/3))*gPS + ((1/2) + (1/6) + (1/3))*gPD
Leff[3, 3] = ((2/3)+(1/3))*gPS + ((1/2) + (1/6) + (1/3))*gPD
Leff[4, 4] = 2*(lwr + lwp)
Leff[5, 5] = 2*(lwr + lwp)
Leff[6, 6] = 2*(lwr + lwp)
Leff[7, 7] = 2*(lwr + lwp)
return (-0.5j)*Leff
def CalculateSingleMmatrix(gPS, gPD, lwg, lwr, lwp):
"""
Si tomamos el Liuvilliano como L = (-j)*(Heff*deltak - Heffdaga*deltak) + sum(Mm),
esta funcion calcula dichos Mm, que tienen dimensión 64x64 ya que esa es la dimensión del L. Estas componentes
salen de hacer la cuenta a mano conociendo los Cm y considerando que Mm[8*(r-1)+s, 8*(k-1)+j] = Cm[r,l] + Cmdaga[j,s] = Cm[r,l] + Cm[s,j]
ya que los componentes de Cm son reales.
Esta M es la suma de las 8 matrices M.
"""
M = np.matrix(np.zeros((64, 64), dtype=np.complex_))
M[0,27] = (2/3)*gPS
M[9,18] = (2/3)*gPS
M[0,18] = (1/3)*gPS
M[1,19] = -(1/3)*gPS
M[8,26] = -(1/3)*gPS
M[9,27] = (1/3)*gPS
M[36,18] = (1/2)*gPD
M[37,19] = (1/np.sqrt(12))*gPD
M[44,26] = (1/np.sqrt(12))*gPD
M[45,27] = (1/6)*gPD
M[54,18] = (1/6)*gPD
M[55,19] = (1/np.sqrt(12))*gPD
M[62,26] = (1/np.sqrt(12))*gPD
M[63,27] = (1/2)*gPD
M[45,18] = (1/3)*gPD
M[46,19] = (1/3)*gPD
M[53,26] = (1/3)*gPD
M[54,27] = (1/3)*gPD
M[0,0] = 2*lwg
M[1,1] = 2*lwg
M[8,8] = 2*lwg
M[9,9] = 2*lwg
factor1 = 1
factor2 = 1
factor3 = 1
factor4 = 1
#M[36, 45] = lwp
M[36,36] = 2*(lwr + factor1*lwp)
M[37,37] = 2*(lwr + factor1*lwp)
M[38,38] = 2*(lwr + factor1*lwp)
M[39,39] = 2*(lwr + factor1*lwp)
M[44,44] = 2*(lwr + factor2*lwp)
M[45,45] = 2*(lwr + factor2*lwp)
M[46,46] = 2*(lwr + factor2*lwp)
M[47,47] = 2*(lwr + factor2*lwp)
M[52,52] = 2*(lwr + factor3*lwp)
M[53,53] = 2*(lwr + factor3*lwp)
M[54,54] = 2*(lwr + factor3*lwp)
M[55,55] = 2*(lwr + factor3*lwp)
M[60,60] = 2*(lwr + factor4*lwp)
M[61,61] = 2*(lwr + factor4*lwp)
M[62,62] = 2*(lwr + factor4*lwp)
M[63,63] = 2*(lwr + factor4*lwp)
return M
def dopplerBroadening(wlg, wlp, alpha, T, mcalcio = 6.655e-23*1e-3):
"""
Calcula el broadening extra semiclásico por temperatura considerando que el ion atrapado se mueve.
wlg es la longitud de onda doppler, wlp la longitud de onda repump, T la temperatura del ion en kelvin, y alpha (en rads) el ángulo
que forman ambos láseres.
"""
kboltzmann = 1.38e-23 #J/K
gammaD = (2*np.pi)*np.sqrt((1/(wlg*wlg)) + (1/(wlp*wlp)) - 2*(1/(wlg*wlp))*np.cos(alpha))*np.sqrt(kboltzmann*T/(2*mcalcio))
return gammaD
def FullL_efficient(rabG, rabR, rabP, gPS = 0, gPD = 0, Detg = 0, Detr = 0, Detp = 0, u = 0, lwg = 0, lwr=0, lwp = 0,
phidoppler=0, titadoppler=0, phiprobe=0, titaprobe=0, phirepump=0, titarepump=0, T = 0, alpha = 0):
"""
Calcula el Liouvilliano total de manera explícita índice a índice. Suma aparte las componentes de las matrices M.
Es la más eficiente hasta ahora.
"""
db = dopplerBroadening(0.397e-6, 0.866e-6, alpha, T)
#lwr = np.sqrt(lwr**2 + dopplerBroadening(0.397e-6, 0.866e-6, alpha, T)**2)
lwg = np.sqrt(lwg**2 + db**2)
lwr = np.sqrt(lwr**2 + db**2)
CC = EffectiveL(gPS, gPD, lwg, lwr, lwp)
Heff = H0matrix(Detg, Detp, u) + HImatrix(rabG, rabP, phidoppler, titadoppler, phiprobe, titaprobe) + CC
Heffdaga = np.matrix(Heff).getH()
Lfullpartial = np.zeros((64, 64), dtype=np.complex_)
for r in range(8):
for q in range(8):
for k in range(8):
for j in range(8):
if j!=q and r!=k:
pass
elif j==q and r!=k:
if (r < 2 and k > 3) or (k < 2 and r > 3) or (r > 3 and k > 3) or (r==0 and k==1) or (r==1 and k==0) or (r==2 and k==3) or (r==3 and k==2): #todo esto sale de analizar explicitamente la matriz y tratar de no calcular cosas de más que dan cero
pass
else:
Lfullpartial[r*8+q][k*8+j] = (-1j)*(Heff[r,k])
elif j!=q and r==k:
if (j < 2 and q > 3) or (q < 2 and j > 3) or (j > 3 and q > 3) or (j==0 and q==1) or (j==1 and q==0) or (j==2 and q==3) or (j==3 and q==2):
pass
else:
Lfullpartial[r*8+q][k*8+j] = (-1j)*(-Heffdaga[j,q])
else:
if Heff[r,k] == Heffdaga[j,q]:
pass
else:
Lfullpartial[r*8+q][k*8+j] = (-1j)*(Heff[r,k]-Heffdaga[j,q])
M = CalculateSingleMmatrix(gPS, gPD, lwg, lwr, lwp)
L0 = np.array(np.matrix(Lfullpartial) + M)
nmax = 1
Lminus, Lplus, DeltaBar = Lplusminus(Detr, Detp, phirepump, titarepump)
factor1 = np.exp(1j*0.2*np.pi)
factor2 = np.exp(-1j*0.2*np.pi)
#print(factor)
L1 = GetL1(factor1*Lplus, factor2*Lminus, DeltaBar, L0, rabR, nmax)
Lfull = L0 + L1
#NORMALIZACION DE RHO
i = 0
while i < 64:
if i%9 == 0:
Lfull[0, i] = 1
else:
Lfull[0, i] = 0
i = i + 1
return Lfull
"""
Scripts para correr un experimento y hacer el análisis de los datos
"""
def CalculoTeoricoDarkResonances(u, titadoppler):
if titadoppler==0:
NegativeDR = [(-7/5)*u, (-3/5)*u, (-1/5)*u, (1/5)*u, (3/5)*u, (7/5)*u]
elif titadoppler==90:
NegativeDR = [(-11/5)*u, (-7/5)*u, (-3/5)*u, (3/5)*u, (7/5)*u, (11/5)*u]
PositiveDR = [(-8/5)*u, (-4/5)*u, 0, (4/5)*u, (8/5)*u]
return NegativeDR, PositiveDR
def CPTspectrum8levels(rabG, rabR, rabP, gPS, gPD, Detg, Detr, u, lwg, lwr, lwp, Temp, alpha, phidoppler, titadoppler, phiprobe, titaprobe, phirepump, titarepump,
freqMin=-100, freqMax=100, freqStep=1e-1, plot=False, solvemode=1):
"""
Hace un experimento barriendo ángulos de repump con el angulo de doppler fijo.
solvemode=1: resuelve con np.linalg.solve
solvemode=2: resuelve invirtiendo L con la funcion np.linalg.inv
"""
phidoppler, titadoppler = phidoppler*(np.pi/180), titadoppler*(np.pi/180)
phiprobe, titaprobe = phiprobe*(np.pi/180), titaprobe*(np.pi/180)
phirepump, titarepump = phirepump*(np.pi/180), titarepump*(np.pi/180)
DetProbeVector = 2*np.pi*np.arange(freqMin*1e6, freqMax*1e6, freqStep*1e6)
Detg, Detr = 2*np.pi*Detg*1e6, 2*np.pi*Detr*1e6
lwg, lwr, lwp = 2*np.pi*lwg*1e6, 2*np.pi*lwr*1e6, 2*np.pi*lwp*1e6
#u = 2*np.pi*u*1e6
Fluovector = []
tinicial = time.time()
for Detp in DetProbeVector:
L = FullL_efficient(rabG, rabR, rabP, gPS, gPD, Detg, Detr, Detp, u, lwg, lwr, lwp, phidoppler, titadoppler, phiprobe, titaprobe, phirepump, titarepump, Temp, alpha)
if solvemode == 1:
rhovectorized = np.linalg.solve(L, np.array([int(i==0) for i in range(64)]))
Fluo = np.real(rhovectorized[18] + np.real(rhovectorized[27])) #estos son los rho33 + rho44
Fluovector.append(Fluo)
if solvemode == 2:
Linv = np.linalg.inv(L)
rhovectorized = [Linv[j][0] for j in range(len(Linv))]
Fluo = np.real(rhovectorized[18] + np.real(rhovectorized[27])) #estos son los rho33 + rho44
Fluovector.append(Fluo)
tfinal = time.time()
print('Done, Total time: ', round((tfinal-tinicial), 2), "s")
DetProbeVectorMHz = np.arange(freqMin, freqMax, freqStep)
if plot:
plt.xlabel('Probe detuning (MHz)')
plt.ylabel('Fluorescence (A.U.)')
plt.plot(DetProbeVectorMHz, [100*f for f in Fluovector], label=str(titaprobe) + 'º, T: ' + str(Temp*1e3) + ' mK')
plt.legend()
return DetProbeVectorMHz, Fluovector
def CPTspectrum8levels_fixedRabi(sg, sr, sp, gPS, gPD, Detg, Detr, u, lwg, lwr, lwp, Temp, alpha, phidoppler, titadoppler, phiprobe, titaprobe, phirepump, titarepump,
freqMin=-100, freqMax=100, freqStep=1e-1, plot=False, solvemode=1):
"""
Hace un experimento barriendo ángulos de repump con el angulo de doppler fijo.
solvemode=1: resuelve con np.linalg.solve
solvemode=2: resuelve invirtiendo L con la funcion np.linalg.inv
"""
phidoppler, titadoppler = phidoppler*(np.pi/180), titadoppler*(np.pi/180)
phiprobe, titaprobe = phiprobe*(np.pi/180), titaprobe*(np.pi/180)
phirepump, titarepump = phirepump*(np.pi/180), titarepump*(np.pi/180)
DetProbeVector = 2*np.pi*np.arange(freqMin*1e6, freqMax*1e6, freqStep*1e6)
Detg, Detr = 2*np.pi*Detg*1e6, 2*np.pi*Detr*1e6
#lwg, lwr, lwp = 2*np.pi*lwg*1e6, 2*np.pi*lwr*1e6, 2*np.pi*lwp*1e6
lwg, lwr, lwp = lwg*1e6, lwr*1e6, lwp*1e6
rabG = sg*gPS
rabR = sr*gPD
rabP = sp*gPD
#u = 2*np.pi*u*1e6
Fluovector = []
tinicial = time.time()
for Detp in DetProbeVector:
L = FullL_efficient(rabG, rabR, rabP, gPS, gPD, Detg, Detr, Detp, u, lwg, lwr, lwp, phidoppler, titadoppler, phiprobe, titaprobe, phirepump, titarepump, Temp, alpha)
if solvemode == 1:
coh = 5
rhovectorized = np.linalg.solve(L, np.array([int(i==0) for i in range(64)]))
#Fluo = np.abs(rhovectorized[coh])
Fluo = np.real(rhovectorized[18] + np.real(rhovectorized[27])) #estos son los rho33 + rho44
Fluovector.append(Fluo)
if solvemode == 2:
Linv = np.linalg.inv(L)
rhovectorized = [Linv[j][0] for j in range(len(Linv))]
Fluo = np.real(rhovectorized[18] + np.real(rhovectorized[27])) #estos son los rho33 + rho44
Fluovector.append(Fluo)
tfinal = time.time()
print('Done, Total time: ', round((tfinal-tinicial), 2), "s")
DetProbeVectorMHz = np.arange(freqMin, freqMax, freqStep)
if plot:
plt.xlabel('Probe detuning (MHz)')
plt.ylabel('Fluorescence (A.U.)')
plt.plot(DetProbeVectorMHz, [100*f for f in Fluovector], label=str(titaprobe) + 'º, T: ' + str(Temp*1e3) + ' mK')
plt.legend()
return DetProbeVectorMHz, Fluovector
#%%
if __name__ == "__main__":
ub = 9.27e-24
h = 6.63e-34
c = (ub/h)*1e-4 #en unidades de MHz/G
B = 25 #campo magnetico en gauss
u = c*B
sg, sr, sp = 0.5, 1.5, 4 #parámetros de saturación del doppler y repump
gPS, gPD, = 2*np.pi*21.58e6, 2*np.pi*1.35e6 #anchos de linea de las transiciones
rabG, rabR, rabP = sg*gPS, sr*gPD, sp*gPD #frecuencias de rabi
lwg, lwr, lwp = 0.3, 0.3, 0.3 #ancho de linea de los laseres
Detg = -25
Detr = 20 #detuning del doppler y repump
Temp = 0.0e-3 #temperatura en K
alpha = 0*(np.pi/180) #angulo entre los láseres
phidoppler, titadoppler = 0, 90
phirepump, titarepump = 0, 90
phiprobe, titaprobe = 0, 90
plotCPT = False
freqMin = -50
freqMax = 50
freqStep = 5e-2
Frequencyvector, Fluovector = CPTspectrum8levels(rabG, rabR, rabP, gPS, gPD, Detg, Detr, u, lwg, lwr, lwp, Temp, alpha, phidoppler, titadoppler, phiprobe, titaprobe, phirepump, titarepump, freqMin=freqMin, freqMax=freqMax, freqStep=freqStep, plot=plotCPT, solvemode=1)
NegativeDR, PositiveDR = CalculoTeoricoDarkResonances(u/(2*np.pi*1e6), titadoppler)
plt.plot(Frequencyvector, [100*f for f in Fluovector], label=str(titaprobe) + 'º, T: ' + str(Temp*1e3) + ' mK')
plt.xlabel('Probe detuning (MHz)')
plt.ylabel('Fluorescence (A.U.)')
for PDR in PositiveDR:
plt.axvline(Detr+PDR, linestyle='--', linewidth=0.5, color='red')
for NDR in NegativeDR:
plt.axvline(Detg+NDR, linestyle='--', linewidth=0.5, color='blue')
#parametros que andan piola:
"""
ub = 9.27e-24
h = 6.63e-34
c = (ub/h)*1e-4 #en unidades de MHz/G
B = 17 #campo magnetico en gauss
u = c*B
#u = 80e6
sr, sp = 0.53, 4.2
gPS, gPD, = 2*np.pi*21.58e6, 2*np.pi*1.35e6
rabR, rabP = sr*gPS, sp*gPD
lw = 2*np.pi * 0.33e6
lwr, lwp = lw, lw #ancho de linea de los laseres
dr_spec = - 2*np.pi* 26e6
freqSteps = 500
freqMin = -100e6
freqMax = 100e6
dps = 2*np.pi*np.linspace(freqMin, freqMax, freqSteps)
#dps = [-30e6]
alfar = 90*(np.pi/180)
ex_r, ey_r, ez_r = np.sin(alfar)*np.cos(0), np.sin(alfar)*np.sin(0), np.cos(alfar)
alfap = 90*(np.pi/180)
ex_p, ey_p, ez_p = np.sin(alfap)*np.cos(0), np.sin(alfap)*np.sin(0), np.cos(alfap)
"""
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