Skip to content

Commit

Permalink
misc
Browse files Browse the repository at this point in the history
  • Loading branch information
grlee77 committed Nov 14, 2019
1 parent df64bf8 commit 3f7aa41
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
NUFFT
=====
High performance NUFFT based on a port of Jeff Fessler's Matlab NUFFT code
from his [image reconstruction toolbox](https://web.eecs.umich.edu/~fessler/code/).
High performance CPU/GPU NUFFT operator for Python.

Much of the code in this module is a based on Matlab routines originally
created by Jeff Fessler and his students at the University of Michigan. See
COPYING for more license info.
This library started as a port of the Matlab NUFFT code in the
[Michigan image reconstruction toolbox](https://web.eecs.umich.edu/~fessler/code/),
but has been substantially overhauled and GPU support has been added.

"""
See COPYING for more license info.

Basic Usage
===========
TODO
It is recommended to use the simplified interface provided by:

Documentation
=============
Expand All @@ -27,4 +26,4 @@ Recommended Dependencies
------------------------
- [matplotlib](https://matplotlib.org) (for plotting)
- [pyFFTW](https://github.com/pyFFTW/pyFFTW) (enable faster FFTS than numpy.fft)
- [mrrt.cuda](https://github.com/grlee77/mrrt.cuda) (code to support the GPU implementation is here)
- [cupy](https://github.com/cupy/cupy) (required for the GPU implementation)
10 changes: 10 additions & 0 deletions mrrt/nufft/_nufft.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ def __init__(
sparse_format="CSC",
adjoint_scalefactor=1.0,
kernel_kwargs={},
order="F",
verbose=False,
on_gpu=False,
):
Expand Down Expand Up @@ -202,6 +203,7 @@ def __init__(
if self.verbose:
print("Entering NufftBase init")
self.__init_complete = False # will be set true after __init__()
self.order = order

self.__on_gpu = on_gpu
# get the array module being used (based on state of self.on_gpu)
Expand Down Expand Up @@ -374,18 +376,26 @@ def xp(self):

# @profile
def _nufft_forward(self, x):
# if self.order == "C":
# x = x.transpose() # functions expect reps at end, not start
if self.mode == "exact":
y = nufft_forward_exact(self, x=x)
else:
y = nufft_forward(self, x=x)
# if self.order == "C":
# y = y.transpose() # functions return reps at end, not start
return y

# @profile
def _nufft_adj(self, x):
# if self.order == "C":
# x = x.transpose() # functions expect reps at end, not start
if self.mode == "exact":
y = nufft_adj_exact(self, xk=x)
else:
y = nufft_adj(self, xk=x)
# if self.order == "C":
# y = y.transpose() # functions return reps at end, not start
return y

def _set_phase_funcs(self):
Expand Down
1 change: 1 addition & 0 deletions requirements/default.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
numpy>=1.14.1
scipy>=0.19.0
cython>=0.23
mrrt.utils

0 comments on commit 3f7aa41

Please sign in to comment.