mind-inria / mri-nufft

Doing non-Cartesian MR Imaging has never been so easy.
https://mind-inria.github.io/mri-nufft/
BSD 3-Clause "New" or "Revised" License
54 stars 10 forks source link

Clean CPU examples #196

Closed Daval-G closed 1 month ago

Daval-G commented 2 months ago

This PR cleans the CPU examples in several ways:

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 commented 2 months ago

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

paquiteau commented 2 months ago

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

RTFM :upside_down_face: 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 commented 2 months ago

Very nice improvements, thanks!

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

Done

Daval-G commented 2 months ago

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 commented 2 months ago

@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