Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DCAN] QCPlot shows FD after filtering #576

Closed
tsalo opened this issue Oct 14, 2022 · 3 comments · Fixed by #581
Closed

[DCAN] QCPlot shows FD after filtering #576

tsalo opened this issue Oct 14, 2022 · 3 comments · Fixed by #581
Labels
bug Issues noting problems and PRs fixing those problems. dcan DCAN-related issues and PRs

Comments

@tsalo
Copy link
Member

tsalo commented Oct 14, 2022

Summary

Based on the code below, it looks like QCPlot uses the filtered framewise displacement values in both the preprocessing and postprocessing carpet+line plots. This is probably misleading to users, since it seems like no filtering was done between the two versions.

confound_matrix = load_confound(datafile=self.inputs.bold_file)[0]
motion_conf = load_motion(
confound_matrix.copy(),
TR=self.inputs.TR,
motion_filter_type=self.inputs.motion_filter_type,
motion_filter_order=self.inputs.motion_filter_order,
freqband=[self.inputs.low_freq, self.inputs.high_freq])
# Pull out motion confounds
motion_df = pd.DataFrame(data=motion_conf.values,
columns=[
"rot_x", "rot_y", "rot_z", "trans_x",
"trans_y", "trans_z"
])
# Compute fd_timeseries from motion_confounds df
fd_timeseries = compute_fd(confound=motion_df,
head_radius=self.inputs.head_radius)

@tsalo tsalo added the bug Issues noting problems and PRs fixing those problems. label Oct 14, 2022
@tsalo
Copy link
Member Author

tsalo commented Oct 14, 2022

It might also be a good idea to show the power spectrum of the FD trace before and after filtering.

@tsalo tsalo changed the title Preprocessing QC plot only shows FD after filtering QCPlot shows FD after filtering Oct 17, 2022
@tsalo
Copy link
Member Author

tsalo commented Oct 17, 2022

@madisoth corrected me on this- we don't want to show unfiltered FD for preprocessed data and filtered for postprocessed data, because the filtered FD is only used for censoring; it's not used for denoising. As such, we want to show the unfiltered FD in both plots. #579 adds a new censoring plot to the summary reports, so users should be less confused.

@tsalo
Copy link
Member Author

tsalo commented Jun 7, 2023

As it turns out, they DCAN team does want us to use the filtered FD for denoising. Not sure why they wanted us to only show unfiltered FD in the plots.

@tsalo tsalo changed the title QCPlot shows FD after filtering [DCAN] QCPlot shows FD after filtering Jun 7, 2023
@tsalo tsalo added the dcan DCAN-related issues and PRs label Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues noting problems and PRs fixing those problems. dcan DCAN-related issues and PRs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant