Skip to content

Commit

Permalink
Bug fix: changed python commentting style to matlab in script template
Browse files Browse the repository at this point in the history
  • Loading branch information
Bogdan Petre committed Oct 30, 2024
1 parent 8d14704 commit f508c9a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Binary file modified nipype/canlabCore/__pycache__/preproc.cpython-39.pyc
Binary file not shown.
9 changes: 6 additions & 3 deletions nipype/canlabCore/preproc.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def _run_interface(self, runtime):
movement_radians=self.inputs.movement_radians,
fd_thresh=self.inputs.fd_thresh,
out_file=self.inputs.out_file)

# This is your MATLAB code template
script = Template(
"""in_file = '$in_file';
Expand All @@ -92,9 +93,11 @@ def _run_interface(self, runtime):
end
[~,~,outlier_tables] = outliers(fmri_data(in_file), varargin{:});
outlier_ind = find(any(outlier_tables.outlier_regressor_matrix_corr,2));
# python-like 0-index
outlier_ind = outlier_ind - 1;
csvwrite(out_file, outlier_ind);
% python-like 0-index
if ~isempty(outlier_ind)
outlier_ind = outlier_ind - 1;
end
csvwrite('$out_file', outlier_ind);
exit;
"""
).substitute(d)
Expand Down

0 comments on commit f508c9a

Please sign in to comment.