Skip to content

Commit

Permalink
fixed more bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
kbouch committed May 26, 2012
1 parent 1d101ec commit 804c1b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fitLine.py
Expand Up @@ -47,7 +47,7 @@ def vposition_of_projection_centroid(eventscatter,vnorm):
net_vprojposit[2] += vector[2] net_vprojposit[2] += vector[2]
pointcount = len(eventscatter)*1.0 pointcount = len(eventscatter)*1.0
for i in range(0,3): for i in range(0,3):
net_vprojposit[i] = (netvprojposit[i] / (pointcount * 1.0)) net_vprojposit[i] = (net_vprojposit[i] / (pointcount * 1.0))
return (net_vprojposit, list_vprojposit) return (net_vprojposit, list_vprojposit)




Expand All @@ -69,7 +69,7 @@ def normgen(theta,phi):
vnorm[0] = math.cos(theta) vnorm[0] = math.cos(theta)
vnorm[1] = math.sin(theta) vnorm[1] = math.sin(theta)
vnorm[2] = math.cos(phi) vnorm[2] = math.cos(phi)

return vnorm






Expand All @@ -89,7 +89,7 @@ def recurse_theta(eventscatter,start,wedge,phi,acc):
compare = triallist[0] compare = triallist[0]
else: else:
compare = triallist[1] compare = triallist[1]
if math.fabs((trialA - compare[0])/trailA) < acc: if math.fabs((trialA - compare[0])/trialA) < acc:
return compare[1] return compare[1]
if trialA < compare: if trialA < compare:
newstart = start newstart = start
Expand Down

0 comments on commit 804c1b7

Please sign in to comment.