Inverse Fourier transform of Lorentzians and sign function I'm trying to caculate the inverse Fourier transform of
$$ G(\omega) = \dfrac{(\omega+a)^2+b^2}{((\omega-c)^2+b^2)((\omega+c)^2+b^2)} \mathrm{sgn}(\omega-d)$$
It is the product of two Lorentzians and sign function $sgn$. The constants $a,b,c,d$ are all real values.
I'm using complex integration to solve the FT integral by brute force:
$$ g(t) = \int_{-\infty}^\infty \dfrac{d\omega}{2\pi} e^{-i\omega t} G(\omega) 
= \int_{-\infty}^\infty \dfrac{d\omega}{2\pi} e^{-i\omega t}\dfrac{(\omega+a)^2+b^2}{((\omega-c)^2+b^2)((\omega+c)^2+b^2)} \mathrm{sgn}(\omega-d)$$
There are poles at $\omega=c-ib,c+ib,-c-ib,-c+ib$. 
One semicircle contour goes anticlockwise on the upper half of the complex plane. The other semicircle contour goes clockwise on the lower half of the complex plane. Then calculating the residues inside each closed contour:
$2\pi i \sum$ (residues in upper half of plane) + $2\pi i \sum$ (residues in lower half of plane)
There are two cases:


*

*for $t>0$, $e^{−i\omega t}$ converges to zero at infinity on the lower half plane, so residues are
$$ R_1 = 2\pi i \left( 
e^{-ict-bt} 
\dfrac{((c+a-ib)^2+b^2)sgn(c-d-ib)}{-2ib((2c-ib)^2+b^2)} \\
+ e^{ict-bt} 
\dfrac{((-c+a-ib)^2+b^2)sgn(-c-d-ib)}{-2ib((-2c-ib)^2+b^2)}
\right)$$

*for $t<0$, $e^{−i\omega t}$ converges to zero at infinity on the upper half plane, so residues are
$$ R_2 = 2\pi i \left(e^{-ict+bt} 
\dfrac{((c+a+ib)^2+b^2)sgn(c-d+ib)}{2ib((2c+ib)^2+b^2)} \\
+ e^{ict+bt} 
\dfrac{((-c+a+ib)^2+b^2)sgn(-c-d+ib)}{2ib((-2c+ib)^2+b^2)}
\right)$$
This means $g(t)=\frac{1}{2\pi}(H(t)R_1 + H(-t)R_2)$ where $H$ is the Heaviside function.
Does my working look correct? Have I missed anything? Below I plot the analytical $g(t)$ alongside the Python IFFT result of $\mathcal{F}^{-1}(G(\omega))$ but they don't agree. (I checked my Python code by performing IFFTs on known FT pairs, so there's nothing wrong with the algorithm.)

 A: Assume that $b \neq 0 \land c \neq 0$. Then the denominator doesn't have multiple roots, and partial fraction decomposition gives a sum of four terms of the form $C/(w \pm c \pm ib)$. Thus it is sufficient to find the Fourier transform of $\operatorname{sgn}(w+d)/(w \pm c \pm i b)$, which reduces to finding the transform of $H(w)/(w+w_0)$, with $w_0$ not on the real axis.
Assume further that $w_0$ is not on the imaginary axis, which is equivalent to $c \neq \pm d$. We have
$$I = \int_{-\infty}^\infty \frac {H(w)} {w+w_0} {e^{-itw}} dw =
e^{\tau_0} \int_{\tau_0}^{it\infty} \frac {e^{-\tau}} \tau d\tau, \\
\tau_0 = i w_0 t, \; w_0 \notin \mathbb R, \; i w_0 \notin \mathbb R.$$
When the origin is inside the sector bounded by the rays from $\tau_0$ to $it\infty$ and from $\tau_0$ to $\infty$, we'll have
$$e^{-\tau_0} I - \Gamma(0, \tau_0) =
-2 \pi i \operatorname{sgn} t
 \operatorname{Res}_{\tau=0} \frac {e^{-\tau}} \tau.$$
Otherwise the difference $e^{-\tau_0} I - \Gamma(0, \tau_0)$ will be zero. The condition for the origin to be inside the sector is
$$\operatorname{Re} \tau_0 < 0 \land \\
 ((t < 0 \land \operatorname{Im} \tau_0 > 0) \lor
 (t > 0 \land \operatorname{Im} \tau_0 < 0)),$$
which simplifies to
$$\operatorname{Re} w_0 < 0 \land t \operatorname{Im} w_0 > 0,$$
and we obtain
$$I = e^{i w_0 t}(\Gamma(0, i w_0 t) -
 2 \pi i \operatorname{sgn} t \,
  H(-\operatorname{Re} w_0) H(t \operatorname{Im} w_0)).$$
