Skip to content

Commit

Permalink
Correction to how the reference dataset is built in do_pca_patch
Browse files Browse the repository at this point in the history
  • Loading branch information
JustLatour committed Nov 21, 2023
1 parent 96527f7 commit 77c5de0
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions vip_hci/psfsub/pca_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -805,24 +805,14 @@ def do_pca_patch(
if data_ref.shape[0] < min_frames_lib and matrix_ref is None:
raise RuntimeError(msg.format(len(indices_left), min_frames_lib))
else:
data_ref = None

if matrix_ref is not None:
# data_ref = None
# if matrix_ref is not None:
# Stacking the ref and the target ref (pa thresh) libraries
if data_ref is not None:
data_ref = np.vstack((matrix_ref, data_ref))
else:
data_ref = matrix_ref
elif pa_threshold == 0:
if matrix_sig_segm is not None:
data_ref = matrix - matrix_sig_segm
else:
data_ref = matrix

if matrix_ref is not None and matrix_sig_segm is None:
# Stacking the ref and the target (pa thresh) libraries

if matrix_ref is not None:
# Stacking the ref and the target ref (pa thresh) libraries
if data_ref is not None:
data_ref = np.vstack((matrix_ref, data_ref))
else:
Expand Down

0 comments on commit 77c5de0

Please sign in to comment.