高斯光学#

高斯光学。

该模块实现:

  • 几何射线传输和高斯矩阵。

    请参见光线传输矩阵、几何体和光束参数

  • 几何光学和高斯光学的共轭关系。

    参见几何高斯光束、高斯光束和共轭光束

距离的约定如下:

焦距

会聚透镜阳性

物体距离

对真实物体是肯定的

图像距离

真实图像为正

class sympy.physics.optics.gaussopt.BeamParameter(wavelen, z, z_r=None, w=None, n=1)[源代码]#

射线传输矩阵形式中高斯射线的表示。

参数:

小波 :波长,

z :到腰部的距离,以及

w :腰部,或

z_r : the rayleigh range.

n : the refractive index of medium.

实例

>>> from sympy.physics.optics import BeamParameter
>>> p = BeamParameter(530e-9, 1, w=1e-3)
>>> p.q
1 + 1.88679245283019*I*pi
>>> p.q.n()
1.0 + 5.92753330865999*I
>>> p.w_0.n()
0.00100000000000000
>>> p.z_r.n()
5.92753330865999
>>> from sympy.physics.optics import FreeSpace
>>> fs = FreeSpace(10)
>>> p1 = fs*p
>>> p.w.n()
0.00101413072159615
>>> p1.w.n()
0.00210803120913829

工具书类

property divergence#

总角扩散的一半。

实例

>>> from sympy.physics.optics import BeamParameter
>>> p = BeamParameter(530e-9, 1, w=1e-3)
>>> p.divergence
0.00053/pi
property gouy#

痛风相。

实例

>>> from sympy.physics.optics import BeamParameter
>>> p = BeamParameter(530e-9, 1, w=1e-3)
>>> p.gouy
atan(0.53/pi)
property q#

表示梁的复参数。

实例

>>> from sympy.physics.optics import BeamParameter
>>> p = BeamParameter(530e-9, 1, w=1e-3)
>>> p.q
1 + 1.88679245283019*I*pi
property radius#

相位前沿的曲率半径。

实例

>>> from sympy.physics.optics import BeamParameter
>>> p = BeamParameter(530e-9, 1, w=1e-3)
>>> p.radius
1 + 3.55998576005696*pi**2
property w#

The radius of the beam w(z), at any position z along the beam. The beam radius at \(1/e^2\) intensity (axial value).

实例

>>> from sympy.physics.optics import BeamParameter
>>> p = BeamParameter(530e-9, 1, w=1e-3)
>>> p.w
0.001*sqrt(0.2809/pi**2 + 1)

参见

w_0

The minimal radius of beam.

property w_0#

The minimal radius of beam at \(1/e^2\) intensity (peak value).

实例

>>> from sympy.physics.optics import BeamParameter
>>> p = BeamParameter(530e-9, 1, w=1e-3)
>>> p.w_0
0.00100000000000000

参见

w

the beam radius at \(1/e^2\) intensity (axial value).

property waist_approximation_limit#

高斯光束近似有效的最小束腰。

解释

高斯光束是傍轴方程的解。对于曲率太大,这不是一个有效的近似值。

实例

>>> from sympy.physics.optics import BeamParameter
>>> p = BeamParameter(530e-9, 1, w=1e-3)
>>> p.waist_approximation_limit
1.06e-6/pi
class sympy.physics.optics.gaussopt.CurvedMirror(R)[源代码]#

曲面反射的光线传输矩阵。

参数:

R :曲率半径(凹面为正)

实例

>>> from sympy.physics.optics import CurvedMirror
>>> from sympy import symbols
>>> R = symbols('R')
>>> CurvedMirror(R)
Matrix([
[   1, 0],
[-2/R, 1]])
class sympy.physics.optics.gaussopt.CurvedRefraction(R, n1, n2)[源代码]#

弯曲界面折射的光线传递矩阵。

参数:

R :

Radius of curvature (positive for concave).

n1 :

Refractive index of one medium.

n2 :

Refractive index of other medium.

实例

>>> from sympy.physics.optics import CurvedRefraction
>>> from sympy import symbols
>>> R, n1, n2 = symbols('R n1 n2')
>>> CurvedRefraction(R, n1, n2)
Matrix([
[               1,     0],
[(n1 - n2)/(R*n2), n1/n2]])
class sympy.physics.optics.gaussopt.FlatMirror[源代码]#

反射光线传输矩阵。

实例

