Ejemplo n.º 1
0
/**
 * Here we get the steady-state values for the gate (the 'instant'
 * calculation) as A_/B_.
 */
void HHChannel::vReinit( const Eref& er, ProcPtr info )
{
	g_ = ChanCommon::vGetGbar( er );
	Element* e = er.element();

	double A = 0.0;
	double B = 0.0;
	if ( Xpower_ > 0 ) {
		assert( xGate_ );
		xGate_->lookupBoth( Vm_, &A, &B );
		if ( B < EPSILON ) {
			cout << "Warning: B_ value for " << e->getName() <<
					" is ~0. Check X table\n";
			return;
		}
                if (!xInited_)
                    X_ = A/B;
		g_ *= takeXpower_( X_, Xpower_ );
	}

	if ( Ypower_ > 0 ) {
		assert( yGate_ );
		yGate_->lookupBoth( Vm_, &A, &B );
		if ( B < EPSILON ) {
			cout << "Warning: B value for " << e->getName() <<
					" is ~0. Check Y table\n";
			return;
		}
                if (!yInited_)
                    Y_ = A/B;
		g_ *= takeYpower_( Y_, Ypower_ );
	}

	if ( Zpower_ > 0 ) {
		assert( zGate_ );
		if ( useConcentration_ )
			zGate_->lookupBoth( conc_, &A, &B );
		else
			zGate_->lookupBoth( Vm_, &A, &B );
		if ( B < EPSILON ) {
			cout << "Warning: B value for " << e->getName() <<
					" is ~0. Check Z table\n";
			return;
		}
                if (!zInited_)
                    Z_ = A/B;
		g_ *= takeZpower_( Z_, Zpower_ );
	}

	ChanCommon::vSetGk( er, g_ * HHChannelBase::modulation_ );
	updateIk();
	// Gk_ = g_;
	// Ik_ = ( Ek_ - Vm_ ) * g_;

	// Send out the relevant channel messages.
	// Same for reinit as for process.
	sendReinitMsgs( er, info );
	
	g_ = 0.0;
}
Ejemplo n.º 2
0
void SynChan::vProcess( const Eref& e, ProcPtr info )
{
	// http://www.genesis-sim.org/GENESIS/Hyperdoc/Manual-26.html#synchan
    // For a spike event, activation = weight / dt
    //      is sent from SynHandler-s for one dt
    // For continuous activation in a graded synapse,
    //      send activation for continous dt-s.
	setGk( e, calcGk() );
	updateIk();
	sendProcessMsgs( e, info ); // Sends out messages for channel.
}
Ejemplo n.º 3
0
void MgBlock::vProcess( const Eref& e, ProcPtr info )
{
	double KMg = KMg_A_ * exp(Vm_/KMg_B_);
	ChanBase::setGk( e, origGk_ * KMg / ( KMg + CMg_ ) );
	// ChanBase::setGk( ChanBase::getGk() * KMg / ( KMg + CMg_ ) );
	// Gk_ = Gk_ * KMg / (KMg + CMg_);

	updateIk();
	// send2< double, double >( e, channelSlot, Gk_, Ek_ );
	// Ik_ = Gk_ * (Ek_ - Vm_);
	sendProcessMsgs( e, info );
}
void MarkovChannel::vProcess( const Eref& e, const ProcPtr p ) 
{
	g_ = 0.0;
	
	//Cannot use the Gbar_ variable of the ChanBase class. The conductance
	//Gk_ calculated here is the "expected conductance" of the channel due to its
	//stochastic nature. 

	for( unsigned int i = 0; i < numOpenStates_; ++i )
		g_ += Gbars_[i] * state_[i];			

	setGk( e, g_ );
	updateIk();

	sendProcessMsgs( e, p ); 
}
Ejemplo n.º 5
0
void SynChan::process( const Eref& e, ProcPtr info )
{
	// while ( !pendingEvents_.empty() &&
		// pendingEvents_.top().getDelay() <= info->currTime ) {
        activation_ += popBuffer(info->currTime) / info->dt;
	// 	pendingEvents_.pop();
	// }
	X_ = modulation_ * activation_ * xconst1_ + X_ * xconst2_;
	Y_ = X_ * yconst1_ + Y_ * yconst2_;
	double Gk = Y_ * norm_;
	setGk( Gk );
	updateIk();
	activation_ = 0.0;
	modulation_ = 1.0;
	SynChanBase::process( e, info ); // Sends out messages for channel.
}
Ejemplo n.º 6
0
void Leakage::vReinit( const Eref & e, ProcPtr p )
{
	ChanCommon::vSetGk( e, this->vGetGbar( e ) * this->vGetModulation( e ));
	updateIk();
    sendReinitMsgs(e, p);
}