Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use SpEC's eccentricity control #6333

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion support/Pipelines/Bbh/EccentricityControl.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# See LICENSE.txt for details.

import logging
from pathlib import Path
from typing import Sequence, Union

import click
import pandas as pd
Expand All @@ -14,7 +16,11 @@
logger = logging.getLogger(__name__)


def eccentricity_control(h5_files, id_input_file_path, **kwargs):
def eccentricity_control(
h5_files: Union[Union[str, Path], Sequence[Union[str, Path]]],
id_input_file_path: Union[str, Path],
**kwargs,
):
"""Eccentricity reduction post inspiral.

This function can be called after the inspiral has run (see the 'Next'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ def eccentricity_control_params(
"'-D SPEC_ROOT' to a SpEC installation when configuring the build "
"with CMake."
)
assert (
target_eccentricity == 0.0
), "Only circular orbits are supported for eccentricity control yet."
Comment on lines +98 to +99
Copy link
Contributor

Choose a reason for hiding this comment

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

yet -> currently


# Make sure h5_files is a sequence
if isinstance(h5_files, (str, Path)):
Expand Down Expand Up @@ -164,6 +167,7 @@ def get_horizons_data(reductions_file):
sA = sB = None

# Call into SpEC's OmegaDotEccRemoval.py
# Despite the name, this SpEC function takes arrays of data
t, Omega, dOmegadt, OmegaVec = ComputeOmegaAndDerivsFromFile(traj_A, traj_B)
eccentricity, delta_Omega0, delta_adot0, delta_D0, ecc_std_dev, _ = (
performAllFits(
Expand Down
Loading