def __init__(self, **parameters):

        # Create single compartment Rubin and Terman GP cell section, i.e. soma section
        self.soma = Section(L=parameters['L'],
                            diam=parameters['diam'],
                            nseg=parameters['nseg'],
                            Ra=parameters['Ra'],
                            cm=parameters['cm'],
                            mechanisms=[
                                Mechanism('myions'),
                                Mechanism('GPeA',
                                          gnabar=0.04,
                                          gkdrbar=0.0042,
                                          gkcabar=0.1e-3,
                                          gcatbar=6.7e-5,
                                          kca=2,
                                          gl=4e-5)
                            ])

        # Initialize ion concentrations
        h("cai0_ca_ion = 5e-6 ")
        h("cao0_ca_ion = 2")
        h("ki0_k_ion = 105")
        h("ko0_k_ion = 3")
        h("nao0_na_ion = 108")
        h("nai0_na_ion = 10")

        # insert current source
        self.stim = h.IClamp(0.5, sec=self.soma)
        self.stim.delay = 0
        self.stim.dur = 1e12
        self.stim.amp = parameters['bias_current']

        # Add DBS stimulation current to neuron model
        self.DBS_stim = h.IClamp(0.5, sec=self.soma)
        self.DBS_stim.delay = 0
        self.DBS_stim.dur = 1e9
        self.DBS_stim.amp = 0

        # Append the DBS stimulation iclamps to global list
        GV.GPe_stimulation_iclamps.append(self.DBS_stim)

        # Add AMPA and GABAa synapses to the cell, i.e. add to the soma section
        self.AMPA = h.AMPA_S(0.5, sec=self.soma)
        self.GABAa = h.GABAa_S(0.5, sec=self.soma)

        # needed for PyNN
        self.source_section = self.soma
        self.source = self.soma(0.5)._ref_v
        self.rec = h.NetCon(self.source, None,
                            sec=self.soma)  # Needed to clear the simulator
        self.spike_times = h.Vector(0)
        self.parameter_names = ('L', 'diam', 'nseg', 'Ra', 'cm',
                                'bias_current_density')
        self.traces = {}
        self.recording_time = False
    def __init__(self, **parameters):

        # Create single compartment Otsuka STN cell section, i.e. soma section
        self.soma = Section(L=parameters['L'],
                            diam=parameters['diam'],
                            nseg=parameters['nseg'],
                            Ra=parameters['Ra'],
                            cm=parameters['cm'],
                            mechanisms=[
                                Mechanism('myions'),
                                Mechanism('stn',
                                          gnabar=49e-3,
                                          gkdrbar=57e-3,
                                          gkabar=5e-3,
                                          gkcabar=1.0e-3,
                                          gcalbar=15e-3,
                                          gcatbar=5e-3,
                                          kca=2,
                                          gl=0.35e-3)
                            ])
        # Initialize ion concentrations
        h("cai0_ca_ion = 5e-6 ")
        h("cao0_ca_ion = 2")
        h("ki0_k_ion = 105")
        h("ko0_k_ion = 3")
        h("nao0_na_ion = 108")
        h("nai0_na_ion = 10")

        # Add bias current to neuron model
        self.stim = h.IClamp(0.5, sec=self.soma)
        self.stim.delay = 0
        self.stim.dur = 1e12
        self.stim.amp = parameters['bias_current']  # bias current density (nA)

        # Add AMPA and GABAa synapses to the cell, i.e. add to the soma section
        self.AMPA = h.AMPA_S(0.5, sec=self.soma)
        self.GABAa = h.GABAa_S(0.5, sec=self.soma)

        # needed for PyNN
        self.source_section = self.soma
        self.source = self.soma(0.5)._ref_v
        self.rec = h.NetCon(self.source, None,
                            sec=self.soma)  # Needed to clear the simulator
        self.spike_times = h.Vector(0)
        self.parameter_names = ('L', 'diam', 'nseg', 'Ra', 'cm',
                                'bias_current')
        self.traces = {}
        self.recording_time = False
    def __init__(self, **parameters):

        # Create single compartment Rubin and Terman Thalamic cell section, i.e. soma section
        self.soma = Section(L=parameters['L'],
                            diam=parameters['diam'],
                            nseg=parameters['nseg'],
                            Ra=parameters['Ra'],
                            cm=parameters['cm'],
                            mechanisms=(Mechanism('thalamic_i_leak'),
                                        Mechanism('thalamic_i_na_k'),
                                        Mechanism('thalamic_i_t')))
        """
		# Note: Thalamic current has no bias current in original paper, i.e. bias_current_density = 0
		#       Can be added in if required.
		# insert current source
		self.stim = h.IClamp(0.5, sec=self.soma)
		self.stim.delay = 0
		self.stim.dur = 1e12
		self.stim.amp = parameters['bias_current_density']*(self.area())*(0.001) 	# (0.001 or 1e-3) is conversion factor so pA -> nA
		"""

        # insert synaptic noise
        self.noise = h.SynNoise(0.5, sec=self.soma)
        self.noise.f0 = 0
        self.noise.f1 = 0.3

        # Add AMPA and GABAa synapses to the cell, i.e. add to the soma section
        self.AMPA = h.AMPA_S(0.5, sec=self.soma)
        self.GABAa = h.GABAa_S(0.5, sec=self.soma)

        # needed for PyNN
        self.source_section = self.soma
        self.source = self.soma(0.5)._ref_v
        self.rec = h.NetCon(self.source, None,
                            sec=self.soma)  # Needed to clear the simulator
        self.spike_times = h.Vector(0)
        self.parameter_names = ('L', 'diam', 'nseg', 'Ra', 'cm',
                                'bias_current_density')
        self.traces = {}
        self.recording_time = False
    def __init__(self, **parameters):

        # Create single compartment Destexhe Interneuron cell section, i.e. soma section
        self.soma = Section(L=parameters['L'],
                            diam=parameters['diam'],
                            nseg=parameters['nseg'],
                            Ra=parameters['Ra'],
                            cm=parameters['cm'],
                            mechanisms=(Mechanism('interneuron_i_leak'),
                                        Mechanism('interneuron_i_na'),
                                        Mechanism('interneuron_i_k')))

        # Add bias current to neuron model - current amplitude is in terms of original model paper, nA
        self.stim = h.IClamp(0.5, sec=self.soma)
        self.stim.delay = 0
        self.stim.dur = 1e12
        self.stim.amp = parameters['bias_current_amp']  # nA

        # insert synaptic noise
        self.noise = h.SynNoise(0.5, sec=self.soma)
        self.noise.f0 = 0
        self.noise.f1 = 0.3

        # Add AMPA and GABAa synapses to the cell, i.e. add to the soma section
        self.AMPA = h.AMPA_S(0.5, sec=self.soma)
        self.GABAa = h.GABAa_S(0.5, sec=self.soma)

        # needed for PyNN
        self.source_section = self.soma
        self.source = self.soma(0.5)._ref_v
        self.rec = h.NetCon(
            self.source, None,
            sec=self.source_section)  # Needed to clear the simulator
        self.spike_times = h.Vector(0)
        self.parameter_names = ('L', 'diam', 'nseg', 'Ra', 'cm',
                                'bias_current_amp')
        self.traces = {}
        self.recording_time = False
    def __init__(self, **parameters):

        # Create cortical pyramidal neuron soma compartment using Pospischil (2008) single compartment model
        self.soma = Section(L=parameters['soma_L'],
                            diam=parameters['soma_diam'],
                            nseg=parameters['soma_nseg'],
                            Ra=parameters['soma_Ra'],
                            cm=parameters['soma_cm'],
                            mechanisms=(Mechanism('cortical_soma_i_leak'),
                                        Mechanism('cortical_soma_i_na'),
                                        Mechanism('cortical_soma_i_k'),
                                        Mechanism('cortical_soma_i_m')))

        # Create cortical pyramidal neuron axon compartments using Foust (2011) axon model
        self.ais = Section(L=parameters['ais_L'],
                           diam=parameters['ais_diam'],
                           nseg=parameters['ais_nseg'],
                           Ra=parameters['ais_Ra'],
                           cm=parameters['ais_cm'],
                           mechanisms=(Mechanism('cortical_axon_i_leak',
                                                 g_l=3.3e-5),
                                       Mechanism('cortical_axon_i_na',
                                                 g_Na=4000e-4),
                                       Mechanism('cortical_axon_i_kv',
                                                 g_Kv=20e-4),
                                       Mechanism('cortical_axon_i_kd',
                                                 g_Kd=0.015)),
                           parent=self.soma)

        # Use loop to create myelin and node sections of axon
        self.myelin = []
        self.node = []
        for i in np.arange(parameters['num_axon_compartments']):
            if i == 0:
                self.myelin.append(
                    Section(L=parameters['myelin_L'],
                            diam=parameters['myelin_diam'],
                            nseg=11,
                            Ra=parameters['myelin_Ra'],
                            cm=parameters['myelin_cm'],
                            mechanisms=(Mechanism('cortical_axon_i_leak',
                                                  g_l=0),
                                        Mechanism('cortical_axon_i_na',
                                                  g_Na=10e-4)),
                            parent=self.ais))
            else:
                self.myelin.append(
                    Section(L=parameters['myelin_L'],
                            diam=parameters['myelin_diam'],
                            nseg=11,
                            Ra=parameters['myelin_Ra'],
                            cm=parameters['myelin_cm'],
                            mechanisms=(Mechanism('cortical_axon_i_leak',
                                                  g_l=0),
                                        Mechanism('cortical_axon_i_na',
                                                  g_Na=10e-4)),
                            parent=self.node[i - 1]))

            self.node.append(
                Section(L=parameters['node_L'],
                        diam=parameters['node_diam'],
                        nseg=parameters['node_nseg'],
                        Ra=parameters['node_Ra'],
                        cm=parameters['node_cm'],
                        mechanisms=(Mechanism('cortical_axon_i_leak',
                                              g_l=0.02),
                                    Mechanism('cortical_axon_i_na',
                                              g_Na=2800e-4),
                                    Mechanism('cortical_axon_i_kv', g_Kv=5e-4),
                                    Mechanism('cortical_axon_i_kd',
                                              g_Kd=0.0072)),
                        parent=self.myelin[i]))

        self.collateral = Section(
            L=parameters['collateral_L'],
            diam=parameters['collateral_diam'],
            nseg=parameters['collateral_nseg'],
            Ra=parameters['collateral_Ra'],
            cm=parameters['collateral_cm'],
            mechanisms=(Mechanism('cortical_axon_i_leak'),
                        Mechanism('cortical_axon_i_na', g_Na=1333.33333e-4),
                        Mechanism('cortical_axon_i_kv', g_Kv=10e-4),
                        Mechanism('cortical_axon_i_kd', g_Kd=0.006)),
            parent=self.node[-1])

        middle_index = int((parameters['num_axon_compartments'] / 2.0))
        self.middle_node = self.node[middle_index]
        self.middle_myelin = self.myelin[middle_index]

        # Add extracellular and xtra mechanisms to collateral
        self.collateral.insert('extracellular')
        self.collateral.insert('xtra')

        # Assign default rx values to the segments rx_xtra
        #  - these values are updated in the main run file
        # 	 where rx is calculated as the transfer resistance
        #    for each collateral segments to the stimulation
        #    electrode in the homogenous extracellular medium
        for seg in self.collateral:
            seg.xtra.rx = seg.x * 3e-1

        # Setting pointers to couple extracellular and xtra mechanisms for simulating extracellular DBS
        for seg in self.collateral:
            h.setpointer(seg._ref_e_extracellular, 'ex', seg.xtra)
            h.setpointer(seg._ref_i_membrane, 'im', seg.xtra)

        # Add bias current to neuron model - current amplitude is in terms of original model paper, nA
        self.stim = h.IClamp(0.5, sec=self.soma)
        self.stim.delay = 0
        self.stim.dur = 1e12
        self.stim.amp = parameters['soma_bias_current_amp']

        # insert synaptic noise
        self.noise = h.SynNoise(0.5, sec=self.soma)
        self.noise.f0 = 0
        self.noise.f1 = 0.3

        # Add AMPA and GABAa synapses to the cell, i.e. add to the soma section
        self.AMPA = h.AMPA_S(0.5, sec=self.soma)
        self.GABAa = h.GABAa_S(0.5, sec=self.soma)

        # needed for PyNN
        self.source = {
            'soma': self.soma(0.5)._ref_v,
            'middle_axon_node': self.middle_node(0.5)._ref_v,
            'collateral': self.collateral(0.5)._ref_v
        }
        self.source_section = {
            'soma': self.soma,
            'middle_axon_node': self.middle_node,
            'collateral': self.collateral
        }
        self.rec = h.NetCon(self.source['collateral'],
                            None,
                            sec=self.source_section['collateral']
                            )  # Needed to clear the simulator
        self.spike_times = h.Vector(0)
        self.traces = {}
        self.recording_time = False
        self.parameter_names = ()