Skip to content

Commit

Permalink
removing unnecessary filter sum normalization for bilinear
Browse files Browse the repository at this point in the history
  • Loading branch information
gvarnavi committed Dec 10, 2023
1 parent c5fe56d commit 853e978
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions py4DSTEM/process/phase/iterative_parallax.py
Original file line number Diff line number Diff line change
Expand Up @@ -1874,7 +1874,7 @@ def _bilinearly_interpolate_array(

raveled_image = image.ravel()
intensities = xp.zeros(xa.shape, dtype=xp.float32)
filter_weights = xp.zeros(xa.shape, dtype=xp.float32)
# filter_weights = xp.zeros(xa.shape, dtype=xp.float32)

for inds, weights in zip(all_inds, all_weights):
intensities += (
Expand All @@ -1887,9 +1887,9 @@ def _bilinearly_interpolate_array(
]
* weights
)
filter_weights += weights
# filter_weights += weights

return intensities / filter_weights
return intensities # / filter_weights # unnecessary, sums up to unity

def _lanczos_interpolate_array(
self,
Expand Down

0 comments on commit 853e978

Please sign in to comment.