Skip to content

Commit 2373fff

Browse files
author
facu.r
committed
add method to get pop sizes
1 parent 9fa73fb commit 2373fff

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

netpyne_ui/netpyne_geppetto.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,18 @@ def getMechParams(self, mechanism):
404404
def getAvailablePlots(self):
405405
plots = ["plotRaster", "plotSpikeHist", "plotSpikeStats","plotRatePSD", "plotTraces", "plotLFP", "plotShape", "plot2Dnet", "plotConn", "granger"]
406406
return [plot for plot in plots if plot not in simConfig.analysis.keys()]
407-
407+
408+
def getGIDs(self):
409+
# pop sizes and gids returned in a dict
410+
out = {}
411+
for key in netParams.popParams.keys():
412+
if 'numCells' in netParams.popParams[key]:
413+
out[key] = netParams.popParams[key]['numCells']
414+
else:
415+
out[key] = 0
416+
out['gids'] = int(np.sum([v for k, v in out.items()]))
417+
return out
418+
408419
def deleteParam(self, paramToDel):
409420
logging.debug("Checking if netParams."+paramToDel+" is not null")
410421
if eval("netParams."+paramToDel) is not None:

0 commit comments

Comments
 (0)