Skip to content

Commit 2fed1f7

Browse files
committed
fix: remove unused parameter 'do_reweighting' from save_results method
1 parent bf5a1cf commit 2fed1f7

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

commit/core.pyx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1461,7 +1461,7 @@ cdef class Evaluation :
14611461
return xic, xec, xiso
14621462

14631463

1464-
def save_results( self, path_suffix=None, coeffs_format='%.5e', stat_coeffs='sum', save_est_dwi=False, do_reweighting=True ) :
1464+
def save_results( self, path_suffix=None, coeffs_format='%.5e', stat_coeffs='sum', save_est_dwi=False ) :
14651465
"""Save the output (coefficients, errors, maps etc).
14661466
14671467
Parameters
@@ -1674,8 +1674,8 @@ cdef class Evaluation :
16741674
# Configuration and results
16751675
logger.subinfo('Configuration and results:', indent_char='*', indent_lvl=1)
16761676
log_list = []
1677-
ret_subinfo = logger.subinfo('streamline_weights.txt', indent_lvl=2, indent_char='-', with_progress=False if (hasattr(self.model, '_postprocess') and do_reweighting) else True)
1678-
with ProgressBar(disable=self.verbose < 3 or (hasattr(self.model, '_postprocess') and do_reweighting), hide_on_exit=True, subinfo=ret_subinfo, log_list=log_list):
1677+
ret_subinfo = logger.subinfo('streamline_weights.txt', indent_lvl=2, indent_char='-', with_progress=False if hasattr(self.model, '_postprocess') else True)
1678+
with ProgressBar(disable=self.verbose < 3 or hasattr(self.model, '_postprocess'), hide_on_exit=True, subinfo=ret_subinfo, log_list=log_list):
16791679
xic, _, _ = self.get_coeffs()
16801680
if stat_coeffs != 'all' and xic.size > 0 :
16811681
xic = np.reshape( xic, (-1,self.DICTIONARY['TRK']['kept'].size) )
@@ -1723,7 +1723,7 @@ cdef class Evaluation :
17231723
self.temp_data['RESULTS_path'] = RESULTS_path
17241724
self.temp_data['affine'] = self.niiDWI.affine if nibabel.__version__ >= '2.0.0' else self.niiDWI.get_affine()
17251725

1726-
if hasattr(self.model, '_postprocess') and do_reweighting:
1726+
if hasattr(self.model, '_postprocess') and (hasattr(self.model, 'lesion_mask') and self.model.lesion_mask):
17271727
self.model._postprocess(self.temp_data, verbose=self.verbose)
17281728
else:
17291729
np.savetxt( pjoin(RESULTS_path,'streamline_weights.txt'), xic, fmt=coeffs_format )

0 commit comments

Comments
 (0)