I am trying to plot the phase shift of perpendicular and parallel waves with variable angle of incidence, 0 to 180 degrees. The waves are travelling from index of refraction of 1.33 to medium with index of refraction of 1.5.
i used the following eqaution: Theory with equations <-- page 18
i used the following code:
def Phase(theta):
n=1.5/1.33
Shift=np.sqrt(np.sin(theta*np.pi/180)**2-n**2)
Shift=Shift/np.cos(theta*np.pi/180)
Shift=2*np.degrees(np.arctan(Shift))
return Shift
print(Phase(x))
x=np.linspace(0,180,30)
The problem is that i get [ nan nan nan nan nan nan nan nan nan nan]
as return.