Skip to content

Commit

Permalink
normalise calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
chraibi committed Mar 16, 2024
1 parent 71a5ae3 commit 76212f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers/speed_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def compute_gaussian_weighted_speed_profile(
distance = np.sqrt(distance_x_expanded**2 + distance_y_expanded**2)

weights = _compute_gaussian_weights(distance, fwhm)
normalized_weights = weights # / np.sum(weights, axis=(0, 1), keepdims=True)
normalized_weights = weights / np.sum(weights, axis=(0, 1), keepdims=True)
weighted_speeds = np.tensordot(normalized_weights, speeds, axes=([2], [0]))
return np.array(weighted_speeds.T)

Expand Down

0 comments on commit 76212f7

Please sign in to comment.