Skip to content

Commit

Permalink
Bump to py script v0.1.6; More info on error with muscle input MVL24
Browse files Browse the repository at this point in the history
  • Loading branch information
pgleeson committed Jun 24, 2024
1 parent fd6b0c2 commit 230c8f8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
17 changes: 13 additions & 4 deletions main_sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion sibernetic_c302.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 230c8f8

Please sign in to comment.