h.FInitializeHandler Crashing
Posted: Tue Mar 17, 2015 11:17 am
Hi all,
For cluster purposes, I'm currently porting all my MATLAB/NEURON code to Python. I seem to have run into a snag with the h.FInitializeHandler step. I am simply trying to load spike times into a target cell.
Beginning with loading of AMPA, NMDA, and GABA conductances:
The issue arises at fih2 = h.FInitializeHandler(loadspikes(numE,numI,rpE,rpI,h.nclistA,h.nclistB,h.nclistC,h.nclistD))
with loadspikes
Stepping through loadspikes with python debugger ('pbd') works fine. However, after reaching h.FinitializeHandler the whole python terminal crashes. Is there a specific variable which needs to be passed in from load spikes or something I'm not seeing?
Thank you for your time,
Brandon
For cluster purposes, I'm currently porting all my MATLAB/NEURON code to Python. I seem to have run into a snag with the h.FInitializeHandler step. I am simply trying to load spike times into a target cell.
Beginning with loading of AMPA, NMDA, and GABA conductances:
Code: Select all
for iii in range(numE):
if drvinputsE.any():
rpE.append(h.Vector())
rpE[iii].from_python(drvinputsE) #Precalculated spike times
numspiking = rpE[iii].size()
aD.append(h.AMPA_LL_IC(0.5))
aD[iii].tau1 = ampatau1 #AMPA time constants
aD[iii].tau = ampatau2
nctempA = h.NetCon(h.nil,aD[iii],0,1,ampaconduct)
h.nclistA.append(nctempA)
bD.append(h.NMDA_LL_IC_2(0.5))
bD[iii].vdepscale = nmdavdep
bD[iii].tau1 = nmdatau1
bD[iii].tau = nmdatau2
nctempB = h.NetCon(h.nil,bD[iii],0,1,nmdaconduct)
h.nclistB.append(nctempB)
for iiii in range(numI):
if drvIinputs.any():
rpI.append(h.Vector())
rpI[iiii].from_python(drvIinputs)
numspikingI = rpI[iiii].size()
cD.append(h.ICGABAa(0.5))
cD[iiii].tau1 = gabatau1
cD[iiii].tau = gabatau2
cD[iiii].scale = gscale
nctempC = h.NetCon(h.nil,cD[iiii],0,1,gabaaconduct)
h.nclistC.append(nctempC)
dD.append(h.ICGABAb3(0.5))
nctempD = h.NetCon(h.nil,dD[iiii],0,1,gababconduct)
h.nclistD.append(nctempD)
fih2 = h.FInitializeHandler(loadspikes(numE,numI,rpE,rpI,h.nclistA,h.nclistB,h.nclistC,h.nclistD))
with loadspikes
Code: Select all
def loadspikes(numE,numI,rpE,rpI,nclistA,nclistB,nclistC,nclistD):
from neuron import *
from nrn import *
import numpy as np
import pdb
pdb.set_trace()
for jj in range(numE):
if len(rpE)>0:
numss = len(rpE[jj])
for ii in range(numss):
h.nclistA.o(jj).event((rpE[jj].x[ii]+200))
h.nclistB.o(jj).event((rpE[jj].x[ii]+200))
for nn in range(numI):
if len(rpI)>0:
numsI = len(rpI[jj])
for mm in range(numsI):
h.nclistC.o(nn).event((rpI[nn].x[mm]+200))
h.nclistD.o(nn).event((rpI[nn].x[mm]+200))
Thank you for your time,
Brandon