def test_11_an_epoch_poststimulus(self): stimparameters = { "type": ["current", "IClamp"], "stimlist": [{ "amp": 0.5, "dur": 100.0, "delay": 10.0 }, { "amp": 1.0, "dur": 50.0, "delay": 10.0 + 100.0 }], "tstop": 200.0 } epoch_value = eg.an_epoch(3, "axon", stimparameters) compare2 = epoch_value["description"] compare1 = "last, no stimulus" #print epoch_value # hows does an epoch metadata look? self.assertEqual(compare2, compare1)
def test_7_an_epoch_prestimulus(self): stimparameters = { "type": ["current", "IClamp"], "stimlist": [{ "amp": 0.5, "dur": 100.0, "delay": 10.0 }, { "amp": 1.0, "dur": 50.0, "delay": 10.0 + 100.0 }], "tstop": 10.0 + 100.0 + 50.0 } epoch_value = eg.an_epoch(0, "soma", stimparameters) compare2 = epoch_value["start_time"] + epoch_value["stop_time"] compare1 = 0.0 + stimparameters["stimlist"][0]["delay"] #print epoch_value # how does an epoch metadata look? self.assertEqual(compare2, compare1)
def test_10_an_epoch_laststimulus_notequals_tstop(self): stimparameters = { "type": ["current", "IClamp"], "stimlist": [{ "amp": 0.5, "dur": 100.0, "delay": 10.0 }, { "amp": 1.0, "dur": 50.0, "delay": 10.0 + 100.0 }], "tstop": 200.0 } epoch_value = eg.an_epoch(2, "axon", stimparameters) compare2 = epoch_value["description"] compare1 = "IClamp stimulation of model with amplitude = " + \ str(stimparameters["stimlist"][1]["amp"]) + " nA" #print epoch_value # hows does an epoch metadata look? self.assertEqual(compare2, compare1)