sdr.coherent_gain_loss(integration_time: ArrayLike, freq_offset: ArrayLike) NDArray[float64]

Computes the coherent gain loss (CGL) as a function of the given integration time and frequency offset.

Parameters:
integration_time: ArrayLike

The coherent integration time \(T_c\) in seconds.

freq_offset: ArrayLike

The frequency offset \(\Delta f\) in Hz.

Returns:

The coherent gain loss (CGL) in dB.

Notes

\[\text{CGL} = -10 \log_{10} \left( \text{sinc}^2 \left( T_c \Delta f \right) \right)\]
\[\text{sinc}(x) = \frac{\sin(\pi x)}{\pi x}\]

Examples

Compute the coherent gain loss for an integration time of 1 ms and a frequency offset of 235 Hz.

In [1]: sdr.coherent_gain_loss(1e-3, 235)
Out[1]: 0.8038919141626675

Compute the coherent gain loss for an integration time of 1 ms and an array of frequency offsets.

In [2]: sdr.coherent_gain_loss(1e-3, [0, 100, 200, 300, 400, 500])
Out[2]: 
array([-0.        ,  0.14335017,  0.57922366,  1.32626966,  2.42007077,
        3.92239754])

Plot coherent gain loss as a function of frequency offset.

In [3]: f = np.linspace(0, 2e3, 1001)

In [4]: plt.figure(); \
   ...: plt.plot(f, sdr.coherent_gain_loss(0.5e-3, f), label="0.5 ms"); \
   ...: plt.plot(f, sdr.coherent_gain_loss(1e-3, f), label="1 ms"); \
   ...: plt.plot(f, sdr.coherent_gain_loss(2e-3, f), label="2 ms"); \
   ...: plt.legend(title="Integration time"); \
   ...: plt.ylim(-5, 55); \
   ...: plt.xlabel("Frequency offset (Hz)"); \
   ...: plt.ylabel("Coherent gain loss (dB)"); \
   ...: plt.title("Coherent gain loss for various integration times");
   ...: 
../../_images/sdr_coherent_gain_loss_1.png

Plot coherent gain loss as a function of integration time.

In [5]: t = np.linspace(0, 1e-2, 1001)

In [6]: plt.figure(); \
   ...: plt.plot(t * 1e3, sdr.coherent_gain_loss(t, 100), label="100 Hz"); \
   ...: plt.plot(t * 1e3, sdr.coherent_gain_loss(t, 200), label="200 Hz"); \
   ...: plt.plot(t * 1e3, sdr.coherent_gain_loss(t, 400), label="400 Hz"); \
   ...: plt.legend(title="Frequency offset"); \
   ...: plt.ylim(-5, 55); \
   ...: plt.xlabel("Integration time (ms)"); \
   ...: plt.ylabel("Coherent gain loss (dB)"); \
   ...: plt.title("Coherent gain loss for various frequency offsets");
   ...: 
../../_images/sdr_coherent_gain_loss_2.png