The official Python toolbox for parsing the PicoScenes .csi files.
pip install git+https://github.com/imba-tjd/mingw64ccompiler
python -m mingw64ccompiler install_specs # Run once
python -m mingw64ccompiler install # Works with venv
--recursive
option.git clone https://github.com/Herrtian/PicoscenesToolbox.git --recursive
sudo apt update
sudo apt install python3
sudo apt install python3-pip
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
install dependency
pip3 install -r requirements.txt
python3 setup.py build_ext --inplace
rx_by_usrpN210.csi is a sample binary csi file created by Picoscenes,now we will use it to create a chart.
# main.py
from picoscenes import Picoscenes
import numpy as np
import matplotlib.pyplot as plt
i = 0 # stands for the first frame of csi frames
frames = Picoscenes("rx_by_usrpN210.csi")
numTones = frames.raw[i].get("CSI").get("numTones")
SubcarrierIndex = np.array(frames.raw[i].get("CSI").get("SubcarrierIndex"))
Mag = np.array(frames.raw[i].get("CSI").get("Mag"))[:numTones]
plt.title(" Magnitude Demo")
plt.xlabel("x axis subcarryindex ")
plt.ylabel("y axis Magnitude")
plt.plot(SubcarrierIndex, Mag)
plt.show()
main.py is included in the working dir.
This programm shows the first frame of rx_by_usrpN210.csi ,and draws the picture whose x-ray stands for SubcarrierIndex and y-ray stands for Magnitude.
python3 main.py
If you run the programm successfully, you will get the result like this :
If you want to know more details about PicoscenesToolbox , you can seek ./docs and [wiki]()
If you have some questions on PicoscenesToolbox, please make me know and submit issues what you met.
Welcome to give this programm a star or fork.
The code in this project is licensed under MIT license. That means if you are building project by this programm, I would greatly appreciate if you could cite this repository.