Skip to content

Commit

Permalink
fixing error propagation during sky subtraction
Browse files Browse the repository at this point in the history
  • Loading branch information
ajmejia committed Mar 5, 2024
1 parent 6b6e167 commit d843c0c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/lvmdrp/functions/skyMethod.py
Original file line number Diff line number Diff line change
Expand Up @@ -1617,6 +1617,7 @@ def quick_sky_subtraction(in_cframe, band=np.array((7238,7242,7074,7084,7194,726
flux = cframe["FLUX"].data
error = cframe["ERROR"].data
sky = cframe["SKY"].data
sky_error = cframe["SKY_ERROR"].data

crval = wave[0]
cdelt = wave[1] - wave[0]
Expand All @@ -1636,7 +1637,7 @@ def quick_sky_subtraction(in_cframe, band=np.array((7238,7242,7074,7084,7194,726
sky_c = np.nan_to_num(sky * scale[:, None])
if not skip_subtraction:
data_c = np.nan_to_num(flux - sky_c)
error_c = np.nan_to_num(error - sky_c)
error_c = np.nan_to_num(np.sqrt(error**2 - sky_error**2))
else:
data_c = flux
error_c = error
Expand Down

0 comments on commit d843c0c

Please sign in to comment.