diff --git a/lddecode/core.py b/lddecode/core.py index 501e8b7f6..638df189b 100644 --- a/lddecode/core.py +++ b/lddecode/core.py @@ -378,16 +378,17 @@ def computeefmfilter(self): This improved EFM filter was devised by Adam Sampson (@atsampson) """ + # Frequency bands - freqs = np.linspace(0.0e6, 2.0e6, num=11) + freqs = np.linspace(0.0e6, 1.9e6, num=11) freq_per_bin = self.freq_hz / self.blocklen # Amplitude and phase adjustments for each band. # These values were adjusted empirically based on a selection of NTSC and PAL samples. - amp = np.array([0.0, 0.2, 0.41, 0.73, 0.98, 1.03, 0.99, 0.81, 0.59, 0.42, 0.0]) + amp = np.array([0.0, 0.215, 0.41, 0.73, 0.98, 1.03, 0.99, 0.81, 0.59, 0.42, 0.0]) phase = np.array( - [0.0, -0.95, -1.05, -1.05, -1.2, -1.2, -1.2, -1.2, -1.2, -1.2, -1.2] + [0.0, -0.92, -1.03, -1.11, -1.2, -1.2, -1.2, -1.2, -1.05, -0.95, -0.8] ) - coeffs = None + phase = [p * 1.25 for p in phase] """Compute filter coefficients for the given FFTFilter.""" # Anything above the highest frequency is left as zero. diff --git a/lddecode/efm_pll.py b/lddecode/efm_pll.py index c28d735ca..7b8c9ea43 100644 --- a/lddecode/efm_pll.py +++ b/lddecode/efm_pll.py @@ -49,11 +49,11 @@ def computeefmfilter(freq_hz = 40000000, blocklen = 65536): freq_per_bin = freq_hz / blocklen # Amplitude and phase adjustments for each band. # These values were adjusted empirically based on a selection of NTSC and PAL samples. - amp = np.array([0.0, 0.2, 0.41, 0.73, 0.98, 1.03, 0.99, 0.81, 0.59, 0.42, 0.0]) + amp = np.array([0.0, 0.215, 0.41, 0.73, 0.98, 1.03, 0.99, 0.81, 0.59, 0.42, 0.0]) phase = np.array( - [0.0, -0.95, -1.05, -1.05, -1.2, -1.2, -1.2, -1.2, -1.2, -1.2, -1.2] + [0.0, -0.92, -1.03, -1.11, -1.2, -1.2, -1.2, -1.2, -1.05, -0.95, -0.8] ) - coeffs = None + phase = [p * 1.25 for p in phase] """Compute filter coefficients for the given FFTFilter.""" # Anything above the highest frequency is left as zero.