suny-downstate-medical-center / netpyne

A Python package to facilitate the development, parallel simulation, optimization and analysis of multiscale biological neuronal networks in NEURON.
http://www.netpyne.org
MIT License
144 stars 135 forks source link

sim.analysis.plotratePSD() doesn't work with populations #754

Closed mariiapopova closed 1 year ago

mariiapopova commented 1 year ago

Hi! I was trying to do some network analysis with netpyne. Everything goes well, except when I try to use: sim.analysis.plotRatePSD(include=['VLA_pop']) with my VLA_pop. It gives the following error:

Plotting firing rate power spectral density (PSD) ... There was an exception in plotRatePSD(): argument of type 'NoneType' is not iterable (<class 'TypeError'>, TypeError("argument of type 'NoneType' is not iterable"), <traceback object at 0x000001BE0C8B5E88>)

I don't understand what is the problem, since when I do the same thing just specifying cell ids - it works perfectly. sim.analysis.plotRatePSD(include=[30,31,32,33,34,35,36,37,38,39],maxFreq=40);

This is the cell ids for the VLA population. Also VLA_pop itself seems to work because when I run: sim.analysis.plotRateSpectrogram(include=['VLA_pop']) everything also works.

Could you give me a hint why this might be happening? Thank you a lot in advance!

mariiapopova commented 1 year ago

It seems that in that case you have to specify popcolors explicitly.

vvbragin commented 1 year ago

Hi Mariia, thanks for pointing this out, will fix this with the next release. That's right, as a temporary workaround you can specify popColors explicitly, or just put popColors={} to use default color scheme.

mariiapopova commented 1 year ago

Thank you!