As stated by Reinhard, we want to separate the "evolution part" and the "amplitude part" . Define the amplitude part as
$$
A_{c1} = A_1 \cos \phi_1 \\
A_{s1} = A_1 \sin \phi_1 \\
A_{c2} = A_2 \cos \phi_2 \\
A_{s2} = A_2 \sin \phi_2
$$
and the evolution part as
$$
h_{c1} = \exp(-t/\tau_1) \cos(2\pi f_1) \\
h_{s1} = \exp(-t/\tau_1) \sin(2\pi f_1) \\
h_{c2} = \exp(-t/\tau_2) \cos(2\pi f_2) \\
h_{s2} = \exp(-t/\tau_2) \sin(2\pi f_2)
$$
We write $A=(A_{c1}, A_{s1}, A_{c2}, A_{s2})^T$ and $h = (h_{c1}, h_{s1}, h_{c2}, h_{s2})^T$, then we have $s = h^T A$. The likelihood ratio can be expressed as
Our aim is to marginalize A. Using Gaussian Integral, we get
$$
\int e^{-\frac{1}{2}A^T M^{-1} A + A^TD} \mathrm{dA} = 2\pi \sqrt{|M|}
$$
Therefore, with two ringdown modes, we only need to calculate the matrix $M^{-1}$, which means calculating 16 (probably 10 due to symmetry) inner products, then take the inverse to get $M$ and calculate its determinant.
I describe a procedure to analytically marginalize the phase in gravitational wave ringdown parameter estimation.
First I recap the existing implementation of coalescence phase marginalization in *pycbc_inference*, which can be found [here](https://github.com/yi-fan-wang/pycbc/blob/master/pycbc/inference/models/marginalized_gaussian_noise.py). The logarithm likelihood of likelihood function reads
Note an intriguing fact, that the first term needs only to be computed once for a fixed coalescence phase, and other phase values will only introduce a phase offset. I think this fact inspires people to find an analytical marginalization over the coalescence phase. The gravitational wave waveform $h$ can be written as the following
where the left hand side the likelihood with the coalescence phase being analytically marginalized over. The $O(d,h^0)$ is a complex inner product. For simplicity I drop all the tilt on top of d and h, but they should be frequency series. The ... are terms independent from phase. Denote the complex inner product as a complex number $x+iy$, then multiplying the phase offset yields
$$
O(d,h^0)e^{i\phi} = (x+iy)(\cos\phi + i \sin\phi)
$$
The real part of it is nothing but $x\cos\phi-y\sin\phi$. A useful property of modified Bessel function of the first kind can help to compute the integral. Consider
(see [here](http://www.mhtlab.uwaterloo.ca/courses/me755/web_chap4.pdf), page 20). Therefore the above integral of the first term of the marginalized likelihood is $I_0(\sqrt{x^2+y^2})$, the term in the parentheses is nothing but the modulo of the complex inner produce between data $d$ and the gravitational wave $h^0$ with phase being 0.
## Review of decomposing Ringdown waveform with spheroidal harmonics
We form a quantity as $h_+ +ih_\times $, it has spin two, so it can be decomposed with respect to spin-2 weighted spherical or spheroidal harmonics. In the following I ignore the overtone index $n$, and simply denote spin-2 spheroidal/spherical harmonics by $Y_{lm}$
Taking the Fourier transform, and note a property that $\tilde{h}^\ast_{lm} (f) = [\tilde{h}_{lm}(-f)]^\ast $ , we get the plus polarization in Fourier domain
Note that we only consider positive frequency here. I think the reasoning behind is because $h_+$ (in the time domain) is real, hence there is a symmetry $\tilde{h}_+(-f) = [\tilde{h}_+(f)]^\ast$. Thus we only need to take care of the single sided of the waveform in Fourier domain.
Another key assumption/behavior here is that people find $\tilde{h}_{lm}(-f) = 0 $ when $m>0$. I'm not sure about it for the ringdown case. But let's say it's true, then we have