# Data Subscription

After you opened a [session](https://emotiv.gitbook.io/cortex-api/session) with a headset, you can [subscribe](https://emotiv.gitbook.io/cortex-api/data-subscription/subscribe) to one or more data streams.

Each data stream gives you **real time** access to data from the headset (EEG, motion...) or data calculated by Cortex (band powers, mental command...)

After you successfully subscribe to a data stream, Cortex will keep sending you [data sample objects](https://emotiv.gitbook.io/cortex-api/data-subscription/data-sample-object).

A subscription is linked to a [session](https://emotiv.gitbook.io/cortex-api/session). All the subscriptions of a session are automatically cancelled when the session is closed. You can call [unsubscribe](https://emotiv.gitbook.io/cortex-api/data-subscription/unsubscribe) to cancel a subscription.

The available data streams depend on the [license](https://emotiv.gitbook.io/cortex-api/authentication/getlicenseinfo) of the user, and the model and [settings](https://emotiv.gitbook.io/cortex-api/headset/updateheadset) of the headset. For an EPOC Flex, it also depends on the EEG sensor mapping.

## Data streams

Each data stream is identified by its name: "eeg", "mot", "dev", "eq", "pow", "met", "com",  "fac", "sys".

| Stream | Description                                                                                                                                                                                                                                                                                          |
| ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| eeg    | The raw EEG data from the headset.                                                                                                                                                                                                                                                                   |
| mot    | The motion data from the headset.                                                                                                                                                                                                                                                                    |
| dev    | The device data from the headset. It includes the battery level, the wireless signal strength, and the contact quality of each EEG sensor.                                                                                                                                                           |
| eq     | <p>The EEG quality of each EEG sensor.</p><p>Please read this <a href="https://emotiv.gitbook.io/cortex-manual/setting_up_your_eeg_device/view_contact_quality_map/contact-quality-cq-vs.-eeg-quality-eq">page</a> to understand the difference between the contact quality and the EEG quality.</p> |
| pow    | The band power of each EEG sensor. It includes the alpha, low beta, high beta, gamma, and theta bands.                                                                                                                                                                                               |
| met    | The results of the performance metrics detection.                                                                                                                                                                                                                                                    |
| com    | The results of the mental commands detection. You must [load a profile](https://emotiv.gitbook.io/cortex-api/bci/setupprofile) to get meaningful results.                                                                                                                                            |
| fac    | The results of the facial expressions detection.                                                                                                                                                                                                                                                     |
| sys    | The system events. These events are related to the training of the mental commands and facial expressions. See [BCI](https://emotiv.gitbook.io/cortex-api/bci) for details.                                                                                                                          |

## Data streams availability

Depending on the license and the model of the headset, some streams may be available or not, and may send [data samples objects](https://emotiv.gitbook.io/cortex-api/data-subscription/data-sample-object) at a different rate.

| Stream | Supported headsets                                                                                                                                                       | Sample rate in hertz                                                                                                                                                                                                                                                                                                                            |
| ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| eeg    | All, but requires a license                                                                                                                                              | <p>128 or 256, depends on the headset and its settings.</p><p>The <a href="authentication/getlicenseinfo">license</a> must contain the scope "eeg".<br>You must activate the <a href="session">session</a> before you subscribe.</p><p>Please check the <a href="https://emotiv.gitbook.io/emotiv-home/">documentation</a> of your headset.</p> |
| mot    | All                                                                                                                                                                      | <p>Disabled, 32, 64, 128, depends on the headset and its settings.</p><p>6.4 hertz for MN8.</p><p>Please check the <a href="https://emotiv.gitbook.io/emotiv-home/">documentation</a> of your headset.</p>                                                                                                                                      |
| dev    | All                                                                                                                                                                      | 2                                                                                                                                                                                                                                                                                                                                               |
| eq     | All                                                                                                                                                                      | 2                                                                                                                                                                                                                                                                                                                                               |
| pow    | All                                                                                                                                                                      | 8                                                                                                                                                                                                                                                                                                                                               |
| met    | All (EPOC Flex requires a [special EEG sensor mapping](https://emotiv.gitbook.io/cortex-api/headset/controldevice#special-eeg-sensor-mapping-for-epoc-flex)).            | <p>2 if the license contains the scope "pm" and you activate the <a href="session">session</a> before you subscribe.<br>0.1 otherwise (1 sample every 10 seconds)</p>                                                                                                                                                                           |
| com    | All (EPOC Flex requires a [special EEG sensor mapping](https://emotiv.gitbook.io/cortex-api/headset/controldevice#special-eeg-sensor-mapping-for-epoc-flex)).            | 8                                                                                                                                                                                                                                                                                                                                               |
| fac    | All (EPOC Flex requires a [special EEG sensor mapping](https://emotiv.gitbook.io/cortex-api/headset/controldevice#special-eeg-sensor-mapping-for-epoc-flex)) except MN8. | 32                                                                                                                                                                                                                                                                                                                                              |
| sys    | All                                                                                                                                                                      | No fixed rate, see [BCI](https://emotiv.gitbook.io/cortex-api/bci) for details.                                                                                                                                                                                                                                                                 |
