<jupyter_start><jupyter_text>Setting iotSDR Frequency- Center Frequency of the<jupyter_code>cent_frequency = 918e6  # channel carrier freq 
chan_spacing_kHz   = 25     # channel spacing w.r.t carrier freq
chan_number        = 1      # channel offset in multiple of channel spacing w.r.t carrier freq

iotSDR.setFrequency(rx_chan_1,cent_frequency,chan_spacing_kHz,chan_number)
iotSDR.setFrequency(rx_chan_2,cent_frequency,chan_spacing_kHz,chan_number)

rx_stream_1 = iotSDR.setupStream(channels.IOTSDR_RX,rx_chan_1)
rx_stream_2 = iotSDR.setupStream(channels.IOTSDR_RX,rx_chan_2)

#This turns the rf radio on
iotSDR.activateStream(rx_stream_1)
iotSDR.activateStream(rx_stream_2)
"""
Create continous memory buffer for ADC received samples
this buffer will be filled up by the streamed samples recieved from the RF chip
"""
from pynq import allocate
import numpy as np

totalSamples  = 1024*16
sample_buffer_1 = allocate(shape=(totalSamples*2,), dtype=np.int16)
sample_buffer_2 = allocate(shape=(totalSamples*2,), dtype=np.int16)

"""
samplesPerFrame = 2*4*1024
"""

total_frames = 1
iotSDR.readStream(rx_stream_1,sample_buffer_1)
iotSDR.readStream(rx_stream_2,sample_buffer_2)

frames_1 = sample_buffer_1[::2] + 1j * sample_buffer_1[1::2]
frames_2 = sample_buffer_2[::2] + 1j * sample_buffer_2[1::2]


N = len(frames_1.real)//1

fig, axes= plt.subplots(nrows=2, ncols=1,figsize=(16,3))
t = np.arange(0, N, 1)

axes[0].plot(t, frames_1.real)
axes[0].plot(t, frames_1.imag)
axes[1].plot(t, frames_2.real)
axes[1].plot(t, frames_2.imag)

plt.tight_layout()
plt.show()
sample_buffer_1.close()
sample_buffer_2.close()
iotSDR.deactivateStream(rx_stream_1)
iotSDR.deactivateStream(rx_stream_2)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11260210035005834, 'fraction_numerical': 0.043757292882147025, 'mean_word_length': 6.976744186046512, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '105262', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 709, 'n_tokens_neox': 664, 'n_words': 121, 'path': 'boards/iotSDR-IOT_Z7020/iotSDR_IOT/notebooks/iotSDR_Dual_channel_reception.ipynb', 'repo_name': 'mfkiwl/iotSDR', 'size': '1714'}