Skip to content

[MRG] FIX: Output NaN columns for CompCor on failure #1443

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

Merged
merged 13 commits into from
Dec 18, 2018

Conversation

effigies
Copy link
Member

@effigies effigies commented Dec 12, 2018

Closes #1433.

Changes proposed in this pull request

Documentation that should be reviewed

@oesteban
Copy link
Member

Should we add a warning to the reports when the column is all NaNs?

@effigies
Copy link
Member Author

I think that's probably a good idea, but haven't gotten around to it. I think a small warning box just below the BOLD masks figure would make the most sense.

Perhaps text like:

Warning: [at]CompCor components could not be estimated, due to a linear algebra error.
While not definitive, this may be an indication of a poor mask. Please inspect the (magenta|blue)
contours above to ensure that they are located in the white matter/CSF.

@oesteban
Copy link
Member

Ref nipreps/niworkflows#268

@effigies
Copy link
Member Author

@oesteban If you could review the logic of the new patched interfaces, that's the most likely place to need fixes. I added a snippet that will only show up as a comment so we can verify this in the CircleCI artifacts.

Copy link
Member

@oesteban oesteban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments, but looking very good in general.

I wonder whether after 10 failures we should call it an error (i.e. always raise in that case)

snippet = '''\
<p class="elem-desc">
Warning: {} components could not be estimated, due to a linear algebra error.
While not definitive, this may be an indication of a poor mask.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could do that, but why raise an error instead of issue a warning? The whole point of this is not to crash. People who care about CompCor can worry about why, but if they don't, the masks don't matter at all.

@effigies
Copy link
Member Author

I wonder whether after 10 failures we should call it an error (i.e. always raise in that case)

We already do that. The point is to give it a few chances to work and gracefully fail.

Copy link
Member Author

@effigies effigies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be fixed before merge, but proof of concept works, so merging nipy/nipype#2819 and can make a final round of cleanups in one go and check the CI output.

@effigies effigies changed the title FIX: Output NaN columns for CompCor on failure [MRG] FIX: Output NaN columns for CompCor on failure Dec 17, 2018
@effigies effigies merged commit 4369e64 into nipreps:master Dec 18, 2018
@effigies effigies deleted the fix/compcor_nans branch August 24, 2023 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multi echo: tCompCor - numpy.linalg.linalg.LinAlgError: SVD did not converge
2 participants