febid.Statistics.Statistics#
- class Statistics(filename='run_id502252')[source]#
Bases:
object
Class implementing statistics gathering and saving(to excel).
Report contains following columns:
Time, Time passed, Simulation time, Simulation speed, N of cells(filled), Volume, Min.precursor coverage, Growth rate
It is possible to automatically include graphs into Excel files Additionally, initial simulation parameters are added to 3 separate sheets
Methods
add_plot
Add scatter plots to the Excel-file.
Add a new statistic to the table.
Add a new record to the statistics.
get_growth_rate
Collect initial parameters and save them to Excel-file
['Time', 'Sim.time', 'Sim.speed', 'Volume', Min.precursor coverage', 'Growth rate'] :type x: :param x: :type y: :param y: :return:
Write collected statistics to an Excel file.
Attributes
shape
- add_plots(*args, position='J1')[source]#
Add scatter plots to the Excel-file.
Args is a list of tuples of column names to be plotted: [(x1, y1), (x2, y2)] Position is a list of cells where to put the graphs (by the upper-left corner)
- add_stat(name, first_value=0)[source]#
Add a new statistic to the table. It is recorded in monitoring function and how it is collected is up to the user.
- append(*stats)[source]#
Add a new record to the statistics. The number of stats must include manually added ones
- Parameters:
stats – current simulation time, current number of deposited cells and manually added columns
- Returns: