Overlap trace adjustment#133
Merged
Merged
Conversation
…ects actual brightness value
feat: package_frame outputs a frame instead of dataarray
…for overlap, while not incrasing the error by too much. not sure if this is a good decision and i should just hardcode some error value
tests: hline removal test
…e to account for general noise
Member
Author
|
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
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.
🔍 Type of Change
✨ New Feature: Introducing new functionality
📝 Description
Another way to alleviate negative residuals.
The
extend-pipeline-tests(#132) deals with overlap by purging negative residuals. This has a benefit of "deprecating" components that do not fit well against the residuals. However, it can also cause correct components to be removed (GradualOnSourcetest gets more chances of failing.) Protecting the "correct" estimators is critical to reaching a solution convergence. Another solution is proposed to ensure correct estimators aren't compromised, while still managing incorrect overlap footprints.Explanation
There are largely two circumstances that a negative residual can occur:
AandBare overlapping. We know ofAonly. (Simulated in Gradual-on Test)Bbegins brightening, driving up trace forAdue to the overlapping area becoming brighter.Athat does not overlapB(A - Bhereon), causing a negative residual.A ∩ B, since trace increase was modulated by the brightness ofA - B, and thus couldn't fully reflect the brightness at the overlap.A - Band a positive residual inA ∩ B.*if
B's brightness decreases instead, the residual will be negative inA ∩ Band positive inA - B.AandBare overlapping. We know ofA U Bonly. (Simulated in Split-off Test)AandBhave been synchronized so far, causing the model to mark the combined footprint as a single component (A U B)Bbegins dimming.A U Bdown.B - A, and underestimation inA - B, and something indeterminable inA ∩ B.B - A, and a positive residual inA - B.*if
Bgrows brighter instead, the residual signs will be opposite. This is symmetric.Solutions
Negative residuals are nonphysical. We propose two ways of dealing with them, while encouraging an accurate cell detection in the process.
Purge Negative Footprints:
The mantra here is: "Oh, we have detected a negative residual. Dismember all suspects that may have caused it."
A, after 4., we end up removing a chunk of it. A hotfix is introduced, where the user can set a negative "buffer threshold" - giving a room for the negative value in Setup 1 to avoid getting purged while waiting for the detection step to build a new component forB(and thusA ∩ B). This assumes the negative residuals in Setup 2 will eventually go over the buffer threshold.Trace Throttling:
This mantra is: "Yes, the residual is negative, but surely we saw something here at one point, since we have a footprint. Let's adjust the traces so that the residual minimum becomes zero. The amplified residuals everywhere else, when accounted for during the detection step, will give us a better picture."
When it comes to Gradual-On test and Split-Off test, the performances of the two are quite similar, with Trace Throttling with a better final trace results. This could be a stochastic result, and more tests/reasoning are necessary to produce a better conclusion.
🧪 Testing
🛠️ Dependencies
✅ Checklist
📚 Documentation preview 📚: https://cala--133.org.readthedocs.build/en/133/