- qspec.gaussian_beam_3d ( r , k , w0 , p0 , r0 = None , axis = -1 )[source]
The Gaussian beam intensity at the position $\vec{r} - \vec{r}_0$ $$\begin{aligned} I(\vec{r}) &= \frac{2P_0}{\pi w_z^2}\,\exp\!\left[-2\left(\!\frac{\rho}{w_z}\!\right)^{\! 2}\right]\\[2ex] w_z &= w_0\sqrt{1 + \left(\!\frac{z}{z_0}\!\right)^{\!2}},\qquad z_0 = \frac{1}{2}|\vec{k}|w_0^2\\[2ex] z &= (\vec{r} - \vec{r}_0)\cdot\hat{k},\qquad \rho = \sqrt{\left[(\vec{r} - \vec{r}_0)\cdot\hat{x}\right]^2 + \left[(\vec{r} - \vec{r}_0)\cdot\hat{y}\right]^2}, \end{aligned}$$ where $\hat{k}$ is the unit vector in $\vec{k}$ direction and $\hat{x}$, $\hat{y}$ are unit vectors orthogonal to $\hat{k}$.
- Parameters:
-
- rarray_like
The position 3-vector $\vec{r}$ where to calculate the beam intensity (m).
- karray_like
The 3-vector $\vec{k}$ of light, where $|\vec{k}| = \omega / c$ (rad / m).
- w0array_like
The beam waist $w_0$ (m).
- p0array_like
The total power $P_0$ propagated by the gaussian beam (W).
- r0array_like
The position 3-vector $\vec{r}_0$ of the beam waist. If
r0
isNone
, it is[0., 0., 0.]
(m).- axisint
The axis along which the vector components are aligned.
- Returns:
-
- I_rndarray
The intensity $I(\vec{r})$ (W/m2 = μW/mm2).
- Raises:
-
- ValueError
r
,k
andr0
must have 3 components along the specifiedaxis
. The shapes ofr
,k
,w0
,r0
andp0
must be compatible.