Repository navigation
Fit apps.mobafit by per-voxel Levenberg-Marquardt; rename nlop.SignalModel to ModelOperator - #141
Merged
Merged
Conversation
…nalModel to ModelOperator Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qarafd1QwmJGNY8ZwdvwUY
Collaborator
Author
|
The wheel test step fails on The pin belongs to this PR, because Generated by Claude Code |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
mcencini
marked this pull request as ready for review
October 12, 2026 17:43
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 changed
apps.mobafit: fits by Levenberg-Marquardt one voxel at a time. Each voxel's damped system is solved directly, with its own damping and its own acceptance test, and converged voxels drop out throughmodel.select.cg_maxiter,inner,alpha,alpha_min,reduandreferenceare removed. The CLI's--liniteris accepted and ignored.nlop.SignalModel: renamed tonlop.ModelOperator, matchingblochsim.ModelOperator. It requires blochsim 0.0.12.Why
Without an encoding operator, the linearized problem is one small system per voxel. A global conjugate gradient converges only as fast as its worst-conditioned voxel. It stops with those voxels still pulled towards the Tikhonov reference.
Measured on 1000 voxels of a multi-echo decay with T2, M0 and a noise-floor offset unknown (true offset 0.05):
Validation
BARTORCH_LIBRARY=… PYTHONPATH=src pytest tests/test_apps.py tests/test_cli.py tests/test_nlop_blochsim.pygave 238 passed, 2 skipped.test_docs,test_docstringsandtest_dependenciesgave 290 passed, 3 skipped.test_mobafit_finds_what_scipy_findsholds the fit toscipy.optimize.least_squareswithrtol=1e-3../scripts/lint.shis clean.Public API and documentation
nlop.SignalModelis nownlop.ModelOperator, andapps.mobafittakes fewer keywords.🤖 Generated with Claude Code
https://claude.ai/code/session_01Qarafd1QwmJGNY8ZwdvwUY
Generated by Claude Code