diff --git a/phys2cvr/cli/run.py b/phys2cvr/cli/run.py index 3bd917c..9f68d46 100644 --- a/phys2cvr/cli/run.py +++ b/phys2cvr/cli/run.py @@ -193,10 +193,9 @@ def _get_parser(): default=0) opt_regr.add_argument('-dmat', '--denoise-matrix', dest='denoise_matrix', - action='append', nargs='*', type=str, - help=('Complete path (absolute or relative) and name ' + help=('Complete path (absolute or relative) and filename ' 'of denoising matrices to add to the regression model. ' 'This option can be specified multiple times to ' 'add multiple denoising matrices, but multiple ' diff --git a/phys2cvr/phys2cvr.py b/phys2cvr/phys2cvr.py index 971a433..ac0f3c9 100755 --- a/phys2cvr/phys2cvr.py +++ b/phys2cvr/phys2cvr.py @@ -127,7 +127,7 @@ def phys2cvr(fname_func, fname_co2=None, fname_pidx=None, fname_mask=None, phys2cvr will add all polynomials up to the specified order (e.g. if user specifies 3, orders 0, 1, 2, and 3 will be added). Default is 0, which will model only the mean of the timeseries. - denoise_matrix : list of np.array(s), optional + denoise_matrix : list of str(s) or path(s), optional Add one or multiple denoising matrices to the regression model. Ignored if not performing the regression step. scale_factor : str, int, or float, optional @@ -359,6 +359,7 @@ def phys2cvr(fname_func, fname_co2=None, fname_pidx=None, fname_mask=None, # Read in eventual denoising factors if denoise_matrix: + denoise_matrix = io.if_declared_force_type(denoise_matrix, 'list', 'denoise_matrix') for matrix in denoise_matrix: LGR.info(f'Read confounding factor from {matrix}') conf = np.genfromtxt(matrix)