Search found 28 matches

by JustasB
Sat Dec 07, 2019 8:07 pm
Forum: Hot tips
Topic: Extracellular stimulation and recording
Replies: 7
Views: 101145

Re: Extracellular stimulation and recording

For those looking for a Python-based, MPI/parallel NEURON compatible version LFPsim described in Parasuram et. al. (2016), take a look at LFPsimpy.
by JustasB
Sat Dec 07, 2019 8:01 pm
Forum: Modeling networks
Topic: Local Field Potentials
Replies: 4
Views: 16300

Re: Local Field Potentials

For those searching for a way to compute LFPs in their models, the LFPsimpy package allows inserting an "LFP electrode".

LFPsimpy is a Python re-implementation of LFPsim described in Parasuram et. al. (2016) .
by JustasB
Sat Dec 07, 2019 7:54 pm
Forum: LFPsim
Topic: Python+MPI version now available
Replies: 0
Views: 58489

Python+MPI version now available

For those interested in LFPsim, there is a pip-installable, MPI-compatible, pure-Python version of LFPsim.

Take a look at LFPsimpy

Example usage:

Code: Select all

build_your_model()

from LFPsimpy import LfpElectrode
le = LfpElectrode(x,y,z)

h.run()

plt.plot(le.times, le.values)
plt.show()
by JustasB
Fri Sep 13, 2019 11:09 pm
Forum: Parallel NEURON
Topic: Minimal Working Example of MPI Gap Junctions (in python)
Replies: 17
Views: 37997

Re: Minimal Working Example of MPI Gap Junctions (in python)

In case others are having a similar problem, I was receiving Segmentation Fault errors under MPI with gap junctions when I had h.cvode.cache_efficient(1). Under h.cvode.cache_efficient(0), the simulation ran without the error.
by JustasB
Thu Sep 05, 2019 10:31 pm
Forum: Parallel NEURON
Topic: Is it possible to associate multiple gids with the same segment?
Replies: 1
Views: 7398

Is it possible to associate multiple gids with the same segment?

I'm working with dendro-dendritic synapses where my pre- cell can have multiple pre-synaptic locations. Depending on section nseg, nearby pre- section(x) locations might be referring to the same segment. When I try to associate multiple gids with a given pre- segment, on the post- end only the synap...
by JustasB
Wed Jun 12, 2019 8:43 pm
Forum: Anatomically detailed models
Topic: Guidance on plotting cell's geometry in Python?
Replies: 4
Views: 15692

Re: Guidance on plotting cell's geometry in Python?

For anyone else who has a similar need to visualize cell model shape beyond what is available in NEURON, I've made tools that I used for such purpose available online. Consider the following options: Use a tool like hoc2swc to convert your cell model to the SWC morphology format. Then you can use an...
by JustasB
Fri Jun 07, 2019 11:19 am
Forum: Anatomically detailed models
Topic: converting hoc to swc
Replies: 7
Views: 16999

Re: converting hoc to swc

If it's useful to anyone else, I packaged the code that exports NEURON cells to SWC files into a pip-install'able Python package: hoc2swc.

Description and instructions can be found here: https://github.com/JustasB/hoc2swc
by JustasB
Sat Mar 23, 2019 2:31 pm
Forum: Suggestions and Feedback
Topic: Possible off-by-one bug in ModelView > Export to NeuroML
Replies: 9
Views: 26550

Re: Possible off-by-one bug in ModelView > Export to NeuroML

Interesting. So it looks like the "orphan root" s2d section was what caused the original problem to appear. The s2d might be safe to remove -- it's only referenced in the create statements, and I found no references to it elsewhere in the project. As you mentioned, it's not connected to an...
by JustasB
Thu Mar 21, 2019 11:36 pm
Forum: Suggestions and Feedback
Topic: Possible off-by-one bug in ModelView > Export to NeuroML
Replies: 9
Views: 26550

Re: Possible off-by-one bug in ModelView > Export to NeuroML

I noticed another, very similar parent-id-off-by-one issue with another model but now in a single cell instantiation scenario. The underlying cause might be the same. Steps to reproduce: Use this HOC file: https://senselab.med.yale.edu/ModelDB/showmodel.cshtml?model=114665&file=/plast/gc-plast.h...
by JustasB
Thu Mar 21, 2019 5:53 pm
Forum: Suggestions and Feedback
Topic: Possible off-by-one bug in ModelView > Export to NeuroML
Replies: 9
Views: 26550

Re: Possible off-by-one bug in ModelView > Export to NeuroML

I get the same "parent id off-by-one" issue when instantiating multiple instances of a cell made using CellBuilder. Here is the HOC template (soma + a spiraling dendrite): https://pastebin.com/J64KfDmZ Then I instantiate it twice with: h.load_file('TestCell.hoc') c1 = h.TestCell() c2 = h.T...
by JustasB
Thu Mar 21, 2019 4:10 pm
Forum: Suggestions and Feedback
Topic: Possible off-by-one bug in ModelView > Export to NeuroML
Replies: 9
Views: 26550

Re: Possible off-by-one bug in ModelView > Export to NeuroML

Ah, that's an interesting case. I did notice the two pieces in Shape plot, but I wasn't familiar enough with the model to tell if the oddity was intentional or not. I looked for the "multi-create" issue in the source code of the models that I have locally and was able to find a few other m...
by JustasB
Wed Mar 20, 2019 9:48 pm
Forum: Suggestions and Feedback
Topic: Possible off-by-one bug in ModelView > Export to NeuroML
Replies: 9
Views: 26550

Possible off-by-one bug in ModelView > Export to NeuroML

I'm running into an issue where when I try to export a model to NeuroML, it generates an XML file that refers to an incorrect parent segment (parent id is off-by-one). Below are the steps to reproduce the issue: # Download a model from ModelDB: https://github.com/ModelDBRepository/116094/archive/mas...
by JustasB
Wed Mar 20, 2019 9:15 pm
Forum: Suggestions and Feedback
Topic: StackOverflow-like site for NEURON?
Replies: 1
Views: 27339

Re: StackOverflow-like site for NEURON?

Having gone through the process of proposing the new Stack Exchange site, the main lesson I learned is that proposals for new Stack Exchange sites are more suitable for large communities with high volumes of questions. In general, the broader the topic of a proposed Stack Exchange site, the more lik...
by JustasB
Fri Apr 06, 2018 8:09 pm
Forum: NEURON + Python
Topic: Cannot get Vector.play() and NetCon/NetStim work with CVODE and SaveState.restore()
Replies: 4
Views: 4920

Re: Cannot get Vector.play() and NetCon/NetStim work with CVODE and SaveState.restore()

Strangely, writing a post here has made it easier to solve my own problem! The problem appears to be with the NetStim.start time, before the restore, being set to 0. If I set the NetStim.start equal to the h.t value after the restore, the crash dissapears. So I believe I've found a workaround. It is...