From 25866dd2480ed58fc3eb7842ce6fa56d1f30bae1 Mon Sep 17 00:00:00 2001 From: Anders Wallin Date: Sun, 26 Nov 2023 20:11:52 +0200 Subject: [PATCH] remove unused code --- allantools/allantools.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/allantools/allantools.py b/allantools/allantools.py index e44bdb3..5b552c5 100644 --- a/allantools/allantools.py +++ b/allantools/allantools.py @@ -10,7 +10,9 @@ **unreleased** - ITU PRC, PRTC, ePRTC masks for TDEV and MTIE in new file mask.py - psd2allan() - convert PSD to ADEV/MDEV -- GCODEV +- GCODEV, Grosslambert deviation, an improved three-cornered-hat analysis +- PDEV, Parabolic deviation + **2019.09** 2019 September - packaging changes, for conda package @@ -476,21 +478,11 @@ def calc_pdev_phase(phase, rate, mj): Mi=0 for i in range(0,M): # 0..M-1 asum=0 - """ - # this naive for-loop is very slow - # using sum( vector[range] ) below is much faster - for k in range(0,mj): # 0..mj-1 - prefactor = (mj-1.0)/2.0 - k - p1 = phase[i+k] - p2 = phase[i+mj+k] - asum = asum + prefactor*(p1-p2) - """ krange = np.linspace(0,mj-1,mj) asum = sum( ((mj-1.0)/2.0 - krange ) * (phase[i:i+mj] - phase[i+mj:i+2*mj]) ) Msum=Msum + pow(asum, 2) Mi=Mi+1 dev = np.sqrt( 72*Msum / ((M)*pow(mj,4)*pow(mj*tau0,2 )) ) - #print('N ',N,' M ', M,' Mi', Mi, 'mj ',mj,' dev', dev) deverr = dev / np.sqrt(M) n=M