Fixed some smaller things

This commit is contained in:
2021-03-28 04:46:37 +02:00
parent 3b837869fe
commit c86d46f447
13 changed files with 80 additions and 26 deletions

View File

@@ -91,11 +91,16 @@ def create_peak_difference_feature(df, max_subj=40):
return peak_diff_df
def analyze_erp(channels):
def analyze_erp(channels, precompute=True):
"""
Execute several statistical tests for different hypothesis, to analyze ERPs
:param channels: The channels for which the tests are executed
:param precompute: If true, the peak-difference data will be computed. Else it will be loaded from a precomputed file,
if it exists. This should only be set 'False' if the method was already executed once!
"""
if precompute:
precompute_erp_df('N170')
for c in channels:
print("CHANNEL: " + c)
erp_df = pd.read_csv('cached_data/erp_peaks/erp_peaks_' + c + '.csv', index_col=0)
@@ -130,5 +135,4 @@ def analyze_erp(channels):
if __name__ == '__main__':
mne.set_log_level(verbose=VERBOSE_LEVEL)
precompute_erp_df('N170')
analyze_erp(['P7', 'PO7', 'P8', 'PO8'])
analyze_erp(['P7', 'PO7', 'P8', 'PO8'], True)