Episode 2: g.Nautilus

Discover how to record wireless EEG data from g.Nautilus. This episode covers device setup, connection handling, and real-time data acquisition.

Note

This page is still under development. Until we have the step-by-step instructions ready, please refer to the code example below.

File example_devices_gnautilus.pyView file on GitHub

  1"""
  2g.Nautilus Device Example - Real-time EEG Acquisition and Processing
  3
  4This example demonstrates how to connect to and process real-time EEG data from
  5a g.Nautilus amplifier system. It showcases EEG signal
  6processing with standard filtering techniques commonly used in clinical and
  7research BCI applications.
  8
  9This example demonstrates how to connect to and process real-time EEG data from
 10a g.Nautilus amplifier system. It showcases EEG signal processing with
 11standard filtering techniques commonly used in clinical and research BCI
 12applications.
 13
 14What this example shows:
 15- Real-time data acquisition from g.Nautilus hardware
 16- Bandpass filtering for EEG frequency band selection
 17- Power line interference removal with dual notch filters
 18- Real-time visualization of clean EEG signals
 19- Hardware integration with g.Pype framework
 20
 21Hardware requirements:
 22- g.Nautilus EEG amplifier system
 23
 24Expected behavior:
 25When you run this example:
 26- Connects to g.Nautilus amplifier automatically
 27- Displays real-time EEG from 8 channels
 28- Shows clean, filtered signals suitable for analysis
 29- Amplitude range: ±50 µV (typical EEG range)
 30- Time window: 10 seconds of continuous data
 31- Real-time updates at amplifier sampling rate
 32
 33Signal processing pipeline:
 341. Raw EEG acquisition (8 channels, 250 Hz)
 352. Bandpass filtering (1-30 Hz) - standard EEG band
 363. 50 Hz notch filter - removes European power line noise
 374. 60 Hz notch filter - removes American power line noise
 385. Real-time visualization
 39
 40Real-world applications:
 41- Clinical EEG monitoring and diagnosis
 42- BCI system development and testing
 43- Neurofeedback training applications
 44- Cognitive state monitoring research
 45- Sleep study and analysis
 46- Seizure detection systems
 47- Attention and meditation training
 48
 49Usage:
 50    1. Mount g.Nautilus cap/electrodes
 51    2. Power on g.Nautilus
 52    4. Run: python example_devices_gnautilus.py
 53    5. Monitor real-time EEG signals
 54
 55Note:
 56    This example provides the foundation for all BCI applications
 57    requiring real-time EEG data acquisition and processing.
 58"""
 59import gpype as gp
 60
 61# Sampling rate (hardware-dependent, typically 250 Hz for g.Nautilus)
 62fs = 250
 63
 64if __name__ == "__main__":
 65
 66    # Initialize main application for GUI and device management
 67    app = gp.MainApp()
 68
 69    # Create real-time processing pipeline for EEG data
 70    p = gp.Pipeline()
 71
 72    # === HARDWARE DATA SOURCE ===
 73    # g.Nautilus: Professional wireless multi-channel EEG amplifier
 74    # Automatically detects and connects to paired wireless device
 75    # Provides high-quality, low-noise wireless EEG signals at 250 Hz
 76    source = gp.GNautilus(sampling_rate=fs, channel_count=8)  # 8 EEG channels
 77
 78    # === SIGNAL CONDITIONING STAGE ===
 79    # Bandpass filter: Extract standard EEG frequency range
 80    # 1-30 Hz preserves all major brain rhythms while removing:
 81    # - DC drift and movement artifacts (<1 Hz)
 82    # - EMG muscle artifacts and high-frequency noise (>30 Hz)
 83    bandpass = gp.Bandpass(
 84        f_lo=1, f_hi=30  # High-pass: remove DC and slow drift
 85    )  # Low-pass: remove muscle artifacts
 86
 87    # === POWER LINE INTERFERENCE REMOVAL ===
 88    # Notch filter for 50 Hz power line noise (European standard)
 89    # 48-52 Hz range accounts for slight frequency variations
 90    notch50 = gp.Bandstop(
 91        f_lo=48, f_hi=52  # Lower bound of 50 Hz notch
 92    )  # Upper bound of 50 Hz notch
 93
 94    # Notch filter for 60 Hz power line noise (American standard)
 95    # 58-62 Hz range accounts for slight frequency variations
 96    # Both filters ensure compatibility with different power systems
 97    notch60 = gp.Bandstop(
 98        f_lo=58, f_hi=62  # Lower bound of 60 Hz notch
 99    )  # Upper bound of 60 Hz notch
100
101    # === REAL-TIME VISUALIZATION ===
102    # Professional EEG scope with clinical amplitude scaling
103    # 50 µV range covers typical EEG signal amplitudes
104    # 10-second window provides good temporal context
105    scope = gp.TimeSeriesScope(
106        amplitude_limit=50, time_window=10  # ±50 µV range
107    )  # 10-second display
108
109    # === PIPELINE CONNECTIONS ===
110    # Create signal processing chain: Hardware → Filtering → Visualization
111    # Order matters: bandpass first, then notch filters, finally display
112
113    # Connect hardware source to initial bandpass filter
114    p.connect(source, bandpass)
115
116    # Connect bandpass output to first notch filter (50 Hz)
117    p.connect(bandpass, notch50)
118
119    # Connect first notch to second notch filter (60 Hz)
120    p.connect(notch50, notch60)
121
122    # Connect final filtered signal to visualization scope
123    p.connect(notch60, scope)
124
125    # === APPLICATION SETUP ===
126    # Add visualization widget to main application window
127    app.add_widget(scope)
128
129    # === EXECUTION ===
130    # Start real-time data acquisition and processing
131    p.start()  # Initialize hardware and begin data flow
132    app.run()  # Start GUI event loop (blocks until window closes)
133    p.stop()  # Clean shutdown: stop hardware and close connections