@@ -139,7 +139,6 @@ def run_emodel_morph(
139139 if hasattr (setup , 'multieval' ):
140140
141141 prefix = 'mm'
142-
143142 altmorph = [[prefix , morph_path , apical_point_isec ]]
144143 evaluator = setup .evaluator .create (etype = '%s' % emodel ,
145144 altmorph = altmorph )
@@ -193,7 +192,7 @@ def run_emodel_morph(
193192
194193
195194def create_arg_list (scores_db_filename , emodel_dirs , final_dict ,
196- extra_values_error = False ):
195+ extra_values_error = False , use_apical_points = True ):
197196 """Create list of argument tuples to be used as an input for
198197 run_emodel_morph.
199198
@@ -203,6 +202,7 @@ def create_arg_list(scores_db_filename, emodel_dirs, final_dict,
203202 input files
204203 final_dict: a dict mapping e-models to dicts with e-model parameters
205204 extra_values_error: boolean to raise an exception upon a missing key
205+ use_apical_points: boolean to use apical points or not
206206
207207 Raises:
208208 ValueError, if one of the database entries contains has value None for
@@ -217,7 +217,7 @@ def create_arg_list(scores_db_filename, emodel_dirs, final_dict,
217217
218218 apical_points_isec = {}
219219 setup = tools .load_module ('setup' , emodel_dirs [one_row ['emodel' ]])
220- if hasattr (setup , 'multieval' ):
220+ if hasattr (setup , 'multieval' ) and use_apical_points :
221221 apical_points_isec = tools .load_json (
222222 os .path .join (one_row ['morph_dir' ], "apical_points_isec.json" )
223223 )
@@ -320,7 +320,8 @@ def expand_scores_to_score_values_table(scores_sqlite_filename):
320320
321321
322322def calculate_scores (final_dict , emodel_dirs , scores_db_filename ,
323- use_ipyp = False , ipyp_profile = None , timeout = 10 ):
323+ use_ipyp = False , ipyp_profile = None , timeout = 10 ,
324+ use_apical_points = True ):
324325 """Calculate scores of e-model morphology combinations and update the
325326 database accordingly.
326327
@@ -333,10 +334,14 @@ def calculate_scores(final_dict, emodel_dirs, scores_db_filename,
333334 use_ipyp: bool indicating whether ipyparallel is used. Default is
334335 False.
335336 ipyp_profile: path to ipyparallel profile. Default is None.
337+ use_apical_points: boolean to use apical points or not
336338 """
337339
338340 print ('Creating argument list for parallelisation' )
339- arg_list = create_arg_list (scores_db_filename , emodel_dirs , final_dict )
341+ arg_list = create_arg_list (scores_db_filename ,
342+ emodel_dirs ,
343+ final_dict ,
344+ use_apical_points = use_apical_points )
340345
341346 print ('Parallelising score evaluation of %d me-combos' % len (arg_list ))
342347
0 commit comments