plotRatePSD

A Python package that facilitates development and use of models of biological neural networks

Moderator: tom_morse

Post Reply
atknox
Posts: 5
Joined: Wed Aug 26, 2015 2:07 pm

plotRatePSD

Post by atknox » Tue Dec 05, 2017 11:39 am

Hi,

I'm having some trouble getting plotRatePSD to work. I create a network with the following populations:

netParams.popParams['PY'] = {'cellType': 'sPY','gridSpacing': netParams.sizeX / numcorticalcells, 'zRange':[0.95,1.0], 'yRange':[0.95,1.0], 'cellModel':'HH'}
netParams.popParams['IN'] = {'cellType': 'sIN','gridSpacing': netParams.sizeX / numcorticalcells, 'zRange':[0.95,1.0],'yRange':[49.95,50.0], 'cellModel':'HH'}
netParams.popParams['RE'] = {'cellType': 'sRE','gridSpacing': netParams.sizeX / numthalamiccells, 'zRange':[0.95,1.0],'yRange':[99.95,100.0], 'cellModel':'HH'}
netParams.popParams['TC'] = {'cellType': 'sTC','gridSpacing': netParams.sizeX / numthalamiccells, 'zRange':[0.95,1.0],'yRange':[149.95,150.0], 'cellModel':'HH'}

Then there's some code to finish setting up the network which I've omitted. I try to make spectral density plot of firing rates with the following line:

simConfig.analysis['plotRatePSD'] = {'include':['PY']}

When I call sim.analyze(), I get the following error:

Plotting firing rate power spectral density (PSD) ...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "absence.py", line 134, in <module>
sim.analyze()
File "C:\ProgramData\Anaconda2\lib\site-packages\netpyne\wrappers.py", line 52, in analyze
sim.analysis.plotData() # gather spiking data and cell info from each node
File "C:\ProgramData\Anaconda2\lib\site-packages\netpyne\analysis.py", line 43, in plotData
out = func(**kwargs) # call function with user arguments
File "C:\ProgramData\Anaconda2\lib\site-packages\netpyne\analysis.py", line 1207, in plotRatePSD
color = popColors[subset] if subset in popColors else colorList[iplot%len(colorList)]
TypeError: argument of type 'NoneType' is not iterable

Do I have the right idea about how to set up the plotRatePSD call? Is a providing a color dictionary in the call manditory? Or is there something else going on here?

Also, if you would like the complete python file, let me know.

Thanks,
Andrew

salvadord
Posts: 69
Joined: Tue Aug 18, 2015 3:49 pm

Re: plotRatePSD

Post by salvadord » Wed Dec 06, 2017 3:19 pm

Andrew,

The issue was due to a bug introduced in a recent change to plotRatePSD(). I have fixed it and pushed to the 'development' github branch of netpyne. It will be released in next version. You can use it now by cloning this github branch. Alternatively, you can just pass a dict with the color for that pop, eg:

Code: Select all

simConfig.analysis['plotRatePSD'] = {'include':['PY'], 'popColors': {'PY': 'red'}

Post Reply