from lmtanalysis.FileUtil import getFilesToProcess from lmtanalysis.Animal import AnimalPool from lmtanalysis.Measure import * from lmtanalysis.Event import EventTimeLine if __name__ == '__main__': #ask the user for database to process files = getFilesToProcess() for file in files: # connect to database connection = sqlite3.connect(file) # create an animalPool, which basically contains your animals animalPool = AnimalPool() # load infos about the animals animalPool.loadAnimals(connection) # load all detection (positions) of all animals for the first hour animalPool.loadDetection(start=0, end=oneHour) eventTimeLine = EventTimeLine(connection, "Oral-genital Contact", minFrame=0, maxFrame=oneHour) eventTimeLine.plotTimeLine()
quit() ''' eventTimeLineList = [] naiveMoveTimeLine = EventTimeLine(connection, "Stop", idA=1, minFrame=minT, maxFrame=maxT, inverseEvent=True) print("MOVE") print("Naive move Total time: ", str(naiveMoveTimeLine.getTotalLength())) naiveMoveTimeLine.plotTimeLine() detectionMoveTimeLine = EventTimeLine(connection, "Detection", idA=1, minFrame=minT, maxFrame=maxT) eventTimeLineList.append(detectionMoveTimeLine) eventTimeLineList.append(naiveMoveTimeLine) eventTimeLine = EventTimeLine(connection, "Move", idA=1, minFrame=minT, maxFrame=maxT)