Code: Select all
h('''
objref po
po = new PythonObject()
proc advance() {
fadvance()
po.mypopulation.calc_csd()
}
Code: Select all
> oc>
Also, if I may use the following commands for the simulation control:
Code: Select all
{pc.set_maxstep(10)}
h.stdinit()
{pc.psolve(h.tstop)}
W is a 2-d numpy array so dot(self.W,self.i_mem_seg) is a 1-d array .Is W a 1-d numpy array?
Would it still be lost if I append the csd vector to the self.csdVecList in the mypopulation object? This append should happen on every time step:But I'm doing nothing with the return value so it is being lost.
Code: Select all
def calc_csd(self):
for sec in self.cell[0].dendritic: # for now use only a single cell for CSD calculations
for jseg,seg in enumerate(sec):
self.i_mem_seg[jseg] = seg.i_membrane*h.area(seg.x) # get membrane current for the segment
self.csdVecList.append(dot(self.W,self.i_mem_seg)) # append csdvec(t) to a list of CSD vectors