Keep the calibration ladders in scripts/ladders, with the method
A ladder draws the candidates for a visual value side by side through MeshTerm's own renderer and live constants, so JP can choose by eye. The two that set constants are kept: hue_ladder.py (the node wheel's lightness, 0.72 on 2026-10-29) and seam_ladder.py (SEAM_BLUR, rebuilt from the 2026-09-16 tool), with contrast.py for the measurement that comes first and ladderkit.py for what they share. launch.ps1 opens a ladder in a new Windows Terminal window and waits for the ladder's marker file; -Snap also takes a screenshot through snap.ps1. It avoids the three traps that broke the launches this week: wt quoting a forwarded command line as one file name, the tab inheriting Claude Code's NO_COLOR=1, and Rich falling back to the 16-colour console API when virtual terminal processing is off. The README explains the method and the traps. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
598e53b488
commit
a493a6a5eb
10 files changed
+674
No files matched your search
@@ -0,0 +1,22 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
# Runs in the new tab that launch.ps1 opens. It runs the ladder one time, and then it gives
|
||||
# the command "ladder <arguments>" to run the same ladder again with other values.
|
||||
|
||||
Remove-Item Env:NO_COLOR -ErrorAction SilentlyContinue
|
||||
$Host.UI.RawUI.WindowTitle = "Ladder $env:LADDER_NAME" # snap.ps1 finds the window by it
|
||||
|
||||
$global:LadderPython = Join-Path $PSScriptRoot '..\..\.venv\Scripts\python.exe'
|
||||
if (-not (Test-Path $global:LadderPython)) { $global:LadderPython = 'python' }
|
||||
$global:LadderScript = Join-Path $PSScriptRoot "$env:LADDER_NAME.py"
|
||||
|
||||
# Start-Process -NoNewWindow gives Python the console itself, and not a PowerShell pipe
|
||||
# (trap 3).
|
||||
function global:ladder {
|
||||
$line = (@("`"$global:LadderScript`"") + @($args | ForEach-Object { "$_" })) -join ' '
|
||||
Start-Process -FilePath $global:LadderPython -ArgumentList $line -NoNewWindow -Wait
|
||||
}
|
||||
|
||||
ladder $env:LADDER_ARGS
|
||||
Write-Host ''
|
||||
Write-Host "Run it again with other values: ladder <arguments> (ladder --help lists them)"
|
||||
Reference in new issue
Block a user