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

[New feature] Extending the 'preConds' and 'postConds' parameters in netParams.connParams to accept string-based functions #690

Open joaovvitor opened 2 years ago

joaovvitor commented 2 years ago

Please describe the new feature you'd like to see.

Extending the 'preConds' and 'postConds' parameters in netParams.connParams to accept string-based functions

Is your feature request related to a problem? Please describe.

I'm improving the topological connectivity in the thalamus model and I would like to be able to specify the 'convergence'/'divergence' as a parameter for connectivity. Before, to implement the topological connectivity, I added the 2D/3D positions as string-based functions in the 'probability' field. That allows me to define connections between the positions of the cells, but I lose control over how many post synaptic cells I connect to, and had to adjust that manually.

Describe the solution you'd like

Now, if we extend the 'preConds' and 'postConds' fields to accept string-based functions, I should then be able to use the x,y,z distances and still define 'convergence'/'divergence' between the cell populations.

Describe alternatives you've considered

I tried creating many populations to connect based on the population position, but still, I need the connectivity to be based on the distance between the cells from the pre and post populations (e.g. if dist_x<200 and dist_z<100)

Additional context

This fix was suggested by Salva, but any other alternative that allows me to have a rule to connect two cells based on their positions should already solve my problem.

Example of the previous topological connectivity I had, but in this case I could not fix the value of how many cells the 'pre' would connect to in 'post'.

exploreParameters_t_allpops_cell_0026_numOfStims_2_plot_2Dnet