Hi all,
I am trying to do re produce the python dblquad fanctrion in labview with no luck. I just cannot get my head around how to generate the 2d array for this function. the python is running smoothly and gives me accurate valuse for What I am generating:
while i<nop:
xi=x[i]
wz=beamwaist*np.sqrt(1+xi**2)
q0=T*delta_phi0/(2*np.pi) # n=2, q0= (2-1)*gamma_2*Ii*Leff
q=q0/(1+x[i]**2)
def f(r,t):
I_input=np.exp(-t**2)/(1+xi**2)*np.exp(-2*r**2/((beamwaist**2)*(1+xi**2)))
f=2*np.pi*I_input*r
return f
quad0,err=dblquad(f,0,3*wz,0,4)
This is as far as I have gotten, but all the rsults are incorrect.
I have devided the integrand into wo parts f(t): np.exp(-t**2)/(1+xi**2) and f(r): r*(np.exp(-2*r**2/((beamwaist**2)*(1+xi**2)))) and a vi for generation the r[i] and t[i] as in pic the rst of the inputs ar generated and feed into the VIs. I tried to use quadrature.vi as well how ever that same problem exists since I have to prepare tha vi to generate the 2d array of (f(x), f(y)) or an string of integrand which present the same issue.
Please, I appreciate any help or suggestions.