From c6edcd823b8737cb2c3a88f492b6dec7a299b771 Mon Sep 17 00:00:00 2001 From: MatthewBCooke Date: Fri, 23 Aug 2019 11:58:24 -0700 Subject: [PATCH] Updated thigmo zones, added in-program update functionality --- SearchStrategyAnalysis/Pathfinder.py | 12 +++++++++--- setup.py | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/SearchStrategyAnalysis/Pathfinder.py b/SearchStrategyAnalysis/Pathfinder.py index 604ede8..81baf13 100755 --- a/SearchStrategyAnalysis/Pathfinder.py +++ b/SearchStrategyAnalysis/Pathfinder.py @@ -296,6 +296,7 @@ def buildGUI(self, root): # Called in the __init__ to build the GUI window self.menu.add_cascade(label="Help", menu=self.helpMenu) self.helpMenu.add_command(label="Help", command=self.getHelp) self.helpMenu.add_command(label="About", command=self.about) + self.helpMenu.add_command(label="Update", command=self.updatePathfinder) rowCount = 0 # ******* Software Type ******* @@ -550,6 +551,11 @@ def getHelp(self): # go to readme logging.debug("Called help") webbrowser.open('https://github.com/MatthewBCooke/Pathfinder/wiki') + def updatePathfinder(self): + subprocess.check_call([sys.executable, '-m', 'pip', 'install', '-U', + 'jsl-pathfinder']) + exit(0) + def tryQuit(self): # tries to stop threads logging.debug("trying to quit") try: @@ -999,14 +1005,14 @@ def settings(self): rowCount+=1 - innerWallCustomL = Label(self.top, text="Time in inner thigmotaxis zone [minimum, % of trial]: ", bg="white") + innerWallCustomL = Label(self.top, text="Time in full thigmotaxis zone [minimum, % of trial]: ", bg="white") innerWallCustomL.grid(row=rowCount, column=0, sticky=E) innerWallCustomE = Entry(self.top, textvariable=self.innerWallCustom) innerWallCustomE.grid(row=rowCount, column=1) rowCount+=1 - outerWallCustomL = Label(self.top, text="Time in outer thigmotaxis zone [minimum, % of trial]: ", bg="white") + outerWallCustomL = Label(self.top, text="Time in smaller thigmotaxis zone [minimum, % of trial]: ", bg="white") outerWallCustomL.grid(row=rowCount, column=0, sticky=E) outerWallCustomE = Entry(self.top, textvariable=self.outerWallCustom, bg="white") outerWallCustomE.grid(row=rowCount, column=1) @@ -2015,7 +2021,7 @@ def mainCalculate(self, goalPosVar=goalPosVar, goalDiamVar=goalDiamVar): if aExperiment.hasAnimalNames: headersToWrite.append("Animal") - headersToWrite.extend(["Trial Code", "Strategy", "IPE", "Velocity", "Distance covered", "Average distance to goal", "Average heading error", "Percent of maze traversed", "Latency", "Sccore", "Initial heading error", "Entropy", "Distance to swim path centroid", "Average distance to centre of maze", "Percent in angular corridor", "Percent in annulus zone", "Percent in outer thigmotaxis zone", "Percent in inner thigmotaxis zone", "Strategy (manual)"]) + headersToWrite.extend(["Trial Code", "Strategy", "IPE", "Velocity", "Distance covered", "Average distance to goal", "Average heading error", "Percent of maze traversed", "Latency", "Sccore", "Initial heading error", "Entropy", "Distance to swim path centroid", "Average distance to centre of maze", "Percent in angular corridor", "Percent in annulus zone", "Percent in smaller thigmotaxis zone", "Percent in full thigmotaxis zone", "Strategy (manual)"]) writer.writerow(headersToWrite) # write to the csv dayNum = 0 diff --git a/setup.py b/setup.py index 549ac4f..5b724d3 100755 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name='jsl-pathfinder', - version='1.2.0', + version='1.2.1', description='Morris Water Maze Search Strategy Analysis', url='https://github.com/MatthewBCooke/Pathfinder', author='Matthew Cooke',