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

Small memory gain: default type of interp table to be complex64 #20

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
changed the default table type to be complex64 in order to gain in me…
…mory
  • Loading branch information
zaccharieramzi committed Jul 16, 2020
commit 2cade421497b741fdb94864e47830fdc98973550
4 changes: 2 additions & 2 deletions tfkbnufft/kbnufft.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class KbNufftModule(KbModule):

def __init__(self, im_size, grid_size=None, numpoints=6, n_shift=None,
table_oversamp=2**10, kbwidth=2.34, order=0, norm='None',
coil_broadcast=False, matadj=False):
coil_broadcast=False, matadj=False, table_dtype=np.complex64):
super(KbNufftModule, self).__init__()

self.im_size = im_size
Expand Down Expand Up @@ -82,7 +82,7 @@ def __init__(self, im_size, grid_size=None, numpoints=6, n_shift=None,
order=self.order,
alpha=self.alpha
)
self.table = table
self.table = table.astype(table_dtype)
assert len(self.table) == len(self.im_size)

scaling_coef = compute_scaling_coefs(
Expand Down