Skip to content

Commit

Permalink
feat(flagging): restrict uncorrected rebinned data from blending
Browse files Browse the repository at this point in the history
  • Loading branch information
ljgray committed May 24, 2024
1 parent 922f342 commit e9cb12f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions draco/analysis/flagging.py
Original file line number Diff line number Diff line change
Expand Up @@ -2298,10 +2298,16 @@ def process(self, data):
The modified data. This is the same object as the input, and it has been
modified in place.
"""
if type(self.data_stack) != type(data):
if "effective_ra" in data.datasets:
raise TypeError(
"Blending uncorrected rebinned data not supported. "
"Please apply a correction such as `sidereal.RebinGradientCorrection."
)

if not isinstance(data, type(self.data_stack)):
raise TypeError(
f"type(data) (={type(data)}) must match"
f"type(data_stack) (={type(self.type)}"
f"type(data_stack) (={type(self.data_stack)}"
)

# Try and get both the stack and the incoming data to have the same
Expand Down

0 comments on commit e9cb12f

Please sign in to comment.