import numpy as np import AnalysisToolForSingleSet as AT if __name__ == "__main__": # should have more varriable REMEMBER: DON'T CHANGE THIS CODE FIRST, CHANGE THE CODE FOR CONVERTING DATA FROM SRT TO SVN FIRST IF YOU DECIDE TO COMBINING CATEGORIES Start = 0 End = 9000 inpath = "Input/" nameFiles = np.loadtxt("NameFile.txt", dtype='S') print nameFiles title = ["Dyad", "Cov", "Time", "Gaze", "Talking Hawking", "Talking Shake"] ori1 = AT.getOverallResult(inpath, Start, End, nameFiles, False) name = "Output/OverallData_EndTime_5min.csv" AT.printResult(ori1, title, name) ori1 = AT.getOverallResult(inpath, Start, End, nameFiles, True) name = "Output/OverallData_EndTime_Actual.csv" AT.printResult(ori1, title, name)
] SpeakType = [ "NoSpeak_", "Typing_", "Speaking_", "SSS_", "Hovering_", "Sound_", "NoSound_" ] Person = ["H_", "S_"] Character = ["Mean", "Median", "PopularSD", "Frequency", "Max", "Min"] inpath = "Input/" nameFiles = np.loadtxt("NameFile.txt", dtype='S') print nameFiles title1 = ["Dyad", "Cov"] nameOutput1 = "Output/DiscriptiveData_5mins.csv" title1 = getTitle(title1, GazeType, SpeakType, Person, Character) ori1 = AT.getDiscriptiveData(inpath, Start, End, nameFiles, False) AT.printResult(ori1, title1, nameOutput1) title2 = ["Dyad", "Cov", "StartFrame"] nameOutput2 = "Output/DiscriptiveData_100secs.csv" title2 = getTitle(title2, GazeType, SpeakType, Person, Character) ori2 = AT.getDiscriptiveDataWithWidth(inpath, Start, End, nameFiles, False, 3000) AT.printResult(ori2, title2, nameOutput2) title3 = ["Dyad", "Cov", "StartFrame"] nameOutput3 = "Output/DiscriptiveData_60secs.csv" title3 = getTitle(title3, GazeType, SpeakType, Person, Character) ori3 = AT.getDiscriptiveDataWithWidth(inpath, Start, End, nameFiles, False, 1800) AT.printResult(ori3, title3, nameOutput3)
inpath = "Input/" nameFiles = np.loadtxt("NameFile.txt", dtype='S') title = [ "Dyad", "Cov", "SectionStartTime", "TalkID", "Start", "End", "Duration", "TalkType" ] TalkType = (1, 2, 3, 4, 5) Person = "H" PersonTile = "S_" nameOutput1 = "Output/CombinedOneLayer/Talk/DiscriptiveData_5talks_H_5mins.csv" title1 = getTitle(title, GazeType, SpeakType, PersonTile, Character) ori1 = AMS.getDiscriptiveTalkWithWidth(inpath, Start, End, nameFiles, False, 9000, TalkType, Person) ATS.printResult(ori1, title1, nameOutput1) nameOutput2 = "Output/CombinedOneLayer/Talk/DiscriptiveData_5talks_H_100sec.csv" title2 = getTitle(title, GazeType, SpeakType, PersonTile, Character) ori2 = AMS.getDiscriptiveTalkWithWidth(inpath, Start, End, nameFiles, False, 3000, TalkType, Person) ATS.printResult(ori2, title2, nameOutput2) Person = "S" PersonTile = "H_" nameOutput3 = "Output/CombinedOneLayer/Talk/DiscriptiveData_S_5mins.csv" title3 = getTitle(title, GazeType, SpeakType, PersonTile, Character) ori3 = AMS.getDiscriptiveTalkWithWidth(inpath, Start, End, nameFiles, False, 9000, TalkType, Person) ATS.printResult(ori3, title3, nameOutput3)
End = 9000 SpeakType = ["NoSound_", "Sound_"] GazeType = [ "Around_", "Monitor_", "Keyboard_", "Face_", "NoFace_", "CompOnly_", "BodyOnly_" ] Character = ["Mean", "Median", "PopularSD", "Frequency", "Max", "Min"] inpath = "Input/" nameFiles = np.loadtxt("NameFile.txt", dtype='S') GoT = 0 nameOutput1 = "Output/CombinedTwoLayer/DiscriptiveData_Gaze_Sound_5mins.csv" title1 = getTitle(GoT, GazeType, SpeakType, Character) ori1 = AMS.getDiscriptiveTwoTalkWithWidth(inpath, Start, End, nameFiles, False, 9000, GoT) ATS.printResult(ori1, title1, nameOutput1) nameOutput2 = "Output/CombinedTwoLayer/DiscriptiveData_Gaze_Sound_100secs.csv" title2 = getTitle(GoT, GazeType, SpeakType, Character) ori2 = AMS.getDiscriptiveTwoTalkWithWidth(inpath, Start, End, nameFiles, False, 3000, GoT) ATS.printResult(ori2, title2, nameOutput2) GoT = 1 nameOutput3 = "Output/CombinedTwoLayer/DiscriptiveData_Sound_Gaze_5mins.csv" title3 = getTitle(GoT, GazeType, SpeakType, Character) ori3 = AMS.getDiscriptiveTwoTalkWithWidth(inpath, Start, End, nameFiles, False, 9000, GoT) ATS.printResult(ori3, title3, nameOutput3) nameOutput4 = "Output/CombinedTwoLayer/DiscriptiveData_Sound_Gaze_100secs.csv"