Skip to content

Commit

Permalink
put debug prints in calc_cartesian_dcw
Browse files Browse the repository at this point in the history
  • Loading branch information
evgueni-ovtchinnikov committed Jun 19, 2024
1 parent 5849c07 commit df80044
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/xGadgetron/pGadgetron/Gadgetron.py
Original file line number Diff line number Diff line change
Expand Up @@ -1855,12 +1855,18 @@ def calc_cartesian_dcw(ad):
traj, inverse, counts = numpy.unique(traj, return_inverse=True, return_counts=True, axis=1)

density_weight = (1.0 / counts)[inverse]
print(density_weight.shape)

density_weight = numpy.expand_dims(density_weight, axis=1)
print(density_weight.shape)
density_weight = numpy.expand_dims(density_weight, axis=2)
print(density_weight.shape)
print(ad.shape)
density_weight = numpy.tile(density_weight, (1, ad.shape[1], ad.shape[2]))
print(density_weight.shape)

dcw = ad.copy()
print(dcw.shape)
dcw.fill(density_weight)

return dcw
Expand Down

0 comments on commit df80044

Please sign in to comment.