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

Clean CPU examples #196

Merged
merged 5 commits into from
Sep 30, 2024
Merged

Clean CPU examples #196

merged 5 commits into from
Sep 30, 2024

Conversation

Daval-G
Copy link
Collaborator

@Daval-G Daval-G commented Sep 20, 2024

This PR cleans the CPU examples in several ways:

  • Change brain orientations to the medical standard
  • Reduce blank spaces around images
  • Remove some overlaps in figures
  • Split script-specific code from the utils and data preparation
  • Homogeneize parts and subparts names & structures
  • Homogeneize one-line descriptions
  • Homogeneize capitalizations, punctuations
  • Apply isort to clean imports
  • Fix a bunch of typos
  • Fix paragraph irregularities
  • Fix a few cross references
  • Break lines sometimes
  • Remove a few dead parts
  • Remove many useless outputs
  • Remove references to MFI in off-resonance operator (we don't do MFI but the opposite)

I will try to do the same for GPU examples later. Note that trajectory examples are barely touched, not because they are perfect but the opposite as I plan to break them into smaller examples as discussed in #118.

@Daval-G Daval-G added the documentation Improvements or additions to documentation label Sep 20, 2024
@Daval-G Daval-G requested a review from paquiteau September 20, 2024 18:08
@Daval-G Daval-G self-assigned this Sep 20, 2024
@Daval-G
Copy link
Collaborator Author

Daval-G commented Sep 20, 2024

By the way, how can we change the examples order in the gallery ? It doesn't make sense

Copy link
Member

@paquiteau paquiteau left a comment

Choose a reason for hiding this comment

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

Very nice improvements, thanks!

If you wish, you can also tackle #182 in this as well.

@paquiteau
Copy link
Member

By the way, how can we change the examples order in the gallery ? It doesn't make sense

RTFM 🙃 https://sphinx-gallery.github.io/stable/configuration.html#within-gallery-order

there are multiple possibilities; I guess FileNameSortKey and a proper naming scheme (example_01_...) could do the trick.

@Daval-G Daval-G requested a review from paquiteau September 28, 2024 08:54
@Daval-G
Copy link
Collaborator Author

Daval-G commented Sep 28, 2024

Very nice improvements, thanks!

If you wish, you can also tackle #182 in this as well.

Done

@Daval-G
Copy link
Collaborator Author

Daval-G commented Sep 28, 2024

By the way, how can we change the examples order in the gallery ? It doesn't make sense

RTFM 🙃 https://sphinx-gallery.github.io/stable/configuration.html#within-gallery-order

there are multiple possibilities; I guess FileNameSortKey and a proper naming scheme (example_01_...) could do the trick.

For now let's sort by example name rather than filename, until we decide of a specific order

@Daval-G
Copy link
Collaborator Author

Daval-G commented Sep 28, 2024

@paquiteau I cleaned the new CG example who seem to be problematic even on the main branch, but even after fixing it doesn't work as intended on my side (image not showing because the algorithm doesn't converge). I moved it to GPU examples because it uses gpuNUFFT even though I doubt it is a requirement, but since it didn't work on my side I didn't want to change too many things

@paquiteau paquiteau linked an issue Sep 30, 2024 that may be closed by this pull request
Copy link
Member

@paquiteau paquiteau left a comment

Choose a reason for hiding this comment

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

LGTM ! Thanks again :)

Don't worry for the CG example, we will take care of it later (@Lenoush ?)

@paquiteau paquiteau merged commit acdd379 into master Sep 30, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use stdlib tempfile module for examples
3 participants