diff --git a/utils/interpolate.py b/utils/interpolate.py index 45709c2..b48459d 100755 --- a/utils/interpolate.py +++ b/utils/interpolate.py @@ -31,9 +31,9 @@ def get_parser(): '-t', '--tmask', action='store', required=True, help='[required]' '\nTemporal mask indicating whether each volume is seen or ' - '\nunseen. For instance, 1 (or >1) indicates that a volume ' - '\nshould be scrubbed, while 0 would indicate that the ' - '\nvolume should be retained.') + '\nunseen. For instance, 1 indicates that a volume ' + '\nshould be retained, while 0 would indicate that the ' + '\nvolume should be fixed.') parser.add_argument( '-m', '--mask', action='store', help='\nSpatial mask indicating the voxels of the input image ' @@ -81,7 +81,7 @@ def get_parser(): tmask = np.loadtxt(opts.tmask) indices = tmask.shape[-1] -t_obs=np.array(np.where(tmask != 0)) +t_obs=np.array(np.where(tmask == 0)) ########################################################################## # Total timespan of seen observations, in seconds @@ -99,8 +99,9 @@ def get_parser(): n_samples_seen = seen_samples.shape[-1] if n_samples_seen == nvol: raise ValueError('No interpolation is necessary for this dataset.') -#if n_samples_seen / nvol > 0.7: - #raise ValueError('More than 70% of the timepoints are to be interpolated.') +if n_samples_seen / nvol > 0.7: + raise ValueError('More than 70% ({}%) of the timepoints are to be interpolated.'.format( + 100.0 * n_samples_seen / nvol)) ########################################################################## # Temoral indices of all observations, seen and unseen ##########################################################################