Skip to content

Fix ValueError in StructureFunction2DStack.calculate_modal_power - #37

Open
richteague wants to merge 1 commit into
masterfrom
fix-modal-power-unpack
Open

Fix ValueError in StructureFunction2DStack.calculate_modal_power#37
richteague wants to merge 1 commit into
masterfrom
fix-modal-power-unpack

Conversation

@richteague

Copy link
Copy Markdown
Collaborator

Summary

  • calculate_modal_power called fit_spiral expecting a 2-tuple return, but fit_spiral returns 3 values, causing a ValueError: too many values to unpack.
  • Unpack the third return value (discarded) so the call matches fit_spiral's actual signature.

Test plan

  • Existing test suite passes (pytest tests/)

calculate_modal_power unpacked two values from the stack's fit_spiral,
which returns three (popts, perrs, model_fns), so every call raised
"too many values to unpack (expected 2)". The method had no test
coverage and no in-repo caller, so the breakage went unnoticed when
fit_spiral gained its per-ring model_fns return.

Discard the third element; behaviour is otherwise unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

1 participant