Skip to content

Commit

Permalink
Final touchups
Browse files Browse the repository at this point in the history
  • Loading branch information
chaithyagr committed Apr 11, 2024
1 parent a21a76a commit 5099c6a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/mrinufft/extras/smaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


def extract_kspace_center(
kspace_data, kspace_loc, threshold=None, window_fun="ellipse",
kspace_data, kspace_loc, threshold=None, density=None, window_fun="ellipse",
):
r"""Extract k-space center and corresponding sampling locations.
Expand Down Expand Up @@ -70,6 +70,8 @@ def extract_kspace_center(
index = xp.extract(condition, index)
center_locations = kspace_loc[index, :]
data_thresholded = data_ordered[:, index]
dc = density[index]
return data_thresholded, center_locations, dc
else:
if callable(window_fun):
window = window_fun(center_locations)
Expand All @@ -83,8 +85,8 @@ def extract_kspace_center(
else:
raise ValueError("Unsupported window function.")
data_thresholded = window * data_thresholded
# Return k-space locations just for consistency
return data_thresholded, kspace_loc
# Return k-space locations & density just for consistency
return data_thresholded, kspace_loc, density


@register_smaps
Expand Down

0 comments on commit 5099c6a

Please sign in to comment.