// $Id: aff_layer.g,v 16.1 2000/03/02 14:43:39 ajay Exp $ // aff_layer.g HIPPO model // Each afferent cell is a pulsegen that produces 4 pulses at 100 Hz. // The output of the pulsegen is connected to inject field of soma of // pyramidal cell to make the cell spike. // The afferent input consists of a sequence of 15 spatial patterns presented // at 150 ms intervals. Each spatial pattern refers to activation of // 5 pyr cells chosen at random. create neutral /library/aff create neutral /library/gate // gategen gates the pulse generator with a single 45 ms pulse create pulsegen /library/gate/gategen setfield /library/gate/gategen \ level1 1.0 \ width1 45e-3 \ // to get 4 pulses at 100Hz from pulsegen baselevel 0.0 \ delay1 0 \ // to be set individually for each gate delay2 3600 \ // very long to allow only one pulse trig_mode 0 // free run mode // pulse generator provides 4 brief (1ms) pulses at 100 Hz to drive pyr cell create pulsegen /library/aff/input setfield /library/aff/input \ level1 1e-7 \ // 1e-8 since duration brief, large amp. width1 1e-3 \ delay1 10e-3 \ // 100 Hz burst baselevel 0 \ trig_mode 2 // ext. gate mode // create column of gate generators. GATE_NX * GATE_NY = 15 createmap /library/gate /gate_layer \ {GATE_NX} {GATE_NY} \ -delta {AFF_SEPX} {AFF_SEPY} \ -origin {-AFF_NX * AFF_SEPX / 2} {-AFF_NY * AFF_SEPY / 2} // create column of afferent cells (pulse generators). AFF_NX * AFF_NY = 75 createmap /library/aff /aff_layer \ {AFF_NX} {AFF_NY} \ -delta {AFF_SEPX} {AFF_SEPY} \ -origin {-AFF_NX * AFF_SEPX / 2} {-AFF_NY * AFF_SEPY / 2} // link each gategen to a group of 5 aff cells (one spatial pattern) function connect_gates int i,j,k for (i = 0; i < {GATE_NY}; i = i+1) for (j = 0; j < 5; j = j+1) k = i*5 + j addmsg /gate_layer/gate[{i}]/gategen \ /aff_layer/aff[{k}]/input INPUT output end end end connect_gates // change_gate_conn changes the connection of gategen 'gatenum' so that it connects to 5 // successive pulsegens, the first of which is given by 'startaff'. function change_gate_conn(gatenum, startaff) int gatenum int startaff int i, nmes // delete previous outgoing messages from gategen element nmes = {getmsg /gate_layer/gate[{gatenum}]/gategen -out -count} for (i=0; i < nmes; i=i+1) deletemsg /gate_layer/gate[{gatenum}]/gategen 0 -outgoing end // connect gategen element to pulsegen elements for (i={startaff}; i < {startaff + 5}; i=i+1) addmsg /gate_layer/gate[{gatenum}]/gategen \ /aff_layer/aff[{i}]/input INPUT output end end // set delay fields of gategens to sequentially activate groups (5 cells // each) of aff cells at theta frequency (150 ms) function set_gate_delays(latency, interval) int i float interval float latency // used to set latency of delay float delay,start_delay start_delay = {latency} + 5e-3 // 15ms before aff input starts (5 here + 10 aff/input) for (i = 0; i < {GATE_NY}; i = i+1) delay = {start_delay + i * {interval}} setfield /gate_layer/gate[{i}]/gategen delay1 {delay} end end set_gate_delays 0 {aff_input_interval} /* create randomspike /library/aff/input setfield ^ min_amp 1.0 max_amp 1.0 rate 400.0 \ reset 1 reset_value 0 abs_refract 1e-6 createmap /library/aff /aff_layer \ {AFF_NX} {AFF_NY} \ -delta {AFF_SEPX} {AFF_SEPY} \ -origin {-AFF_NX * AFF_SEPX / 2} {-AFF_NY * AFF_SEPY / 2} int i for(i = 0; i <= 24; i = i + 1) setfield /aff_layer/aff[{i}]/input rate 400.0 end */