feat: make the 2.5D tracing parameters reachable from configuration - #15
Open
leiverkus wants to merge 1 commit into
Open
feat: make the 2.5D tracing parameters reachable from configuration#15leiverkus wants to merge 1 commit into
leiverkus wants to merge 1 commit into
Conversation
Only gap_bridge_m reached the tracers from Settings. threshold_k, min_length_m and simplify_m existed on both tracers but were never passed, and the relief kernels were not a parameter at all — the same pattern the 2D track had until today, now the fifth instance. The kernels are the ones that matter, and they are in *pixels*, so they depend on the DEM's resolution. At 2.10 cm/px the default (9, 25, 51) is 19, 53 and 107 cm — stone-scale, not wall-scale. That is why the traced lines follow individual stones and meander around them: the response has a stone-sized term. Raising the kernels past a stone width merges the stones into one ridge — on the Tiberias trench (9,25,51) gives 137 lines of median length 1.22 m, while (201,401) gives 7 of median 4.80 m. .env.example says this rather than just naming the variables, because a pixel value that looks absolute is the same trap min_area and gap_bridge_m set earlier. Does not fix the 2.5D track. Cross-profiles through the traced lines show they follow their response faithfully — the response is what sits in the wrong place. Recorded in the PR; the fix is a different response, not a different parameter. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
The item PR #14 named as out of scope:
threshold_k,min_length_m,simplify_mand the relief kernel sizes were unreachable from configuration — onlygap_bridge_mwas. This is the same treatment the 2D track got in #10 and #13.What is exposed
STRUCTURA_RELIEF_KERNELSWallTracer.kernels→multiscale_relief9,25,51STRUCTURA_DEM_THRESHOLD_K1.0STRUCTURA_DEM_MIN_LENGTH_M0.5STRUCTURA_DEM_SIMPLIFY_MEdgeTracerwas constructed with no arguments at all inpipeline.run; it now receives the three it accepts.Why the kernels are the one that matters
They are in pixels, so they depend on the DEM's resolution, and they decide what gets traced rather than how much. A kernel near stone size makes the response follow individual stones and the skeleton meander around them instead of running along the course. On the Tiberias DEM at 2.10 cm/px the default
(9,25,51)is only 19/53/107 cm — stone-sized, not wall-sized.A sweep over the real trench (M10, 815 m²), all else equal:
That range is not reachable today without editing source.
What this does not do
It does not improve the 2.5D track. The sweep above is a good illustration of why: the recorded quantities cannot distinguish a wall from a smoothly-shaped artefact —
201,401has the best-looking numbers and is most likely just over-smoothing. Measurements on M10 today ruled out DEM denoising (36 365 → 35 875 steep pixels, threshold unmoved), non-maximum suppression (the mask is already 2.1 px thin, and the response sits on the gradient maximum in 62.6 % of pixels — Canny at three scales was worse), and a physical step threshold in place ofmean + k·std(fewer and more sinuous lines). The open problem is which edges to keep, which is not a parameter.So these knobs are for experimenting, not a fix. They are worth having because every one of those measurements needed source edits to run.
Tests
None added. The four settings are pass-through; the change is that
Settingshas four more fields andpipeline.runforwards them. The twoSettingsfixtures intest_make_segmenter.pyandtest_pipeline.pyare updated to construct the dataclass._int_tupleparses a comma-separated list and falls back to the default when unset or blank, matching_opt_float.ruffclean,mypyclean on 26 files, 72 tests passing — verified locally on this branch merged onto currentmain(which is one commit ahead, #14).