C1: refactor ocv_rlx onto native schema + fix the self.data trap (#709) - #739
Merged
Conversation
…(C1, #709) Utils wave 3 for ocv_rlx (scipy/lmfit fitting stays app-side, unchanged): - Native header access: select_ocv_points / MultiCycleOcvFit / OcvFit now read column names from cell.schema (schema.raw, schema.steps) instead of the deprecated headers_normal / headers_step_table singletons (removed in 2.1, E3). Step-table statistic columns build on the native raw base names (potential/current/step_time + _first/_last/_delta). Dropped the module-level get_headers_* singletons entirely. - Ended the self.data-holds-a-CellpyCell trap: MultiCycleOcvFit holds the cell as `.cell` (was `.data`, which produced the confusing `self.data.data.steps` double-.data). `.data` property and `set_data()` stay as deprecation aliases (warn_once, removal 2.2) for `.cell` / `set_cell()`. Verified numerically identical (test_ocv_relax's r0==12.15126 fit guard holds); added tests for the rename + deprecated aliases. select_ocv_points signature and output unchanged, so batch_analyzers keeps working. Closes #709 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
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.
Epic C, arc C1 (#709) — utils wave 3:
ocv_rlxRefactors
cellpy/utils/ocv_rlx.pyonto native schema headers and fixes the long-standingself.data-holds-a-CellpyCelltrap. The scipy/lmfit fitting (OcvFit, the model, the translated parameters) stays app-side, unchanged.Native header access (#709, ahead of E3)
select_ocv_points,MultiCycleOcvFit, andOcvFit.set_cellpydatanow read column names fromcell.schema(schema.raw,schema.steps) instead of the deprecatedheaders_normal/headers_step_tablesingletons (removed in 2.1). Step-table statistic columns build on the native raw base names (potential/current/step_time+_first/_last/_delta). The module-levelget_headers_*singletons are gone.The
self.datatrapMultiCycleOcvFitheld theCellpyCellas.data, producing the confusingself.data.data.stepsdouble-.data. It's now.cell(→self.cell.data.steps)..data(property) andset_data()remain as deprecation aliases (warn_once, removal 2.2) for.cell/set_cell().Verification
Numerically identical —
test_ocv_relax'sr0 == 12.15126fit guard holds. Added tests for the rename + deprecated aliases (6 passed).select_ocv_pointssignature/output unchanged, sobatch_analyzerskeeps working.Closes #709