diff --git a/main_sim.py b/main_sim.py index edba41a..0d350dc 100644 --- a/main_sim.py +++ b/main_sim.py @@ -194,8 +194,9 @@ def run(self, skip_to_time=-1): try: val = getattr(self.h, var)[0].soma.cai except AttributeError as e: - print(e) + print("Problem passing neuronal output of %s to muscle in Sibernetic: %s"%(var, e)) continue + val = 0 scaled_val = self._scale(val) values.append(scaled_val) vars_read.append(var) @@ -206,7 +207,8 @@ def run(self, skip_to_time=-1): try: val = getattr(self.h, var)[0].soma.cai except AttributeError as e: - print(e) + print("Problem passing neuronal output of %s to muscle in Sibernetic: %s"%(var, e)) + val = 0 continue scaled_val = self._scale(val) values.append(scaled_val) @@ -216,7 +218,13 @@ def run(self, skip_to_time=-1): try: val = getattr(self.h, var)[0].soma.cai except AttributeError as e: - print(e) + if var=='a_MVL24': + extra = "Note: not an issue as no muscle MVL24 in the real C. elegans" + else: + extra = '' + print("Problem passing output of %s to muscle in Sibernetic: %s %s"%(var, e, extra)) + + val = 0 continue scaled_val = self._scale(val) values.append(scaled_val) @@ -226,7 +234,8 @@ def run(self, skip_to_time=-1): try: val = getattr(self.h, var)[0].soma.cai except AttributeError as e: - print(e) + print("Problem passing neuronal output of %s to muscle in Sibernetic: %s"%(var, e)) + val = 0 continue scaled_val = self._scale(val) values.append(scaled_val) diff --git a/sibernetic_c302.py b/sibernetic_c302.py index e7827ab..b176fa1 100644 --- a/sibernetic_c302.py +++ b/sibernetic_c302.py @@ -9,7 +9,7 @@ import pprint pp = pprint.PrettyPrinter(indent=4) -script_version = '0.1.5' # This will change at different rate to C++ code... +script_version = '0.1.6' # This will change at different rate to C++ code... DEFAULTS = {'duration': 2.0, 'dt': 0.005,