void SynChan::setTau1( double tau1 )
{
	tau1_ = tau1;
    // Aditya added
    // required if changing tau1 during a simulation
    // (eg. Marder pyloric networks).
	xconst1_ = tau1_ * ( 1.0 - exp( -dt_ / tau1_ ) );
	xconst2_ = exp( -dt_ / tau1_ );
    normalizeGbar();
}
Example #2
0
/*
 * Note that this causes issues if we have variable dt.
 */
void SynChan::reinit( const Eref& e, ProcPtr info )
{
	double dt = info->dt;
	activation_ = 0.0;
	modulation_ = 1.0;
	SynChanBase::setGk( 0.0 );
	SynChanBase::setIk( 0.0 );
	X_ = 0.0;
	Y_ = 0.0;
    // These below statements are also called when setting tau1 and tau2
    // (required when changing tau1 and tau2 during a simulation).
	xconst1_ = tau1_ * ( 1.0 - exp( -dt / tau1_ ) );
	xconst2_ = exp( -dt / tau1_ );

        if ( doubleEq( tau2_, 0.0 ) ) {
                yconst1_ = 1.0;
                yconst2_ = 0.0;
        } else {
                yconst1_ = tau2_ * ( 1.0 - exp( -dt / tau2_ ) );
                yconst2_ = exp( -dt / tau2_ );
        }
	normalizeGbar();
	/*
        if ( doubleEq( tau2_, 0.0 ) ) {
                yconst1_ = 1.0;
                yconst2_ = 0.0;
                norm_ = 1.0;
        } else {
                yconst1_ = tau2_ * ( 1.0 - exp( -dt / tau2_ ) );
                yconst2_ = exp( -dt / tau2_ );
                if ( tau1_ == tau2_ ) {
                    norm_ = SynChanBase::getGbar() * SynE() / tau1_;
                } else {
                    double tpeak = tau1_ * tau2_ * log( tau1_ / tau2_ ) / 
                            ( tau1_ - tau2_ );
                    norm_ = SynChanBase::getGbar() * ( tau1_ - tau2_ ) / 
                            ( tau1_ * tau2_ * ( 
                            exp( -tpeak / tau1_ ) - exp( -tpeak / tau2_ )
                                                ));
                }
        }
        
	// updateNumSynapse( e );
	if ( normalizeWeights_ && getNumSynapses() > 0 )
		norm_ /= static_cast< double >( getNumSynapses() );
	*/
	// while ( !pendingEvents_.empty() )
	// 	pendingEvents_.pop();
        SynChanBase::reinit(e, info);
}
void SynChan::setTau2( double tau2 )
{
    tau2_ = tau2;
    // Aditya added
    // required if changing tau1 during a simulation
    // (eg. Marder pyloric networks).
    if ( doubleEq( tau2_, 0.0 ) ) {
            yconst1_ = 1.0;
            yconst2_ = 0.0;
    } else {
            yconst1_ = tau2_ * ( 1.0 - exp( -dt_ / tau2_ ) );
            yconst2_ = exp( -dt_ / tau2_ );
    }
    normalizeGbar();

}
/*
 * Note that this causes issues if we have variable dt.
 */
void SynChan::vReinit( const Eref& e, ProcPtr info )
{
	dt_ = info->dt;
	activation_ = 0.0;
	ChanBase::setGk( e, 0.0 );
	ChanBase::setIk( e, 0.0 );
	X_ = 0.0;
	Y_ = 0.0;
    // These below statements are also called when setting tau1 and tau2
    // (required when changing tau1 and tau2 during a simulation).
	xconst1_ = tau1_ * ( 1.0 - exp( -dt_ / tau1_ ) );
	xconst2_ = exp( -dt_ / tau1_ );

        if ( doubleEq( tau2_, 0.0 ) ) {
                yconst1_ = 1.0;
                yconst2_ = 0.0;
        } else {
                yconst1_ = tau2_ * ( 1.0 - exp( -dt_ / tau2_ ) );
                yconst2_ = exp( -dt_ / tau2_ );
        }
	normalizeGbar();
    sendReinitMsgs(e, info);
}
///////////////////////////////////////////////////
// Field function definitions
///////////////////////////////////////////////////
//
void SynChan::vSetGbar( const Eref& e, double Gbar )
{
	ChanCommon::vSetGbar( e, Gbar );
	normalizeGbar();
}
Example #6
0
///////////////////////////////////////////////////
// Field function definitions
///////////////////////////////////////////////////
//
void SynChan::innerSetGbar( double Gbar )
{
	SynChanBase::innerSetGbar( Gbar );
	normalizeGbar();
}