Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 21, 2023
1 parent 5aeb740 commit 4939760
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions xrtpy/util/xrt_remove_lightleak.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,7 @@ def xrt_remove_lightleak(in_map, scale=1.0, leak_map=None):
images at the phase 1 (as of Feb-2022).
"""
if "Light leak subtraction: DONE" in in_map.meta["HISTORY"]:
warnings.warn(
"HISTORY indicates light leak subtraction already done on image."
)
warnings.warn("HISTORY indicates light leak subtraction already done on image.")

if leak_map is None:
leak_filename = _select_lightleak_file(
Expand All @@ -231,7 +229,7 @@ def get_ll_file():

# case of 2048 x 2048 input image - for full resolution image, the light leak image flux
# in each pixel must be split into four pixels each, thus the factor of 0.25 below
if in_map.dimensions[0] == 2*leak_map.dimensions[0]:
if in_map.dimensions[0] == 2 * leak_map.dimensions[0]:
leak_map = leak_map.resample(u.Quantity(in_map.dimensions))
leak_map *= 0.25
leak_map *= scale
Expand Down

0 comments on commit 4939760

Please sign in to comment.