Skip to content

PSF calibration: says where the pupil model learns, and warns of a CPU-only PyTorch beside an NVIDIA card - #165

Merged
jries merged 4 commits into
mainfrom
claude/vigilant-johnson-ns061k
Nov 15, 2026
Merged

jries merged 4 commits into
mainfrom
claude/vigilant-johnson-ns061k

Conversation

@jries

@jries jries commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

What changes

  • Where learning runs. The line Detect writes in the PSF calibration window now ends with where the pupil model, in situ and the molecule stacks learn: "learnt on the graphics card (its name)", "on Apple's GPU" or "on the CPU" (uipsf.device.describe, through psf_window.learning_device).
  • A CPU-only PyTorch beside an NVIDIA card. Before, it learnt on the CPU without saying so. This is the case after a plain pip install torch on Windows, whose PyPI wheel is CPU only.
    • torch_install.cpu_build_on_nvidia finds it from the version's local label, without importing torch.
    • The window now says so and offers Install PyTorch again. It never blocks a run.
    • The button's command (command(replace=True)) reinstalls the card's build from the CUDA 12.6 index: with --force-reinstall --no-deps on Windows, through the higher local label on Linux. A plain --upgrade would keep the CPU build.
    • If torch is already loaded in the process, the window asks for a restart.
  • Docs and tests. The PSF calibration help page explains both. Five tests are added in tests/test_torch_install.py.

Not yet checked

The replacement install itself has not been run on a real Windows PC with a CPU-only torch.

Tests

--slow -n auto: 4225 passed, 17 failed, 29 errors, 101 skipped. None of the failures is this change's:

  • DECODE tests (tests/decode_tests, the DECODE plugin pages): torch was installed for this run but not the decode extra, so they fail on ModuleNotFoundError: No module named 'tqdm'.
  • Three crashed workers: test_live_session::test_the_window_hands_the_fits_progress_on_as_numbers, uipsf_tests/test_confocal::test_a_pinhole_wide_open_gives_the_open_detectors_scan and uipsf_tests/test_minimal_pupil::test_a_calibration_recovers_gamma_the_saf_damping_and_the_blur_beyond_the_pixel. Each crashed its pytest worker in the full run (4 workers, 15 GB) and passes when run alone: 3 passed in 96 s.

Targeted: test_torch_install, test_panel_docs, uipsf_tests/test_psf_window, test_window_actions, test_calibrate_qt: 53 passed, 18 skipped.


Generated by Claude Code

…eplaces it

The plugin (Localize/Bead calibration), its window (calibrate/qt_gui.py), its
assistant actions and its pages are removed.  The bead average is the PSF
calibration window's, which already had every page, the bead table and the
assistant's actions; its method's explanation moves to a widgetless help page,
Panels/Bead average.  smappy-calibrate opens the PSF calibration window
(headless --out unchanged).  The tests of the use_calibration hand-over and of
the bead settings' forms are kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014JegwAEzHHExiXkwvXgA2j
…est tested on the minimal pupil

From round 2, once the coverslip edge has set the focus, a unit localised more than
3 errors below the coverslip (its CRLB times the edge's scatter factor, with the
edge's own error) is not chosen (`insitu_rounds.below_coverslip`,
`RoundSettings.below_coverslip_sd`): the z bins below 0 had filled with molecules
the model placed badly.  The twin test already mirrored held modes; a test now pins
it for the minimal pupil, in situ's default.  The roadmap's in situ line and the
architecture's known flaws brought up to date.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014JegwAEzHHExiXkwvXgA2j
…U-only PyTorch beside an NVIDIA card

The line Detect writes now ends with where learning runs (uipsf.device.describe: the
graphics card by name, Apple's GPU or the CPU).  A torch built for the CPU only on a
machine with an NVIDIA card (torch_install.cpu_build_on_nvidia, from its version's local
label: a plain pip install on Windows brings it) learnt on the CPU without a word; the
window now says so and offers Install PyTorch, whose command then reinstalls the card's
build from the CUDA index (command(replace=True)), and asks for a restart where the old
build is already loaded.  Neither blocks a run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014JegwAEzHHExiXkwvXgA2j
@jries
jries merged commit 0384454 into main Nov 15, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants