Examples¶
Explore hands-on examples for common use-cases with the intan package. Each example includes full scripts, usage notes, and expected outcomes.
Getting Started¶
If you’re new to the package, start with these fundamental examples:
Loading and Parsing Data Files - Load and parse EMG data from various file formats
File Loading and Visualization Example - Visualize data from files
Live Plotting of Multiple EMG Channels - Real-time streaming visualization
Advanced Topics¶
Data Handling
Visualization
Machine Learning
Hardware Integration
Quick Reference¶
By Task:
Load data from files: Loading and Parsing Data Files
Visualize EMG signals: File Loading and Visualization Example, Live Plotting of Multiple EMG Channels
Stream from RHX device: Live Plotting of Multiple EMG Channels, Comparing RHD File Data to Live TCP Stream
Use Lab Streaming Layer: Lab Streaming Layer (LSL) Integration
Train gesture classifiers: Gesture classification
Real-time prediction: Real-time prediction
Control robots/hardware: Hardware integration
GUI applications: GUI applications
By Data Format:
.rhd files: Loading and Parsing Data Files, File Loading and Visualization Example
.dat files: Loading and Parsing Data Files
.csv files: Loading and Parsing Data Files
.npz files: Gesture classification
Live TCP streaming: Live Plotting of Multiple EMG Channels, Comparing RHD File Data to Live TCP Stream
By Hardware:
Intan RHX Controller: Live Plotting of Multiple EMG Channels, Comparing RHD File Data to Live TCP Stream
Raspberry Pi Pico: Hardware integration
3D-printed robotic arm: Hardware integration
IMU sensors: Hardware integration
RHD2164 wireless: Hardware integration
Example Scripts Location¶
All example scripts can be found in the examples/ directory of the repository:
examples/
├── Read_Files/ # File loading examples
├── RHXDevice/ # Device streaming examples
├── LSL/ # Lab Streaming Layer
├── gesture_classifier/ # ML pipeline (training & prediction)
├── applications/ # GUI applications
├── 3D_printed_arm_control/ # Robotic control
├── interface/ # Hardware interfacing
├── intan_tcp/ # Low-level TCP examples
└── RHD2164_wireless/ # Wireless headstage
Contributing Examples¶
Have an interesting use case? We welcome example contributions! See the contribution guide for details on submitting new examples.