Brain_Emotion_Decoder / Src /Processing.py
Ihssane123's picture
Initial commit
3b6d764
raw
history blame contribute delete
378 Bytes
import numpy as np
emotion_list = ["0", "1", "2", "3", "4", "5", "6"]
def load_data(psd_file_pth):
np_data = np.load(psd_file_pth, allow_pickle=True).item()["psd"]
return np_data
def process_data(np_data):
#Swap axes
swapped_data = np.swapaxes(np_data, 0, 1)
## reshape data
reshape_data = swapped_data.reshape(630, 320)
return reshape_data