Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PasantiasLaCOnGA_2022
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Victor Clarizio
PasantiasLaCOnGA_2022
Commits
3b21e1c5
Commit
3b21e1c5
authored
2 years ago
by
Victor Clarizio
Browse files
Options
Downloads
Patches
Plain Diff
Upload New File
parent
c93d09f8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
NeutronesConWCD/HIstograma_VEMs_-_07_a_10.py
+96
-0
96 additions, 0 deletions
NeutronesConWCD/HIstograma_VEMs_-_07_a_10.py
with
96 additions
and
0 deletions
NeutronesConWCD/HIstograma_VEMs_-_07_a_10.py
0 → 100644
+
96
−
0
View file @
3b21e1c5
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Nov 16 16:51:00 2022
@author: victor
"""
import
matplotlib
import
numpy
as
np
import
matplotlib.pyplot
as
plt
import
matplotlib.mlab
as
mlab
import
math
import
csv
,
operator
import
scipy.stats
as
st
from
numpy
import
random
import
pandas
as
pd
from
datetime
import
datetime
from
pandas
import
*
from
scipy.stats
import
norm
import
statistics
matplotlib
.
pyplot
.
savefig
#df = df.rename(columns={'oldName1': 'newName1', 'oldName2': 'newName2'})
##Este código Python servirá para analizar los datos correspondientes al WCD Characatito.
##Existen diferentes terminaciones de archivos que corresponden a datos de análisis distintos.
##Pero todos los archivos comparten el mismo nombre, salvo la terminación.
##Luego de realizar el primer procesamiento de datos (Lo a L1) con ./raw en la terminal,
##procedemos a estudiar la data adquirida aquí. Las terminaciones de archivos que nos interesan
##son: .rte (pulsos detectados por unidad de tiempo fijada por el usuario), .flx (pulsos detec-
##tados por segundo)
#dfc0000 = dfc0000.drop(dfc0000.columns[[0, 2, 3, 4, 5, 6]], axis=1)
##PARA MODIFICAR EL NÚMERO DE BINES
Bines
=
30
Opac
=
0.5
Rwidth
=
0.85
Xmin
=
1400
Xmax
=
1800
ajust
=
0.076
###----------------------------------------------------------------------
df
=
pd
.
read_csv
(
'
histogramavems.csv
'
,
decimal
=
'
,
'
,
skiprows
=
0
)
df
.
columns
=
[
'
1
'
,
'
2
'
,
'
3
'
]
df
=
df
.
drop
(
df
.
columns
[[
0
,
1
]],
axis
=
1
)
df
[
'
3
'
].
hist
(
bins
=
Bines
)
#plt.title("Histograma de Cargas de VEMS - Julio/Octubre", fontsize = 'xx-large')
#plt.ylabel("Conteos registrados", fontsize = 'xx-large')
plt
.
xlabel
(
'
Carga del VEM [ADC]
'
,
fontsize
=
'
xx-large
'
)
plt
.
axvline
(
x
=
Xmin
+
Xmax
/
2
-
Xmin
/
2
,
color
=
'
red
'
)
plt
.
axvline
(
x
=
Xmin
,
color
=
'
green
'
)
plt
.
axvline
(
x
=
Xmax
,
color
=
'
green
'
)
df
=
df
[
df
[
'
3
'
]
<
Xmax
]
df
=
df
[
df
[
'
3
'
]
>
Xmin
]
df
.
hist
(
bins
=
Bines
,
color
=
'
blue
'
,
alpha
=
Opac
,
rwidth
=
Rwidth
)
# Plot the Gaussian PDF
xmin
,
xmax
=
plt
.
xlim
()
x
=
np
.
linspace
(
Xmin
,
Xmax
,
1000
)
df
[
'
3
'
].
std
()
mu
,
std
=
norm
.
fit
(
df
)
gfit
=
norm
.
pdf
(
x
,
mu
,
std
)
*
14000
plt
.
plot
(
x
,
gfit
,
'
r--
'
,
linewidth
=
1
)
plt
.
xticks
(
np
.
arange
(
1400
,
1850
,
50
))
title
=
""
plt
.
text
(
1700
,
70
,
r
'
$\mu={:.2f}$
'
.
format
(
mu
,
std
),
fontsize
=
'
large
'
)
plt
.
text
(
1700
,
60
,
r
'
$\sigma= {:.2f}$
'
.
format
(
std
),
fontsize
=
'
large
'
)
plt
.
text
(
1700
,
50
,
r
'
$\epsilon= 0.0756\;\frac{MeV}{{ADC}}$
'
,
fontsize
=
'
large
'
)
plt
.
ylabel
(
"
Conteos registrados
"
,
fontsize
=
'
xx-large
'
)
plt
.
xlabel
(
'
Carga del VEM [ADC]
'
,
fontsize
=
'
xx-large
'
)
plt
.
axvline
(
x
=
1585.27
+
df
[
'
3
'
].
std
(),
color
=
'
green
'
,
linestyle
=
'
-.
'
)
plt
.
axvline
(
x
=
1585.27
,
color
=
'
red
'
,
linestyle
=
'
-.
'
)
plt
.
axvline
(
x
=
1585.27
-
df
[
'
3
'
].
std
(),
color
=
'
green
'
,
linestyle
=
'
-.
'
)
#plt.axvline(x = 1584.60 + 2*df['3'].std(), color = 'red')
#plt.axvline(x = 1584.60 - 2*df['3'].std(), color = 'red')
plt
.
title
(
title
)
plt
.
savefig
(
"
VEMS30.png
"
,
dpi
=
300
)
print
(
df
[
'
3
'
].
std
())
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment