Skip to content

Commit

Permalink
Added default ChannelModel backend
Browse files Browse the repository at this point in the history
  • Loading branch information
rgerkin committed Jun 20, 2019
1 parent 73ffa26 commit 94f3202
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions neuronunit/models/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
class ChannelModel(LEMSModel, cap.NML2ChannelAnalysis):
"""A model for ion channels"""

def __init__(self, channel_file_path_or_url, channel_index=0, name=None):
def __init__(self, channel_file_path_or_url, channel_index=0, name=None, backend='jNeuroML'):
"""
channel_file_path: Path to NML file.
channel_index: Order of channel in NML file
Expand All @@ -23,7 +23,7 @@ def __init__(self, channel_file_path_or_url, channel_index=0, name=None):
base, file_name = os.path.split(channel_file_path_or_url)
name = file_name.split('.')[0]
super(ChannelModel, self).__init__(channel_file_path_or_url, name=name,
backend='jNeuroML')
backend=backend)
channels = ca.get_channels_from_channel_file(self.orig_lems_file_path)
self.channel = channels[channel_index]
self.a = None
Expand Down Expand Up @@ -67,8 +67,8 @@ def ca_make_lems_file(self, **params):
self.ca_namespace)

def ca_run_lems_file(self, verbose=True):
results = ca.run_lems_file(self.lems_file_path, verbose)
return results
self.run(verbose=verbose)
return self.results

def ca_compute_iv_curve(self, results):
iv_data = ca.compute_iv_curve(self.channel, self.ca_namespace, results)
Expand Down

0 comments on commit 94f3202

Please sign in to comment.