Skip to content

Commit bb4d647

Browse files
authored
Merge pull request #6465 from vtommasini/develop
Eccentricity Control Full Run Test
2 parents 742233d + 811961c commit bb4d647

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

support/Pipelines/Bbh/Inspiral.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Next:
1919
Next:
2020
Run: spectre.Pipelines.Bbh.EccentricityControl:eccentricity_control
2121
With:
22-
h5_files: ./BbhReductions.h5
22+
h5_files: "../Segment_*/BbhReductions.h5"
2323
plot_output_dir: ./
2424
id_input_file_path: {{id_input_file_path }}
2525
pipeline_dir: {{ pipeline_dir }}

support/Pipelines/EccentricityControl/EccentricityControlParams.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# See LICENSE.txt for details.
55

66
import functools
7+
import glob
78
import logging
89
from pathlib import Path
910
from typing import Dict, Literal, Optional, Sequence, Tuple, Union
@@ -52,7 +53,7 @@ def eccentricity_control_params(
5253
5354
Arguments:
5455
h5_files: Paths to the H5 files containing the trajectory data (e.g.
55-
BbhReductions.h5).
56+
BbhReductions.h5). Can also be a glob pattern.
5657
id_input_file_path: Path to the initial data input file from which the
5758
evolution started. This file contains the initial data parameters that
5859
are being controlled.
@@ -99,7 +100,9 @@ def eccentricity_control_params(
99100
), "Only circular orbits are currently supported for eccentricity control."
100101

101102
# Make sure h5_files is a sequence
102-
if isinstance(h5_files, (str, Path)):
103+
if isinstance(h5_files, str):
104+
h5_files = glob.glob(h5_files)
105+
if isinstance(h5_files, Path):
103106
h5_files = [h5_files]
104107

105108
# Read initial data parameters from input file

tests/support/Pipelines/Bbh/Test_Inspiral.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def test_cli(self):
205205
{
206206
"Run": modulename + ":eccentricity_control",
207207
"With": {
208-
"h5_files": "./BbhReductions.h5",
208+
"h5_files": "../Segment_*/BbhReductions.h5",
209209
"plot_output_dir": "./",
210210
"id_input_file_path": str(
211211
self.id_dir.resolve() / "InitialData.yaml"

tests/support/Pipelines/EccentricityControl/Test_EccentricityControlParams.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def tearDown(self):
8787

8888
def test_ecc_control_params(self):
8989
ecc, ecc_std_dev, param_updates = eccentricity_control_params(
90-
h5_files=[self.h5_filename],
90+
h5_files=self.test_dir + "/TestEccentricity*.h5",
9191
id_input_file_path=self.id_input_file_path,
9292
tmin=0.0,
9393
tmax=1200.0,

0 commit comments

Comments
 (0)