>>> from sympy.physics.optics import FlatMirror
>>> FlatMirror()
Matrix([
[1, 0],
[0, 1]])
class sympy.physics.optics.gaussopt.FlatRefraction(n1, n2)[源代码]#

折射的光线传输矩阵。

参数:

n1 :

Refractive index of one medium.

n2 :

Refractive index of other medium.

实例

>>> from sympy.physics.optics import FlatRefraction
>>> from sympy import symbols
>>> n1, n2 = symbols('n1 n2')
>>> FlatRefraction(n1, n2)
Matrix([
[1,     0],
[0, n1/n2]])
class sympy.physics.optics.gaussopt.FreeSpace(d)[源代码]#

自由空间的光线传输矩阵。

参数:

distance

实例

>>> from sympy.physics.optics import FreeSpace
>>> from sympy import symbols
>>> d = symbols('d')
>>> FreeSpace(d)
Matrix([
[1, d],
[0, 1]])
class sympy.physics.optics.gaussopt.GeometricRay(*args)[源代码]#

射线传输矩阵形式中几何射线的表示。

参数:

h :高度,以及

:角度,或

矩阵 :2x1矩阵(矩阵(2,1, [高度、角度] )

实例

>>> from sympy.physics.optics import GeometricRay, FreeSpace
>>> from sympy import symbols, Matrix
>>> d, h, angle = symbols('d, h, angle')
>>> GeometricRay(h, angle)
Matrix([
[    h],
[angle]])
>>> FreeSpace(d)*GeometricRay(h, angle)
Matrix([
[angle*d + h],
[      angle]])
>>> GeometricRay( Matrix( ((h,), (angle,)) ) )
Matrix([
[    h],
[angle]])
property angle#

与光轴的夹角。

实例

>>> from sympy.physics.optics import GeometricRay
>>> from sympy import symbols
>>> h, angle = symbols('h, angle')
>>> gRay = GeometricRay(h, angle)
>>> gRay.angle
angle
property height#

与光轴的距离。

实例

>>> from sympy.physics.optics import GeometricRay
>>> from sympy import symbols
>>> h, angle = symbols('h, angle')
>>> gRay = GeometricRay(h, angle)
>>> gRay.height
h
class sympy.physics.optics.gaussopt.RayTransferMatrix(*args)[源代码]#

光线传输矩阵的基类。

It should be used if there is not already a more specific subclass mentioned in See Also.

参数:

parameters :

A, B, C and D or 2x2 matrix (Matrix(2, 2, [A, B, C, D]))

实例

>>> from sympy.physics.optics import RayTransferMatrix, ThinLens
>>> from sympy import Symbol, Matrix
>>> mat = RayTransferMatrix(1, 2, 3, 4)
>>> mat
Matrix([
[1, 2],
[3, 4]])
>>> RayTransferMatrix(Matrix([[1, 2], [3, 4]]))
Matrix([
[1, 2],
[3, 4]])
>>> mat.A
1
>>> f = Symbol('f')
>>> lens = ThinLens(f)
>>> lens
Matrix([
[   1, 0],
[-1/f, 1]])
>>> lens.C
-1/f

工具书类

property A#

矩阵的A参数。

实例

>>> from sympy.physics.optics import RayTransferMatrix
>>> mat = RayTransferMatrix(1, 2, 3, 4)
>>> mat.A
1
property B#

矩阵的B参数。

实例

>>> from sympy.physics.optics import RayTransferMatrix
>>> mat = RayTransferMatrix(1, 2, 3, 4)
>>> mat.B
2
property C#

矩阵的C参数。

实例

>>> from sympy.physics.optics import RayTransferMatrix
>>> mat = RayTransferMatrix(1, 2, 3, 4)
>>> mat.C
3
property D#

矩阵的D参数。

实例

>>> from sympy.physics.optics import RayTransferMatrix
>>> mat = RayTransferMatrix(1, 2, 3, 4)
>>> mat.D
4
class sympy.physics.optics.gaussopt.ThinLens(f)[源代码]#

薄透镜的光线传输矩阵。

参数:

f :

The focal distance.

实例

>>> from sympy.physics.optics import ThinLens
>>> from sympy import symbols
>>> f = symbols('f')
>>> ThinLens(f)
Matrix([
[   1, 0],
[-1/f, 1]])
sympy.physics.optics.gaussopt.conjugate_gauss_beams(wavelen, waist_in, waist_out, **kwargs)[源代码]#

找到使对象/图像腰围共轭的光学装置。

参数:

wavelen :

The wavelength of the beam.

waist_in and waist_out :

The waists to be conjugated.

f :

The focal distance of the element used in the conjugation.

返回:

包含(su in,su out,f)的元组

s_in :

The distance before the optical element.

s_out :

The distance after the optical element.

f :

The focal distance of the optical element.

实例

>>> from sympy.physics.optics import conjugate_gauss_beams
>>> from sympy import symbols, factor
>>> l, w_i, w_o, f = symbols('l w_i w_o f')
>>> conjugate_gauss_beams(l, w_i, w_o, f=f)[0]
f*(1 - sqrt(w_i**2/w_o**2 - pi**2*w_i**4/(f**2*l**2)))
>>> factor(conjugate_gauss_beams(l, w_i, w_o, f=f)[1])
f*w_o**2*(w_i**2/w_o**2 - sqrt(w_i**2/w_o**2 -
          pi**2*w_i**4/(f**2*l**2)))/w_i**2
>>> conjugate_gauss_beams(l, w_i, w_o, f=f)[2]
f
sympy.physics.optics.gaussopt.gaussian_conj(s_in, z_r_in, f)[源代码]#

高斯光束的共轭关系。

参数:

s_in :

The distance to optical element from the waist.

z_r_in :

The rayleigh range of the incident beam.

f :

The focal length of the optical element.

返回:

包含(su out,zu ru out,m)的元组

s_out :

The distance between the new waist and the optical element.

z_r_out :

The rayleigh range of the emergent beam.

m :

The ration between the new and the old waists.

实例

>>> from sympy.physics.optics import gaussian_conj
>>> from sympy import symbols
>>> s_in, z_r_in, f = symbols('s_in z_r_in f')
>>> gaussian_conj(s_in, z_r_in, f)[0]
1/(-1/(s_in + z_r_in**2/(-f + s_in)) + 1/f)
>>> gaussian_conj(s_in, z_r_in, f)[1]
z_r_in/(1 - s_in**2/f**2 + z_r_in**2/f**2)
>>> gaussian_conj(s_in, z_r_in, f)[2]
1/sqrt(1 - s_in**2/f**2 + z_r_in**2/f**2)
sympy.physics.optics.gaussopt.geometric_conj_ab(a, b)[源代码]#

近轴条件下几何光束的共轭关系。

解释

获取到光学元件的距离并返回所需的焦距。

实例

>>> from sympy.physics.optics import geometric_conj_ab
>>> from sympy import symbols
>>> a, b = symbols('a b')
>>> geometric_conj_ab(a, b)
a*b/(a + b)
sympy.physics.optics.gaussopt.geometric_conj_af(a, f)[源代码]#

近轴条件下几何光束的共轭关系。

解释

取物体到光学元件的距离(对于几何焦距)或图像距离(对于几何焦距)。然后返回共轭所需的其他距离。

实例

>>> from sympy.physics.optics.gaussopt import geometric_conj_af, geometric_conj_bf
>>> from sympy import symbols
>>> a, b, f = symbols('a b f')
>>> geometric_conj_af(a, f)
a*f/(a - f)
>>> geometric_conj_bf(b, f)
b*f/(b - f)
sympy.physics.optics.gaussopt.geometric_conj_bf(a, f)[源代码]#

近轴条件下几何光束的共轭关系。

解释

取物体到光学元件的距离(对于几何焦距)或图像距离(对于几何焦距)。然后返回共轭所需的其他距离。

实例

>>> from sympy.physics.optics.gaussopt import geometric_conj_af, geometric_conj_bf
>>> from sympy import symbols
>>> a, b, f = symbols('a b f')
>>> geometric_conj_af(a, f)
a*f/(a - f)
>>> geometric_conj_bf(b, f)
b*f/(b - f)
sympy.physics.optics.gaussopt.rayleigh2waist(z_r, wavelen)[源代码]#

从高斯光束的瑞利范围计算腰围。

实例

>>> from sympy.physics.optics import rayleigh2waist
>>> from sympy import symbols
>>> z_r, wavelen = symbols('z_r wavelen')
>>> rayleigh2waist(z_r, wavelen)
sqrt(wavelen*z_r)/sqrt(pi)
sympy.physics.optics.gaussopt.waist2rayleigh(w, wavelen, n=1)[源代码]#

从高斯光束的腰部计算瑞利范围。

实例

>>> from sympy.physics.optics import waist2rayleigh
>>> from sympy import symbols
>>> w, wavelen = symbols('w wavelen')
>>> waist2rayleigh(w, wavelen)
pi*w**2/wavelen