spectre.Pipelines.Bbh.PostprocessId¶
Functions
|
Postprocess initial data after generation. |
- spectre.Pipelines.Bbh.PostprocessId.postprocess_id(id_input_file_path: str | Path, id_run_dir: str | Path | None = None, horizon_l_max: int = 12, horizons_file: str | Path | None = None, control: bool = True, control_residual_tolerance: float = DEFAULT_RESIDUAL_TOLERANCE, control_max_iterations: int = DEFAULT_MAX_ITERATIONS, control_refinement_level: int = 1, control_polynomial_order: int = 6, control_params: Dict[Literal['mass_A', 'mass_B', 'spin_A', 'spin_B', 'center_of_mass', 'linear_momentum'], float | Sequence[float]] = {}, evolve: bool = False, pipeline_dir: str | Path | None = None, **scheduler_kwargs)¶
Postprocess initial data after generation.
This function is called automatically after the initial data has been generated (see the ‘Next’ section in the ‘InitialData.yaml’ input file), or manually by pointing the ID_INPUT_FILE_PATH to the input file of the initial data run. Also specify ‘id_run_dir’ if the initial data was run in a different directory than where the input file is.
This function does the following:
Find apparent horizons in the data to determine quantities like the masses and spins of the black holes. These quantities are stored in the given ‘horizons_file’ in subfiles ‘Ah{A,B}.dat’. In addition, the horizon surface coordinates and coefficients are written to the ‘horizons_file’ in subfiles ‘Ah{A,B}/Coordinates’ and ‘Ah{A,B}/Coefficients’.
If ‘control’ is set to True, run a control loop such that masses and spins of the horizons match the input parameters. See ControlId.py for details.
Start the inspiral if ‘evolve’ is set to True.
- Parameters:
id_input_file_path – Path to the input file of the initial data run.
id_run_dir – Directory of the initial data run. Paths in the input file are relative to this directory. If not provided, the directory of the input file is used.
horizon_l_max – Maximum l-mode for the horizon search.
horizons_file – Path to the file where the horizon data is written to. Default is ‘Horizons.h5’ in the ‘id_run_dir’.
control – Control BBH physical parameters (default: True).
control_residual_tolerance – Residual tolerance used for control.
control_max_iterations – Maximum of iterations allowed for control.
control_refinement_level – h-refinement used for control.
control_polynomial_order – p-refinement used for control.
control_params – Dictionary used to customize control. See ControlId.py for details.
evolve – Evolve the initial data after postprocessing (default: False).
pipeline_dir – Directory where steps in the pipeline are created. Required if ‘evolve’ is set to True.