Skip to content

Commit

Permalink
Merge pull request #625 from Julat300/PCA_annular
Browse files Browse the repository at this point in the history
Correction to how the reference dataset is built in do_pca_patch
  • Loading branch information
VChristiaens authored Nov 23, 2023
2 parents 96527f7 + 77c5de0 commit 6028e7e
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 6028e7e

Please sign in to comment.