Search found 89 matches

by pascal
Wed Apr 19, 2017 9:51 am
Forum: Other questions
Topic: Purpose of interpxyz.hoc in extracellular_stim_and_rec code
Replies: 3
Views: 5350

Purpose of interpxyz.hoc in extracellular_stim_and_rec code

Hi Ted, I want to make sure I understand why interpxyz.hoc is necessary in your extracellular_stim_and_rec code (found here: http://www.neuron.yale.edu/phpBB/viewtopic.php?f=28&t=168 ). In particular, it seems to my naive eyes that define_shape() already calculates the interpolated 3D coordinates at...
by pascal
Mon Apr 17, 2017 11:19 am
Forum: Other questions
Topic: Defining 3D location information
Replies: 2
Views: 4840

Re: Defining 3D location information

Whoops, apparently this question has already been asked here: https://www.neuron.yale.edu/phpBB/viewtopic.php?f=8&t=3627 (In my defense, I searched for n3d and n3d() , and nothing came up in either case.) I thought I had tried calling define_shape() before printing out the 3D coordinates, but appare...
by pascal
Mon Apr 17, 2017 10:18 am
Forum: Other questions
Topic: Defining 3D location information
Replies: 2
Views: 4840

Defining 3D location information

I am having trouble with a very basic issue: getting NEURON to tell me the 3D location of a cell. The "Conceptual Overview of Sections" documentation has the following snippet of code to print out the 3D coordinates of a cell: forall delete_section() create a, b, c, d, e connect b(0), a(1) connect c...
by pascal
Wed Mar 29, 2017 8:40 am
Forum: Parallel NEURON
Topic: Using Traub's parallel gap junction in Python
Replies: 2
Views: 6644

Re: Using Traub's parallel gap junction in Python

All right, I figured out the fix from this post: https://www.neuron.yale.edu/phpBB/viewtopic.php?f=2&t=3160 I had to replace the line pc.source_var(cell.soma(0.5)._ref_v, source_src_gid) with pc.source_var(cell.soma(0.5)._ref_v, source_src_gid,sec=cell.soma) According to the link above, sec=cell.som...
by pascal
Mon Mar 27, 2017 9:08 am
Forum: Parallel NEURON
Topic: Using Traub's parallel gap junction in Python
Replies: 2
Views: 6644

Using Traub's parallel gap junction in Python

I am trying to implement Traub's parallel gap junction code (see https://senselab.med.yale.edu/ModelDB/ShowModel.cshtml?model=82894&file=\nrntraub\hoc\parlib2.hoc#tabs-2 ) in Python. So far I have the following for par_gap_create and par_gap_create1 (implemented as methods within a "Net" class): def...
by pascal
Fri Mar 24, 2017 11:11 am
Forum: Getting started
Topic: Axo-axonal gap junctions object-oriented
Replies: 11
Views: 11275

Re: Axo-axonal gap junctions object-oriented

I am also trying to implement gap junctions in a parallel model, and I have a question about the Traub implementation (at https://senselab.med.yale.edu/ModelDB/ShowModel.cshtml?model=82894&file=\nrntraub\hoc\parlib2.hoc#tabs-2 , as stated above). The code looks like this: gap_src_gid = 2 proc par_ga...
by pascal
Wed Mar 08, 2017 11:46 am
Forum: NEURON + Python
Topic: Iterating over just the sections within an object
Replies: 4
Views: 10064

Re: Iterating over just the sections within an object

That is very helpful--thank you!
by pascal
Sun Mar 05, 2017 3:52 pm
Forum: NEURON + Python
Topic: Iterating over just the sections within an object
Replies: 4
Views: 10064

Re: Iterating over just the sections within an object

Ah, I did end up finding a good example in this portion of the tutorial: http://neuron.yale.edu/neuron/static/docs/neuronpython/ballandstick2.html . Thanks. Following the tutorial, I was able to clean up my code by using the wholetree method (rather than adding each individual section to the Section...
by pascal
Fri Mar 03, 2017 10:58 am
Forum: NEURON + Python
Topic: Iterating over just the sections within an object
Replies: 4
Views: 10064

Iterating over just the sections within an object

I am writing one of my first programs in NEURON + Python, and I want to make sure that I am correctly iterating over just the sections within a newly-created object. (I realized that using for sec in h.allsec() iterates over all sections in the entire program, which is not what I want.) My toy class...
by pascal
Sat Feb 11, 2017 10:02 am
Forum: Adding new mechanisms and functions to NEURON
Topic: Accessing a variable from hoc that is not defined in NMODL
Replies: 5
Views: 7564

Re: Accessing a variable from hoc that is not defined in NMO

Oh I see, that explanation makes perfect sense. Thank you very much for the help. And yes, this model has been used to generate published results. I am currently going back and re-running with gmax_IhPyrKop = 0.1, and I will see whether this affects simulation results. Thank you both again for the h...
by pascal
Fri Feb 10, 2017 10:19 am
Forum: Adding new mechanisms and functions to NEURON
Topic: Accessing a variable from hoc that is not defined in NMODL
Replies: 5
Views: 7564

Accessing a variable from hoc that is not defined in NMODL

I am translating a hoc model (that I inherited) into Python, and I am having some trouble with a custom mod file. The hoc code references the mod file (which defines a mechanism named "IhPyrKop") in the following way: insert IhPyrKop soma{ gh_IhPyrKop = 0.1 v50_IhPyrKop = -82 } The only problem is, ...
by pascal
Mon Feb 06, 2017 7:48 pm
Forum: NEURON + Python
Topic: Creating NetCon with null source in NEURON+Python
Replies: 10
Views: 15478

Re: Creating NetCon with null source in NEURON+Python

Great, thanks so much for the thorough explanation. I feel like when it comes to NEURON's integration schemes, I now harbor fewer unknown unknowns, more known unknowns, and maybe even one or two known knowns. :-)
by pascal
Mon Feb 06, 2017 9:48 am
Forum: NEURON + Python
Topic: Creating NetCon with null source in NEURON+Python
Replies: 10
Views: 15478

Re: Creating NetCon with null source in NEURON+Python

Thanks, this works perfectly now. I really appreciate the help. I am curious why importing gui automatically creates an instance of CVode. I know CVode implements adaptive time step numerical integration, with a separate "stream" for each neuron in the simulation. Is CVode the default numerical inte...
by pascal
Fri Feb 03, 2017 11:12 am
Forum: NEURON + Python
Topic: Creating NetCon with null source in NEURON+Python
Replies: 10
Views: 15478

Re: Creating NetCon with null source in NEURON+Python

That is really helpful--thank you! One more question, though. I am having trouble getting this newly-crated NetCon to actually do anything. Using the following code from neuron import h, gui soma=h.Section() soma.insert('pas') syn=h.ExpSyn(soma(0.5)) #create netcon h("objref nil") nil=h.nil nc=h.Net...
by pascal
Wed Feb 01, 2017 9:52 am
Forum: NEURON + Python
Topic: Creating NetCon with null source in NEURON+Python
Replies: 10
Views: 15478

Creating NetCon with null source in NEURON+Python

I am trying to translate the following hoc code into Python (where nil is an unassigned objref, and syn is some generic synapse): nc=new NetCon(nil, syn) I initially tried nc=h.NetCon(None,syn) but I received a "hoc error" . Then, after reading https://www.neuron.yale.edu/phpBB/viewtopic.php?f=2&t=1...