prefactor for Allan deviation for noise
            type defined by (qd, b, tau0)

            Colored noise generated with (qd, b, tau0) parameters will
            show an Allan variance of:

            AVAR = prefactor * h_a * tau^c

            where a = b + 2 is the slope of the frequency PSD.
            and h_a is the frequency PSD prefactor S_y(f) = h_a * f^a

            The relation between a, b, c is:
            a   b   c(AVAR) c(MVAR)
            -----------------------
            -2  -4   1       1
            -1  -3   0       0
             0  -2  -1      -1
            +1  -1  -2      -2
            +2   0  -2      -3

            Coefficients from:
            S. T. Dawkins, J. J. McFerran and A. N. Luiten, "Considerations on
            the measurement of the stability of oscillators with frequency
            counters," in IEEE Transactions on Ultrasonics, Ferroelectrics, and
            Frequency Control, vol. 54, no. 5, pp. 918-925, May 2007.
            doi: 10.1109/TUFFC.2007.337

def adev_from_qd(self, tau0=1.0, tau=1.0):
        """ prefactor for Allan deviation for noise
            type defined by (qd, b, tau0)

            Colored noise generated with (qd, b, tau0) parameters will
            show an Allan variance of:

            AVAR = prefactor * h_a * tau^c

            where a = b + 2 is the slope of the frequency PSD.
            and h_a is the frequency PSD prefactor S_y(f) = h_a * f^a

            The relation between a, b, c is:
            a   b   c(AVAR) c(MVAR)
            -----------------------
            -2  -4   1       1
            -1  -3   0       0
             0  -2  -1      -1
            +1  -1  -2      -2
            +2   0  -2      -3

            Coefficients from:
            S. T. Dawkins, J. J. McFerran and A. N. Luiten, "Considerations on
            the measurement of the stability of oscillators with frequency
            counters," in IEEE Transactions on Ultrasonics, Ferroelectrics, and
            Frequency Control, vol. 54, no. 5, pp. 918-925, May 2007.
            doi: 10.1109/TUFFC.2007.337

        """
        g_b = self.phase_psd_from_qd(tau0)
        f_h = 0.5/tau0
        if self.b == 0:
            coeff = 3.0*f_h / (4.0*pow(np.pi, 2)) # E, White PM, tau^-1
        elif self.b == -1:
            coeff = (1.038+3*np.log(2.0*np.pi*f_h*tau))/(4.0*pow(np.pi, 2))# D, Flicker PM, tau^-1
        elif self.b == -2:
            coeff = 0.5 # C, white FM,  1/sqrt(tau)
        elif self.b == -3:
            coeff = 2*np.log(2) # B, flicker FM,  constant ADEV
        elif self.b == -4:
            coeff = 2.0*pow(np.pi, 2)/3.0 #  A, RW FM, sqrt(tau)

        return np.sqrt(coeff*g_b*pow(2.0*np.pi, 2))