compare_runs module
Define functions to compare several runs based on their evaluations.csv.
- concatenate_evaluation_files(simulation_id: str, evaluation_folder: Path, evaluation_namecol: str) DataFrame
Load the file and rename column header.
- Parameters:
simulation_id (str) – Name that will be given to the simulation in the plot.
evaluation_folder (pathlib.Path) – Folder where the
evaluations.csvfile is.evaluation_namecol (str) – Name of the column in the
evaluations.csvfile.
- Returns:
Holds all the values of
evaluation_namecolinevaluation_path; new name of the column issimulation_id.- Return type:
- _compare_one_quantity_all_simulations(simulation_ids_and_paths: dict[str, Path], evaluation_namecol: str, y_label: str) None
Load and plot all the given files.
- Parameters:
simulation_ids_and_paths (dict[str, pathlib.Path]) – Keys are name of the simulation in the plot, values are corresponding
evaluations.csvpath.evaluation_namecol (str) – Name of the column to take in
evaluations.csv.y_label (str) – Name of the y-axis in the plot.
- compare_simulations(simulation_ids_and_paths: dict[str, Path], studies: dict[str, str]) None
Perform all defined studies.
- Parameters:
Examples
>>> simulation_ids_and_paths = {"leapfrog": "run_1/evaluations.csv", "downhill": "run2/evaluations.csv"} >>> studies = {"Lost power [W]", "lost power shall be null", "Relative emittance increase", "emittance increase"} >>> compare_simulations(simulation_ids_and_paths, studies)