class ALController(object): """ Setup the antennal lobe network and control simulation, data presentation etc. """ def __init__(self, pynn, config): lg.info('building network') self.pynn = pynn self.net = AntennalLobe(pynn, config) def run_network(self, duration): lg.info('starting simulation for %.1f ms' % duration) self.pynn.run(duration) def set_pattern(self, pattern): lg.info("setting pattern in the AL.") self.net.set_pattern(pattern) def set_pattern_batch(self, patterns, time_per_pattern): """ set the driver spike rates such that all patterns are presented in sequence. """ lg.info('setting pattern batch in the AL.') self.net.set_batch_pattern(patterns, time_per_pattern) def retrieve_spikes(self): """ Retrieve the spikes produced in the network. """ lg.info('retrieving spikes.') return self.net.retrieve_spikes()
class ALController(object): """ Setup the antennal lobe network and control simulation, data presentation etc. """ def __init__(self, pynn, config): lg.info('building network') self.pynn = pynn self.net = AntennalLobe(pynn, config) def run_network(self, duration): lg.info('starting simulation for %.1f ms'%duration) self.pynn.run(duration) def set_pattern(self, pattern): lg.info("setting pattern in the AL.") self.net.set_pattern(pattern) def set_pattern_batch(self, patterns, time_per_pattern): """ set the driver spike rates such that all patterns are presented in sequence. """ lg.info('setting pattern batch in the AL.') self.net.set_batch_pattern(patterns, time_per_pattern) def retrieve_spikes(self): """ Retrieve the spikes produced in the network. """ lg.info('retrieving spikes.') return self.net.retrieve_spikes()
def __init__(self, pynn, config): lg.info('building network') self.pynn = pynn self.net = AntennalLobe(pynn, config)