def stopSessionWithoutConfirmation(): #For data acquisition sessions, stop sampling and save to file if playMode == PlayMode.ACQUISITION: #Stop sampling tco.orderToStopSession() #Save session to file JSONConverter.endDataAcquisition() #Hide trial info label mainWindow.trialInfoLabel.hide() #Clears the session ts.currentSession = None #Resets the graph tg.resetTrialGraph() #Resets the play, stop, and lock buttons mainWindow.playButton.setIcon(playIcon) mainWindow.playButton.setEnabled(True) mainWindow.stopButton.setEnabled(False) mainWindow.lockButton.setEnabled(True) #Always go back to default acquisition mode when no session is pulled up setPlayMode(PlayMode.ACQUISITION)
def loadTrial(trialNumber): #Clear current trial tg.resetTrialGraph() #Set trial number, wrapping around if trial number is out bounds if trialNumber > ts.currentSession.trialCount: ts.currentSession.currentTrial = 1 elif trialNumber < 1: ts.currentSession.currentTrial = ts.currentSession.trialCount else: ts.currentSession.currentTrial = trialNumber #Display new trial tg.createTrialGraph()