# Initial background tweak in DynamicDetectionTask has no effect

XMLWordPrintable

## Details

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

## Description

Sogo Mineo reports on slack:

In the dynamic detection, (1) I suspect that the call to tweakBackground() at
https://github.com/lsst/meas_algorithms/blob/master/python/lsst/meas/algorithms/dynamicDetection.py#L214
is not effective because it modifies only exposure and it does not modify middle , which is passed to applyThreshold() . The tweaked exposure will be thrown away when the instruction pointer goes out of the with-clause.

I agree with his analysis.  I believe we do eventually make the tweak permanent, by calling tweakBackground a second time near the end of detectFootprints, this time on the image that is retained.  And the initial call tweakBackground does have a small affect, because the temporary image it is operating on is used to refine the set of peaks after the footprint regions have already been determined when doTempLocalBackground is true.  But it seems like it was intended to affect the image used for footprint-region detection ("middle") as well.

## Attachments

1. image.png
3.93 MB
2. sky objects.png
2.68 MB
3. TweakBackground.png
3.93 MB
4. TweakBackground[1].png
3.93 MB
5. TweakBackground-thresh10.png
3.80 MB

## People

• Assignee:
Sogo Mineo
Reporter:
Jim Bosch
Watchers:
Jim Bosch, Paul Price, Sogo Mineo