Skip to content

Commit

Permalink
another broadcasted calculation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Jashcraf committed Apr 19, 2024
1 parent 51099ad commit 151074b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion katsu/mueller.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def decompose_diattenuator(M):
diattenutation_norm = diattenuation_vector / D[..., np.newaxis]
else:
diattenutation_norm = diattenuation_vector / D

# DD = diattenutation_norm @ np.swapaxes(diattenutation_norm,-2,-1)
DD = broadcast_outer(diattenutation_norm, diattenutation_norm)

Expand All @@ -232,6 +232,7 @@ def decompose_diattenuator(M):

if M.ndim > 2:
I = np.broadcast_to(I, [*M.shape[:-2], 3, 3])
mD = mD[..., np.newaxis]

inner_diattenuator = mD * I + (1 - mD) * DD # Eq. 19 Lu & Chipman

Expand Down

0 comments on commit 151074b

Please sign in to comment.