Morphology classes

class bluepyopt.ephys.morphologies.Morphology(name='', comment='')[source]

Morphology class

class bluepyopt.ephys.morphologies.NrnFileMorphology(morphology_path, do_replace_axon=False, do_set_nseg=True, comment='', replace_axon_hoc=None, nseg_frequency=40, morph_modifiers=None, morph_modifiers_hoc=None)[source]

Morphology loaded from a file


  • morphology_path (str) – location of the file describing the morphology

  • do_replace_axon (bool) – Does the axon need to be replaced by an AIS stub with default function ?

  • replace_axon_hoc (str) – Translation in HOC language for the ‘replace_axon’ method. This code will ‘only’ be used when calling create_hoc on a cell model. While the model is run in python, replace_axon is used instead. Must include ‘proc replace_axon(){ … } If None,the default replace_axon is used

  • nseg_frequency (float) – frequency of nseg

  • do_set_nseg (bool) – if True, it will use nseg_frequency

  • morph_modifiers (list) – list of functions to modify the icell with (sim, icell) as arguments

  • morph_modifiers_hoc (list) – list of hoc strings corresponding to morph_modifiers


Destroy morphology instantiation

instantiate(sim=None, icell=None)[source]

Load morphology

static replace_axon(sim=None, icell=None)[source]

Replace axon


Set the nseg of every section