// $Id: x_cell.g,v 16.1 2000/03/02 14:43:39 ajay Exp $ // x_cell.g genesis 2.1. // Graphs to look at activity of a single cell and its channels. function make_Vmgraph float vmin = -0.08 float vmax = 0.0 create xform /Vmgraph [265,50,350,350] create xdialog /Vmgraph/CellName -hgeom 10% -label "Cell Name" \ -value "/pyr_layer/pyr[20]" -script "link_cell " create xgraph /Vmgraph/voltage -hgeom 90% -title "Membrane Potential" setfield ^ XUnits sec YUnits Volts setfield ^ xmax {tmax} ymin {vmin} ymax {vmax} setfield /Vmgraph/voltage/x_axis fg blue setfield /Vmgraph/voltage/x_axis textcolor blue setfield /Vmgraph/voltage/y_axis fg blue setfield /Vmgraph/voltage/y_axis textcolor blue useclock /Vmgraph/voltage 0 xshow /Vmgraph end float gmax = 4e-9 // AMPA gmax, Siemens function make_condgraph create xform /condgraphs [620,50,475,350] pushe /condgraphs create xgraph channel_Gk -hgeom 100% -title "Channel Conductance" setfield channel_Gk xmin 0 xmax {tmax} ymin 0 ymax {gmax*5} setfield channel_Gk XUnits "sec" YUnits "Gk (siemens)" setfield channel_Gk/x_axis fg blue setfield channel_Gk/x_axis textcolor blue setfield channel_Gk/y_axis fg blue setfield channel_Gk/y_axis textcolor blue pope useclock /condgraphs/channel_Gk 0 xshow /condgraphs end // another conductance graph for GABA conductance function make_condgraph2 create xform /condgraphs2 [620,50,475,350] pushe /condgraphs2 create xgraph channel_Gk -hgeom 100% -title "Channel Conductance" setfield channel_Gk xmin 0 xmax {tmax} ymin 0 ymax {gmax*5} setfield channel_Gk XUnits "sec" YUnits "Gk (siemens)" setfield channel_Gk/x_axis fg blue setfield channel_Gk/x_axis textcolor blue setfield channel_Gk/y_axis fg blue setfield channel_Gk/y_axis textcolor blue pope useclock /condgraphs2/channel_Gk 0 xshow /condgraphs2 end function link_cell(cellname) // connect cell to Vmgraph str cellname // first clear previous message to graph if any if ({getmsg /Vmgraph/voltage -in -count}) deletemsg /Vmgraph/voltage 0 -incoming // only msg deleted end // add message from current cell addmsg {cellname}/soma /Vmgraph/voltage PLOT Vm *somaVm *blue end function link_cond(condname) // connect channel conductance to condgraphs str condname // first clear previous message to graph if any if ({getmsg /condgraphs/channel_Gk -in -count}) deletemsg /Vmgraph/channel_Gk 0 -incoming // only msg deleted end // add message from current channel addmsg {condname} /condgraphs/channel_Gk PLOT Gk *AMPA_Gk *blue end make_Vmgraph link_cell {getfield /Vmgraph/CellName value} /* make_condgraph // link_cond /pyr_layer/pyr[5]/apical/AMPA_channel addmsg /pyr_layer/pyr[11]/apical/AMPA_channel /condgraphs/channel_Gk PLOT Gk *AMPA_Gk *blue addmsg /pyr_layer/pyr[18]/apical/AMPA_channel /condgraphs/channel_Gk PLOT Gk *AMPA_Gk *green addmsg /pyr_layer/pyr[19]/apical/AMPA_channel /condgraphs/channel_Gk PLOT Gk *AMPA_Gk *red addmsg /pyr_layer/pyr[20]/apical/AMPA_channel /condgraphs/channel_Gk PLOT Gk *AMPA_Gk *black make_condgraph2 addmsg /pyr_layer/pyr[11]/soma/GABAa_channel /condgraphs2/channel_Gk PLOT Gk *GABAa_Gk *blue addmsg /pyr_layer/pyr[18]/soma/GABAa_channel /condgraphs2/channel_Gk PLOT Gk *GABAa_Gk *green addmsg /pyr_layer/pyr[19]/soma/GABAa_channel /condgraphs2/channel_Gk PLOT Gk *GABAa_Gk *red addmsg /pyr_layer/pyr[20]/soma/GABAa_channel /condgraphs2/channel_Gk PLOT Gk *GABAa_Gk *black */ reset