tools.py 文件源码

python
阅读 31 收藏 0 点赞 0 评论 0

项目:CElegansBehaviour 作者: ChristophKirst 项目源码 文件源码
def histogram2dstd(data, std = 6, bins = 50):
  """Create histogram resolving distribution according to std"""

  ## calculate standard deviations in each direction
  stds = np.std(data[:,0:-2], axis = 0);
  means = np.mean(data[:,0:-2], axis = 0);

  rngs = [[m- std * s, m + std * s] for m,s in itertools.izip(means,stds)];  

  hist = np.histogram2d(data[:,0], data[:,1], bins = bins, range = rngs);

  return hist;
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号