Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
artiq_experiments
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nicolas Nunez Barreto
artiq_experiments
Commits
5e8021f6
Commit
5e8021f6
authored
Mar 22, 2024
by
Nicolas Nunez Barreto
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://code.df.uba.ar/nnunez/artiq_experiments
parents
7a7541c6
058680d2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
136 additions
and
8 deletions
+136
-8
teoryanalysis.py
...plots/20230912_RotationalDopplerShift_v7/teoryanalysis.py
+2
-0
CPT_plotter_20231123.py
...plots/20231123_CPTconmicromocion3/CPT_plotter_20231123.py
+2
-2
RDS_piezobeamsizes_2024_invariance.py
...alDopplerShift_news/RDS_piezobeamsizes_2024_invariance.py
+132
-6
scaleinvariance.jpg
.../20240312_RotationalDopplerShift_news/scaleinvariance.jpg
+0
-0
No files found.
analisis/plots/20230912_RotationalDopplerShift_v7/teoryanalysis.py
View file @
5e8021f6
...
...
@@ -26,6 +26,8 @@ amp2=2*np.pi/w2
plt
.
figure
()
plt
.
plot
(
r
,
1
*
OAM
(
r
,
w1
,
amp1
))
plt
.
plot
(
r
,
1
*
OAM
(
r
,
w2
,
amp2
))
plt
.
plot
(
r
,
1
*
OAM
(
r
,
w2
*
1.5
,
amp2
*
1.5
))
plt
.
plot
(
r
,
1
*
OAM
(
r
,
w2
*
1.7
,
amp2
*
1.7
))
#%%
plt
.
figure
()
plt
.
plot
(
r
,
OAM
(
r
,
w1
,
amp1
)
/
RDE
(
r
,
2
,
2
))
...
...
analisis/plots/20231123_CPTconmicromocion3/CPT_plotter_20231123.py
View file @
5e8021f6
...
...
@@ -589,8 +589,8 @@ beta_vector = np.arange(0,2,0.01)
comparison
=
[]
for
beta_target
in
beta_vector
:
factor1
=
popt_rho22_balance
[
1
]
*
(
hbar
/
kb
)
*
MicromotionSpectra
(
beta_target
,
2
*
np
.
pi
*
popt_rho22_balance
[
0
],
2
*
np
.
pi
*
23e6
)
factor2
=
popt_rho22_balance
[
2
]
*
(
beta_target
**
2
)
factor1
=
1
*
(
hbar
/
kb
)
*
MicromotionSpectra
(
beta_target
,
2
*
np
.
pi
*
popt_rho22_balance
[
0
],
2
*
np
.
pi
*
23e6
)
factor2
=
popt_rho22_balance
[
1
]
*
(
beta_target
**
2
)
comparison
.
append
(
factor2
/
factor1
)
plt
.
figure
()
...
...
analisis/plots/20240312_RotationalDopplerShift_news/RDS_piezobeamsizes_2024_invariance.py
View file @
5e8021f6
...
...
@@ -122,9 +122,9 @@ power=1
palette
=
sns
.
color_palette
(
"tab10"
)
pmlocmedvec1
=
list
(
np
.
arange
(
0
,
len
(
PIEZOS1_FILES
),
1
))
pmlocmedvec1
=
list
(
np
.
arange
(
0
,
len
(
PIEZOS1_FILES
)
-
2
,
1
))
#pmlocmedvec1 = [
6
]
#pmlocmedvec1 = []
plt
.
figure
()
...
...
@@ -219,7 +219,7 @@ palette = sns.color_palette("tab10")
pmlocmedvec2
=
list
(
np
.
arange
(
0
,
len
(
PIEZOS2_FILES
),
1
))
#pmlocmedvec2 = [
0,1,2
]
#pmlocmedvec2 = [
4
]
plt
.
figure
()
...
...
@@ -243,6 +243,8 @@ for med in pmlocmedvec2:
if
med
==
3
:
popt
,
pcov
=
curve_fit
(
Lorentzian
,
np
.
array
(
Freqs
[
0
:
70
]),
np
.
array
(
Counts
[
0
:
70
]),
p0
=
(
-
2000
,
2100
,
435.8
,
0.05
,
0.1
),
bounds
=
((
-
100000
,
0
,
435.5
,
0
,
0
),(
0
,
1e5
,
436.1
,
10
,
10000
)))
if
med
==
4
:
popt
,
pcov
=
curve_fit
(
Lorentzian
,
np
.
array
(
Freqs
[
0
:
-
4
]),
np
.
array
(
Counts
[
0
:
-
4
]),
p0
=
(
-
2000
,
2100
,
435.8
,
0.05
,
0.1
),
bounds
=
((
-
100000
,
0
,
435.5
,
0
,
0
),(
0
,
1e5
,
436.1
,
10
,
10000
)))
# elif med==7:
# k=60
# popt, pcov = curve_fit(Lorentzian, np.array(Freqs[0:10]+Freqs[k:]), np.array(Counts[0:10]+Counts[k:]), p0=(-2000,2100,435.8,0.05,0.1), bounds=((-100000,0,435.5,0,0),(0,1e5, 436.1, 10,10000)))
...
...
@@ -250,8 +252,11 @@ for med in pmlocmedvec2:
# elif med==10:
# popt, pcov = curve_fit(Lorentzian, np.array(Freqs[6:80]), np.array(Counts[6:80]), p0=(-2000,2100,435.8,0.05,0.1), bounds=((-100000,0,435.5,0,0),(0,1e5, 436.1, 10,10000)))
# elif med==12:
# popt, pcov = curve_fit(Lorentzian, np.array(Freqs[:75]), np.array(Counts[:75]), p0=(-2000,2100,435.8,0.05,0.1), bounds=((-100000,0,435.5,0,0),(0,1e5, 436.1, 10,10000)))
elif
med
==
25
:
print
(
'che'
)
k1
,
k2
=
0
,
40
k3
,
k4
=-
20
,
-
1
popt
,
pcov
=
curve_fit
(
Lorentzian
,
np
.
array
(
Freqs
[
k1
:
k2
]
+
Freqs
[
k3
:
k4
]),
np
.
array
(
Counts
[
k1
:
k2
]
+
Counts
[
k3
:
k4
]),
p0
=
(
-
2000
,
2100
,
435.8
,
0.05
,
0.1
),
bounds
=
((
-
100000
,
0
,
435.5
,
0
,
0
),(
0
,
1e5
,
436.1
,
10
,
10000
)))
else
:
...
...
@@ -347,6 +352,127 @@ plt.grid()
plt
.
xlabel
(
'Distance to center of beam (steps)'
)
plt
.
ylabel
(
'DR depth / Beam intensity'
)
plt
.
savefig
(
'/home/nico/Documents/artiq_experiments/analisis/plots/20240312_RotationalDopplerShift_news/scaleinvariance.jpg'
)
#plt.savefig('/home/nico/Documents/artiq_experiments/analisis/plots/20240312_RotationalDopplerShift_news/scaleinvariance.jpg')
#%%
"""
Intento ajustar con un modelo
F(r)=A*( r²/(r²+b²)
"""
from
scipy.optimize
import
curve_fit
def
modelo1
(
r
,
a
,
b
):
k
=
2
return
a
*
((
r
**
k
/
(
b
**
k
+
r
**
k
)))
rfit
=
np
.
arange
(
x2
,
len
(
Intensityver2
)
*
20
+
x2
,
20
)
yfit
=
[
p
for
p
in
pmdepthsdrver2
]
rlong
=
np
.
arange
(
0
,
1000
,
1
)
popt
,
pcov
=
curve_fit
(
modelo1
,
rfit
,
yfit
)
plt
.
figure
()
plt
.
errorbar
(
np
.
arange
(
x1
,
len
(
Intensityver1
)
*
20
+
x1
,
20
),
[
p
for
p
in
pmdepthsdrver1
],
yerr
=
errorpmdepthsdrver1
,
fmt
=
'o'
,
color
=
'red'
,
capsize
=
3
,
markersize
=
8
,
zorder
=
1
)
plt
.
plot
([
x
*
20
for
x
in
xchicofinal
],[
i
/
np
.
max
(
IntensityChico
)
for
i
in
IntensityChico
],
'o'
,
color
=
'red'
,
alpha
=
0.3
)
plt
.
errorbar
(
np
.
arange
(
x2
,
len
(
Intensityver2
)
*
20
+
x2
,
20
),
[
p
for
p
in
pmdepthsdrver2
],
yerr
=
errorpmdepthsdrver2
,
fmt
=
'o'
,
color
=
'blue'
,
capsize
=
3
,
markersize
=
8
,
zorder
=
1
)
plt
.
plot
([
x
*
20
for
x
in
xgrandefinal
],[
i
/
np
.
max
(
IntensityGrande
)
for
i
in
IntensityGrande
],
'o'
,
color
=
'blue'
,
alpha
=
0.3
)
plt
.
plot
(
rlong
,
modelo1
(
rlong
,
*
popt
),
zorder
=
2
,
color
=
'black'
,
linewidth
=
3
,
linestyle
=
'dashed'
,
label
=
r'$I(r)=A\,\frac{r^2}{r^2+b^2}$'
)
plt
.
xlim
(
-
20
,
600
+
x2
+
10
)
plt
.
legend
()
plt
.
grid
()
#%%
"""
Va otro modelo con funciones de bessel
F(r) = 1-(J_0 (b*r))²
"""
from
scipy.special
import
jv
def
modelo2
(
r
,
a
,
b
):
return
a
*
(
1
-
(
jv
(
0
,
b
*
(
r
))
**
2
))
rfit
=
np
.
arange
(
x2
,
len
(
Intensityver2
)
*
20
+
x2
,
20
)
yfit
=
[
p
for
p
in
pmdepthsdrver2
]
rlong
=
np
.
arange
(
0
,
1000
,
1
)
popt
,
pcov
=
curve_fit
(
modelo2
,
rfit
,
yfit
,
p0
=
(
0.7
,
0.005
))
print
(
popt
)
plt
.
figure
()
plt
.
errorbar
(
np
.
arange
(
x1
,
len
(
Intensityver1
)
*
20
+
x1
,
20
),
[
p
for
p
in
pmdepthsdrver1
],
yerr
=
errorpmdepthsdrver1
,
fmt
=
'o'
,
color
=
'red'
,
capsize
=
3
,
markersize
=
8
,
zorder
=
1
)
plt
.
plot
([
x
*
20
for
x
in
xchicofinal
],[
i
/
np
.
max
(
IntensityChico
)
for
i
in
IntensityChico
],
'o'
,
color
=
'red'
,
alpha
=
0.3
)
plt
.
errorbar
(
np
.
arange
(
x2
,
len
(
Intensityver2
)
*
20
+
x2
,
20
),
[
p
for
p
in
pmdepthsdrver2
],
yerr
=
errorpmdepthsdrver2
,
fmt
=
'o'
,
color
=
'blue'
,
capsize
=
3
,
markersize
=
8
,
zorder
=
1
)
plt
.
plot
([
x
*
20
for
x
in
xgrandefinal
],[
i
/
np
.
max
(
IntensityGrande
)
for
i
in
IntensityGrande
],
'o'
,
color
=
'blue'
,
alpha
=
0.3
)
plt
.
plot
(
rlong
,
modelo2
(
rlong
,
*
popt
),
zorder
=
2
,
color
=
'black'
,
linewidth
=
3
,
linestyle
=
'dashed'
,
label
=
r'$I(r)=a\,(1-(J_0(br)))$'
)
plt
.
xlim
(
-
20
,
600
+
x2
+
10
)
plt
.
legend
(
loc
=
'upper left'
)
plt
.
grid
()
#%%
"""
Va otro modelo con funciones de bessel
F(r) = A*(J_0 (b/r))²
"""
from
scipy.special
import
jv
def
modelo3
(
r
,
a
,
b
):
return
a
*
((
jv
(
0
,
b
*
(
1
/
r
)))
**
2
)
rfit
=
np
.
arange
(
x2
,
len
(
Intensityver2
)
*
20
+
x2
,
20
)
yfit
=
[
p
for
p
in
pmdepthsdrver2
]
rlong
=
np
.
arange
(
0
,
1000
,
1
)
popt
,
pcov
=
curve_fit
(
modelo3
,
rfit
,
yfit
,
p0
=
(
0.7
,
1
))
print
(
popt
)
plt
.
figure
()
plt
.
errorbar
(
np
.
arange
(
x1
,
len
(
Intensityver1
)
*
20
+
x1
,
20
),
[
p
for
p
in
pmdepthsdrver1
],
yerr
=
errorpmdepthsdrver1
,
fmt
=
'o'
,
color
=
'red'
,
capsize
=
3
,
markersize
=
8
,
zorder
=
1
)
plt
.
plot
([
x
*
20
for
x
in
xchicofinal
],[
i
/
np
.
max
(
IntensityChico
)
for
i
in
IntensityChico
],
'o'
,
color
=
'red'
,
alpha
=
0.3
)
plt
.
errorbar
(
np
.
arange
(
x2
,
len
(
Intensityver2
)
*
20
+
x2
,
20
),
[
p
for
p
in
pmdepthsdrver2
],
yerr
=
errorpmdepthsdrver2
,
fmt
=
'o'
,
color
=
'blue'
,
capsize
=
3
,
markersize
=
8
,
zorder
=
1
)
plt
.
plot
([
x
*
20
for
x
in
xgrandefinal
],[
i
/
np
.
max
(
IntensityGrande
)
for
i
in
IntensityGrande
],
'o'
,
color
=
'blue'
,
alpha
=
0.3
)
plt
.
plot
(
rlong
,
modelo3
(
rlong
,
*
popt
),
zorder
=
2
,
color
=
'black'
,
linewidth
=
3
,
linestyle
=
'dashed'
,
label
=
r'$I(r)=a\,(J_0(\frac{b}{r}))^2$'
)
plt
.
xlim
(
-
20
,
600
+
x2
+
10
)
plt
.
legend
()
plt
.
grid
()
analisis/plots/20240312_RotationalDopplerShift_news/scaleinvariance.jpg
View replaced file @
7a7541c6
View file @
5e8021f6
152 KB
|
W:
|
H:
20.6 KB
|
W:
|
H:
2-up
Swipe
Onion skin
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment