-
Notifications
You must be signed in to change notification settings - Fork 13
DM-48966: refactoring of adaptive thresholding changes #448
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
Open
TallJimbo
wants to merge
17
commits into
tickets/DM-48966
Choose a base branch
from
u/jbosch/DM-48966
base: tickets/DM-48966
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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).
2bc6eb4 to
beacbdf
Compare
...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.
acb0d84 to
7f241a6
Compare
3df15ed to
5c954e3
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.