channel.name = 'SFA';
channel.longname = 'Spike Frequency Adaptation';//defaults to normal name if blank
channel.desc = 'AKA getting tired. While excited, slowly opens & inhibits until cell returns to baseline.';

// relative conductance of ions when channel is open
channel.set_conductance(ion_k, 200);

// How quickly should the adaptation kick in? (passed in by the neuron script)
var open_speed = 0.0005;
if (channel.option == 'none') { open_speed = 0; }
if (channel.option == 'slow') { open_speed = 0.0005; }
if (channel.option == 'fast') { open_speed = 0.0025; }

// channel.set_opening_speed(0.0025);
// channel.set_closing_speed(0.0025);

channel.set_opening_speed(open_speed);
channel.set_closing_speed(0.0025);

//let it fire for a bit before closing and ending the party
channel.if_voltage_above(-40);
channel.open();

// only close
channel.if_voltage_below(-70);
channel.close();
