Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
debora-pe committed Nov 15, 2024
1 parent a598677 commit 6922f20
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pypeit/extraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,10 @@ def __init__(self, sciImg, slits, sobjs_obj, spectrograph, par, objtype, global_
if flatimages is not None:
# This way of getting the flat image (instead of just reading flatimages.pixelflat_model) ensures that the
# flat image is available also when an archival pixel flat is used.
flat_raw = flatimages.pixelflat_raw
if flat_raw is not None:
flat_norm = flatimages.pixelflat_norm
self.flatimg, _ = flat.flatfield(flat_raw, flat_norm)
flat_raw = flatimages.pixelflat_raw if flatimages.pixelflat_raw is not None else flatimages.illumflat_raw
if flat_raw is not None and flatimages.pixelflat_norm is not None:
# TODO: Can we just use flat_raw if flatimages.pixelflat_norm is None?
self.flatimg, _ = flat.flatfield(flat_raw, flatimages.pixelflat_norm)
if self.flatimg is None:
msgs.warn("No flat image was found. A spectrum of the flatfield will not be extracted!")

Expand Down

0 comments on commit 6922f20

Please sign in to comment.