Fix #130: Expose delay fitting options in CLI config classes#137
Open
Devguru-codes wants to merge 1 commit intoOSIPI:mainfrom
Open
Fix #130: Expose delay fitting options in CLI config classes#137Devguru-codes wants to merge 1 commit intoOSIPI:mainfrom
Devguru-codes wants to merge 1 commit intoOSIPI:mainfrom
Conversation
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.
Hello @ltorres6 sir, I am making this pr because i saw the issue created by you. This PR exposes the delay fitting options that already exist in the library layer (fit_model() in osipy/dce/fitting.py) through the CLI configuration system, allowing users to enable and configure arterial delay fitting via YAML config files. The changes made are -
osipy/cli/config.py - Added fit_delay: bool = False and delay_bounds: list[float] = [0.0, 60.0] to DCEFittingConfig, with a validator ensuring delay_bounds is a valid [lower, upper] pair.
osipy/pipeline/dce_pipeline.py - Added fit_delay and delay_bounds to the DCEPipelineConfig dataclass, and passed fit_delay=self.config.fit_delay in the fit_model() call inside DCEPipeline.run().
osipy/cli/runner.py - Wired fit_delay and delay_bounds from the YAML config through both runner code paths:
tests/unit/cli/test_config.py - Added 5 new tests:
DSC Note
DSC delay maps (Ta/Tmax) are already computed automatically by the SVD deconvolution methods - they come from the residue function peak, not from a configurable fitting toggle. No DSC config changes are needed.
Usage
Users can now enable delay fitting in their YAML config:
modality: dce
pipeline:
model: extended_tofts
fitting:
fit_delay: true
delay_bounds: [0.0, 30.0]
I will wait for suggestions from your side and then update this pr accordingly. Thank you.
Fixes #130