LCNhm_functions

This script has all functions except from the LCNhm_class and its methods.

Within its miscellaneous purposes, there are:

  • One function naming and making the folder: make_folder
  • Functions related to how to distribute intrinsic properties along the cell: gradient_membrane_resistance, gradient_spine_scale, gradient_V12 and gradient_gHCN
  • Function of how to distribute the synaptic releases along a theta cycle: synaptic_time_probability_distribution
  • Functions that record and save data from the simulation: recordings, save_spiking_times, save_recordings and save_parameters

Functions and descriptions

LCNhm_functions.gradient_V12(zDistance)

Definition of the HCN half-maximal activation voltage (V1/2) factor along the z axis (radial axis) (Sinha2015)

Parameters:zDistance (Float) – Distance to soma on the z axis (radial axis)
Returns:v12 – Half-maximal activation voltage (mV)
Return type:Float
LCNhm_functions.gradient_gHCN(zDistance)

Definition of the HCN maximum conductance along the z axis (radial axis) (Sinha2015)

Parameters:zDistance (Float) – Distance to soma on the z axis (radial axis)
Returns:gHCN – Maximumn HCN conductance (S/cm2)
Return type:Float
LCNhm_functions.gradient_membrane_resistance(zDistance)

Definition of the membrane resistivity along the z axis (radial axis)

Parameters:zDistance (Float) – Distance to soma on the z axis (radial axis)
Returns:MembraneResistance – Membrane resistance (ohm*cm2) at zDistance
Return type:Float
LCNhm_functions.gradient_spine_scale(zDistance, Diameter)

Definition of the spine scale factor along the z axis (radial axis)

To take into account the spines intrinsic properties such as the capacitance and the membrane resistance must be multiplied by a factor SS

Parameters:
  • zDistance (Float) – Distance to soma on the z axis (radial axis)
  • Diameter (Float) – Diameter of compartiment (um)
Returns:

SS – Spine scale factor

Return type:

Float

LCNhm_functions.make_folder(DIR_LOCATION, OPT_FOLDER_NAME)

Make a new folder inside DIR_LOCATION/LCNhm-results/ to save any new simulation.

< D(ate)YearMonthDay _ T(ime)HourMinute _ OptionalFolderName >
Parameters:
Returns:

FOLDER_NAME – Name of the folder just made.

Return type:

String

LCNhm_functions.recordings(Pyramidal, RECORDING_MAGNITUDE, RECORDING_SECTION, RECORDING_LOCATION)

Recordings are set.

Parameters:
Returns:

Recordings

Dictionary with all recordings

Eg.: Given the following inputs, the Recordings Dictionary would be

RECORDING_MAGNITUDE = ['Time','Vmem','Pos']
RECORDING_SECTION = ['SomaList0','ApicList0','ApicList0','ApicList0']
RECORDING_LOCATION = [0.0, 0.2, 0.5, 0.9]

Recordings = { 'Time': record object
               'Vmem': { 'SomaList0_000': record object,
                         'ApicList0_020': record object,
                         'ApicList0_050': record object,
                         'ApicList0_090': record object},
               'Imem': { 'SomaList0_000': record object,
                         'ApicList0_020': record object,
                         'ApicList0_050': record object,
                         'ApicList0_090': record object} }

Return type:

Dictionary

LCNhm_functions.save_parameters(Parameters, FolderName)

Values of the LCNhm_configurationfile parameters are written in Parameters.txt in LCNhm_main.FolderName subfolder.

Eg.:

>>> vi LCNhm-results/20190723_1200_test/Parameters.txt
>>>   DIR_LOCATION /home/andrea/Projects/HippoModel/LCNhippomodel
>>>   OPT_FOLDER_NAME test
>>>   SIMPROP_THETA_MODE True
>>>   SIMPROP_THETA_PERIOD 166.000000
>>>   SIMPROP_START_TIME 0.000000
>>>   SIMPROP_SIM_TIME 1660.000000
>>>   SIMPROP_END_TIME 1660.000000
>>>   SIMPROP_DT 0.025000
>>>   SIMPROP_TEMPERATURE 34.000000
>>>   CELLPROP_MORPHOLOGY n128
>>>   CELLPROP_INTRINSIC 0
>>>   CELLPROP_INTRINSIC_IONCHS iNas iA iAHPs iC iCaL iCaT iKDR iM iHCN iL
>>>   CELLPROP_INTRINSIC_EXPERIMENT 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000
>>>   CELLPROP_SYNAPTIC_INPUTS CA3 CA2 EC3 EC2 Axo Bis CCK Ivy NGF OLM PV SCA
>>>   CELLPROP_SYNAPTIC_EXPERIMENT 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000
>>>   CURRENT_DURATION 0.000000
>>>   CURRENT_DELAY 0.000000
>>>   CURRENT_AMPLITUDES 0.000000
>>>   CURRENT_SECTION SomaList0
>>>   CURRENT_LOCATION 0.000000
>>>   RECORDING_MAGNITUDE
>>>   RECORDING_SECTION SomaList0
>>>   RECORDING_LOCATION 0.0
Parameters:
LCNhm_functions.save_recordings(Recordings, FolderName, RECORDING_MAGNITUDE)

Recordings of the magnitudes selected in LCNhm_configurationfile.RECORDING_MAGNITUDE are saved in a txt file in LCNhm_main.FolderName subfolder, as:

Eg.: Recordings_Vmem.txt

Eg.: Recordings_Pos.txt

Membrane potentials (Vmem) and membrane currents (Imem) along time of each recording site is saved in different rows

Eg.:

>>> vi LCNhm-results/20190723_1200_test/Recordings_Vmem.txt
>>>           Time    0.000    0.025    0.050   ...
>>>  SomaList0_000  -65.000  -65.300  -65.450   ...
>>>  ApicList0_000  -55.000  -54.800  -54.600   ...

Position is saved in different rows for each recording site

Eg.:

>>> vi LCNhm-results/20190723_1200_test/Recordings_Pos.txt
>>>  SomaList0_000  0.0    0.0      0.0
>>>  ApicList0_000  0.0    0.0  -1000.0
Parameters:
  • Recordings (Dictionary) – Dictionary with all recordings, output from recordings()
  • FolderName (String) – Name of folder where recordings will be saved, output from make_folder()
LCNhm_functions.save_spiking_times(Recordings, FolderName)

Time of spikes are detected and saved in LCNhm_main.FolderName /TimeSpikes.txt

If there are no spikes, it will write NaN

Parameters:
  • Recordings (Dictionary) – Dictionary with all recordings, output from recordings()
  • FolderName (String) – Name of folder where recordings will be saved, output from make_folder()
LCNhm_functions.synaptic_time_probability_distribution(Times, PhaseMax, Parameters)

Definition of the synaptic probability distribution along theta phase. In this case, the distribution chosen is the asymmetric gaussian (beta function), described as:

beta(x,A,B) = x^(A-1) * (1-x)^(B-1)
Parameters:
  • Times (Numpy array) – Times to whom compute the firing probability function
  • PhaseMax (Float) – Phase of maximum probability
  • Parameters (List) – List of parameters. In this case, Parameters = [A, B] will define the shift of the gaussian distribution to the left or to the right.
Returns:

ProbDistribution – Spiking probability distribution for Times

Return type:

Numpy array