-
Notifications
You must be signed in to change notification settings - Fork 5
/
dev_raw.py
30 lines (24 loc) 路 697 Bytes
/
dev_raw.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import time
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from tqdm import tqdm
from src.muse import MuseMonitor
from src.pylive import live_plot
if __name__ == "__main__":
headset = MuseMonitor(debug=True)
df = pd.read_csv('res/raw.csv')
atts = []
meds = []
for i in tqdm(range(len(df))):
AF7, TP9 = df.iloc[i]
headset._eeg_handler(AF7=AF7, TP9=0)
attention = headset.attention.value
meditation = headset.meditation.value
atts += [attention]
meds += [meditation]
# plt.hist(atts, bins=200)
# plt.hist(meds, bins=200, alpha=0.5)
plt.plot(atts)
plt.plot(meds)
plt.show()