Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional DQ flags to the mask, including MSA_FAILED_OPEN #68

Merged
merged 1 commit into from
May 15, 2024

Conversation

gbrammer
Copy link
Owner

@gbrammer gbrammer commented May 15, 2024

Use more flags from the DQ array for masking

Before, was just using DO_NOT_USE. There is a smattering of pixels flagged by the other flags, but most important is to include MSA_FAILED_OPEN populated by MSAFlagOpenStep.

import jwst.datamodels

BAD_PIXEL_NAMES = [
    "DO_NOT_USE",
    "OTHER_BAD_PIXEL",
    "MSA_FAILED_OPEN",
    "UNRELIABLE_SLOPE",
    "UNRELIABLE_BIAS",
    "NO_SAT_CHECK",
    "NO_GAIN_VALUE",
    "HOT",
    "DEAD",
    # "TELEGRAPH",
    "RC",
    "LOW_QE",
    "OPEN",
    "ADJ_OPEN",
    "SATURATED",
]

BAD_PIXEL_FLAG = 1024
for _bp in BAD_PIXEL_NAMES:
    BAD_PIXEL_FLAG |= jwst.datamodels.dqflags.pixel[_bp]
  • The update also adds global verbosity control with the VERBOSE_LOG switch.

@gbrammer gbrammer merged commit 834085c into main May 15, 2024
5 checks passed
@gbrammer gbrammer deleted the extend-dq-mask branch May 15, 2024 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant