pytrnsys_process.process.process_batch.process_single_simulation#
- pytrnsys_process.process.process_batch.process_single_simulation(sim_folder: Path, processing_scenario: Callable[[Simulation], None] | Sequence[Callable[[Simulation], None]]) Simulation[source]#
Process a single simulation folder using the provided processing step/scenario.
- Parameters:
sim_folder (pathlib.Path) – Path to the simulation folder to process
processing_scenario (collections.abc.Callable or collections.abc.Sequence of collections.abc.Callable) – They should contain the processing logic for a simulation. Each callable should take a Simulation object as its only parameter and modify it in place.
- Returns:
Simulation
- Return type:
Example
>>> import pathlib as _pl >>> from pytrnsys_process import api ... >>> def processing_step_1(sim: api.Simulation): ... # Process simulation data ... pass >>> results = api.process_single_simulation( ... _pl.Path("path/to/simulation"), ... processing_step_1 ... )