-
Notifications
You must be signed in to change notification settings - Fork 125
Open
Description
I am not sure why I can't reach target sampling rate by the following code:
import time
sdr.sample_rate = 2.048e6
sample_num = 1024 * 128
iq = []
n=100 #n cycles
tic = time.time()
for _ in range(1,n+1):
iq.extend(sdr.read_samples(sample_num))
toc = time.time()
dt = toc-tic
sr = len(iq)/dt
print(f'sample rate setting: {sdr.sample_rate}, actual sample rate = {sr}')
result:
sample rate setting: 2048000.0, actual sample rate = 1888409.6998254296
I could only reach target fro samplle_rate<=300KHz
Is there any way I could omptimize my code?
Should I jump to stream(), which read sample in a async way?
Metadata
Metadata
Assignees
Labels
No labels