brian2tools.nmlimport.nml module¶
- class brian2tools.nmlimport.nml.NMLMorphology(file_obj, name_heuristic=True)[source]¶
Bases:
objectA class that extracts and store all morphology related information from a .nml file.
- build_morphology(section, parent_section=None)[source]¶
A recursive function that converts Section tree to a Brian Morphology object.
- Parameters:
section (SectionObject) – An object of class SectionObject containing segment member information.
parent_section (SectionObject) – Parent of the section object passed.
- Returns:
Generated Brian morphology object.
- Return type:
Morphology
- get_channel_equations(ion_channel)[source]¶
This method extracts information for the
ion_channel idpassed as argument, convert required values toquantityobjects and substitute it in its corresponding template to generate ion channel equations. Currently this method only support ion channels of typeionChannelHHandionChannelPassive.- Parameters:
ion_channel (str) – ion channel id.
- Returns:
equation object for the given ion channel.
- Return type:
Equations
- get_resolved_group_ids(m)[source]¶
Returns dictionary of relative ids(i.e ids used inside Brian’s morphology) of all segments in each SegmentGroup present in given morphology object.
- Returns:
A dictionary of resolved segment ids of each SegmentGroup, here each SegmentGroup’s id is a key of this dictionary.
- Return type:
- get_segment_group_ids(group_id, morph)[source]¶
Returns segment ids of all segments of a SegmentGroup with id
group_idpresent in .nml file.