Open pgleeson opened 11 years ago
@russelljjarvis will have a look at this.
Some suggestions for tool support after this is completed:
Hi Padraig,
So to test out what my changes do. I should down load neural connectivity data from the neocortical micro circuit. https://bbp.epfl.ch/nmc-portal/downloads
I noticed in the portal a link to: https://github.com/OpenSourceBrain/BlueBrainProjectShowcase/blob/master/NMC/NeuroML2/README.md
I will play around with your code in OSB, in order to try to get orientated.
Sounds good @russelljjarvis. I hadn't realised they had added the json files there with the connectivity/synaptic properties.
@russelljjarvis While the BBP cells/connectivity is useful to aim at, the files involved will be quite large and it will be difficult to visually check correct export. 2 more modest multicompartmental connected network examples are at:
https://github.com/NeuroML/NeuroML2/blob/master/examples/NML2_MultiCompCellNetwork.nml
With these, especially the first, you should be able to see where the synapses are be located on the cells and make sure the cell centred net version is the same as the connection centred version.
You can see connection lines with pyNeuroML:
pynml-povray NML2_MultiCompCellNetwork.nml -scalez 15 -conns -conn_points
povray NML2_MultiCompCellNetwork.pov
pynml-povray MediumNet.net.nml -scalez 7 -conns -conn_points
povray MediumNet.net.pov
Okay I had to do a few python3 related fixes as python3 does not support: .has_key
So for example I replaced:
if pop_id_vs_cell.has_key(projection.presynaptic_population):
with:
if projection.presynaptic_population in pop_id_vs_cell.keys():
However after I have made these substitutions. Povray loads briefly flashes the connectivity geometry on the screen, and then quits. I am currently reading about where to retrieve the saved image from, or alternatively a command that keeps povray open instead of quiting.
Okay I just read that the flag +F
achieves this
for example povray +F NML2_MultiCompCellNetwork.pov
However I think either I broke the code, or I need to find a way to make povray zoom out such that it has a view of the more of the multicompartment network geometry.
@russelljjarvis thanks for the suggestion re python 3. I've made these changes and added a test for pynml-povray, see commit above.
Re changing the image, try:
pynml-povray -h
for a list of options. -scalez 5 will pull the camera back 5x from the bounding box around the cell in the z direction. There is also -viewx etc. to move the point the camera looks at. I generally use -movie, and this produces a set of images which orbit around the cell/network, though you'll generally have to pull back from it first with -scalez. Also, I usually generate the image file(s) with povray and look at them afterwards in an external image preview program.
Hi Padriag, This is great, I git cloned the repository into the Dockerfile I am working with, and your python3 fixes are working well now.
I didn't realize that you could run povray on the .pov file in order to generate .png files.
povray Antialias=On Antialias_Depth=10 Antialias_Threshold=0.1 +W1200 +H900 -movie NML2_MultiCompCellNetwork.nml.pov
As opposed to just an instance based network description:
specification of the synapses at cell level should also be supported:
This will allow greater portability of the (cell & its synapses) and will allow neuronal reconstruction applications to export cell descriptions together with synapse locations (without requiring another post/pre cell).