Commit f6256af2 authored by Samuel Rowlinson's avatar Samuel Rowlinson

adding function for finite aperture clipping loss for LG modes

parent 05e0a752
......@@ -10,6 +10,7 @@ from math import factorial
from pykat.math.hermite import hermite
from scipy.misc import comb
from scipy.integrate import newton_cotes
from scipy.special import gammainc
from pykat.math import newton_weights
import time
......@@ -793,3 +794,17 @@ def plot_knm_matrix(couplings, knm, cmap=None, show=True, fig=None):
fig.tight_layout()
if show: plt.show()
def clipping_loss_LG(p, l, R, w):
"""Computes the clipping loss due to a finite aperture
for an LG mode.
See ifo Living Review section 11.10 (page 184).
"""
sum = 0
for m in range(1 + p):
for n in range(1 + p):
sum += ((-1)**(n+m)/(factorial(p - n) * factorial(p - m)) *
1/(factorial(abs(l) + n) * factorial(abs(l) + m) * factorial(n) * factorial(m)) *
gammainc(abs(l) + n + m + 1, 2*R*R/(w*w)))
return 1.0 - factorial(p) * factorial(p + abs(l)) * sum
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment