Multi-surfaces-based flattening#13
Closed
huangziwei wants to merge 5 commits into
Closed
Conversation
…both new and legacy apis
Collaborator
Author
|
Not needed yet. Will reopen once we reach the point where we have such data. |
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.
What
This PR expands the two-SAC-surfaces-based flattening to multi-surfaces support.
Why
Cells far from the SAC bands (e.g., in the OPL) are not warped/unwarped accurately when using only ON/OFF SAC as reference surfaces. We discovered this when implementing the unwarper that OPL cells showed poorer roundtrip accuracy, which hinted at inaccurate forward warping in the first place.
How
Core change:
build_mappingnow accepts a dict of N tagged surfaces (e.g., {"on_sac": ..., "off_sac": ..., "xbc": ...}) instead of exactly two. Surfaces are auto-sorted by median depth throughout the pipeline.Flattening surface selection: For each cell,
warp_nodesandunwarp_nodesautomatically select the two surfaces that bracket the cell's median z-depth for local LS registration.Normalization anchors: ON SAC (z=0) and OFF SAC (z=12) remain the universal normalization anchors. Other surfaces get their normalized z positions from the same linear transform.
TL;DR
In short, we still assume the SAC bands as canonical reference surfaces, and set as default (which also backward compatible with the old data), but the code now is flexible enough to handle any n>=2 surfaces, and they don't have to be SAC bands if you know the what params to use beforehand.
Pending
I actually want to have some real data from EW2 to test it properly before merging. AFAIK, we don't have a complete layer of proofread cells beyond OFF SAC yet.