spacetelescope / jwst

Python library for science observations from the James Webb Space Telescope

Home Page:https://jwst-pipeline.readthedocs.io/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Modify outlier detection for TSO3

stscijgbot-jp opened this issue · comments

Issue JP-3584 was created on JIRA by David Law:

As reported in the discussion for https://jira.stsci.edu/browse/JP-3578, the outlier detection implemented for TSO mode observations is less than ideal.  Specifically, it's essentially using regular imaging-mode outlier detection but without the resampling/blotting step.  It creates a single median image from all integrations, and compares each integration against this median to determine where the the deviations are larger than expected based on the ERR array and flag outliers accordingly.

This isn't always great for TSOs though, as by definition such objects are variable and sufficiently large variations (as in https://jira.stsci.edu/browse/JP-3578) will cause the source to be flagged as an outlier in some pixels and cause strange results.

This ticket is to change the implementation of outlier detection for TSO observations to instead compare against a moving-median of X integrations at a time.  X might be 25 by default, but should be a user-customizable parameter if desired.  Chunking up the integrations into chunks of length X for the median/outlier detection would work as well, if this were to provide an advantage in term of runtime and/or code simplicity.

Setting priority to 'low' for the time being, as this would be ready for immediate development, but presently has application to a limited number of science cases.

Tagging Nikolay Nikolov Sarah Kendrew Nestor Espinoza so that they're aware of this ticket and any development on it.

Comment by Howard Bushouse on JIRA:

David Law Do you consider this ready for SCSB to implement, based on the information provided in the description?

Comment by David Law on JIRA:

Howard Bushouse Yes, it should be.

Comment by Ned Molter on JIRA:

Proposed implementation is being discussed in a lot more detail on the PR.

Comment by Howard Bushouse on JIRA:

Fixed by #8473