How to make multiple segments with different length?

The basics of how to develop, test, and use models.
Post Reply
edaneshi
Posts: 12
Joined: Wed Oct 09, 2013 5:10 pm

How to make multiple segments with different length?

Post by edaneshi » Fri Nov 04, 2016 7:18 pm

Dear Ted,

I was wondering if it is possible to have a section with multiple segments such that the length of each segment is not equal to the other segments's length?
For example, let's assume that I have an internode section in my neuron model. Its length is 100um. I would like to have 5 segments. However, I want the length of each segment be like:
1- Segment 1: 35um
2- Segment 2: 20um
3- Segment 3: 10um
4- Segment 4: 10um
5- Segment 5: 25um

I would appreciate it if you could help me find the answer for this question please?

Warm regards,
Ehsan

ted
Site Admin
Posts: 5620
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: How to make multiple segments with different length?

Post by ted » Sat Nov 05, 2016 10:18 am

I would appreciate it if you could help me find the answer for this question
Here's how to answer most questions for yourself: Help for the total beginner http://www.neuron.yale.edu/neuron/node/47

The Programmer's Reference has very specific and informative documentation about sections: Conceptual Overview of Sections https://www.neuron.yale.edu/neuron/stat ... metry.html

For your particular application it is necessary to use several sections, each with the appropriate length.

edaneshi
Posts: 12
Joined: Wed Oct 09, 2013 5:10 pm

Re: How to make multiple segments with different length?

Post by edaneshi » Sat Nov 05, 2016 8:20 pm

Dear Ted,

Thanks for your reply and help. I really appreciate it.
However, I have a question regarding splitting my section into different sections. In my application, my initial intent was to change the diameter (and some other range variables) of part of a section(s) in my axonal model based on my input parameters.
The length (Lx) of this part (Which I was trying to define and separate from the rest of the section by having different segments) will vary based on my experimental conditions (0=<Lx<L). Splitting the "long section" into five smaller sections lets me change the length of each small section independently while I am doing the math behind the scene to make sure that the overall length of small sections is always equal to the length of my long section (L1+L2+L3+L4+L5=L). Everything is good so far!
However, I was wondering what should I do if I want to set the L1=0? What type of errors it may introduce to my results (Conduction velocity and action potential amplitude)?

PS: I cannot increase the number of segments so much in all sections that I am interested in. The reason is that I am changing some range variables in different parts of my axonal model to perform a sensitivity analysis. The length if these sections are very different (1um-500um). If I increase the number of segments in different sections (to reach the spatial accuracy that I need), the time that I need to run my simulations will be more than a month.

ted
Site Admin
Posts: 5620
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: How to make multiple segments with different length?

Post by ted » Sun Nov 06, 2016 4:29 pm

edaneshi wrote:what should I do if I want to set the L1=0?
Don't. Enforce a nonzero minimum length.
I cannot increase the number of segments so much in all sections that I am interested in.
If you intend to compare results across simulations in which the length of one or more sections differs from run to run, suggest you use a worst case nseg for each of the affected sections. That way the total number of system equations is the same regardless of the lengths of the individual sections. If instead you try to "cleverly" change nseg because a particular section is longer or shorter, or has different diameter, or has a different Ra or cm, then you are not only changing model parameters but also the number of system equations--and that will confound interpretation of results (if you observe a difference, how will you know what part of it is attributable to the change of section length vs. how much is due to changing the number of system equations?).
If I increase the number of segments in different sections (to reach the spatial accuracy that I need), the time that I need to run my simulations will be more than a month.
Good results obtained in a month are better than garbage results obtained in an afternoon.

Maybe it would be useful to do a preliminary exploration of parameter space. That is fundamentally an embarrassingly parallel problem, quite amenable to NEURON's "bulletin-board-style" parallelization, and could be accelerated by taking advantage of the Neuroscience Gateway Portal http://www.nsgportal.org/ (free CPU time on HPC resources, and NEURON is already installed and ready to go).

edaneshi
Posts: 12
Joined: Wed Oct 09, 2013 5:10 pm

Re: How to make multiple segments with different length?

Post by edaneshi » Sun Nov 06, 2016 6:04 pm

Dear Ted,

Thank you for taking the time and helping me.
Don't. Enforce a nonzero minimum length.
So, let's assume that I have a long axon and I have a section (Length=L) in somewhere in the middle of my axonal model that I want to split it into two smaller sections.
1- All properties of these two sections are the same except than their length;
2- let's say that their Length are L1 and L2;
3- My condition is that L1+L2=constant;
Then what is the minimum length for L1 that doesn't change my measurements (conduction velocity and action potential amplitude) in regions far from these two sections. I want to make sure my model's results will remain the same (or without a significant amount of change); just like when I had a long section instead of two smaller sections.
If instead you try to "cleverly" change nseg because a particular section is longer or shorter, or has different diameter, or has a different Ra or cm, then you are not only changing model parameters but also the number of system equations--and that will confound interpretation of results (if you observe a difference, how will you know what part of it is attributable to the change of section length vs. how much is due to changing the number of system equations?).
Very good point and this is something that I am always very concerned about. I want to have a systematic study and have only one independent variable in my simulations. I understand that we are changing the number of systems equations in the regions that we are changing nseg (Let's call it region A). It makes sense that our measurements in those sections will be affected. However, I was wondering if this event will affect our measurements (conduction velocity and action potential amplitude) in regions far from region A? If yes, why?
Good results obtained in a month are better than garbage results obtained in an afternoon.

Maybe it would be useful to do a preliminary exploration of parameter space. That is fundamentally an embarrassingly parallel problem, quite amenable to NEURON's "bulletin-board-style" parallelization, and could be accelerated by taking advantage of the Neuroscience Gateway Portal http://www.nsgportal.org/ (free CPU time on HPC resources, and NEURON is already installed and ready to go).
That's right. However, the problem for using these awesome online tools and resources is that some common but not open-source/free software such as Matlab are not installed on the servers (As far as I know). In my case, I am changing NEURON model parameters with Matlab and perform some analysis in Matlab during each simulation.

ted
Site Admin
Posts: 5620
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: How to make multiple segments with different length?

Post by ted » Mon Nov 07, 2016 12:15 am

edaneshi wrote:what is the minimum length for L1 that doesn't change my measurements (conduction velocity and action potential amplitude) in regions far from these two sections.
Not sure I know what you mean. You can set L to 0.01 um or smaller and see if that disturbs your simulations.

I'm not a big fan of poring over numerical shavings--it's hard to get excited about small differences between large numbers, given (1) the uncertanties involved in building and using empirically-based computational models, which include the limited precision and inherent variability of experimental measurements, and (2) the fact that spatiotemporal discretization introduces its own approximations. Structures that are only a few tens of um long aren't going to produce latencies that justify very precise estimates of conduction velocity.
I was wondering if this event will affect our measurements (conduction velocity and action potential amplitude) in regions far from region A?
As to "whether A will cause B," a computational experiment will quickly answer that.
the problem for using these awesome online tools and resources is that some common but not open-source/free software such as Matlab are not installed on the servers (As far as I know). In my case, I am changing NEURON model parameters with Matlab and perform some analysis in Matlab during each simulation.
I guess you have to decide whether Matlab enhances your research more than it limits your research.

Post Reply