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
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 Pipeline
Real-time prediction: Realtime gesture prediction from streaming data
Control robots/hardware: Hardware Integration and Control
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 Pipeline
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 and Control
3D-printed robotic arm: Hardware Integration and Control
IMU sensors: Hardware Integration and Control
RHD2164 wireless: Hardware Integration and Control
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.