Merge branch 'master' of http://47.98.56.110:7001/lizhao/bci_algo
This commit is contained in:
@@ -19,7 +19,7 @@ PKT_INTERVAL = N_SAMPLES_PER_PKT / FS
|
||||
|
||||
def build_packet(global_sample_idx):
|
||||
"""
|
||||
生成一包 [5, 66] 的 float32 数据
|
||||
生成一包 [5, 66] 的 float64 数据
|
||||
:param global_sample_idx: 当前包第一个采样点在全局序列中的索引 (从 0 开始)
|
||||
:return: np.ndarray shape [5, 66]
|
||||
"""
|
||||
@@ -32,13 +32,13 @@ def build_packet(global_sample_idx):
|
||||
eeg = np.tile(eeg, (1, 64)) # [5, 64]
|
||||
|
||||
# Ch64: 标签值通道,初始化为 0
|
||||
event = np.zeros((N_SAMPLES_PER_PKT, 1), dtype=np.float32)
|
||||
event = np.zeros((N_SAMPLES_PER_PKT, 1), dtype=np.float64)
|
||||
|
||||
# Ch65: 标签序号通道,初始化为 0
|
||||
label_idx = np.zeros((N_SAMPLES_PER_PKT, 1), dtype=np.float32)
|
||||
label_idx = np.zeros((N_SAMPLES_PER_PKT, 1), dtype=np.float64)
|
||||
|
||||
# 拼成 [5, 66]
|
||||
packet = np.concatenate([eeg, event, label_idx], axis=1).astype(np.float32)
|
||||
packet = np.concatenate([eeg, event, label_idx], axis=1).astype(np.float64)
|
||||
return packet
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user