Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions examples/pcmfm_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@
import numpy as np
from matplotlib.axes import Axes
from matplotlib.ticker import MultipleLocator
from scipy.signal import besselap, impulse

from waveforms.cpm.helpers import normalize_cpm_filter
from waveforms.cpm.modulate import cpm_modulate
from waveforms.cpm.pcmfm import PCMFM_DENOM, PCMFM_NUMER
from waveforms.cpm.pcmfm import (
PCMFM_DENOM,
PCMFM_NUMER,
freq_pulse_pcmfm,
)
from waveforms.cpm.trellis.encoder import TrellisEncoder
from waveforms.cpm.trellis.model import SimpleTrellis2
from waveforms.glfsr import PNSequence
Expand Down Expand Up @@ -42,12 +45,7 @@
["-", "--", "-", "--", "-."],
[3, 3, 2, 2, 2],
):
t, y = impulse(
besselap(order, norm="mag"),
T=np.linspace(0, length * 2 / 0.7, num=(length - 1) * sps + 1),
)
freq_pulse = normalize_cpm_filter(sps, np.convolve(y, np.ones(sps)))

freq_pulse = freq_pulse_pcmfm(sps, order)
normalized_time, modulated_signal = cpm_modulate(
symbols=symbols,
mod_index=mod_index,
Expand Down
Loading
Loading