# Dynamic detection not robust against extended emission

XMLWordPrintable

#### Details

• Type: Story
• Status: Done
• Resolution: Done
• Fix Version/s: None
• Component/s:
• Labels:
• Team:
External

#### Description

Ikeda-san has reported that the background tweak being applied in the DynamicDetectionTask is excessive when there are bright stars in the field.

On investigation, found that sky objects are correctly avoiding the DETECTED areas, but the DETECTED area isn't anywhere as large as it seems just by looking at the image because the extended emission from the star is being purposely suppressed by the code (so the deblender isn't overwhelmed; this is the "wide temporary background" feature).

Suitable results can be obtained by doing an explicit background subtraction (using the base_LocalBackground measurement algorithm).

#### Activity

Hide
Paul Price added a comment -

Thanks for volunteering to review this, Yusra AlSayyad.

 pprice@tigressdata:/scratch/pprice/meas_algorithms[tickets/DM-14119] $git sub commit 6816c1e76c710c74b3e4008e071587b495657a6a Author: Paul Price  Date: Mon Apr 16 19:40:00 2018 -0400    dynamicDetection: make robust against extended emission    by applying an explicit background subtraction using the  base_LocalBackground measurement algorithm. Otherwise, extended  low-level background (e.g. around bright stars) can contaminate  our measurements.    python/lsst/meas/algorithms/dynamicDetection.py | 12 ++++++++----  1 file changed, 8 insertions(+), 4 deletions(-)  Show Paul Price added a comment - Thanks for volunteering to review this, Yusra AlSayyad . pprice@tigressdata:/scratch/pprice/meas_algorithms[tickets/DM-14119]$ git sub commit 6816c1e76c710c74b3e4008e071587b495657a6a Author: Paul Price <price@astro.princeton.edu> Date: Mon Apr 16 19:40:00 2018 -0400   dynamicDetection: make robust against extended emission by applying an explicit background subtraction using the base_LocalBackground measurement algorithm. Otherwise, extended low-level background (e.g. around bright stars) can contaminate our measurements.   python/lsst/meas/algorithms/dynamicDetection.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
Hide

I included some stupid questions on the PR because I had trouble following why you could reuse some variables from above, but not others.  Maybe add a comment about why you're reconvolving but using the previous middle/sigmas.

Show
Yusra AlSayyad added a comment - I included some stupid questions on the PR because I had trouble following why you could reuse some variables from above, but not others.  Maybe add a comment about why you're reconvolving but using the previous middle/sigmas.
Hide
Paul Price added a comment -

Yusra AlSayyad, your questions weren't stupid but very helpful. I've made some changes and spent some time crafting a suitable test (with thanks to John Parejko for the prompting). Would you mind having another look?

Show
Paul Price added a comment - Yusra AlSayyad , your questions weren't stupid but very helpful. I've made some changes and spent some time crafting a suitable test (with thanks to John Parejko for the prompting). Would you mind having another look?
Hide

It's still not obvious to me why that sigma is the right one to pass to finalizeFootprints. The test makes sense, but just to double check we don't normally use config.thresholdType = "pixel_stdev" for detections on coadds, right?

Show
Yusra AlSayyad added a comment - It's still not obvious to me why that sigma is the right one to pass to finalizeFootprints . The test makes sense, but just to double check we don't normally use config.thresholdType = "pixel_stdev" for detections on coadds, right?
Hide
Paul Price added a comment -

The alternative to that sigma is the one passed to the method, which may be None. The sigma I'm using will be the one passed to the method if it's non-None, or the appropriate value for the provided PSF: see here.

Show
Paul Price added a comment - We do use pixel_stdev for detection on coadds . The alternative to that sigma is the one passed to the method , which may be None . The sigma I'm using will be the one passed to the method if it's non- None , or the appropriate value for the provided PSF: see here .
Hide

Thanks for the clarification. OK to merge when it passes Jenkins

Show
Yusra AlSayyad added a comment - Thanks for the clarification. OK to merge when it passes Jenkins
Hide
Paul Price added a comment -

Jenkins is green.

Show
Paul Price added a comment - Jenkins is green.
Hide
Paul Price added a comment -

Merged to master.

Show
Paul Price added a comment - Merged to master.

#### People

Assignee:
Paul Price
Reporter:
Paul Price
Reviewers: