NutMEG.culture.colony package

Submodules

NutMEG.culture.colony.colony module

class NutMEG.culture.colony.colony.colony(name, collection=[])

Bases: object

Class for a colony of base_organism like objects, which monitors its size and structure.

collection

List of all active organisms in the colony

Type

numpy array

inactive

List of all inactive organisms in the colony

Type

numpy array

name

Name of the colony, used for output management

Type

str

base

The base organism in the colony, used for general parameters and reproduction.

Type

base_organism like

output

Helper attribute for output to terminal and database management.

Type

colony_output

add_organism(o, n=1)

Add an organism or list of organisms o to the colony.

If n is passed, it is the number of random instances of org to generate.

getCHNOPSut()

Return the rate of uptake of each CHNOPS element for the whole colony.

get_average_maintenance_fraction()

Return the average maintenance fraction of energetic input of the alive population.

get_mass(inactive=False)

Return the total mass of the colony. Pass inactive as True to include inactive organisms.

get_population(inactive=False)

Return the number of organisms in the colony. Pass inactive as True to include inactive organisms.

get_volume(inactive=False)

Return the total volume of the colony. Pass inactive as True to include inactive organisms.

select_timestep(factorup=1.01)

Return a timestep which will increase the population factorup times given the current model parameters

take_step(t)

Advance the colony by time t.

We calculate the local environment only once to save doing it for every organsim.

NutMEG.culture.colony.colony_output module

class NutMEG.culture.colony.colony_output.colony_output(hostcolony)

Bases: object

helper class for managing the output of a colony, either to terminal or to a database.

appendvals(startnum, dt)
buildbaseparams(first=False)
params = {}
paramtypelst()
refreshparams()

reset the parameter dictionary to have empty numpy arrays.

Inherit and adjust this method for saved organisms which have specific parameters you want to monitor.

Module contents