def low_pass_filter(freq, f3dB, alpha=0):
    """
    Produces the relative PSD of a signal that, to a factor (1-alpha²), is
    filtered by a 1st-order low-pass filter.

    This, in particular, describes the filtering of a quadrant photo-diode:
    Only a fraction of the photons that reach the diode is absorped in the
    depletion region, the other fraction get's absorped outside that region.
    The electron-hole pairs need to diffuse to the depletion region until
    they produce a photo-current. This process causes an effective low-pass
    filter for these photons. The in the power spectrum the function looks
    like this:

     F(f) = alpha² + (1 - alpha²) / (1 + (f / f3dB)**2)

    Arguments
    ---------
    freq : array(float)
        Frequency vector.
    f3dB : float
        Cut-off frequency of the low-pass filter.
    alpha : float
        Filter efficiency. Only a fraction (0 <= alpha <= 1) of the signal that
        is not low pass filtered. Thus, alpha = 1, will produce no low-pass
        filter at all, whereas alpha = 0, will produce a 1st-order low-pass
        filter.

    References
    ----------
    Equ. (35) in:
        Berg-Sørensen, K., & Flyvbjerg, H. (2004)
        Power spectrum analysis for optical tweezers. Review of Scientific
        Instruments, 75(3), 594–612.
        http://doi.org/10.1063/1.1645654
    Equ. (20) in:
        Berg-So̸rensen, K., et al. (2006)
        Power spectrum analysis for optical tweezers. II: Laser wavelength
        dependence of parasitic filtering, and how to achieve high bandwidth.
        Review of Scientific Instruments, 77(6), 063106.
        http://doi.org/10.1063/1.2204589
    """
    return alpha ** 2 + (1 - alpha ** 2) / (1 + (freq / f3dB) ** 2)
