本文整理汇总了Python中neurokernel.pattern.Pattern.interface[lam_sel_in]方法的典型用法代码示例。如果您正苦于以下问题:Python Pattern.interface[lam_sel_in]方法的具体用法?Python Pattern.interface[lam_sel_in]怎么用?Python Pattern.interface[lam_sel_in]使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类neurokernel.pattern.Pattern
的用法示例。
在下文中一共展示了Pattern.interface[lam_sel_in]方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: connect_retina_lamina
# 需要导入模块: from neurokernel.pattern import Pattern [as 别名]
# 或者: from neurokernel.pattern.Pattern import interface[lam_sel_in] [as 别名]
def connect_retina_lamina(self, manager, ret_lpu, lam_lpu):
#.values or .tolist()
print('Initializing selectors')
# some workarounds
ret_sel = ','.join(['/retout/'+ str(sel[-1]) for sel in ret_lpu.interface.index.tolist()])
lam_sel = ','.join(['/' + str(sel[0]) + '/' + str(sel[1]) for sel in lam_lpu.interface.index.tolist()])
print('Initializing pattern with selectors')
pat = Pattern(ret_sel, lam_sel)
ret_sel = ','.join(['/retout/'+ str(sel[-1]) for sel in ret_lpu.interface.index.tolist()])
lam_sel_in = ','.join(['/retin/' + str(sel[-1]) for sel in lam_lpu.interface.index.tolist() if sel[0] == 'retin'])
lam_sel_out = ','.join(['/lamout/' + str(sel[-1]) for sel in lam_lpu.interface.index.tolist() if not sel[0] == 'retin'])
print('Setting selector attributes in pattern')
pat.interface[ret_sel] = [0, 'in', 'gpot']
pat.interface[lam_sel_in] = [1, 'out', 'gpot']
pat.interface[lam_sel_out] = [1, 'in', 'gpot']
for sel in lam_sel_in.split(','):
pat[sel.replace('in', 'out'), sel] = 1
print('Connecting LPUs with the pattern')
manager.connect(ret_lpu, lam_lpu, pat, 0, 1)