g.Nautilus
- class gpype.backend.sources.g_nautilus.GNautilus[source]
Bases:
AmplifierSourceg.Nautilus EEG amplifier for real-time data acquisition.
Interface to g.tec’s g.Nautilus wireless EEG amplifier system.
- NUM_TIMELINE_CHANNELS = 1
- LINK_WARNING_S = 2.0
- LINK_ERROR_S = 60.0
- LINK_VALID_CONFIRM_S = 1.0
The flag has to stay 1 this long before a loss counts as over. At the edge of range it flickers – 18 short blips before one real loss, and valid blocks inside it – and a single valid block used to restart the clock, so a headset mostly out of range could hold the error off for ever.
- class Configuration[source]
Bases:
ConfigurationConfiguration class for g.Nautilus amplifier parameters.
- class Keys[source]
Bases:
KeysConfiguration key constants for the g.Nautilus amplifier.
- ENABLE_DI = 'enable_di'
Configuration key for enabling the digital trigger input
- ENABLE_COUNTER = 'enable_counter'
Configuration key for enabling counter channel
- NOISE_REDUCTION = 'noise_reduction'
Configuration key for noise reduction
- CAR = 'car'
Configuration key for Common Average Reference
- ACCELERATION_DATA = 'acceleration_data'
Configuration key for acceleration data
- LINK_QUALITY = 'link_quality'
Configuration key for link quality
- BATTERY_LEVEL = 'battery_level'
Configuration key for battery level
- VALIDATION_INDICATOR = 'validation_indicator'
Configuration key for validation indicator
- class OptionalKeys[source]
Bases:
OptionalKeysConfiguration keys that may legitimately be absent.
- SERIAL = 'serial'
The serial of the unit that opened, wherever one did. A process that opens no device – a server, or a replay – keeps None, which means what it meant to the author: whichever amplifier answers first.
- SENSITIVITY = 'sensitivity'
The sensitivity the device reported, wherever one opened. None where none opened – a server, a replay – means the driver’s own choice, the device’s lowest.
- EXTRA_CHANNELS = {'acceleration_data': 3, 'battery_level': 1, 'enable_di': 1, 'link_quality': 1, 'validation_indicator': 1}
- EXTRA_CHANNEL_UNITS = {'acceleration_data': ['g', 'g', 'g'], 'battery_level': ['%'], 'enable_di': [None], 'link_quality': ['%'], 'validation_indicator': [None]}
Unit of each extra’s channel(s), from the vendor header (
vendor/gds-headers/GDSClientAPI_gNautilus.hin gtec-gds-dev): acceleration is +/- 6 g, link quality and battery level are 0-100 percent, and the digital input and validation indicator are bit-encoded flags with no physical unit.
- __init__(serial=None, sampling_rate=None, channel_count=None, frame_size=None, sensitivity=None, enable_di=None, enable_counter=None, noise_reduction=None, car=None, acceleration_data=None, link_quality=None, battery_level=None, validation_indicator=None, enable_oscar=False, edge_id=None, **kwargs)[source]
Initialize g.Nautilus amplifier interface.
- Parameters:
serial (
str) – Device serial number. Uses first available if None.sampling_rate (
float) – Sampling frequency in Hz (250 or 500).channel_count (
int) – Number of EEG channels to acquire.frame_size (
int) – Samples per data frame (NumberOfScans).sensitivity (
float) – Channel sensitivity (get_supported_sensitivities()).enable_di (
bool) – Enable digital I/O channel.enable_counter (
bool) – Enable counter channel.noise_reduction (
bool) – Enable noise reduction.car (
bool) – Enable Common Average Reference.acceleration_data (
bool) – Enable accelerometer data (adds 3 channels).link_quality (
bool) – Enable link quality information channel.battery_level (
bool) – Enable battery level channel.validation_indicator (
bool) – Enable validation indicator channel.enable_oscar (
bool) – Run OSCAR artifact removal on this stream.edge_id (
Optional[str]) – Which edge runs this node, matched against the edge process’s –edge-id. None, the default, is every edge; ignored when the pipeline is not distributed.**kwargs – Additional parameters for AmplifierSource.
- Raises:
NotImplementedError – If not running on Windows.
RuntimeError – If GDS library unavailable or device init fails.
ValueError – If the sampling rate, frame size or channel count is not a whole number.
- channel_units()[source]
One ‘uV’ per EEG channel, each enabled extra’s own unit, None for the arrival stamp – see
EXTRA_CHANNEL_UNITS().
- setup(data, port_context_in)[source]
Separate the measured channels from the appended extras.
Digital input, accelerometer, link quality, battery level and validation indicator are appended after the measured channels. Marking them keeps a filter from processing them as if they were EEG, which is otherwise invisible: a filtered battery level is still a plausible-looking number.
The digital input is named as a trigger when it is the only extra enabled, because then its position is fixed whatever order the driver uses. With several enabled the order matters and is decided inside g.NEEDaccess: it cannot be derived from the channel arithmetic here, which only ever adds to a total. Guessing it would attach roles to the wrong channels, and a wrong role is not merely uninformative - it is acted on.
Link quality and the validation indicator are marked auxiliary rather than quality, even though that is what they report. Sync consumes the quality role, so naming them that way would delete channels the user switched on deliberately.
The counter is a further known gap: enabling it replaces one of the measured channels rather than appending one, and which one is not exposed here, so it stays in the measured block exactly as it has always been.
The arrival stamp is appended after every extra, and counted apart from them. It has to be: the lone-digital-input branch below turns on there being exactly one extra, and counting the stamp as a second one would silently demote a real trigger to auxiliary.
- start()[source]
Start g.Nautilus data acquisition.
Initiates hardware data streaming and activates the amplifier for real-time EEG data processing.
- Return type: