def adjust_chanlib(cdict):
    """Update the revarsal potentials for channels. Set the initial X
    value for AR channel. Set the tau for Ca pool."""
    channel_dict = init_chanlib()
    for ch in channel_dict.values():
        if isinstance(ch, kchans.KChannel):
            ch.Ek = cdict['EK']
        elif isinstance(ch, nachans.NaChannel):
            ch.Ek = cdict['ENa']
        elif isinstance(ch, cachans.CaChannel):
            ch.Ek = cdict['ECa']
        elif isinstance(ch, archan.AR):
            ch.Ek = cdict['EAR']
            if 'X_AR' in cdict:
                ch.X = cdict['X_AR']        
        elif isinstance(ch, capool.CaPool):
            ch.tau = cdict['TauCa']            
def adjust_chanlib(cdict):
    """Update the revarsal potentials for channels. Set the initial X
    value for AR channel. Set the tau for Ca pool."""
    channel_dict = init_chanlib()
    for ch in list(channel_dict.values()):
        if isinstance(ch, kchans.KChannel):
            ch.Ek = cdict["EK"]
        elif isinstance(ch, nachans.NaChannel):
            ch.Ek = cdict["ENa"]
        elif isinstance(ch, cachans.CaChannel):
            ch.Ek = cdict["ECa"]
        elif isinstance(ch, archan.AR):
            ch.Ek = cdict["EAR"]
            if "X_AR" in cdict:
                ch.X = cdict["X_AR"]
        elif isinstance(ch, capool.CaPool):
            ch.tau = cdict["TauCa"]
Beispiel #3
0
def adjust_chanlib(cdict):
    """Update the revarsal potentials for channels. Set the initial X
    value for AR channel. Set the tau for Ca pool."""
    channel_dict = init_chanlib()
    for ch in list(channel_dict.values()):
        config.logger.info('adjusting properties of %s' % (ch.path))
        if isinstance(ch, kchans.KChannel):
            ch.Ek = cdict['EK']
        elif isinstance(ch, nachans.NaChannel):
            ch.Ek = cdict['ENa']
        elif isinstance(ch, cachans.CaChannel):
            ch.Ek = cdict['ECa']
        elif isinstance(ch, archan.AR):
            ch.Ek = cdict['EAR']
            if 'X_AR' in cdict:
                ch.X = cdict['X_AR']        
        elif isinstance(ch, moose.CaConc):
            ch.tau = cdict['TauCa']            
        if isinstance(ch, moose.HHChannel):
            config.logger.debug('%s.Ek = %g' % (ch.path, ch.Ek))
Beispiel #4
0
def adjust_chanlib(cdict):
    """Update the revarsal potentials for channels. Set the initial X
    value for AR channel. Set the tau for Ca pool."""
    channel_dict = init_chanlib()
    for ch in list(channel_dict.values()):
        config.logger.info('adjusting properties of %s' % (ch.path))
        if isinstance(ch, kchans.KChannel):
            ch.Ek = cdict['EK']
        elif isinstance(ch, nachans.NaChannel):
            ch.Ek = cdict['ENa']
        elif isinstance(ch, cachans.CaChannel):
            ch.Ek = cdict['ECa']
        elif isinstance(ch, archan.AR):
            ch.Ek = cdict['EAR']
            if 'X_AR' in cdict:
                ch.X = cdict['X_AR']        
        elif isinstance(ch, moose.CaConc):
            ch.tau = cdict['TauCa']            
        if isinstance(ch, moose.HHChannel):
            config.logger.debug('%s.Ek = %g' % (ch.path, ch.Ek))