Skip to content

Commit

Permalink
Updated thigmo zones, added in-program update functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewBCooke committed Aug 23, 2019
1 parent a72d3f6 commit c6edcd8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions SearchStrategyAnalysis/Pathfinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 *******
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit c6edcd8

Please sign in to comment.