Skip to content

Conversation

@TallJimbo
Copy link
Member

No description provided.

This aims at adaptively adjusting the detection threshold for PSF
modelling such that a single pipeline run is able to accommodate a
large variety of "scenes" (from sparsely populated, through very
crowded fields, and possible extended nebulosity).

It can be turned on[off] by setting the do_adaptive_threshold_detection
config in pipe_tasks's CalibrateImageTask to True[False].
It may be desirable to limit selected sources to only those with a certain
error budget on the centroids (e.g. for astrometric calibration sources).
Namely, allow for a minimum magnitude (maximum brightness) as well as a
maximum total number of loaded reference objects.  This can be useful for
memory considerations, particularly for very crowded fields.
It doesn't make sense to subtract a local background from sources that
were explicitly placed to represent areas of background.
This is desired for the dynamic detection (particulalry when dealing
with crowded fields).
If the detection mask ends up as a single, or few many-peaked footprints,
then all subsequent processing will fall over.  Impose a limit to the
maximum number of peaks in a given footprint for the detection mask.  If
this condition is not met, iteravely increase the detection threshold until
it does.  This is meant to be a no-op for most "typical" scenes and observing
conditions, but can help avoid a total downstream meltdown in certain cases
(e.g. very crowded regions).
...at least as far as the usage in CalibrateImageTask.

This includes:

- Nesting the baseline detection configuration.

- Modifying the run arguments to accept only those expected by
  SourceDetectionTask.run (possibly since the initial threshold and
  multiplier are now nested in that baseline configuration).

- Modifying the result struct to add new attributes to the struct
  returned by SourceDetectionTask instead of nesting that within a new
  struct.
This should not change the behavior at all.
- Replace "are we looping" variables with 'break' and 'for x in range'.

- Use snake_case consistently for internal variables, but keep
  camelCase for configs, for consistency with SubtractBackgroundTask
  configs.

- Move some magic numbers (not all) to config fields.
@laurenam laurenam force-pushed the tickets/DM-48966 branch 3 times, most recently from 3df15ed to 5c954e3 Compare November 5, 2025 20:03
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.

3 participants