-
Notifications
You must be signed in to change notification settings - Fork 19
Add prephasors, rewinders etc. #276
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
Conversation
paquiteau
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here are some general comments, I don't understand it fully, but I do see that is great stuff nonetheless !
Co-authored-by: Pierre-Antoine Comby <[email protected]>
|
I think finallllyyyy, we have a good PR :) Sorry for the mess, i took most of all your comments in, but I think we need fresh round of reviews given that I did major changes to the codes. |
paquiteau
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was a big bite to chew, but nicely cooked !
I have some nitpicks suggestions and questions (That could be answered as comments in code for posterity)
| f"Maximum gradient amplitude: {maxG:.3f} > {gmax:.3f}" | ||
| f"Maximum slew rate: {maxS:.3f} > {smax:.3f}" | ||
| ) | ||
| if pregrad != "prephase": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be safer without the prephase check (we always want to raise warning if the slew-rate is not hardware compatible)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if ceil: | ||
| n_ramp_down = np.ceil(n_ramp_down).astype(int) | ||
| n_ramp_up = np.ceil(n_ramp_up).astype(int) | ||
| return n_ramp_down + buffer, n_ramp_up + buffer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the buffer ? Also in the rest of the code it is always equal to 1, consider just inlining it ? (with a comment to say why this buffer is required)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Buffer is just a way to allow for function to add buffers to give some extra rastre times so that the calculation wont fail in case we didnt fully converge or issues due to np.ceil on ramp length (discritization)
Co-authored-by: Pierre-Antoine Comby <[email protected]>
6f4e1bc to
8e54c61
Compare
paquiteau
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Daval-G
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I trust @paquiteau's approval and @chaithyagr on recent changes, I will take too much time to review otherwise
* Added * Fix * Remove bymistake add * Fix * Fixed lint * Lint * Added refbackend * Fix NDFT * feat: use finufft as ref backend. * feat(tests): move ndft vs nufft tests to own file. * Add support for pipe * \!docs_build try to run cufinufft tests * \!docs_build fix style * Added next235 for stability * Fix lint * Fix CUPY * WIP * Updates * fix back learn examples * move tto flatiron * fix black * Move to test on GPU * Update pyproject toml and use it in test-ci, to prevent duplication of dependencies and actually test them! * Make CI build shorter * Test run to run * \!docs_build Added * adding density normalization * Start support for finufft spread and interpolate (pipe) * Add support for density comp * Add support for normlize back * Added a bunch of extra codes * PEP fixes * Update siemens.py * Added fixes * add [docs] * Fixes and updates on the locatuions * Update the codes to be in sync with cufinufft / finufft 2.4.0 * Merged to master * [style] * Fix toml ffile [docs] * Fix toml ffile [docs] * Update testbatch stuff * Update the tests * Fixed tests againnnn * All set * Add finufft * Updates * Fixes * More fixes * make tests less strict again * remove bymistake * Remove strictness, everything works, hopefully [docs] * [docs] setup cufinufft also * [docs] fix style * [docs] more updates, fixes * pywavelets * [docs] fixes further * [docs] try again * [docs] final comments * [docs] method class use * WIP, updated codes to get itw orking * trying to vectorize * WIP * WIP * added direct change * More updates * Added timing and gradients * Update gradspec and codes * Update the error for slew * Added tests * Setup PEP, ready for review * Minor update on spec * WIP * Fixes for tests * fix docs * Update src/mrinufft/io/nsp.py Co-authored-by: Pierre-Antoine Comby <[email protected]> * remove unused stuff * Final fixes. [docs] * Haandleing comments * Update src/mrinufft/trajectories/tools.py Co-authored-by: Guillaume Daval-Frérot <[email protected]> * [docs] update the docnames * update TE_pos * style fixes * style fixes * Fix for ramps * Update src/mrinufft/trajectories/tools.py Co-authored-by: Guillaume Daval-Frérot <[email protected]> * Apply suggestions from code review Co-authored-by: Guillaume Daval-Frérot <[email protected]> * Update src/mrinufft/io/nsp.py Co-authored-by: Guillaume Daval-Frérot <[email protected]> * Update src/mrinufft/io/nsp.py Co-authored-by: Guillaume Daval-Frérot <[email protected]> * Update src/mrinufft/io/nsp.py Co-authored-by: Guillaume Daval-Frérot <[email protected]> * Update src/mrinufft/io/nsp.py Co-authored-by: Guillaume Daval-Frérot <[email protected]> * Handle comments * rename parameters and fix ordering * Handle comments * Update codes * More updates * Fixed some bugs * Update the tools * style fixes and [docs] * More bugs! Fixes * [WIP] * Updateds WIP * wip * WIP: moved to solvers * Fixed everything, ready for review * Update src/mrinufft/trajectories/tools.py Co-authored-by: Pierre-Antoine Comby <[email protected]> * style fixes * Update ruff * Added joblib * style changes [docs] * Apply suggestions from code review Co-authored-by: Pierre-Antoine Comby <[email protected]> * Renaming * Fix more comments * Undo changes * fix undo * refactor: split test in two --------- Co-authored-by: chaithyagr <[email protected]> Co-authored-by: Pierre-antoine Comby <[email protected]> Co-authored-by: Asma TANABENE <[email protected]> Co-authored-by: Guillaume Daval-Frérot <[email protected]> Co-authored-by: Pierre-Antoine Comby <[email protected]>
This is just the same PR #269 . Adding back @Daval-G and @j-obriot for review.