本文整理汇总了Python中reader.Reader.moveto方法的典型用法代码示例。如果您正苦于以下问题:Python Reader.moveto方法的具体用法?Python Reader.moveto怎么用?Python Reader.moveto使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类reader.Reader
的用法示例。
在下文中一共展示了Reader.moveto方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: set_marks
# 需要导入模块: from reader import Reader [as 别名]
# 或者: from reader.Reader import moveto [as 别名]
def set_marks(datazip_filename,frame,mark_filename):
from reader import Reader,ZipSource
import matplotlib.pyplot as plt
reader = Reader(ZipSource(datazip_filename))
print reader
reader.moveto(frame)
bg = reader.getframe()
fig = plt.figure()
plt.imshow(bg)
xy = plt.ginput(n=0)
plt.close(fig)
t = reader.head
print xy,t
fid = open(mark_filename,'w+t')
for x,y in xy:
fid.write('%f,%f,%d\n'%(x,y,t))
del fid
print 'marks saved in ',mark_filename
示例2: gaussian_filter
# 需要导入模块: from reader import Reader [as 别名]
# 或者: from reader.Reader import moveto [as 别名]
f2 = gaussian_filter(bg,sigma=15)
f = ((f1-f2+3)*10).astype('uint8')
loc_max = rankfilter(f,'highest',20,infSup=[0,0])
r = bg.copy()
r[loc_max>0]=0
plt.figure()
plt.subplot(2,2,1)
plt.imshow(bg)
plt.subplot(2,2,2)
plt.imshow(f)
plt.colorbar()
plt.subplot(2,2,3)
plt.imshow(loc_max)
plt.subplot(2,2,4)
plt.imshow(r)
plt.show()
if __name__ == "__main__":
datazip_filename = '../test/data/seq0_extract.zip'
reader = Reader(ZipSource(datazip_filename))
params = {'N':8,'radius_halo':22,'radius_soma':12,'exp_halo':20,'exp_soma':2,'niter':10,'alpha':.75}
# plot_grid(reader.getframe(),model=Cell,params=params)
preproc_dog(reader.moveto(29))