Simulation
Name |
Type |
Description |
|---|---|---|
output_path |
|
Path of the stored results. |
iteration |
|
Iteration count at which to obtain results. |
element_path |
|
Identifier which should be “cell_storage” or “voxel_storage” |
threads |
|
Number of threads to use simultaneously. |
iteration |
|
Iteration count at which to obtain results. |
- calculate_entropy(output_path, iteration) ndarray
Obtain entropies for both species.
- Parameters:
output_path (Path) – Path of the stored results.
iteration (int) – Iteration count at which to obtain results.
- Returns:
Array containing entropy values for both species.
- Return type:
np.ndarray
- calculate_spatial_density(data, domain, weights=None)
Calculates the spatial entry given data for cells and domain.
- Parameters:
data (pd.DataFrame) – DataFrame containing cellular properties.
domain (pd.DataFrame) – DataFrame containing domain properties.
weights (list) – List of weightings to use for calculating the entropy. Will be filled
provided. (automatically by the volume of the individual cells if not)
- generate_cells(n_cells_1, n_cells_2, domain, randomness=0.0, pad=0.15, seed=0, homogenous=False)
n_cells_1: int n_cells_2: int uniformity: float
Floating point number between 0.0 and 1.0
- get_all_iterations(output_path, element_path='cell_storage')
Obtain a sorted list of all saved iteration counts.
- Parameters:
output_path (Path) – Path of the stored results.
element_path (str) – Identifier which should be “cell_storage” or “voxel_storage”
- Returns:
Sorted list of iteration counts.
- Return type:
list[int]
- get_elements_at_all_iterations(output_path: Path, element_path='cell_storage', threads=1)
- Parameters:
output_path (Path) – Path of the stored results.
element_path (str) – Identifier which should be “cell_storage” or “voxel_storage”
threads (int) – Number of threads to use simultaneously.
Returns:
- get_elements_at_iter(output_path: Path, iteration, element_path='cell_storage') DataFrame
Helper function to obtain information about cells or the domain at a given iteration point.
- Parameters:
output_path (Path) – Path of the stored results.
iteration (int) – Iteration count at which to obtain results.
element_path (str) – Identifier which should be “cell_storage” or “voxel_storage”
- Returns:
DataFrame containing all information
- Return type:
pd.DataFrame
- get_last_output_path(name='pool_model', prefix='out') Path
Returns the path of the last numerical result.
- Parameters:
name (str) – Name of the subfolder in which to look for.
- Returns:
Storage Path of the last simulation result
- Return type:
Path
- get_simulation_settings(output_path) tuple[Any, Any, Any]
Obtain simulation settings for a given output path.
- Parameters:
output_path (Path) – Path of the stored results.
- Returns:
A tuple containing json results of the domain, initial cells and meta parameters.
- Return type:
(Any, Any, Any)