Old high school files. Lessson notes/codes/projects etc.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

16 lines
374 B

import numpy as np
from phys.const import *
# wave function
def psi(x, n) -> float:
return D * np.sin( k(n) * x )
def psi_opt(x, n) -> float: # optimized version
return D * np.sin( psi_k[n] * x )
# probability density function
def prob(x, n) -> float:
return (psi(x, n))**2
def prob_opt(x, n) -> float: # optimized version
return abs(psi_opt(x,n)) ** 2