Created
May 17, 2016 11:55
-
-
Save mstimberg/7164945c8db0c187e7a227927b21d775 to your computer and use it in GitHub Desktop.
Print out the
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def print_schedule(network=None): | |
if network is None: | |
network = magic_network | |
network._update_magic_objects(level=1) | |
network._sort_objects() | |
print('Available slots (also "before_..." and "after_..."):\n%s\n' % network.schedule) | |
print('Slot Order Name') | |
prev_slot = None | |
for obj in network.objects: | |
if isinstance(obj, (Synapses, NeuronGroup)): | |
continue | |
if obj.when != prev_slot: | |
prev_slot = obj.when | |
print('-----------------------------------------------------------------') | |
print('{obj.when:<20}{obj.order:<20}{obj.name}'.format(obj=obj)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment