Skip to content

Commit 9eb3a0e

Browse files
committed
Updated output of PCA full-frame function in the case of a list of input ncomp without source_xy provided
1 parent cee0a17 commit 9eb3a0e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

vip_hci/psfsub/pca_fullfr.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ def pca(*all_args: List, **all_kwargs: dict):
658658
final_residuals_cube, frame, table, _ = res_pca
659659
else:
660660
# returning only the optimal residual
661-
final_residuals_cube = res_pca[1]
661+
final_residuals_cube = res_pca[0]
662662
# full-frame PCA with rotation threshold
663663
else:
664664
recon_cube, residuals_cube, residuals_cube_, frame = res_pca
@@ -683,8 +683,8 @@ def pca(*all_args: List, **all_kwargs: dict):
683683
# parameters: full_output, source_xy, batch, ncomp
684684
# --------------------------------------------------------------------------
685685
# If requested (except when source_xy is not None), return median image
686-
cond_s = algo_params.source_xy is None
687-
if final_residuals_cube is not None and algo_params.med_of_npcs and cond_s:
686+
# cond_s = algo_params.source_xy is None
687+
if final_residuals_cube is not None and algo_params.med_of_npcs:
688688
final_residuals_cube = np.median(final_residuals_cube, axis=0)
689689

690690
isarr = isinstance(algo_params.cube, np.ndarray)

0 commit comments

Comments
 (0)