code: def b1_noise_id(x, af, rate):
      
      (taus,devs,errs,ns) = at.adev(x,taus=[af*rate],data_type="phase", rate=rate) 
      oadev_x = devs[0]
      y = np.diff(x)
      y_cut = np.array( y[:len(y)-(len(y)%af)] ) # cut to length
      assert len(y_cut)%af == 0
      y_shaped = y_cut.reshape( ( int(len(y_cut)/af), af) )
      y_averaged = np.average(y_shaped,axis=1) # average
          
      var = np.var(y_averaged, ddof=1)
      return var/pow(oadev_x,2.0)
docs: B1 ratio for noise identification
      
          ratio of Standard Variace to AVAR