Skip to content

Commit

Permalink
Solved future deprecation in PCA based sky subtraction
Browse files Browse the repository at this point in the history
  • Loading branch information
VChristiaens committed Aug 8, 2024
1 parent f9bb102 commit 0bf94a5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions vip_hci/preproc/skysubtraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,8 @@ def cube_subtract_sky_pca(sci_cube, sky_cube, masks, ref_cube=None, ncomp=2,
sci_cube_skysub = np.zeros_like(sci_cube)
sky_opt = sci_cube.copy()
for i in range(Msci_masked.shape[0]):
tmp_sky = [np.sum(np.fromiter(transf_sci_scaled[j, i]*sky_boat_cube[j]
for j in range(ncomp)))]
sky_opt[i] = np.array(tmp_sky)
sky_opt[i] = np.sum([transf_sci_scaled[j, i]*sky_boat_cube[j]
for j in range(ncomp)], axis=0)
sci_cube_skysub[i] = sci_cube_boat[i] - sky_opt[i]

# -- Processing the reference cube (if any)
Expand Down

0 comments on commit 0bf94a5

Please sign in to comment.