def generate_cell(self):
     # cell = self.h.cell()
     from neuron import h as H
     H.load_file("cell_template.hoc")
     cell = H.cell()
     morphology_path = self.description.manifest.get_path('MORPHOLOGY')
     self.generate_morphology(cell, morphology_path)
     self.load_cell_parameters(cell)
     self.cell = cell
Example #2
0
    def attach_recordings(self, ntimepts):
        hoc_vectors = {
            'v': h.Vector(ntimepts),
            'ina': h.Vector(ntimepts),
            'ik': h.Vector(ntimepts),
            'ica': h.Vector(ntimepts),
            'i_leak': h.Vector(ntimepts),
            'i_cap': h.Vector(ntimepts),
        }

        hoc_vectors['v'].record(h.cell(0.5)._ref_v)
        hoc_vectors['ina'].record(h.cell(0.5)._ref_ina)
        hoc_vectors['ica'].record(h.cell(0.5)._ref_ica)
        hoc_vectors['ik'].record(h.cell(0.5)._ref_ik)
        hoc_vectors['i_leak'].record(h.cell(0.5).pas._ref_i)
        hoc_vectors['i_cap'].record(h.cell(0.5)._ref_i_cap)

        return hoc_vectors
Example #3
0
 def attach_clamp(self):
     h('objref clamp')
     clamp = h.IClamp(h.cell(0.5))
     clamp.delay = 0
     clamp.dur = h.tstop
     h.clamp = clamp