feat: multi-dataset evaluator with domain union utilities (closes #196, ref #132)#241
Open
aditya-pandey-dev wants to merge 1 commit intoJuliaAstro:mainfrom
Open
Conversation
…#196, ref JuliaAstro#132) - Add multi_dataset_problem: fits single model to N datasets - Per-dataset normalisations free, all other params shared via bindall! - Add domain_union: merges energy bin edges within tolerance - Add domains_are_compatible: validates shared domain assumption - Add extract_normalisation_index, has_normalisation, get_normalisation_param - Type-stable: uses Vararg+Val(N)+ntuple, not Vector - Zero new dependencies, reuses existing bindall!/normalisationfield - 19 new tests added, all 211 tests pass
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #241 +/- ##
==========================================
+ Coverage 55.69% 56.35% +0.65%
==========================================
Files 39 42 +3
Lines 2632 2676 +44
==========================================
+ Hits 1466 1508 +42
- Misses 1166 1168 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Author
|
@fjebaker I have raise a PR related to this issue can you please check the PR. What changes should I do? |
5 tasks
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.
Implements the evaluator hook requested in #196 and addresses the
single-model-multiple-data problem from #132.
Changes
New files
src/multi-data/domain_utils.jl—domain_unionanddomains_are_compatiblesrc/multi-data/norm_extraction.jl—extract_normalisation_index,has_normalisation,get_normalisation_paramsrc/multi-data/multi_problem.jl—multi_dataset_problemconstructortest/test_multi_dataset.jl— 19 tests covering all new functionsexamples/multi_dataset_example.jl— self-contained runnable proofModified files
src/SpectralFitting.jl— include the three new filestest/runtests.jl— include the new test fileDesign decisions
Type stability:
multi_dataset_problemusesVararg{T,N}+Val(N)+ntupleto construct model copies as aTuple(not aVector), consistent with howFittableMultiModelworks internally.Reuse of existing API: The implementation deliberately reuses
bindall!,normalisationfield, andparameter_namesfrom the existing codebase rather than reimplementing parameter introspection.Zero new dependencies: All three files use only types and functions already present in SpectralFitting.jl.
Verification
Output:
Test results
Closes #196
See also #132