Skip to content

Fix theta-search solver and polarization handling - #41

Merged
simonevadi merged 2 commits into
developfrom
fix/theta-search-pol-solver-logging
Sep 3, 2026
Merged

simonevadi merged 2 commits into
developfrom
fix/theta-search-pol-solver-logging

Conversation

@simonevadi

Copy link
Copy Markdown
Contributor

Summary

  • keep expected theta-search clamp notices out of terminal output and deduplicate logging setup
  • propagate solver and polarization choices through generated theta-search cases, examples, and web runs
  • document the changes and prepare the changelog for 0.4.8 without changing pyproject.toml

Testing

  • uv run pytest tests/unit tests/smoke --ignore=tests/unit/test_reticolopy_opt.py --cov=grax --cov-report=term-missing --cov-report=xml (462 passed, 5 skipped)

simonevadi and others added 2 commits September 3, 2026 15:30
… case generator

Three fixes for the multilayer theta search:

- The `Requested theta half-width ... reaches near/into 0 deg` notice leaked to
  the terminal from the spawned batch workers, which re-import grax but never
  call setup_logging, so the record fell through to logging.lastResort. Attach a
  NullHandler to the `grax` logger at import; setup_logging now also sets
  propagate=False and de-duplicates its file handler. The notice itself drops
  from WARNING to INFO and is emitted once per distinct (center, half-width)
  instead of on every rough/fine re-centring attempt.
- multilayer_theta_search_cases gained `solver` / `solver_options`, matching
  run_multilayer_theta_search. The batch runner already honoured a per-case
  "solver" key; the generator just could not set one.
- The multilayer_theta_search example takes --polarization alongside --solver
  and writes each run under results/<solver>_<polarization>/ so s and p runs no
  longer overwrite each other.

Polarization and solver were already threaded through
run_multilayer_theta_search(_sweep) and the web run form on develop; this closes
the remaining gaps on that branch.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@simonevadi
simonevadi merged commit 5e881b2 into develop Sep 3, 2026
1 check passed
@simonevadi
simonevadi deleted the fix/theta-search-pol-solver-logging branch September 3, 2026 14:39
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.

1 participant