Skip to content

Conversation

@chaithyagr
Copy link
Member

This is just the same PR #269 . Adding back @Daval-G and @j-obriot for review.

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.

Here are some general comments, I don't understand it fully, but I do see that is great stuff nonetheless !

@chaithyagr chaithyagr requested a review from paquiteau July 25, 2025 12:40
@chaithyagr
Copy link
Member Author

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.

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.

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":
Copy link
Member

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)

Copy link
Member Author

Choose a reason for hiding this comment

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

naahh, i disagree.. As @Daval-G mentioned, the sequence can handle pre-phasors right. This warning shouyld come up only in the case of UTE trajectories.. I think I am handeling that in #273

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
Copy link
Member

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)

Copy link
Member Author

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)

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 !
I will see how we can rebase #277 and #283 on top of it properly

Copy link
Collaborator

@Daval-G Daval-G left a 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

@chaithyagr chaithyagr merged commit c7fb11b into master Aug 20, 2025
13 checks passed
@paquiteau paquiteau deleted the add_prephasors branch September 24, 2025 16:54
paquiteau added a commit that referenced this pull request Sep 24, 2025
* 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]>
@paquiteau paquiteau added this to the v1.4 milestone Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

trajectories Issues concerning non-Cartesian trajectories

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prewind / Speed up trajectories and Rewind / Slow down trajectories in the binary file

4 participants