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

Repeated nilearn warning message for report #1092

Closed
handwerkerd opened this issue May 2, 2024 · 1 comment · Fixed by #1103
Closed

Repeated nilearn warning message for report #1092

handwerkerd opened this issue May 2, 2024 · 1 comment · Fixed by #1103
Labels
reports issues related to boilerplate generation or visual reports

Comments

@handwerkerd
Copy link
Member

Summary

For certain anatomical images, nilearn is outputting the same warning message repeatedly (over 50 times in a run). It would be good to see if there is a way to prevent or suppress this warning.

Additional Detail

  • @mrneont shared this with me and might be able to provide more details
  • This is likely a result of Improve component plots #1045 which switched to using plot_stat_map with nilearn to generate brain images for the report
  • The message is /usr/local/apps/tedana/conda/envs/24.0.0/lib/python3.9/site-packages/nilearn/plotting/displays/_slicers.py:1949: UserWarning: A non-diagonal affine is found in the given image. Reordering the image to get diagonal affine for finding cuts in the slices. coords[direction] = find_cut_slices(
  • It looks like the warning his about how it is handling a specific situation instead of an actual problem, but I asked them to confirm the output in the report looks correct
  • @mrneont thinks the issue is that nilearn is expecting data in RAS+ orientation (right, anterior, superior), but these data were in ASL (anterior, superior, left) and it might not be handling the interaction between that and obliquity. If this is the case, the Q is whether we can just find a way to suppress the warning or if this is also an issue that might need to get fixed within nilearn

Next Steps

  • Just documenting for now.
  • Hopefully someone who knows nilearn plotting a bit better can assess if this is easily addressable or a more complex issue
@handwerkerd handwerkerd added the reports issues related to boilerplate generation or visual reports label May 2, 2024
@tsalo
Copy link
Member

tsalo commented Jun 5, 2024

Let's just filter out that warning like this: https://stackoverflow.com/a/9134842/2589328

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
reports issues related to boilerplate generation or visual reports
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants