Search found 24 matches

by uri.cohen
Sun Sep 02, 2012 6:59 am
Forum: Other questions
Topic: Exactly regenerate inputs
Replies: 2
Views: 1401

Re: Exactly regenerate inputs

Ok, I was able to add a method reset() to all my NetStim instances to reset their state: PROCEDURE reset() { : randomize the first spike so on average it occurs at : start + noise*interval event = start + invl(interval) : but not earlier than 0 while (event < 0) { event = event + invl(interval) } } ...
by uri.cohen
Fri Aug 31, 2012 3:34 am
Forum: Other questions
Topic: Exactly regenerate inputs
Replies: 2
Views: 1401

Exactly regenerate inputs

I have a model which I wish to feed with the same external inputs, arriving through few hundreds NetStim-s which I connect to my model using NetCon-s. Even though I reset the inputs by called NetStim.seed() before each run and starting over from t=0, the resulting inputs are different. Is this suppo...
by uri.cohen
Fri May 11, 2012 4:31 pm
Forum: NEURON + Python
Topic: Model (hoc file), plotting output in Python
Replies: 15
Views: 9263

Re: Model (hoc file), plotting output in Python

Ted, I totally agree with you. I'm not blindly pushing Python to users and openly admit it's current limitations- having only a modest toolset (implemented mostly in neuronvisio) compared to the richness of the NEURON tools. Actually, including the NEURON GUI is the only feature-request I got so far...
by uri.cohen
Thu May 10, 2012 6:35 pm
Forum: NEURON + Python
Topic: PyNEURON simplify NEURON usage from Python on Windows
Replies: 12
Views: 10943

Re: PyNEURON simplify NEURON usage from Python on Windows

The sentence about win32 is just referring to the Win32 API of windows, not to the fact that it's 32bit (historical name). Your python is indeed 64bit, and note that 32bit DLLs cannot be loaded into 64bit processes, hence you won't be able to use any mechanism. Regarding your problem, do you see hoc...
by uri.cohen
Thu May 10, 2012 6:31 pm
Forum: NEURON + Python
Topic: Model (hoc file), plotting output in Python
Replies: 15
Views: 9263

Re: Model (hoc file), plotting output in Python

PyNEURON (installed from pypi or bitbucket) does not include the NEURON GUI and hence cannot be used to visualize cells of plot simulation result. If you're dealing with legacy code, I would recommend getting a standard installation of NEURON and using it without Python for the tasks which require G...
by uri.cohen
Mon Apr 23, 2012 2:26 am
Forum: NEURON + Python
Topic: Installing NEURON using PIP
Replies: 2
Views: 2598

Re: Installing NEURON using PIP

Hello Andreas,
The option to use PIP to install NEURON is a work-in-progress which doesn't support MacOS yet. Mike Vella can provide more details, I'll forward it to him.
Uri
by uri.cohen
Thu Apr 19, 2012 4:29 pm
Forum: NEURON + Python
Topic: Destroy a vector in order to restart recording
Replies: 3
Views: 2372

Re: Destroy a vector in order to restart recording

Thanks, Ted! Works like a charm. And also simple...
I think I was trying the dead-end approach I was asking about because it actually do work for NetCon recording: due to the single-recording-per-source limitation, recording into a new vector just works.
Thanks again!
by uri.cohen
Wed Apr 18, 2012 6:10 pm
Forum: NEURON + Python
Topic: Destroy a vector in order to restart recording
Replies: 3
Views: 2372

Destroy a vector in order to restart recording

I'm using Python to record from all currents in a model (for example, I record neuron.h.soma.ik_SK which is k-current in the soma). This is quite memory-intensive when for >100 compartments and when running the model for more than a second or so. As I'm actually interested in the total current of ea...
by uri.cohen
Wed Mar 21, 2012 5:33 am
Forum: NEURON + Python
Topic: Finding netcon-s from python
Replies: 5
Views: 2864

Re: Finding netcon-s from python

Thank you, this is what I needed and I missed it in the documentation. Your example works for List objects ("new List()") but not for arrays, defined in hoc as: objref netconExc[EXCTOTALSYNAPSES] In case someone will look at this post, for such objects the access is done using: import neuron print l...
by uri.cohen
Tue Mar 20, 2012 10:16 am
Forum: NEURON + Python
Topic: Finding netcon-s from python
Replies: 5
Views: 2864

Re: Finding netcon-s from python

Does your hoc program set up a List to which all NetCons are appended? Yes. All hoc variables and objects are accessible from Python and vice versa. This is exactly the part I could not find how to do. The NetCon class's record() method is used to record source event times to a Vector. Ok, so this ...
by uri.cohen
Tue Mar 20, 2012 5:43 am
Forum: NEURON + Python
Topic: Finding netcon-s from python
Replies: 5
Views: 2864

Finding netcon-s from python

I have a hoc file which setups some simulation and I load it and run it from python. I would like to record event times in a simulation from python. My problem is that the NetCon objects are setup in the hoc file, and I need to find them from python in order to record from them. Are those objects so...
by uri.cohen
Tue Feb 14, 2012 7:15 am
Forum: NEURON + Python
Topic: PyNEURON simplify NEURON usage from Python on Windows
Replies: 12
Views: 10943

Re: PyNEURON simplify NEURON usage from Python on Windows

I my implementation it is setup.py which install the right files (32/64) and possibly even MSWin / Mac / Linux is such a support will be added in the future (only MSwin is available there right now). I believe my solution for compiling the code using cygwin/mingw is similar yours and indeed also the...
by uri.cohen
Sat Feb 11, 2012 3:36 am
Forum: NEURON + Python
Topic: PyNEURON simplify NEURON usage from Python on Windows
Replies: 12
Views: 10943

PyNEURON simplify NEURON usage from Python on Windows

It is now possible to use NEURON from python on Windows without installing NEURON and without compiling it from sources. A new Python package called PyNEURON is available at pypi. If you have Python 2.7 installed on your Windows, just do the following: pip install PyNEURON And you have a fully funct...
by uri.cohen
Tue Dec 27, 2011 4:30 pm
Forum: NEURON + Python
Topic: Finding available variables in each section
Replies: 4
Views: 2105

Finding available variables in each section

I'm loading an existing hoc file into python and would like to list the available state variables in each compartment. For example, the soma has a variable 'v' in each location (available through h.soma(0.5).v). Is there a programmatic way to do so?
Thanks!