pygrin.pygrin Module
Gradient Index lens calculations and plots.
More documentation at <https://pygrin.readthedocs.io>
Typical usage:
import pygin
length = 7 # mm
diameter = 2 # mm
r = np.linspace(-1,1,11) # mm
n_0 = 1.48 # refractive index at r=0
theta_i = 0 # launch angle
pitch = 0.25 # quarter pitch lens
pygrin.plot_principal_planes(n_0, pitch, length, diameter)
for r_i in r:
z,r = pygrin.meridional_curve(n_0, pitch, length, r_i, theta_i)
plt.plot(z,r,color='blue')
plt.show()
Functions to locate focal points and cardinal points:
BFL(n_0, pitch, length)
EFL(n_0, pitch, length)
FFL(n_0, pitch, length)
NA(n_0, pitch, length, diameter)
cardinal_points(n_0, pitch, length)
Functions to find properties of GRIN lens:
gradient(pitch, length)
period(grad, length)
max_angle(n_0, pitch, length, diameter)
ABCD(n_0, pitch, length, z)
image_distance(n_0, pitch, length, s)
image_mag(n_0, pitch, length, s)
Functions to determine refractive index profile:
hyperbolic_secant_profile_index(n_0, alpha, r)
parabolic_profile_index(n_0, pitch, length, r)
Functions to help raytrace through GRIN lens:
full_meridional_curve(n_0, pitch, length, z_obj, r_obj, r_lens)
meridional_curve(n_0, pitch, length, r_i, theta_i)
plot_principal_planes(n_0, pitch, length, diameter)
Functions
|
ABCD matrix for meridonal ray propagation. |
|
Back focal length of a grin lens. |
|
Effective focal length of a grin lens. |
|
Front focal length of a grin lens. |
|
Numerical aperture of a grin lens in air. |
|
Cardinal points of a grin lens relative to first surface. |
|
Points on a path from an object to image through a GRIN lens. |
|
Gradient of a grin lens based on its pitch and length. |
|
Index of a hyperbolic secant grin lens at a particular radius. |
|
Image distance for an object. |
|
Transverse magnification of an object located at s. |
|
Maximum acceptance angle of a grin lens in air. |
|
Points on path of a ray passing through a grin lens. |
|
Index of a parabolic grin lens at a particular radius. |
|
Period or pitch of a grin lens based on its gradient and length. |
|
Create a plot for a grin lens showing the cardinal points. |