https://github.com/armandomtz05/optikit
Solution of the paraxial wave equations using different coordinates systems
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
✓DOI references
Found 3 DOI reference(s) in README -
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.5%) to scientific vocabulary
Keywords
Repository
Solution of the paraxial wave equations using different coordinates systems
Basic Info
Statistics
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
OptiKit
Summary
This Python module provides a comprehensive suite of tools for studying and applying optics principles, particularly focusing on wave optics. The module is designed to generate families of solutions to the paraxial wave equation, which is fundamental in understanding the behavior of light in optical systems. Additionally, it includes functionalities for hologram generation, light propagation, and analysis of Stokes parameters, which describe the polarization state of light. These tools are essential for research and applications in optical engineering, laser physics, and related fields.
Solutions to the paraxial wave equation in various coordinate systems. * Hermite-Gaussian Modes in cartesian coordinates * Laguerre-Gaussian Modes in cylindrical coordinates * Ince-Gaussian Modes in elyptical coordinates
Library installation
Requirements
- numpy
- pillow
- scipy
- matplotlib
- python >= 3.10
pip install optikit
Gaussian Modes
$U(r, \theta, z) = \frac{\omega_0}{\omega(z)}\exp{\frac{-r^2}{\omega(z)^2}} \exp{\left(-i\left(kz + k\frac{r^2}{2R(z)} - \Psi(z) \right)\right)}$
where r is the radius, $\omega0$ represents the beam width at $z = 0$, $\omega(z) = \omega0\sqrt{1 + z^2/zR^2}$ describes the beam width, $R(z) = z + z^2R/z$ is the radius of curvature of the phase front, $zR = k\omega0^2/2$ is the Rayleigh range and $\Psi = arctan(z/z_R)$ is the Gouy shift.
Code implementation
``` from optikit.Beam import Beam
Gauss = Beam(type = 'Gaussian', size = 5e-3, # in meters shape = 501, # Number of points w0 = 1e-3, # Beam width k = (2*np.pi/632.8e-9), # wavenumber z = 0) Gauss.plot_amplitude() ```
Ince-Gaussian Modes
The Ince-Gaussian (IG) mode is a solution to the paraxial wave equation expressed in elliptic coordinates $(\xi, \eta)$. The general form of an Ince-Gaussian beam $(\xi, \eta, z)$ can be written as:
$\text{IG}{p,m}^e(\mathbf{r}, \epsilon) = \frac{C\omega0}{\omega(z)}Cp^m(i\xi, \epsilon)Cp^m(\eta, \epsilon)\exp\left[\frac{-r^2}{\omega^2(z)}\right] \exp\left(i\left[kz + \frac{kr^2}{2R(z)} - (p - 1) \Psi(z)\right]\right)$,
$\text{IG}{p,m}^o(\mathbf{r}, \epsilon) = \frac{S\omega0}{\omega(z)}Sp^m(i\xi, \epsilon)Sp^m(\eta, \epsilon)\exp\left[\frac{-r^2}{\omega^2(z)}\right] \exp\left(i\left[kz + \frac{kr^2}{2R(z)} - (p - 1) \Psi(z)\right]\right)$
where r is the radius, $\omega0$ represents the beam width at $z = 0$, $\omega(z) = \omega0\sqrt{1 + z^2/zR^2}$ describes the beam width, $R(z) = z + z^2R/z$ is the radius of curvature of the phase front, $zR = k\omega0^2/2$ is the Rayleigh range and $\Psi = arctan(z/z_R)$ is the Gouy shift. C and S are normalization constants and the superindices $e$ and $o$ refer to even and odd modes, respectively.
Code implementation
``` from optikit.Beam import Beam
Ince = Beam(type = 'InceGaussian',
size = 5e-3,
shape = 501,
parity = 0,
p = 2,
m = 2,
e = 2,
w0 = 1e-3,
k = (2*np.pi/632.8e-9),
z = 0)
Ince.plot_amplitude()
```
Created using a DMD
Laguerre-Gaussian modes
$\text{LG}{p}^l(r, \phi, z) = \frac{1}{w(z)} \sqrt{\frac{2p!}{\pi (p + |l|)!}} \left(\frac{\sqrt{2} r}{\omega(z)}\right)^{|l|} Lp^{|l|}\left(\frac{2r^2}{\omega(z)^2}\right) \exp\left(-\frac{r^2}{\omega(z)^2}\right) \exp\left(-i \left(k z + k \frac{r^2}{2 R(z)} - l \phi - (2p + |l| + 1)\Psi(z)\right)\right)$
where r is the radius, $\omega0$ represents the beam width at $z = 0$, $\omega(z) = \omega0\sqrt{1 + z^2/zR^2}$ describes the beam width, $R(z) = z + z^2R/z$ is the radius of curvature of the phase front, $zR = k\omega0^2/2$ is the Rayleigh range and $\Psi = arctan(z/z_R)$ is the Gouy shift.
Code implementation
``` from optikit.Beam import Beam
Lag = Beam(type = 'LaguerreGauss',
size = 5e-3,
shape = 501,
p = 2,
l = 2,
w0 = 1e-3,
k = (2*np.pi/632.8e-9),
z = 0)
Lag.plot_amplitude()
```
Hermite-Gaussian modes
$\text{HG}{m}^n(x, y, z) = \frac{1}{w(z)} \sqrt{\frac{2}{\pi \, 2^{n+m} \, n! \, m!}} \, Hn\left(\frac{\sqrt{2} \, x}{w(z)}\right) H_m\left(\frac{\sqrt{2} \, y}{w(z)}\right) \exp\left(-\frac{x^2 + y^2}{w(z)^2}\right) \exp\left(-i \left(k z + (n + m + 1) \Psi(z) - \frac{k (x^2 + y^2)}{2 R(z)}\right)\right)$
where r is the radius, $\omega0$ represents the beam width at $z = 0$, $\omega(z) = \omega0\sqrt{1 + z^2/zR^2}$ describes the beam width, $R(z) = z + z^2R/z$ is the radius of curvature of the phase front, $zR = k\omega0^2/2$ is the Rayleigh range and $\Psi = arctan(z/z_R)$ is the Gouy shift.
Code implementation
``` from optikit.Beam import Beam
Herm = Beam(type = 'HermiteGaussian',
size = 5e-3,
shape = 501,
n = 2,
m = 2,
w0 = 1e-3,
k = (2*np.pi/632.8e-9),
z = 0)
Herm.plot_amplitude()
```
Hologram generation
The slmpy module can be used to project the holograms in a SLM, the code implementation should be as bellow:
``` from optikit.Beam import Beam import slmpy
Ince = Beam(type = 'InceGaussian',
size = 5e-3,
shape = 501,
parity = 0,
p = 2,
m = 2,
e = 2,
w0 = 1e-3,
k = (2*np.pi/632.8e-9),
z = 0)
slm = slmpy.SLMdisplay() Hologram = Ince.Beam.Hologam(gamma=np.pi/3000, theta = np.pi/4, save= True) slm.updateArray(Hologram)
```
Propagator
The equation is solve numericaly by applying a transfer function.
$U(z) = \mathfrak{F}^{-1}\left\{H\cdot \mathfrak{F}\{U_0\}\right\}$
where $H = \exp\left(-i kz\sqrt{k0^2 -\left(kx^2+ky^2\right)}\right)$ and $U0$ represents the initial field.
Code implementation
The Propagator class supports as an input a np.ndarray ans OptiKit.Beam class
``` from optikit.optics import propagator from optikit.Beam import Beam
Gauss = Beam(type = 'Gaussian', size = 2e-3, shape = 2*8, w0 = 1e-3, k = (2np.pi/632.8e-9), z = 0)
Gauss.plotamplitude() Gaussz = Propagator(beam= Gauss) Gaussz.propagate(zi = 1/2 * (2np.pi/632.8e-9) * (1e-3 * 2) , zn = 2**8) Gaussz.plot() ```
Stokes parameters
A classical way to measure the stokes paramters is the following:
| Polarizer axis angle| Wave plate fast axis angle| Power Measurement| |---------------------|---------------------------|------------------| | $0°$ | - | $P1$ | | $90°$ | - | $P2$ | | $45°$ | - | $P3$ | | $45°$ | $0°$ | $P4$ |
Stokes equations
- $S0 = P1 + P_2$
- $S1 = P1 - P_2$
- $S2 = 2P3 - S_0$
- $S3 = S0 - 2P_4$
Ellipse Parameters
- $\psi = \frac{1}{2}\text{arctan}\left(\frac{S2}{S1}\right)$
- $E{ox} = \sqrt{0.5(S0 + S_1)}$
- $E{oy} = \sqrt{0.5(S0 - S_1)}$
Example
References
[1] R. W. Gerchberg and W. O. Saxton, “A practical algorithm for the determination of the phase from image and diffraction plane pictures”, Optik 35, 237 (1972).
[2] K. Mitchell, S. Turtaev, M. Padgett, T. Cizmár, and D. Phillips, “High-speed spatial control of the intensity, phase and polarisation of vector beams using a digital micro-mirror device”, Opt. Express 24, 29269-29282 (2016).
[3] Forbes A. 2014, Laser Beam Propagation: Generation and Propagation of Customized Light (London: Taylor and Francis).
[4] Bandres MA, Gutiérrez-Vega JC. Ince-Gaussian modes of the paraxial wave equation and stable resonators. J Opt Soc Am A Opt Image Sci Vis. 2004 May;21(5):873-80. doi: 10.1364/josaa.21.000873. PMID: 15139441.
[5] Beth Schaefer, Edward Collett, Robert Smyth, Daniel Barrett, and Beth Fraher "Measuring the Stokes polarization parameters," Am. J. Phys. 75, 163-168 (2007).
[6] Siegman, A. E. (1986). Lasers. Taiwan: University Science Books.
[7] Vallone, Giuseppe. (2015). On the properties of circular beams: normalization, Laguerre–Gauss expansion, and free-space divergence. Optics Letters. 40. 10.1364/OL.40.001717.
[8] Capps DM. Derivation and application of a Green function propagator suitable for nonparaxial propagation over a two-dimensional domain. J Opt Soc Am A Opt Image Sci Vis. 2019 Apr 1;36(4):563-577. doi: 10.1364/JOSAA.36.000563. PMID: 31044976.
To do
This project is still in development. New features will be added in upcoming versions.
Owner
- Name: Armando Martinez Hernandez
- Login: ARMANDOMTZ05
- Kind: user
- Company: Armando Martinez
- Repositories: 1
- Profile: https://github.com/ARMANDOMTZ05
Actual Student of Bachelor in Physics Engineering at Monterrey Institute of Technology and Higher Education
GitHub Events
Total
Last Year
Committers
Last synced: 8 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Armando Martinez Hernandez | a****z@h****m | 14 |
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 42 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 12
- Total maintainers: 1
pypi.org: optikit
A basic optics module
- Homepage: https://github.com/ARMANDOMTZ05/OptiKit
- Documentation: https://optikit.readthedocs.io/
- License: MIT License
-
Latest release: 0.1.1a11
published over 1 year ago
Rankings
Maintainers (1)
Dependencies
- PIL *
- matplotlib *
- numpy *
- scipy *