docs: def dot_product(laserl,sign,r,i,j):
  	"This function calculates the dot product epsilon^(l(+-)) . vec(r_ij)."
  	if sign==1:
  		dp=sum([laserl.Yp[1-p]*r[p+1][i-1][j-1]*(-1)**p for p in range(-1,2)])
  	elif sign==-1:
  		dp=sum([laserl.Ym[1-p]*r[p+1][i-1][j-1]*(-1)**p for p in range(-1,2)])
  
  	#~ if i==2 and j==9 and sign==-1:
  		#~ print 222
  		#~ print dp
  		#~ print [(laserl.Yp[1-p],r[p+1][i-1][j-1]) for p in range(-1,2)]
  
  
  	if not sage_included:
  		return complex(dp)
  	else:
  		return dp