Skip to content

Commit

Permalink
Fix odd comment placement
Browse files Browse the repository at this point in the history
  • Loading branch information
melanieclarke committed Jan 30, 2025
1 parent 3901bd8 commit a60403e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions jwst/clean_flicker_noise/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,9 +447,9 @@ def __init__(
)
self.data[np.isinf(self.data)] = np.nan # Restore NaNs

bdpx[np.logical_not(self.mask)] = (
0 # We don't need to worry about non-background pixels
)
# We don't need to worry about non-background pixels
bdpx[np.logical_not(self.mask)] = 0

# Also flag 4 nearest neighbors
bdpx = (
bdpx
Expand Down Expand Up @@ -536,10 +536,10 @@ def fit(self, return_fit=False, weight_fit=False):

# NSClean's weighting requires the Moore-Penrose inverse of A = P*B.
# $A^+ = (A^H A)^{-1} A^H$
_a = (
p_matrix.reshape((-1, 1)) * basis
) # P is diagonal. Hadamard product is most RAM efficient
_a_h = np.conjugate(_a.transpose()) # Hermitian transpose of A
# P is diagonal. Hadamard product is most RAM efficient
_a = p_matrix.reshape((-1, 1)) * basis
# Hermitian transpose of A
_a_h = np.conjugate(_a.transpose())
pinv_pb = np.matmul(np.linalg.inv(np.matmul(_a_h, _a)), _a_h)

else:
Expand Down

0 comments on commit a60403e

Please sign in to comment.