bluepyopt.ephys.morphologies

Morphology classes

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

Arbor morphology utilities

static extract_nrn_seclists(icell, seclists)[source]

Extract section lists from an instantiated cell (axon replacement)

Parameters:
  • () (seclists) – Instantiated cell model in the NEURON simulator.

  • () – List of section lists to extract

  • ['axon' ((typically ['axon'] or)

  • 'myelin']).

static load(morpho_filename, replace_axon)[source]

Load morphology and optionally perform axon replacement

Parameters:
  • morpho_filename (str) – Path to file with original morphology.

  • () (replace_axon) – Path to/ACC string for morphology to replace

  • with (axon)

static replace_axon(morphology, replacement=None)[source]

return a morphology with the axon replaced by another morphology

Parameters:
  • morphology (arbor.morphology) – The original Arbor morphology

  • () (replacement) – An Arbor morphology to replace the axon with

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, axon_stub_length=60, axon_nseg_frequency=40, nseg_frequency=40, morph_modifiers=None, morph_modifiers_hoc=None, morph_modifiers_kwargs=None)[source]

Morphology loaded from a file

Constructor

Parameters:
  • morphology_path (str or Path) – 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

  • axon_stub_length (float) – Length of replacement axon

  • axon_nseg_frequency (int) – frequency of nseg, for axon

  • 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

  • morph_modifiers_kwargs (dict) – kwargs for morph_modifiers functions

destroy(sim=None)[source]

Destroy morphology instantiation

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

Load morphology

static replace_axon(sim=None, icell=None, axon_stub_length=60, axon_nseg_frequency=40)[source]

Replace axon

set_nseg(icell)[source]

Set the nseg of every section