Skip to content

Add SpEC's OmegaDotEccRemoval.py - #13

Merged
nilsvu merged 2 commits into
sxs-collaboration:mainfrom
nilsvu:add_ecc
Sep 2, 2026
Merged

Add SpEC's OmegaDotEccRemoval.py#13
nilsvu merged 2 commits into
sxs-collaboration:mainfrom
nilsvu:add_ecc

Conversation

@nilsvu

@nilsvu nilsvu commented Aug 28, 2026

Copy link
Copy Markdown
Member

No description provided.

@nilsvu
nilsvu requested review from markscheel and a lite review from Copilot August 28, 2026 08:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR brings SpEC’s eccentricity-removal workflow into SimulationSupport by adding the (largely unmodified) OmegaDotEccRemoval.py implementation and a small wrapper API that computes eccentricity estimates and suggested initial-parameter updates from in-memory trajectories, along with a test and API docs wiring.

Changes:

  • Add OmegaDotEccRemoval.py (SpEC-derived) and expose its fitting routines for library use.
  • Add eccentricity_control_params(...) convenience wrapper that computes eccentricity and suggested updates from trajectory arrays.
  • Add a unit test for the wrapper, API docs entry, and a new varpro dependency.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/SimulationSupport/EccentricityControl/OmegaDotEccRemoval.py Adds SpEC-derived eccentricity fitting and update computation logic.
src/SimulationSupport/EccentricityControl/EccentricityControlParams.py Introduces a Python API wrapper around the SpEC-derived routines for array inputs.
tests/EccentricityControl/Test_EccentricityControlParams.py Adds a test exercising the wrapper on synthetic PN trajectories.
pyproject.toml Adds varpro as a VCS-pinned dependency.
docs/Api.rst Exposes the new wrapper module in Sphinx API docs.
Suppressed comments (1)

src/SimulationSupport/EccentricityControl/OmegaDotEccRemoval.py:1669

  • B_std_dev is computed as a standard deviation, but the second term uses param_std_dev_spin[3] without squaring it (the first term uses **2). This likely underestimates the uncertainty and is dimensionally inconsistent.
  B_std_dev = sqrt(pLin_spin[2]**2 * param_std_dev_spin[2]**2 \
                 + pLin_spin[3]**2 * param_std_dev_spin[3]) / B_spin

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/SimulationSupport/EccentricityControl/OmegaDotEccRemoval.py
Comment on lines +1514 to +1515
B_std_dev = sqrt(pLin_nonspin[2]**2 * param_std_dev_nonspin[2]**2 \
+ pLin_nonspin[3]**2 * param_std_dev_nonspin[3]) / B_nonspin

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@markscheel I think this might be a bug in SpEC

Comment thread src/SimulationSupport/EccentricityControl/EccentricityControlParams.py Outdated
@nilsvu
nilsvu enabled auto-merge September 2, 2026 07:53
@nilsvu
nilsvu merged commit c630959 into sxs-collaboration:main Sep 2, 2026
8 checks passed
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