Skip to content
Snippets Groups Projects
Commit a1f8af46 authored by Yessica Dominguez's avatar Yessica Dominguez
Browse files

Replace DetectorHits.py

parent f1c26c9d
No related branches found
No related tags found
No related merge requests found
# -*- coding: utf-8 -*-
"""
Spyder Editor
This is a temporary script file.
"""
#Este programa grafica la ubicacion previa de los neutrones en el suelo
#antes de ser detectados por un detector fisico simulado en URANOS
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
......@@ -11,12 +7,13 @@ import pandas as pd
#Dectector hits.
#Los datos corresponden a 10% de humedad en el suelo con porosidad del 50%
#Leemos los datos y los almacenamos en un dataframe
dlayer= pd.read_table('/work/SALIDASdetectorNeutronHitData.dat')
datareal=dlayer[(dlayer['maximum_Depth_[m]']>0)]
data1=datareal.assign(hola=(datareal['maximum_Depth_[m]']*(-1)))
datareal=dlayer[(dlayer['maximum_Depth_[m]']>0)]#Filtramos para graficar la profundidad que alcanzan las particulas en el suelo humedo
data1=datareal.assign(hola=(datareal['maximum_Depth_[m]']*(-1)))# Es necesario invertir el signo (ya que las distancias por debajo del suelo tienen numero postivo, y es mas intuitivo trabajarlas como distancias negativas)
#Graficamos vista aerea de el suelo
# es decir, el plano x-y con z = 0
datareal.plot(x='x_at_interface_[m]', y='y_at_Interface_[m]', kind="scatter", s = 4, fontsize=15, alpha=0.3)
plt.xlabel('x(m)', size=18)
plt.ylabel('y(m)', size=18)
......@@ -27,6 +24,7 @@ plt.grid()
plt.show()
###########
#Graficamos vista transversal del suelo
# Es decir el plano x-z con y=0
#########
data1.plot(y='hola', x='x_at_interface_[m]', kind="scatter", s = 3, fontsize=15, alpha=0.3)
plt.xlim(-300,300)
......@@ -36,7 +34,3 @@ plt.xlabel('x(m)', size=18)
plt.ylabel('z(m)', size=18)
plt.grid()
plt.show()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment