notas-fnys/cascada.py~
Vladimir Lemus 2f9bb6d4e4 pres 7
modificados:     .gitignore
	nuevos archivos: Mossbauer.jpg
	modificados:     notas5.pdf
	modificados:     notas5.tex
	modificados:     pres7.pdf
	modificados:     pres7.tex
2023-11-07 14:26:05 -06:00

34 lines
523 B
Python
Executable file

import numpy as np
import matpltlib.pyplot as plt
ZZ= 7 #nitrógeno
E0 = 20*10**9 #eV
EC = 600*10**6/ZZ #eV
def rand():return(np.random.uniform(0,1))
E=[E0]
X=[0]
N=[1]
T=[]
tmax = int(np.log(E0/EC)/np.log(2))
for t in range(0,tmax):
X.append(t+1)
s=N[t]
for i in range(len(E)):
x=rand()
e=0.5*x*E[i]
e1=0.5*(1-x)*E[i]
if e>EC:
T.append(e)
if e1>EC:
T.append(e1)
prof=len(T)
N.append(prof)
E=T
T=[]