spectre.Pipelines.EccentricityControl.DirectoryStructure

Functions

list_ecc_iterations(pipeline_dir)

All eccentricity-control iterations in the 'pipeline_dir'

Classes

EccIteration(path, id)

One iteration of the eccentricity-control loop

class spectre.Pipelines.EccentricityControl.DirectoryStructure.EccIteration(path: Path, id: int)

One iteration of the eccentricity-control loop

Each iteration generates initial data, evolves it for a few orbits, and measures the eccentricity. If the eccentricity is not yet within tolerance, the next iteration starts with updated orbital parameters. Once it is, the evolution of the last iteration continues to completion, branching into one or more resolutions (“Levs”).

We currently write eccentricity-control iterations in a directory structure like this:

``` PIPELINE_DIR/

Ecc0/
ID/

0000_InitialData/ 0001_InitialData/ …

Lev1/

0000_Inspiral/ 0001_Inspiral/ …

Ecc1/

```

The ‘ID’ directory and the ‘Lev’ directories are segments directories, so the runs in them are ‘Segment’s (see ‘spectre.support.DirectoryStructure.Segment’).

WARNING: Don’t assume that simulations always have the above directory structure. You don’t want your code to break when files are copied, moved around, or renamed. Instead of relying on some directory structure, have your code take the files it needs as input. This is quite easy using globs.

NAME_PATTERN = re.compile('Ecc(\\d+)')
classmethod current(pipeline_dir: str | Path) EccIteration

The iteration in progress in the ‘pipeline_dir’

The first iteration if the ‘pipeline_dir’ has none yet, or else the last iteration.

id: int
property id_dir: Path

Directory that holds the initial data of this iteration

classmethod last(pipeline_dir: str | Path) EccIteration | None

The last iteration in the ‘pipeline_dir’, or ‘None’ if it has none

lev_dir(lev: int) Path

Directory that holds the evolution of this iteration at ‘lev’

classmethod match(path: str | Path) EccIteration | None

Checks if the ‘path’ is an eccentricity-control iteration

classmethod next(pipeline_dir: str | Path) EccIteration

The next iteration to create in the ‘pipeline_dir’

Continues the numbering of the iterations in the ‘pipeline_dir’, or starts at zero if it has none.

path: Path
spectre.Pipelines.EccentricityControl.DirectoryStructure.list_ecc_iterations(pipeline_dir: str | Path) List[EccIteration]

All eccentricity-control iterations in the ‘pipeline_dir’