task = 'stimuli' run = '1' nepochs = 28 nobs = 1126 #HFB_tot_face = np.empty(shape =( nepochs, 0, nobs)) #HFB_tot_place = np.empty(shape =( nepochs, 0, nobs)) HFB_tot_pref = np.empty(shape=(nepochs, 0, nobs)) # need to define time before HFB_tot_npref = np.empty(shape=(nepochs, 0, nobs)) sub_id = [ 'AnRa', 'AnRi', 'ArLa', 'BeFe', 'DiAs', 'FaWa', 'JuRo', 'NeLa', 'SoGi' ] path_visual = cf_load.visual_path() df_visual = pd.read_csv(path_visual) for sub in sub_id: subject = cf_load.Subject(name=sub, task=task, run=run) fpath = subject.fpath(proc=preproc, suffix='lnrmv') raw = subject.import_data(fpath) face_chan = list(df_visual['chan_name'].loc[ df_visual['subject_id'] == sub].loc[df_visual['category'] == 'Face']) place_chan = list(df_visual['chan_name'].loc[ df_visual['subject_id'] == sub].loc[df_visual['category'] == 'Place']) bands = HFB_process.freq_bands() # Select Bands of interests HFB_db = HFB_process.extract_HFB_db(raw, bands) HFB_db = HFB_db.drop_channels(ch_names='TRIG')
import pandas as pd %matplotlib plt.rcParams.update({'font.size': 17}) preproc = 'preproc' suffix2save = 'HFB_visual' ext2save = '.mat' cf_subjects = ['AnRa', 'AnRi', 'ArLa', 'BeFe', 'DiAs', 'FaWa', 'JuRo', 'NeLa', 'SoGi'] tasks = ['stimuli', 'rest_baseline'] runs = ['1','2'] path_visual = cf_load.visual_path() # pick visual channels for all subjects df_visual = pd.read_csv(path_visual) for sub in cf_subjects: for task in tasks: for run in runs: #%% Import data subject = cf_load.Subject(name=sub, task= task, run = run) fpath = subject.fpath(preproc = preproc, suffix='lnrmv') raw = subject.import_data(fpath) # %% Extract HFB and save bands = HFB_test.freq_bands() # Select Bands of interests HFB = HFB_test.extract_HFB(raw, bands)