Examples

Below are simple templeates cases of simulation postprocessing in a typical application.

Before proceeding to the proper analysis, feature-independent settings need to be sspecified.

  • External input and output paths for the data. For the examples, data input files can be downloaded from data/in directory of the GitHub repository.

  • Index of the simulation run.

  • The cell type. It has three attributes packed inside a class: typename and plmind are used in constructing cell-specific path to input files and correspond to internal directory structure the Explicit Microtubules. regions cell field defines borders of cell internal subcompartments.

Below, we will process the same simulation, so it is convenient to store the settings in a separate python module for importing them into the process-specific scripts.

sim_specs.py
 1from pathlib import PurePath                     # OS-independedt paths
 2from numpy import Inf
 3from cytoskeleton_analyser.cells import CellType
 4from cytoskeleton_analyser.cells import Region, Regions
 5
 6# Set data source and destination. !! CHANGE !!
 7data_in = PurePath('/Full/path/to/input/directory')
 8data_out = PurePath('Full/path/to/output/directory')
 9
10# Specify the simulation runs to analyse:
11rinds = [1]
12
13# The runs represent the same cell type.
14# Derive the cell class from CellType to ensure
15# that no attributes are missing.
16cell = CellType(
17   # Name of the data foder for this cell type.
18   typename = 'irreg',
19   # Index of the membrane mesh.
20   plmind = 1,
21   # Radial distance limits (in μm) for the cell subcompartments.
22   regions = Regions(
23      cytosol=Region(0., Inf),
24      soma=Region(0., 6.),
25      lamella=Region(6., Inf),
26      edge=Region(10., Inf),
27   )
28)

Now let us see the use cases: