Search found 35 matches

by vogdb
Wed Feb 26, 2020 7:16 am
Forum: NEURON + Python
Topic: Vector Values
Replies: 2
Views: 138

Re: Vector Values

Hi! The error message clearly say that you are trying to access a string value as float (numeric type). Please post the links to the code from neuron website you are mentioning.
by vogdb
Fri Feb 21, 2020 7:12 am
Forum: Anatomically detailed models
Topic: Neuron transforms soma that is loaded from .swc. What is the rule for it?
Replies: 4
Views: 272

Re: Neuron transforms soma that is loaded from .swc. What is the rule for it?

Thank you for the information! In my case the solution was to use the last point of soma for connection of other sections. So, instead of parent id 1 use 3 ... 4 2 0.292800 -4.265800 -5.562200 0.325200 1 ... Use # index type X Y Z radius parent ... 4 2 0.292800 -4.265800 -5.562200 0.325200 3 ... And...
by vogdb
Tue Feb 11, 2020 5:20 am
Forum: Anatomically detailed models
Topic: Neuron transforms soma that is loaded from .swc. What is the rule for it?
Replies: 4
Views: 272

Re: Neuron transforms soma that is loaded from .swc. What is the rule for it?

Thank you, Ted! My main question is how I can avoid of adding 2 additional points in case soma is a cylinder already. In order to avoid any misunderstandings here is the code: SimpleCellCylinder.swc # index type X Y Z radius parent 1 1 -5.442800 0.000000 0.000000 5.442800 -1 2 1 0.000000 0.000000 0....
by vogdb
Mon Feb 10, 2020 6:58 am
Forum: Anatomically detailed models
Topic: Neuron transforms soma that is loaded from .swc. What is the rule for it?
Replies: 4
Views: 272

Neuron transforms soma that is loaded from .swc. What is the rule for it?

Hi! Can you please point to me to the source code/rule that adds new points to a soma that is loaded from .swc? An example. Lets say I have a morphology with a soma. # index type X Y Z radius parent 1 1 0.000000 0.000000 0.000000 5.442800 -1 2 2 0.292800 -4.265800 -5.562200 0.325200 1 3 2 0.654500 -...
by vogdb
Fri Dec 20, 2019 4:27 am
Forum: Suggestions and Feedback
Topic: Accessibility of documentation
Replies: 1
Views: 219

Accessibility of documentation

Hi! I receive 404 (Not Found) error when I try to access https://www.neuron.yale.edu/neuron/stat ... index.html. Is it fine?
by vogdb
Wed Dec 18, 2019 7:20 am
Forum: NEURON + Python
Topic: Associative arrays in HOC
Replies: 5
Views: 318

Re: Associative arrays in HOC

Also here a couple of examples: begintemplate String public s strdef s endtemplate String begintemplate ObjDict public get, put, setKeys objref keyList, valueList, nil proc init() { keyList = new List() valueList = new List() } proc put() {localobj key key = new String() key.s = $s1 keyList.append(k...
by vogdb
Wed Dec 18, 2019 5:52 am
Forum: NEURON + Python
Topic: Associative arrays in HOC
Replies: 5
Views: 318

Re: Associative arrays in HOC

There is an implementation of Dictionary in this post viewtopic.php?t=1438
by vogdb
Fri Dec 13, 2019 5:36 pm
Forum: NEURON + Python
Topic: Associative arrays in HOC
Replies: 5
Views: 318

Associative arrays in HOC

In Python we have dicts like this

Code: Select all

d = {'key1': 1, 'key2': 56}
Is there an analogue in HOC?
by vogdb
Wed Nov 27, 2019 3:52 am
Forum: NEURON + Python
Topic: How to get synapse offset/position
Replies: 5
Views: 378

Re: How to get synapse offset/position

Thank you so much! This is a very useful information for me.
by vogdb
Tue Nov 26, 2019 5:01 am
Forum: NEURON + Python
Topic: How to get synapse offset/position
Replies: 5
Views: 378

Re: How to get synapse offset/position

Thank you, Ted! I heard of *d_lambda* but forgot its specifics. My purpose was rather educational.
by vogdb
Thu Nov 21, 2019 11:58 am
Forum: NEURON + Python
Topic: How to get synapse offset/position
Replies: 5
Views: 378

Re: How to get synapse offset/position

Aha, I see. It is up to the number of segments in section. With high enough number of segments the synapse is placed to a nearly correct position otherwise it is placed as close as possible. So if I do

Code: Select all

dend.nseg = 100
then I have 0.775 as my synapse position.
This is very tricky.
by vogdb
Thu Nov 21, 2019 5:46 am
Forum: NEURON + Python
Topic: How to get synapse offset/position
Replies: 5
Views: 378

How to get synapse offset/position

Hi! Can somebody please clarify. It looks I'm missing something fundamental. How to know that syn is at 0.77 offset? get_segment().x , get_loc return 0.5 . Do I miss something? Is syn moved to the offset 0.5 after instantiation? from neuron import h h.load_file('stdrun.hoc') dend = h.Section(name='d...
by vogdb
Tue Sep 24, 2019 12:14 pm
Forum: NEURON + Python
Topic: error in saving a voltage trace into a figure
Replies: 2
Views: 542

Re: error in saving a voltage trace into a figure

Hi! Does it work fine if you plot directly instead of saving figure? What would happen if you replace

Code: Select all

fig.savefig("trial.png")
with

Code: Select all

plt.show()
?
by vogdb
Sat Sep 21, 2019 10:02 am
Forum: NEURON + Python
Topic: Filter Mechanism params by NMODL PARAMETER
Replies: 8
Views: 942

Re: Filter Mechanism params by NMODL PARAMETER

Here is the today's solution. Thank you again! ms = h.MechanismStandard(mech_name, 1) param_name = h.ref('') param_names = [] for i in range(ms.count()): ms.name(param_name, i) param_names.append(param_name[0]) param_names = [name.split('_' + mech_name)[0] for name in param_names]
by vogdb
Fri Sep 20, 2019 3:22 pm
Forum: NEURON + Python
Topic: Filter Mechanism params by NMODL PARAMETER
Replies: 8
Views: 942

Re: Filter Mechanism params by NMODL PARAMETER

Thank you so much for so many options. I will try the old way tomorrow as it looks very neat. Today I've ended up with this solution: from neuron import h from nmodl import dsl mech_type = h.MechanismType(0) mech_type.select('hh') code = mech_type.code() driver = dsl.NmodlDriver() modast = driver.pa...