Skip to content

Commit

Permalink
Case with missing .mat extension was not covered
Browse files Browse the repository at this point in the history
  • Loading branch information
giadarol committed Feb 18, 2018
1 parent a49cc5e commit b5f3c06
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions init.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ def read_input_files_and_init_components(pyecl_input_folder='./', skip_beam=Fals
elif cc.chamb_type in ('polyg', 'polyg_cython'):
if os.path.isfile(pyecl_input_folder+'/'+cc.filename_chm):
filename_chm_path = pyecl_input_folder+'/'+cc.filename_chm
elif os.path.isfile(pyecl_input_folder+'/'+cc.filename_chm+'.mat'):
filename_chm_path = pyecl_input_folder+'/'+cc.filename_chm+'.mat'
else:
filename_chm_path = cc.filename_chm
chamb = gipfi.polyg_cham_geom_object(filename_chm_path, flag_non_unif_sey, **chamber_kwargs)
Expand Down Expand Up @@ -247,6 +249,8 @@ def read_input_files_and_init_components(pyecl_input_folder='./', skip_beam=Fals
kwargs_secem['flag_costheta_Emax_shift'] = cc.flag_costheta_Emax_shift
if os.path.isfile(pyecl_input_folder+'/'+cc.sey_file):
sey_file_path = pyecl_input_folder+'/'+cc.sey_file
elif os.path.isfile(pyecl_input_folder+'/'+cc.sey_file+'.mat'):
sey_file_path = pyecl_input_folder+'/'+cc.sey_file+'.mat'
else:
sey_file_path = cc.sey_file
sey_mod = SEY_model_from_file(sey_file_path, **kwargs_secem)
Expand Down

0 comments on commit b5f3c06

Please sign in to comment.