Open adeeb10abbas opened 3 years ago
Hi @adeeb10abbas,
Could you be more precise on your issue. Is this a question? Do you report a bug? Do you ask for a feature?
Yes sorry about that. I am asking for a feature! Thanks!
Did you have a look to the SISOFlatChannel class? It should do what you ask for. There are several variants possible, like using a complex signal but this snippet should be enough to start.
from commpy.channels import SISOFlatChannel
from commpy.utilities import signal_power
import numpy as np
channel = SISOFlatChannel()
noiseless_signal = np.random.choice((-1, 1), 10) # Use your own signal here
channel.set_SNR_dB(10, Es=signal_power(noiseless_signal)) # I compute the signal power but if you know it, you can just specified the right argument
noisy_signal = channel.propagate(noiseless_signal)
Is it OK for you? If so, I let you close this issue.
Yes, this works but partially. I am looking for something that can add noise to a signal that already has some amount of noise.
Replace noiseless_signal
with your already noisy signal and it's done, isn't it?
Adding Gaussian noise to a signal of a specific SNR. The signal may or may not have noise already