// see also instructions at the bottom of this file

// directory with Purkinje tabchannels
str Purkinje_dir = "../Purkinje_cell"


// directory name for ascii output
   str filename = "results/"
//   str filename = {getenv SIMOUTFILE}
//   str filename = "/cluster/scratch/local/reinoud/"


// chanmode for hsolver
   int  chanmode = 4 // 2 //  4 // 5 // 4 // 5 // 4 // 3



// Cell numbers and topographics

// Number of PCs is specified separately for x and y dimensions; numbers of all
// other neurons are specified as multiple of PCs in both directions (hence ratio^2).
// PCs are positioned in hexagonal grid, with given PC-separation.
// Positions of other neurons are distributed uniformly along z direction. 

// Purkinje cells (PCs)

   int  number_PCs_PFaxis = 5 
   int  number_PCs_sagitt = 10 
   int  number_Purkinje_cells = 0 //  {number_PCs_PFaxis * number_PCs_sagitt}

   echo number_Purkinje_cells = {number_Purkinje_cells}

   // separation between adjacent Purkinje cells
   float PC_separation  = 50e-6 // meter


// Stellate cells (stcs)

   int  number_stcs_PFaxis = 5 
   int  number_stcs_sagitt = 20 * 2 
   int  number_stcs_zaxis = 4 
   int  number_stellate_cells = {number_stcs_PFaxis} * {number_stcs_sagitt} * {number_stcs_zaxis} 

   echo number_stellate_cells = {number_stellate_cells}

   int number_stcs_xz = {number_stcs_PFaxis} * {number_stcs_zaxis}
   int number_stcs_xy = {number_stcs_PFaxis} * {number_stcs_sagitt}
   int number_stcs_yz = {number_stcs_sagitt} * {number_stcs_zaxis}

   // separation between adjacent stellate cells
   float stc_separation = 40e-6 * 0.5 // meter

   float xlength_mollayer = {number_stcs_PFaxis * stc_separation}
//   float ylength_mollayer = {{number_stcs_sagitt - 1} * stc_separation * {sqrt 3} * 0.5}
// to allow OFs to connect to dendrites of boundary neurons
   float ylength_mollayer = {{number_stcs_sagitt + 1} * stc_separation * {sqrt 3} * 0.5}
   float zlength_mollayer = 300e-6

   echo x {xlength_mollayer} y {ylength_mollayer} z {zlength_mollayer} 

           
// Parallel fibres (PFs)

   int  number_parallel_fibers = 10e10 * {ylength_mollayer * zlength_mollayer} * 0.8 // * 0.5 // * 0.25 // 20000 // 2000 // 20000 // {number_stellate_cells * 20} 

   echo number_parallel_fibers = {number_parallel_fibers}

   // length parallel fiber
   float parallel_fiber_length = 5.0e-3 // meter


// parallel fiber input
   float parallel_fiber_firing_rate = 10 // sec^-1
   float parallel_fiber_refractory_period = 0.001 // sec
   float interburst_interval = 0.1             // sec
   float burst_duration      = 0.01           // sec
   float burst_intensity     = 1.0              // multiplied by mossy_fiber_firing_rate 



// synaptic probabilities
   float P_parallel_fiber_Purkinje_cell_synapse  = 0.5  // probability 
   float P_parallel_fiber_stellate_cell_synapse  = 0.2 * 1 // 2 // probability

   float P_Purkinje_cell_Purkinje_cell_synapse   =  0.1 // 0.1 * 2 // 0.1 // 0.05 // 0.075 // 0.1 // 0.05 // 0.1 // 0.15 // 0.1 // 0.05 // 0.1 // 0.025 // 0.1 // 1.0 // probability
   float P_Purkinje_cell_stellate_cell_synapse   =  0.2 // 0.1 // 0.15 // 0.1 // 0.05 // 0.1 // 0.025 // 0.1 // 1.0 // probability

   float P_stellate_cell_Purkinje_cell_synapse   =  0.02 // * 2 // * 0.8 // * 1 // 2 * 0.02 // 0.03 // 0.02 // 0.05 // 0.1 // 0.04 // 0.02 // 0.01 // 0.1 // 1 // 0.1 //  probability
   float P_stellate_cell_stellate_cell_synapse   =  0.1 * 0.1 * 2 // * 2 // 1 // 2 // 4 // 2 // 3.5 // 3.2 // 2.66 // 4 // 2 // 4 // 1 // 2 // 4 // 2 // 0.5 // probability

   float P_stc_stc_gapjunction   =  1 



// synaptic weights : the normalization is now done in RECALC of synchan !!!!

   float weight_parallel_fiber_Purkinje_cell_synapse   = 0.5 // * 2 // * 4 // /2

   float weight_parallel_fiber_stellate_cell_synapse   = 1.5 * 2 * 45.0 // * 2 // / 2 // * 1 // 50

   float weight_stellate_cell_Purkinje_cell_synapse = 0.25 // 0 // 0.25 // 0 // 0.25 // 0.275 // 0.25 // 0.3 // 0.25 // 0.275 // 0.26 // 0.275 // 0.25 // 0.225 // 0.25 // 0.225 // 0.25 // 0.225 // 0.35 // 0.4 // 0.3 

   float weight_stellate_cell_stellate_cell_synapse =  {weight_stellate_cell_Purkinje_cell_synapse} * 100 

   float weight_Purkinje_cell_Purkinje_cell_synapse = 0 

   float weight_Purkinje_cell_stellate_cell_synapse = 0 

   float gap_junction_conductance =   1 * 200e-12  

// synaptic delays
   float delay_mossy_fiber_granule_cell_synapse =  0.0
   float delay_mossy_fiber_Golgi_cell_synapse   =  0.0
   float delay_granule_cell_Golgi_cell_synapse  =  0.0
   float delay_Golgi_cell_granule_cell_synapse  =  0.0
   float delay_stellate_cell_Golgi_cell_synapse =  0.0
   float parallel_fiber_conduction_velocity = 0.3 // m/s

float time_axis_graph = 1.0

float weight_distribution  =  0 
float delay_distribution  = 0.0


/*** INSTRUCTIONS ***/
/* Some parameters have to be consistent with each other.

The basic parameters are : (1) the number of Golgi cells (number_Golgi_cells),
(2) the ratio of the number of mossy fibers to the number of Golgi cells 
(mossy_fiber_to_Golgi_cell_ratio), and (3) the span value for mossy fiber
ramification (mossy_fiber_to_granule_cell_connection_radius).

The number of mossy fibers (number_mossy_fibers) is derived from (1)
and (2), the number of granule cells (number_granule_cells) is derived
in Script Gran_layer_setup.g from number_mossy_fibers and (3).

Nevertheless, number_mossy_fibers and number_granule_cells must be correctly
initialized because these variables are used in some other scripts.

To know with which value number_granule_cells should be initialized,
you can run the simulation and abort it after script
Gran_layer_setup.g has been completed.  The correct number is printed
on the screen by Gran_layer_setup.g ("made ... numbers of granule cells").

*/
