You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#we assume that the radius is constant over the range of the slanted baseline, for small angles this is probably accurate, but for larger angles this can result in a significant error.
if (edgeleft-erffitsize)>=0and (edgeleft-erffitsize)<=len(imagerow):
54
-
fitparts=np.array(imagerow[range(np.int(edgeleft)-erffitsize,np.int(edgeleft)+erffitsize)]) #take out part of the image around the edge to fit the error function
54
+
fitparts=np.array(imagerow[range(int(edgeleft)-erffitsize,int(edgeleft)+erffitsize)]) #take out part of the image around the edge to fit the error function
55
55
guess=(max(fitparts)-min(fitparts))/2,-.22,0,min(fitparts) #initial guess for error function
56
56
lstsqrsol=least_squares(errorfunction,guess,args=(np.array(range(-erffitsize,erffitsize)),fitparts)) #least sqaures fit
57
57
leftsubpxcorr=-lstsqrsol.x[2]/lstsqrsol.x[1] #add the subpixel correction
58
58
else:
59
59
leftsubpxcorr=0
60
60
if (edgeright-erffitsize)>=0and (edgeright+erffitsize)<len(imagerow):
0 commit comments