Skip to content
Merged
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
6 changes: 3 additions & 3 deletions src/uwa_replay/replay.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

def replay(input, fs, array_index, channel, start=None):
"""
Simulate the replay of a baseband signal through an underwater acoustic channel.
Simulate the replay of a passband signal through an underwater acoustic channel.

Parameters:
-----------
input : ndarray
Complex baseband input signal.
Real passband input signal.

fs : float
Sampling frequency of the input signal in Hz.
Expand Down Expand Up @@ -69,7 +69,7 @@ def replay(input, fs, array_index, channel, start=None):
if "theta_hat" in channel.keys():
theta_hat = np.array(channel["theta_hat"])[:, array_index]

# Convert baseband and resample the signal to fs_delay
# Convert to baseband and resample the signal to fs_delay
frac = Fraction(fs_delay / fs).limit_denominator()
baseband = input * np.exp(-2j * np.pi * fc * np.arange(input.shape[0]) / fs)
baseband = sg.resample_poly(baseband, frac.numerator, frac.denominator)
Expand Down