**3.Gaussian Beams > 2.Photodetectors**

**1.Beat coefficients**

Author: Daniel Brown

The ideal split photo detector consists of two half-infinite planes. The signal from the two planes are subtracte from each other. For a beam which is centered on the line seperating the two planes, the detector will only show the beat between symmetric and asymmetric modes, which is useful for generating alignment signals.

For a beam: $$E~=~~\sum_{n,m}~a_{nm}~u_{nm}(x,y,z)$$ the power is proportional to $\int E*E^*$

For a normal detector the integral would be over the entire x-y plane. For the split-photodectors (here assuming split along the vertical y-axis) we get $$P\sim \int_0^\infty E*E^* - \int_0^{-\infty} E*E^* =2 \int_0^\infty E*E^*$$

In [6]:

```
import numpy as np
import math
from math import factorial
from scipy.integrate import quad
from scipy.special import hermite
```

In [11]:

```
def HG_split_diode_coefficient_numerical(n1,n2):
# return zero if n1,n2 are both even or both odd
if (n1+n2) % 2 == 0:
return 0.0
# extract normlisation coefficients
A = 2.0 * np.sqrt(2.0/np.pi) * np.sqrt(1.0 / (2.0**(n1+n2) * factorial(n1) * factorial(n2)))
# define rest of u_n1 * u_n2^* as integrand
f = lambda x: hermite(n1)(np.sqrt(2.0)*x) * math.exp(-2.0*x*x) * hermite(n2)(np.sqrt(2.0)*x)
# perform numerical integration
val, res= quad(f, 0.0, np.Inf, epsabs=1e-10, epsrel=1e-10, limit=200)
return A * val
```

In [12]:

```
print(HG_split_diode_coefficient_numerical(0,0))
print(HG_split_diode_coefficient_numerical(0,1))
```

This function has been implemented in PyKat and can be used as follows:

In [14]:

```
import pykat.optics.pdtype as pdtype
pdtype.HG_split_diode_coefficient_numerical(0,1)
```

Out[14]:

In [17]:

```
pdtype.finesse_split_photodiode(5,'x')
```

In [ ]:

```
```