Skip to content

Commit 23054e3

Browse files
committed
better filtering and rounding - improved to 21 bad/1003 "good"
1 parent a1585d5 commit 23054e3

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

chopin8.py

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
dc = data.mean()
3030
data -= dc
3131

32-
# without filter: 340 errors, 303bad/449good if DP
32+
# without filter: 340 errors, 303bad/449good if DP (324/473 if using leftover at write time)
3333

3434
# 91 errors
3535
bandpass = sps.firwin(97, [.08/NYQUIST_MHZ, 1.20/NYQUIST_MHZ], pass_zero=False)
@@ -41,11 +41,24 @@
4141
bandpass = sps.firwin(97, [.100/NYQUIST_MHZ, 1.50/NYQUIST_MHZ], pass_zero=False)
4242
# 44 (double precision)
4343
bandpass = sps.firwin(91, [.100/NYQUIST_MHZ, 1.50/NYQUIST_MHZ], pass_zero=False)
44-
# 40 (double precision)/ 842 good
44+
# 40 (double precision)/ 842 good - 29/920 if using leftover
4545
bandpass = sps.firwin(91, [.095/NYQUIST_MHZ, 1.72/NYQUIST_MHZ], pass_zero=False)
46+
47+
# 30/957 with leftover
48+
bandpass = sps.firwin(65, [.150/NYQUIST_MHZ, 1.75/NYQUIST_MHZ], pass_zero=False)
49+
50+
# 20/994 with leftover
51+
bandpass = sps.firwin(49, [.290/NYQUIST_MHZ, 1.80/NYQUIST_MHZ], pass_zero=False)
52+
53+
# 17/999 with leftover
54+
bandpass = sps.firwin(49, [.290/NYQUIST_MHZ, 1.85/NYQUIST_MHZ], pass_zero=False)
55+
56+
# 19/1007 with leftover
57+
bandpass = sps.firwin(45, [.360/NYQUIST_MHZ, 1.85/NYQUIST_MHZ], pass_zero=False)
58+
4659
data = sps.lfilter(bandpass, 1.0, data)
4760

48-
#bandpassb, bandpassa = sps.butter(4, [0.20/NYQUIST_MHZ, 1.7/NYQUIST_MHZ], btype='bandpass')
61+
#bandpassb, bandpassa = sps.butter(4, [0.10/NYQUIST_MHZ, 2.0/NYQUIST_MHZ], btype='bandpass')
4962
#data = sps.lfilter(bandpassb, bandpassa, data)
5063

5164
# filter to binary signal

0 commit comments

Comments
 (0)