Search found 55 matches

by oren
Mon Dec 22, 2014 9:38 am
Forum: NEURON + Python
Topic: record from one cell of a matrix to a vector
Replies: 4
Views: 3848

record from one cell of a matrix to a vector

Hello,
how do I record a single cell of a matrix with python?

I know that if I want to record a Vector I can use the following code:

Code: Select all

Vvec = h.Vector()
Vvec.record(y0._ref_x[0])
But how do I record from a Matrix, as this does not work

Code: Select all

Vvec = h.Vector()
Vvec.record(c._ref_x[0][0])
by oren
Thu Sep 04, 2014 9:54 am
Forum: Getting started
Topic: Record current of a Linear mechanisem
Replies: 1
Views: 2754

Record current of a Linear mechanisem

Hello I am using this code to create a gap junction via a linear mechanism, begintemplate LinearMGap public src, target, g, valid, pr, set_gm, gm, cm objref srcsec, targetsec, cm, gm, y, b, xvec, sl, lm, this, fih strdef tstr proc init(){ g_ = 10 valid_ = 0 cm = new Matrix(2,2,2) gm = new Matrix(2,2...
by oren
Tue Sep 02, 2014 1:22 pm
Forum: Other questions
Topic: Gap Junction Linear Mechanism cvode
Replies: 1
Views: 2376

Gap Junction Linear Mechanism cvode

Hello, I have a network simulation with gap junction, I am using pc.source pc.target for the Gap Junctions. I want to test if my results stay the same when I use linear mechaisem instead of pc.source and pc.target, but it is extremely slow, so I tried to cvode ( is it possible to use cvode and linea...
by oren
Fri Aug 08, 2014 9:19 am
Forum: Getting started
Topic: start Neuron with a -c startment that has a string
Replies: 1
Views: 1839

Re: start Neuron with a -c startment that has a string

Ok
all I needed to do is:
nrniv -c "{strdef aa aa=\"123\"}" init.hoc
by oren
Fri Aug 08, 2014 9:12 am
Forum: Getting started
Topic: start Neuron with a -c startment that has a string
Replies: 1
Views: 1839

start Neuron with a -c startment that has a string

Hello,
I want to send a string to Neuron when I load it
nrniv init.hoc -c "{strdef aa aa="123"}"

but the problem is that I can not use " inside the " and it does not except '

what can I do?

Thank You.
by oren
Sun Jul 27, 2014 2:52 am
Forum: NEURON + Python
Topic: how to delete a Point Process object
Replies: 11
Views: 7822

Re: how to delete a Point Process object

Code: Select all

%reset Out
seems to fix the problem.
by oren
Thu Jul 24, 2014 11:32 am
Forum: NEURON + Python
Topic: how to delete a Point Process object
Replies: 11
Views: 7822

Re: how to delete a Point Process object

Hi Michel Thank You, In python your code does work, But in ipython it does not work In [2]: soma = h.Section() In [3]: zz= h.Impedance() In [4]: h.Impedance[0] Out[4]: <hoc.HocObject at 0x1a0c420> In [5]: zz=None In [6]: _ Out[6]: <hoc.HocObject at 0x1a0c420> In [7]: 1 Out[7]: 1 In [8]: h.Impedance[...
by oren
Thu Jul 24, 2014 9:01 am
Forum: NEURON + Python
Topic: how to delete a Point Process object
Replies: 11
Views: 7822

Re: how to delete a Point Process object

Hello Ted, Thank You, When I run your code, I do manage to delete the Impedance, But when I run the following code from neuron import h soma = h.Section() zz= h.Impedance() h.Impedance[0] zz = None zz= None does not delete the Impedance, Can you try it? It seems that running the line h.Impedance[0] ...
by oren
Thu Jul 24, 2014 8:16 am
Forum: NEURON + Python
Topic: Section stack overflow
Replies: 7
Views: 6384

Re: Section stack overflow

Just add a h.pop_section() after you finish with the section you pushed [push()] and the stack overflow will disappear dend = [h.Section() for i in range(ndend)] for i in dend: i.push() i.connect(soma, 0, 0) i.nseg = npoints i.Ra = 200 i.insert('pas') i.insert('ds') i.e_pas = -70 i.g_pas = 0.00004 h...
by oren
Wed Jul 23, 2014 6:29 pm
Forum: NEURON + Python
Topic: how to delete a Point Process object
Replies: 11
Views: 7822

how to delete a Point Process object

Hello, I am trying to delete an Impedance tool in python but I can not manage to do it. in hoc it is very easy objref zz create soma zz = new Impedance() Impedance[0] I get Impedance[0] When I do objref zz Impedance[0] I get nrniv: Object ID doesn't exist: Impedance[0] As expected! -----------------...
by oren
Thu Jun 19, 2014 4:15 am
Forum: NEURON + Python
Topic: to_python() causes big memory problems
Replies: 8
Views: 7717

Re: to_python() causes big memory problems

I think the Leak has returned NEURON -- VERSION 7.3 ansi (1078:2b0c984183df) 2014-04-04 ipython from neruon import h Vec = h.Vector() Vec.indgen(0,100,0.25) while 1: Vec.to_python(); 2.5GB in 5 Seconds. Also when I run the original code that arb posted import neuron h = neuron.h h("""...
by oren
Tue Jun 10, 2014 12:44 pm
Forum: Getting started
Topic: Record current
Replies: 7
Views: 7161

Re: Record current

Thank You Ted, It works great. If anyone ever needs. This is my solution for recording the current thats going from the soma to the dendrites. (I assume the soma is 1 segment) objref s1, childVolts, childri, somaV childVolts = new List() childri = new Vector() somaV = new Vector() s1 = new SectionLi...
by oren
Tue Jun 10, 2014 7:56 am
Forum: Parallel NEURON
Topic: starting gui multisplit from code
Replies: 3
Views: 6696

Re: starting gui multisplit from code

Thank You,
Working Great!
by oren
Sun Jun 08, 2014 10:48 am
Forum: Parallel NEURON
Topic: starting gui multisplit from code
Replies: 3
Views: 6696

starting gui multisplit from code

Hi I have what seems to be a weird question. Usually when I want to do multisplit on a model that I am running. I do: Tools-> Parallel Computing -> threads=8 & Multiplit on Refresh and it works. But I can't seems to find the correct commands so that this clicks will be automatically run from the...