@@ -156,7 +156,13 @@ def compileModMechFiles(self, compileMod, modFolder):
156156 if modFolder :
157157 neuron .load_mechanisms (str (modFolder ))
158158
159- def loadModel (self , args ): # handles all data coming from a .json file (default file system for Netpyne)
159+ def loadModel (self , args ):
160+ """ Imports a model stored as file in json format.
161+
162+ :param args:
163+ :return:
164+ """
165+
160166 def remove (dictionary ):
161167 # remove reserved keys such as __dict__, __Method__, etc
162168 # they appear when we do sim.loadAll(json_file)
@@ -220,11 +226,12 @@ def remove(dictionary):
220226 if wake_up_geppetto :
221227 if len (sim .net .cells ) > 0 :
222228 section = list (sim .net .cells [0 ].secs .keys ())[0 ]
223- if not 'pt3d' in list (sim .net .cells [0 ].secs [section ].geom .keys ()):
229+ if 'pt3d' not in list (sim .net .cells [0 ].secs [section ].geom .keys ()):
224230 sim .net .defineCellShapes ()
225231 sim .gatherData ()
226232 sim .loadSimData (args ['jsonModelFolder' ])
227233
234+ sim .gatherData ()
228235 self .geppetto_model = self .model_interpreter .getGeppettoModel (sim )
229236 return json .loads (GeppettoModelSerializer .serialize (self .geppetto_model ))
230237 else :
@@ -233,6 +240,11 @@ def remove(dictionary):
233240 return utils .getJSONError ("Error while loading the NetPyNE model" , sys .exc_info ())
234241
235242 def importModel (self , modelParameters ):
243+ """ Imports a model stored in form of Python files.
244+
245+ :param modelParameters:
246+ :return:
247+ """
236248 try :
237249 # Get Current dir
238250 owd = os .getcwd ()
0 commit comments