Skip to content

Conversation

@TomDonoghue
Copy link
Member

@TomDonoghue TomDonoghue commented Nov 26, 2025

This generalizes the procedure for doing post-fitting parameter conversions.

To do so, it introduces "ParameterConverters". For any parameter with a requested / provided converter, this conversion gets called on the fit parameter value after the model fitting process.

In doing so, this update removes parameter conversion from the Algorithm, and makes it a separate process. Note that in terms of default behavior, this PR does not change anything (the same set of post-fitting parameter conversions are defined are previous versions of specparam 2.0 & fooof 1.X, and they are accessed / returned in the same way).

Notes:

  • This might not be the final approach / organization for managing parameter conversions
    • ToDo: figure this out more (e.g. might store as part of Modes, and need to consider loading definitions)

@TomDonoghue TomDonoghue changed the title [ENH] - Add general support for parameter conversions [ENH/WIP] - Add general support for parameter conversions Nov 26, 2025
@fooof-tools fooof-tools deleted a comment from codecov bot Nov 26, 2025
@codecov
Copy link

codecov bot commented Nov 29, 2025

Codecov Report

❌ Patch coverage is 99.36306% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 97.61%. Comparing base (f2f771b) to head (1e8b05c).

Files with missing lines Patch % Lines
specparam/models/model.py 90.90% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #383      +/-   ##
==========================================
+ Coverage   97.56%   97.61%   +0.05%     
==========================================
  Files         152      160       +8     
  Lines        6542     6680     +138     
==========================================
+ Hits         6383     6521     +138     
  Misses        159      159              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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