Search found 63 matches

by wwlytton
Tue Dec 05, 2017 4:32 am
Forum: OS X
Topic: Choice of Python2.7 or 3.xx on install?
Replies: 0
Views: 459

Choice of Python2.7 or 3.xx on install?

I'm guessing that Anaconda gives you both 2 and 3 and that when NEURON detects that you have 3 installed it assumes that you want to use the more modern version?? I have no personal experience on this; A student reports: having trouble getting my Python 2.7 Anaconda env working ... py2.7 problem tur...
by wwlytton
Mon Dec 04, 2017 5:11 am
Forum: Other questions
Topic: Suppress "First Instance Of"
Replies: 5
Views: 1762

Re: Suppress "First Instance Of"

I'm just now re-stumbling over these messages which I haven't seen in a long time. Not sure if that reflects a change in the code or more likely just a change in the way I'm running. Anyway it would still be desirable to have a non-compile toggle for this (perhaps there is one but I didn't find).
by wwlytton
Mon Jun 05, 2017 3:35 pm
Forum: NetPyNE
Topic: Programming and Debugging a declarative language
Replies: 1
Views: 5726

Programming and Debugging a declarative language

I am having trouble getting used to NetPyNE and realize that part of this is my unfamiliarity with proper programming practices in a declarative language such as this. "Declarative programming is where you say what you want without having to say how to do it" When working in an imperative language, ...
by wwlytton
Tue Apr 25, 2017 5:29 pm
Forum: General questions and discussions about computational neuroscience
Topic: spine resistance debates
Replies: 1
Views: 6292

spine resistance debates

There is great variability in spine resistance estimates in different studies and models. Eg Carnevale in 2013 said "Notably, our experimental data was closely modeled using a neck resistance of 520 M , similar to the value reported for hippocampal pyramidal neurons (26). " ("Compartmentalization of...
by wwlytton
Tue Oct 11, 2016 3:30 pm
Forum: Employment and educational opportunities
Topic: Two postdoctoral NEURON modeling positions - EEE theory
Replies: 0
Views: 10929

Two postdoctoral NEURON modeling positions - EEE theory

Two Computational Neuroscience postdoctoral modeling positions are immediately available for development of a novel NIBIB-BRAIN-funded brain theory. Our new NIH BRAIN Initiative brain theory project aims to build and establish a new theory - Embedded Ensemble Encoding (EEE) theory - out of observati...
by wwlytton
Fri Nov 21, 2014 5:09 pm
Forum: NEURON + Python
Topic: generate dictionary of hoc (h.) things
Replies: 1
Views: 866

Re: generate dictionary of hoc (h.) things

in python 2.7+ can also do dict comprehensions so

hdict = {name:h.__getattribute__(name) for name in dir(h) if hasattr(h,name)}
by wwlytton
Fri Nov 21, 2014 5:00 pm
Forum: NEURON + Python
Topic: generate dictionary of hoc (h.) things
Replies: 1
Views: 866

generate dictionary of hoc (h.) things

I wanted a dictionary of hoc stuff for reasons that in retrospect was unnecessary, but having done this I thought I would share it hdict = dict([(name,h.__getattribute__(name)) for name in dir(h) if hasattr(h,name)]) the hasattr() turned out to be the trick since for reasons obscure some things turn...
by wwlytton
Thu Nov 13, 2014 10:10 am
Forum: NEURON + Python
Topic: Bulletin Board Style
Replies: 11
Views: 3415

Re: Bulletin Board Style

With MH's assistance I have produced a functioning test for packing and unpacking # mpiexec -n 4 nrniv -python -mpi test.py from neuron import h pc = h.ParallelContext() myid = int(pc.id()) nhost = int(pc.nhost()) def storevecs (): pc.pack([myid],h.Vector().from_python(range(myid,100,nhost)).as_nump...
by wwlytton
Tue Nov 11, 2014 10:14 pm
Forum: NEURON + Python
Topic: Bulletin Board Style
Replies: 11
Views: 3415

Re: Bulletin Board Style

the following works for pack and unpack in python tvec = h.Vector().from_python([1.2,3.3,4.7]) # ersatz vec of spike times myid=8 pc.pack([myid],tvec.as_numpy()) # turn myid and vec into python objects when packing pc.post('test') pc.take('test') upmyid=pc.upkpyobj()[0] # grab the myid out of the 1 ...
by wwlytton
Tue Aug 19, 2014 10:36 am
Forum: Other questions
Topic: Setting stims and time after SaveState.restore()
Replies: 4
Views: 1051

Re: Setting stims and time after SaveState.restore()

if i understand correctly, there's a single thread here and, as in the case of multiple threads, the individual thread values have to be explicitly set to correspond to the time given by the interpreters h.t It appears that in order to see these threads that one needs to set up an explicit ParallelC...
by wwlytton
Wed Aug 13, 2014 4:47 pm
Forum: Other questions
Topic: Setting stims and time after SaveState.restore()
Replies: 4
Views: 1051

Re: Setting stims and time after SaveState.restore()

Here's full runnable code demonstrating the points made above run python and then execfile('file.py') # file.py is where you saved it from neuron import h,gui import sys,os,time h.load_file("stdrun.hoc") from matplotlib import pyplot as mp import numpy as np mp.ion() mss = h.SaveState(); myfile = h....
by wwlytton
Wed Aug 13, 2014 2:16 pm
Forum: Other questions
Topic: Setting stims and time after SaveState.restore()
Replies: 4
Views: 1051

Setting stims and time after SaveState.restore()

After a SaveState.restore() , modifications are difficult and seem to depend on doing things at the correct time in the finitialize() sequence. I don't yet fully understand the reasons at each step but will post further as I better understand it. Here is the fairly simple sim I was working with: mss...
by wwlytton
Thu Jan 09, 2014 4:04 pm
Forum: Anatomically detailed models
Topic: Current Source Density Approximations
Replies: 0
Views: 4882

Current Source Density Approximations

Apparently there are differences in approach as to whether capacitative current should or should not be included as one of the currents that constitutes the Current Source Density (CSD) that is approximated via an inverse solution using a 2nd spatial deriv of voltages. In reading the documentation o...
by wwlytton
Sun Dec 08, 2013 11:45 am
Forum: NEURON + Python
Topic: no subscripting of SectionList in python
Replies: 0
Views: 695

no subscripting of SectionList in python

in some cases, the flexibility of python provides some additional functionality that was not available in hoc in current case, I was hoping to avoid prior practice of copying SectionLists onto regular Lists to get random access -- I noted that in Python, a __getitem__ was exposed in dir(h.SectionLis...