mmuckley / torchkbnufft

A high-level, easy-to-deploy non-uniform Fast Fourier Transform in PyTorch.
https://torchkbnufft.readthedocs.io/
MIT License
204 stars 44 forks source link

Add density compensator from Pipe et al #13

Closed chaithyagr closed 3 years ago

chaithyagr commented 3 years ago

Hello @mmuckley Based on email conversation, I have implemented the Pipe et al's density compensation estimator. I am not sure if the earlier implementation was of Pipe, it was basically that radially we give more weights to farther from center of kspace. This would work only for densities which are radially symmetric and also which have densities which vary as 1/R^2 where R is distance from center of kspace.

This implementation is more generic and can be used pretty much for any kind of trajectories as it accumulates the weights by successive interpolation and gridding

Feel free to let me know if you have issues in running or anything abnormal due to my codes.

mmuckley commented 3 years ago

@chaithyagr This is great! Would you mind adding a unit test? You could make a new test_dcomp.py file under tests. It doesn't have to be anything fancy - you could just run the code with the NUFFT and make sure it runs without exception.

mmuckley commented 3 years ago

I'm going to go ahead and merge this and then make some modifications for the update I'm working on. Thanks!

chaithyagr commented 3 years ago

Im sorry i didnt get time to get to the test @mmuckley . I will make a PR for it when I get free

mmuckley commented 3 years ago

@chaithyagr I wouldn't do it for now - I've pretty much rewritten everything, lots of backwards-breaking changes. I'll ask for your comment when I PR the new version, if you don't mind looking at it.