def build_hh_cell(sim, cell_area=None): if cell_area is None: cell_area = unit('5000:um2') morphology = MorphologyBuilder.get_single_section_soma(area=cell_area) cell = sim.create_cell(morphology=morphology) # Apply the channels uniformly over the cell env = sim.environment modelsrc = StandardModels.HH52 cell.apply_channel( ChannelLibrary.get_channel(modelsrc=modelsrc, celltype=None, channeltype="Na", env=env)) cell.apply_channel( ChannelLibrary.get_channel(modelsrc=modelsrc, celltype=None, channeltype="K", env=env)) cell.apply_channel( ChannelLibrary.get_channel(modelsrc=modelsrc, celltype=None, channeltype="Lk", env=env)) return cell
def __init__(self, morphology=None, area=None, segmenter=None, initial_voltage=None, cell_tags=None, cell_type=None, **kwargs): if area is not None: assert morphology is None morphology = MorphologyBuilder.get_single_section_soma(area=area) if cell_tags == None: cell_tags = [] from morphforge.simulation.base.segmentation.cellsegmenter import CellSegmenter_MaxCompartmentLength super(Cell, self).__init__(**kwargs) self.morphology = morphology self._cell_type = cell_type self.cell_segmenter = (segmenter if segmenter else CellSegmenter_MaxCompartmentLength()) #self.cell_segmenter.connect_to_cell(self) self.biophysics = CellBiophysics(self) self.initial_voltage = initial_voltage or qty('-51:mV') self.cell_tags = cell_tags if self.name: self.cell_tags = self.cell_tags + [self.name] self.population = None
def __init__(self, morphology=None, area=None, segmenter=None, initial_voltage=None, cell_tags=None, cell_type=None, **kwargs): if area is not None: assert morphology is None morphology = MorphologyBuilder.get_single_section_soma(area=area) if cell_tags == None: cell_tags = [] from morphforge.simulation.base.segmentation.cellsegmenter import CellSegmenter_MaxCompartmentLength super(Cell, self).__init__(**kwargs) self.morphology = morphology self._cell_type = cell_type self.cell_segmenter = (segmenter if segmenter else CellSegmenter_MaxCompartmentLength()) self.cell_segmenter.connect_to_cell(self) self.biophysics = CellBiophysics(self) self.initial_voltage = initial_voltage or unit('-51:mV') self.cell_tags = cell_tags if self.name: self.cell_tags = self.cell_tags + [self.name] self.population = None
def build_hh_cell(sim, cell_area=None): if cell_area is None: cell_area = unit('5000:um2') morphology = MorphologyBuilder.get_single_section_soma(area = cell_area) cell = sim.create_cell(morphology=morphology) # Apply the channels uniformly over the cell env = sim.environment modelsrc=StandardModels.HH52 cell.apply_channel( ChannelLibrary.get_channel(modelsrc=modelsrc, celltype=None, channeltype="Na", env=env) ) cell.apply_channel( ChannelLibrary.get_channel(modelsrc=modelsrc, celltype=None, channeltype="K", env=env) ) cell.apply_channel( ChannelLibrary.get_channel(modelsrc=modelsrc, celltype=None, channeltype="Lk", env=env) ) return cell