Skip to content

Commit

Permalink
Merge pull request #15 from benlansdell/master
Browse files Browse the repository at this point in the history
Include source file name in table output
  • Loading branch information
MatthewBCooke authored Apr 13, 2023
2 parents e3433af + 77f5c77 commit 847eb72
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions SearchStrategyAnalysis/Pathfinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -2274,7 +2274,7 @@ def mainCalculate(self, goalPosVar=goalPosVar, goalDiamVar=goalDiamVar):
except:
pass
headersToWrite.extend(
["Trial Code", "Strategy", "IPE", "Velocity", "Distance covered", "Average distance to goal",
["Trial name", "Trial Code", "Strategy", "IPE", "Velocity", "Distance covered", "Average distance to goal",
"Average heading error", "Percent of maze traversed", "Latency", "Score", "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",
Expand Down Expand Up @@ -2444,12 +2444,14 @@ def mainCalculate(self, goalPosVar=goalPosVar, goalDiamVar=goalDiamVar):

dataToWrite = []


dataToWrite.append(trialNum[animal])
if aExperiment.hasTrialNames:
#if aExperiment.hasTrialNames:
if hasattr(aTrial, 'name'):
dataToWrite.append(aTrial.name)
if aExperiment.hasAnimalNames:
elif aExperiment.hasAnimalNames:
dataToWrite.append(aTrial.animal)
else:
dataToWrite.append('')

dataToWrite.extend(
[(str(animal) + " " + str(dayNum) + " " + str(trialNum[animal])), strategyType, round(ipe, 2),
Expand Down

0 comments on commit 847eb72

Please sign in to comment.