コード例 #1
0
IU.draw_circles_along_vec(fig1,r1,[512,512],[1024,1024])
IU.draw_circles_along_vec(fig1,r2,[512,512],[1024,1024])

##########################################################################
#Extract peaks
##########################################################################
#sort the peaks by strength and recenter some of them
#thevecs1 = fill_space_with_basis2D(autoc,r1,r2,PY.array([512,512]))
thevecs1 = VF.fill_space_with_basis2D_2(autoc,r1,r2,np.array([512,512]))
#fig1 = imshow_z(filt2s,vmin=0,vmax=250)
#IU.draw_circles_at_vec(fig1,thevecs1)

#slightly shift the centroids and collec the intensities
cents,sums = IU.DiffPeakSums(filt2s,thevecs1)
fig1 = imshow_z(filt2s,vmin=0,vmax=250)
IU.draw_circles_at_vec(fig1,thevecs1,color='w')
IU.draw_circles_at_vec(fig1,cents,size=22,color='r')

#scale vectors to produce data to compare to simulations
camera_length_f = 0.002
nullrad = 0.15
Fvalskspace = np.zeros((np.shape(thevecs1)[0],3))
Fvalskspace[:,0] = (thevecs1[:,0] - 512)*(camera_length_f)
Fvalskspace[:,1] = (thevecs1[:,1] - 512)*(camera_length_f)
rads = np.sqrt(Fvalskspace[:,0]*Fvalskspace[:,0] + Fvalskspace[:,1]*Fvalskspace[:,1])
Fvalskspace[:,2] = sums
Fvalskspace = Fvalskspace[rads>nullrad,:] 

#PLT.close("all")

#############################################################################