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
813afa0d
Commit
813afa0d
authored
Oct 18, 2022
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
9619164c
7b84e236
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
9 deletions
+34
-9
IonStatistics.py
analisis/plots/20221017_IonStatistics/IonStatistics.py
+34
-9
No files found.
analisis/plots/20221017_IonStatistics/IonStatistics.py
View file @
813afa0d
...
...
@@ -7,6 +7,20 @@ import ast
from
scipy.optimize
import
curve_fit
import
os
import
scipy.stats
as
sts
import
seaborn
as
sns
colors1
=
sns
.
color_palette
(
"rocket"
,
10
)
colors2
=
sns
.
color_palette
(
"mako"
,
10
)
color1
=
colors1
[
5
]
color2
=
colors1
[
3
]
color3
=
colors1
[
1
]
plt
.
rcParams
.
update
({
"font.family"
:
"STIXGeneral"
})
plt
.
rcParams
.
update
({
"font.size"
:
14
})
# Solo levanto algunos experimentos
Stat_files
=
[
8731
,
8738
,
8745
]
...
...
@@ -53,26 +67,37 @@ for i, fname in enumerate(Stat_files):
#plt.figure()
#plt.plot(Stat_Bins[0][:-1], Stat_Heigths[0])
#plot figuras papers
bins1
=
np
.
arange
(
100
,
350
,
1
)
bins2
=
np
.
arange
(
10
,
50
,
1
)
bins3
=
np
.
arange
(
30
,
100
,
1
)
plt
.
figure
()
plt
.
hist
(
Stat_Heigths
[
0
],
bins
=
bins1
,
histtype
=
'step'
,
density
=
True
)
plt
.
figure
(
figsize
=
(
4.5
,
3
)
)
plt
.
hist
(
Stat_Heigths
[
0
],
bins
=
bins1
,
histtype
=
'step'
,
density
=
True
,
color
=
color1
)
#,label = 'BG'
)
#plt.hist(Stat_Heigths[1], bins=bins2, histtype='step',density = True)
plt
.
hist
(
Stat_Heigths
[
1
],
bins
=
bins2
,
histtype
=
'step'
,
density
=
True
)
plt
.
hist
(
Stat_Heigths
[
1
],
bins
=
bins2
,
histtype
=
'step'
,
density
=
True
,
color
=
color2
)
#,label = 'UV laser'
)
#plt.hist(Stat_Heigths[3], bins=bins2, histtype='step',density = True)
#plt.hist(Stat_Heigths[4], bins=bins2, histtype='step',density = True)
plt
.
hist
(
Stat_Heigths
[
2
],
bins
=
bins3
,
histtype
=
'step'
,
density
=
True
)
plt
.
hist
(
Stat_Heigths
[
2
],
bins
=
bins3
,
histtype
=
'step'
,
density
=
True
,
color
=
color3
)
#,label = 'Ion'
)
#%%
poisson
=
sts
.
poisson
.
pmf
(
bins
,
np
.
mean
(
Stat_Heigths
))
plt
.
plot
(
bins
+
0.5
,
poisson
)
poisson1
=
sts
.
poisson
.
pmf
(
bins1
,
np
.
mean
(
Stat_Heigths
[
0
]))
poisson2
=
sts
.
poisson
.
pmf
(
bins2
,
np
.
mean
(
Stat_Heigths
[
1
]))
poisson3
=
sts
.
poisson
.
pmf
(
bins3
,
np
.
mean
(
Stat_Heigths
[
2
]))
poissoneidad
=
np
.
var
(
Stat_Heigths
)
/
np
.
mean
(
Stat_Heigths
)
plt
.
title
(
'Varianza/media = {:.4f}'
.
format
(
poissoneidad
))
plt
.
plot
(
bins2
+
0.5
,
poisson2
,
color
=
color2
,
alpha
=
0.9
,
label
=
'BG'
)
plt
.
plot
(
bins3
+
0.5
,
poisson3
,
color
=
color3
,
alpha
=
0.9
,
label
=
'UV laser'
)
plt
.
plot
(
bins1
+
0.5
,
poisson1
,
color
=
color1
,
alpha
=
0.9
,
label
=
'Ion'
)
plt
.
legend
()
plt
.
grid
()
plt
.
tight_layout
()
plt
.
xlabel
(
'Counts'
)
plt
.
ylabel
(
'Event frequency'
)
#poissoneidad = np.var(Stat_Heigths)/np.mean(Stat_Heigths)
#plt.title('Varianza/media = {:.4f}'.format(poissoneidad))
plt
.
savefig
(
'bg_laser_ion_stats.pdf'
,
dpi
=
600
)
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