-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
48 lines (33 loc) · 1.38 KB
/
main.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import os
import analysisIC
import aggAnalyze
import aggStats
import aggPlot
import aggExport
import warnings
import time
warnings.filterwarnings("ignore")
# Input the address to the location of IC .zip files
# Please make sure the IC archives are the only .zip files in that folder
myDir = ''
zipNames = [x for x in os.listdir(myDir) if x.endswith(".zip")]
if __name__ == '__main__':
nameLists = [None] * len(zipNames)
filePhases = nameLists.copy()
visDurs = nameLists.copy()
visNums = nameLists.copy()
print('Analyzing files:\n')
for zipind, zipname in enumerate(zipNames):
print(zipname + '\n')
nameLists[zipind], filePhases[zipind], visDurs[zipind], visNums[zipind] = analysisIC.analyze(zipname, myDir)
print('Aggregating files\n')
aggNum, phaseDict = aggAnalyze.aggregate(visNums, filePhases, nameLists)
aggDur, _ = aggAnalyze.aggregate(visDurs, filePhases, nameLists)
print('Running statistical tests\n')
corrDict, meanCorrs, compDict, anovas, posthocs, halfs, anova_pars = aggStats.getstats(aggDur, aggNum)
print('Creating Graphs\n')
aggPlot.visualize(aggDur, aggNum, meanCorrs, posthocs, halfs, anova_pars)
print('Exporting results to Excel\n')
aggExport.export(aggDur, aggNum, compDict, anovas, posthocs, halfs, anova_pars)
print('Finished!\n\nExiting...')
time.sleep(3)