This repository was archived by the owner on Feb 26, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 4949 'myelinated' ]
5050
5151
52+ def generate_channels_by_location (mechs , location_order ):
53+ """Create a OrderedDictionary of all channel mechs for hoc template.
54+
55+ Args:
56+ mechs (list of bluepyopt.ephys.mechanisms.Mechanism): mechanisms
57+ location_order (list of str): order of locations
58+
59+ Returns: tuple of channels, point_channels and location order
60+ """
61+ loc_desc = _loc_desc
62+ return _generate_channels_by_location (mechs , location_order , loc_desc )
63+
64+
5265def _generate_channels_by_location (mechs , location_order , loc_desc ):
5366 """Create a OrderedDictionary of all channel mechs for hoc template."""
5467 channels = OrderedDict ((location , []) for location in location_order )
Original file line number Diff line number Diff line change 2020 'myelinated' ]
2121
2222
23+ @pytest .mark .unit
24+ def test_generate_channels_by_location ():
25+ """ephys.create_hoc: Test generate_channels_by_location"""
26+ mech = utils .make_mech ()
27+ public_res = create_hoc .generate_channels_by_location (
28+ [mech ], DEFAULT_LOCATION_ORDER ,
29+ )
30+ private_res = create_hoc ._generate_channels_by_location (
31+ [mech ], DEFAULT_LOCATION_ORDER , create_hoc ._loc_desc
32+ )
33+ assert public_res == private_res
34+
35+
2336@pytest .mark .unit
2437def test__generate_channels_by_location ():
2538 """ephys.create_hoc: Test _generate_channels_by_location"""
You can’t perform that action at this time.
0 commit comments