Skip to content

Commit

Permalink
fixing sky sky refinement
Browse files Browse the repository at this point in the history
  • Loading branch information
ajmejia committed Dec 18, 2023
1 parent dda9437 commit 2495fb1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions python/lvmdrp/functions/skyMethod.py
Original file line number Diff line number Diff line change
Expand Up @@ -1717,12 +1717,14 @@ def quick_sky_refinement(in_cframe, band=np.array((7238,7242,7074,7084,7194,7265
smap_1 = bn.nanmean(sky[:, i_band[4]:i_band[5]], axis=1)
smap_c = smap_b - 0.5 * (smap_0 + smap_1)


scale = map_c / smap_c
sky_c = np.nan_to_num(sky * scale[:, None])
if skip_subtraction:
if not skip_subtraction:
data_c = np.nan_to_num(flux - sky_c)
error_c = np.nan_to_num(error - sky_c)
else:
data_c = flux
error_c = error

cframe["FLUX"].data = data_c
cframe["ERROR"].data = error_c
Expand Down

0 comments on commit 2495fb1

Please sign in to comment.