Documentation

Submodules of the cr_mech_coli package

crm.simulation

Initialize Agents, run simulations, access results

crm.fitting

Fit the computational model to data

crm.gen

Generate synthetic images

crm.imaging

Create 2D cell masks

crm.datatypes

Datatypes shared across submodules

This package performs numerical simulations of rod-shaped bacterial cells. It can also visualize the results of these simulations and provides methods to perform parameter estimations.

Running a simulation and storing the corresponding images is straightforward. All settings needed to run a single simulation are contained in the Configuration class. The routine is executed via the run_simulation() function and returns a CellContainer which contains all information of the cells at every stored time interval.

import cr_mech_coli as crm

# Contains settings regarding simulation domain, time increments etc.
config = crm.Configuration()

# Use predefined values for agents
agent_settings = crm.AgentSettings()

# Automatically generate agents
agents = crm.generate_agents(
    4,
    agent_settings,
    config
)

# Run simulation and return container
cell_container = crm.run_simulation_with_agents(config, agents)

# Plot individual results
crm.store_all_images(cell_container, config.domain_size)

Note

This package is based on the f32 floating point type. All numerical calculations performed by cellular_raza are done in this format. However the same can not be guaranteed for calculations involving any of the python packages.