Skip to content

Commit

Permalink
fix: Preserve n/a during FD sum
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Feb 7, 2025
1 parent 22163d3 commit 8c02a8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fmriprep/interfaces/confounds.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def _run_interface(self, runtime):
diff = motion[['trans_x', 'trans_y', 'trans_z', 'rot_x', 'rot_y', 'rot_z']].diff()
diff[['rot_x', 'rot_y', 'rot_z']] *= self.inputs.radius

fd = pd.DataFrame(diff.abs().sum(axis=1), columns=['FramewiseDisplacement'])
fd = pd.DataFrame(diff.abs().sum(axis=1, skipna=False), columns=['FramewiseDisplacement'])

fd.to_csv(self._results['out_file'], sep='\t', index=False)

Expand Down

0 comments on commit 8c02a8d

Please sign in to comment.