Open jmmelko opened 3 years ago
here is what I did in my code:
def Forward(Fin, z, sizenew, Nnew):
return LightPipes.Forward(Fin=Fin, z=z, sizenew=sizenew, Nnew=Nnew)
def Fresnel(Fin, z, sizenew, Nnew):
return LightPipes.Fresnel(Fin=LightPipes.Interpol(Fin, sizenew, Nnew), z=z)
def Forvard(Fin, z, sizenew, Nnew):
return LightPipes.Forvard(Fin=LightPipes.Interpol(Fin, sizenew, Nnew), z=z)
Maybe we can put that in light Pipes, provided that Interpol never crashes
Hi guys,
I suggest adding
newsize
andNnew
as optional parameters to theFresnel
andForvard
methods. They would by used to call Interpol within the function.This would make the three main integration methods homogeneous in terms of arguments.
I have implemented this in my own code, to be able to switch between methods, by changing the values of a Methods dictionary/list defined at the beginning of my script. Indeed, it is often the case that we have to change the method depending on the conditions (focusing or not, long or short propagation distance, etc.)
besides, this would not be shocking as other LightPipes function already integrate coordinate changes, LendForvard for instance that uses spherical coordinates.