Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for astigmatic beams #52

Open
jmmelko opened this issue Feb 3, 2021 · 2 comments
Open

Support for astigmatic beams #52

jmmelko opened this issue Feb 3, 2021 · 2 comments

Comments

@jmmelko
Copy link
Contributor

jmmelko commented Feb 3, 2021

As explained in A. Siegman, Lasers, the Hermite-Gaussian modes can be straightforwardly generalized to astigmatic beams:
umn(x,y,z) = um(x,z) * un(y,z)

That would be cool if LightPipes could provide native support for that, at least in the GaussBeam class, with wx, wy as input parameters.

@jmmelko
Copy link
Contributor Author

jmmelko commented Feb 9, 2021

I have written this, but it is ugly:

def AstigGaussBeam(Fin, wx, wy, x_shift=0, y_shift=0, tx=0, ty=0):
    
    if wx == wy:
        return LightPipes.GaussBeam(Fin=Fin, w0=wx, x_shift=x_shift, y_shift=y_shift, tx=tx, ty=ty)    
    
    Ex = LightPipes.GaussBeam(Fin=Fin, w0=wx, x_shift=x_shift, y_shift=0, tx=tx, ty=0)
    Ey = LightPipes.GaussBeam(Fin=Fin, w0=wy, x_shift=0, y_shift=y_shift, tx=0, ty=ty)
    
    Ix = LightPipes.Intensity(Ex,0)
    Iy = LightPipes.Intensity(Ey,0)
    Phix = LightPipes.Phase(Ex)
    Phiy = LightPipes.Phase(Ey)
    
    (Nx, Ny) = Ix.shape
    nmidx = int(_np.round(Nx/2))
    nmidy = int(_np.round(Ny/2))
    
    Ix = Ix[nmidy,:]
    Ix = _np.tile(Ix, (Ny, 1))
    Iy = Iy[:,nmidx]
    Iy = _np.tile(Iy, (Nx, 1)).T
    
    Phix = Phix[nmidy,:]
    Phix = _np.tile(Phix, (Ny, 1))
    Phiy = Phiy[:,nmidx]
    Phiy = _np.tile(Phiy, (Nx, 1)).T    
    
    Eout = LightPipes.SubIntensity(Fin=Fin, Intens=sqrt(_np.multiply(Ix,Iy)))
    Eout = LightPipes.SubPhase(Fin=Eout, Phi=Phix+Phiy)
    
    return Eout

@IvanOstr
Copy link

Have you tried maybe using Zernike polynomials for this purpose? There is Zernike polynomials info in the manual.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants