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

Random sampling #220

Merged
merged 14 commits into from
Jan 30, 2025
Merged

Random sampling #220

merged 14 commits into from
Jan 30, 2025

Conversation

paquiteau
Copy link
Member

@paquiteau paquiteau commented Dec 2, 2024

This PR adds random sampling extension for trajectories.
In particular, it adds a trajectory expansion function (stack_random) to stack 2D trajectory following a certain distribution.

  • Add examples
  • ([ ] Add ND sampling (e.g poisson disc))

An example of stack of spiral with uniform sampling (but fully sampled in the center of k-space)
Screenshot From 2024-12-02 15-15-50

@paquiteau paquiteau requested a review from Daval-G December 2, 2024 13:51
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.

Great idea for an additional tool. A bunch of comments mostly about aligning this function with other similar tools and also avoiding redundancy with PR #206

src/mrinufft/trajectories/display.py Show resolved Hide resolved
src/mrinufft/trajectories/utils.py Show resolved Hide resolved
src/mrinufft/trajectories/tools.py Outdated Show resolved Hide resolved
src/mrinufft/trajectories/tools.py Outdated Show resolved Hide resolved
src/mrinufft/trajectories/tools.py Outdated Show resolved Hide resolved
src/mrinufft/trajectories/tools.py Show resolved Hide resolved
src/mrinufft/trajectories/tools.py Outdated Show resolved Hide resolved
src/mrinufft/trajectories/tools.py Outdated Show resolved Hide resolved
src/mrinufft/trajectories/tools.py Outdated Show resolved Hide resolved
src/mrinufft/trajectories/tools.py Outdated Show resolved Hide resolved
@paquiteau
Copy link
Member Author

@Daval-G What do you think of this updated version ? also do not hesitate to check the example as well

@Daval-G
Copy link
Collaborator

Daval-G commented Jan 23, 2025

@paquiteau I am starting again to look at this request, but I won't finish tonight. I see that a bunch of my old comments are un-answered, could you have a look ? Thx

@paquiteau
Copy link
Member Author

I think now I have address everything you asked for :)

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.

Great improvements, only small comments remaining. Would you like to give a try to type hints ? If not it's OK, it was an itch from me but I don't want to impose it

examples/example_trajectory_tools.py Outdated Show resolved Hide resolved
examples/example_trajectory_tools.py Outdated Show resolved Hide resolved
examples/example_trajectory_tools.py Outdated Show resolved Hide resolved
examples/example_trajectory_tools.py Outdated Show resolved Hide resolved
examples/example_trajectory_tools.py Outdated Show resolved Hide resolved
examples/example_trajectory_tools.py Outdated Show resolved Hide resolved
examples/example_trajectory_tools.py Outdated Show resolved Hide resolved
examples/example_trajectory_tools.py Show resolved Hide resolved
src/mrinufft/trajectories/tools.py Outdated Show resolved Hide resolved
src/mrinufft/trajectories/tools.py Outdated Show resolved Hide resolved
@Daval-G Daval-G self-requested a review January 30, 2025 11:49
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.

LGTM

@paquiteau paquiteau merged commit b6d603d into master Jan 30, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants