本文整理汇总了Python中ucl.physiol.neuroconstruct.project.ProjectManager.saveNetworkStructureHDF5方法的典型用法代码示例。如果您正苦于以下问题:Python ProjectManager.saveNetworkStructureHDF5方法的具体用法?Python ProjectManager.saveNetworkStructureHDF5怎么用?Python ProjectManager.saveNetworkStructureHDF5使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ucl.physiol.neuroconstruct.project.ProjectManager
的用法示例。
在下文中一共展示了ProjectManager.saveNetworkStructureHDF5方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: File
# 需要导入模块: from ucl.physiol.neuroconstruct.project import ProjectManager [as 别名]
# 或者: from ucl.physiol.neuroconstruct.project.ProjectManager import saveNetworkStructureHDF5 [as 别名]
if i != numCells - 1:
myProject.generatedNetworkConnections.addSynapticConnection("NC1", i, i + 1)
# Print details
print myProject.generatedCellPositions.details()
print myProject.generatedNetworkConnections.details()
# Save to a NetworkML file
myNetworkMLFile = File("TestPython/savedNetworks/nmlt.nml")
simConfig = myProject.simConfigInfo.getDefaultSimConfig()
pm.saveNetworkStructureXML(myProject, myNetworkMLFile, 0, 0, simConfig.getName(), "Physiological Units")
print "Network structure saved to file: " + myNetworkMLFile.getAbsolutePath()
import sys
print sys.argv
if len(sys.argv) > 1 and sys.argv[1] == "-h":
myNetworkMLH5File = File("TestPython/savedNetworks/nmlt.h5")
pm.saveNetworkStructureHDF5(myProject, myNetworkMLH5File, simConfig.getName(), "Physiological Units")
print "Network structure also saved to file: " + myNetworkMLH5File.getAbsolutePath()
System.exit(0)
示例2: sleep
# 需要导入模块: from ucl.physiol.neuroconstruct.project import ProjectManager [as 别名]
# 或者: from ucl.physiol.neuroconstruct.project.ProjectManager import saveNetworkStructureHDF5 [as 别名]
while pm.isGenerating():
print "Waiting for the project to be generated with Simulation Configuration: "+str(simConfig)
sleep(2)
print "Generated %i cells in %i cell groups" % (project.generatedCellPositions.getNumberInAllCellGroups(), project.generatedCellPositions.getNumberNonEmptyCellGroups())
print "Generated %i instances in %i network connections" % (project.generatedNetworkConnections.getNumAllSynConns(), project.generatedNetworkConnections.getNumNonEmptyNetConns())
print "Generated %i instances in %i elect inputs" % (project.generatedElecInputs.getNumberSingleInputs(), project.generatedElecInputs.getNonEmptyInputRefs().size())
'''
fileX = File( "%s/savedNetworks/Net_%s.nml"%(project.getProjectMainDirectory().getCanonicalPath(), targetNum))
print "Saving XML net to %s"%fileX.getCanonicalPath()
pm.saveNetworkStructureXML(project, fileX, 0, 0, simConfig.getName(), "Physiological Units")
'''
fileH = File( "%s/savedNetworks/Net_%s.h5"%(project.getProjectMainDirectory().getCanonicalPath(), targetNum))
print "Saving HDF5 net to %s"%fileH.getCanonicalPath()
pm.saveNetworkStructureHDF5(project, fileH, simConfig.getName(), "Physiological Units")
print "Finished running all sims, shutting down..."
stop = datetime.datetime.now()
print
print "Started: %s, finished: %s" % (start.strftime("%Y-%m-%d %H:%M"),stop.strftime("%Y-%m-%d %H:%M"))
print
sleep(5)
exit()