CompartmentalSystems.bins package

Submodules

CompartmentalSystems.bins.CompatibleTsTpMassFieldsPerPool module

class CompartmentalSystems.bins.CompatibleTsTpMassFieldsPerPool.CompatibleTsTpMassFieldsPerPool(normal_list)[source]

Bases: CompartmentalSystems.bins.TsTpMassFields.TsTpMassFieldsPerPool

advanced(external_inputs, internal_death_rate_fields, outward_death_rate_fields)[source]
property number_of_pools

CompartmentalSystems.bins.FieldsPerTimeStep module

class CompartmentalSystems.bins.FieldsPerTimeStep.FieldsPerTimeStep(listOfTimeFields, start)[source]

Bases: list

property t_max
property t_min
property times
property tss

CompartmentalSystems.bins.TimeBin module

class CompartmentalSystems.bins.TimeBin.TimeBin(tss, smin, pmin, content, facecolors=None, offset=0)[source]

Bases: object

plot(ax)[source]
verts()[source]

CompartmentalSystems.bins.TimeField module

class CompartmentalSystems.bins.TimeField.TimeField(arr, tss)[source]

Bases: object

property max_Ts
property number_of_Ts_entries
property shape

CompartmentalSystems.bins.TimeMassField module

class CompartmentalSystems.bins.TimeMassField.TimeMassField(arr, tss)[source]

Bases: CompartmentalSystems.bins.TimeField.TimeField

CompartmentalSystems.bins.TimeStep module

class CompartmentalSystems.bins.TimeStep.TimeStep(time, rectangles, internal_death_rate_fields, external_death_rate_fields, external_input_numbers)[source]

Bases: object

property updated_content

CompartmentalSystems.bins.TimeStepIterator module

class CompartmentalSystems.bins.TimeStepIterator.TimeStepIterator(initial_plains, external_input_funcs, internal_death_rate_funcs, external_death_rate_funcs, t0, number_of_steps)[source]

Bases: object

iterator for looping over the results of a difference equation

classmethod from_ode_reservoir_model_run(mr, initial_plains=None)[source]
reset()[source]
property tss
CompartmentalSystems.bins.TimeStepIterator.external_death_rate_maker(sender, func, solfs)[source]
CompartmentalSystems.bins.TimeStepIterator.external_input_maker(tss, receiver, func)[source]
CompartmentalSystems.bins.TimeStepIterator.internal_death_rate_maker(key, func, solfs)[source]

CompartmentalSystems.bins.TimeStepPlotter module

class CompartmentalSystems.bins.TimeStepPlotter.TimeStepPlotter(time_step)[source]

Bases: object

plot_pdfs()[source]
CompartmentalSystems.bins.TimeStepPlotter.plot_contents_and_gains(contents, internal_gains, external_gains, max_Ts, max_Tp, max_z)[source]
CompartmentalSystems.bins.TimeStepPlotter.plot_contents_and_losses(remainders, internal_losses, external_losses, max_Ts, max_Tp, max_z)[source]
CompartmentalSystems.bins.TimeStepPlotter.plot_external_gains(external_input_numbers, tss, nTs, nTp, max_z)[source]
CompartmentalSystems.bins.TimeStepPlotter.plot_figure_per_pipe(rectangles, max_Ts, max_Tp, max_z, title_stem, facecolors)[source]
CompartmentalSystems.bins.TimeStepPlotter.plot_figure_per_pool(rectangles, max_Ts, max_Tp, max_z, title_stem, facecolors)[source]
CompartmentalSystems.bins.TimeStepPlotter.plot_internal_gains(gains, max_Ts, max_Tp, max_z)[source]

CompartmentalSystems.bins.TsMassField module

class CompartmentalSystems.bins.TsMassField.TsMassField(arr, tss)[source]

Bases: CompartmentalSystems.bins.TimeMassField.TimeMassField

default_plot_args(time, Ts_max=None, t_min=None, t_max=None, z_max=None)[source]
plot_bins(ax, time, Ts_max=None, t_min=None, t_max=None, z_max=None, facecolors=None, offset_field=None)[source]
shifted()[source]

CompartmentalSystems.bins.TsMassFieldsPerTimeStep module

class CompartmentalSystems.bins.TsMassFieldsPerTimeStep.TsMassFieldsPerTimeStep(listOfTimeFields, start)[source]

Bases: CompartmentalSystems.bins.FieldsPerTimeStep.FieldsPerTimeStep

property max_Ts
property max_number_of_Ts_entries
plot_bins(ax, mr=None, pool=None)[source]
plot_surface(ax, mr=None, pool=None)[source]

CompartmentalSystems.bins.TsTpBin module

class CompartmentalSystems.bins.TsTpBin.TsTpBin(tss, smin, pmin, content, facecolors=None, offset=0)[source]

Bases: CompartmentalSystems.bins.TimeBin.TimeBin

plot(ax)[source]

CompartmentalSystems.bins.TsTpDeathRateField module

class CompartmentalSystems.bins.TsTpDeathRateField.TsTpDeathRateField(arr, tss)[source]

Bases: CompartmentalSystems.bins.TsTpField.TsTpField

CompartmentalSystems.bins.TsTpField module

class CompartmentalSystems.bins.TsTpField.TsTpField(arr, tss)[source]

Bases: CompartmentalSystems.bins.TimeField.TimeField

default_plot_args(max_shape=None, z_max=None)[source]
property max_Tp
property number_of_Tp_entries
plot_bins(ax, max_shape=None, z_max=None, facecolors=None, offset_field=None)[source]
plot_surface(ax, max_shape=None, z_max=None)[source]
set_limits(ax, max_shape, z_max)[source]
set_ticks_and_labels(max_shape, ax)[source]

CompartmentalSystems.bins.TsTpMassField module

class CompartmentalSystems.bins.TsTpMassField.TsTpMassField(arr, tss)[source]

Bases: CompartmentalSystems.bins.TimeMassField.TimeMassField, CompartmentalSystems.bins.TsTpField.TsTpField

loss(eta_dist)[source]
receive(age_shifted_gain)[source]
receive_external(brand_new_stuff)[source]
remove_loss(loss)[source]
resize(max_index)[source]
shift()[source]
sum_over_all_pool_ages()[source]
property total_content

CompartmentalSystems.bins.TsTpMassFields module

class CompartmentalSystems.bins.TsTpMassFields.TimeMassFields[source]

Bases: dict

shift()[source]
class CompartmentalSystems.bins.TsTpMassFields.TsMassFieldsPerPool(*args, **kwargs)[source]

Bases: CompartmentalSystems.bins.TsTpMassFields.TimeMassFields

class CompartmentalSystems.bins.TsTpMassFields.TsTpMassFieldsPerPipe(*args, **kwargs)[source]

Bases: CompartmentalSystems.bins.TsTpMassFields.TimeMassFields

property gains
class CompartmentalSystems.bins.TsTpMassFields.TsTpMassFieldsPerPool(*args, **kwargs)[source]

Bases: CompartmentalSystems.bins.TsTpMassFields.TimeMassFields

external_losses(external_death_rate_fields)[source]
internal_losses(internal_death_rate_fields)[source]
receive(gains)[source]
receive_external(external_inputs)[source]
remove(l)[source]
shift()[source]

CompartmentalSystems.bins.TsTpMassFieldsPerPoolPerTimeStep module

class CompartmentalSystems.bins.TsTpMassFieldsPerPoolPerTimeStep.TsTpMassFieldsPerPoolPerTimeStep(multi_pool_pyramid, start)[source]

Bases: object

classmethod from_time_step_iterator(iterator)[source]
matrix_plot(sub_func_name, fig)[source]
matrix_plot3d(sub_func_name, fig, title=None, mr=None)[source]
property number_of_pools
singlePoolPyramid(pool_nr)[source]
single_pool_cartoon(pool_number, trunk)[source]
property tss

CompartmentalSystems.bins.TsTpMassFieldsPerTimeStep module

class CompartmentalSystems.bins.TsTpMassFieldsPerTimeStep.TsTpMassFieldsPerTimeStep(listOfTimeFields, start)[source]

Bases: CompartmentalSystems.bins.FieldsPerTimeStep.FieldsPerTimeStep

plot_system_age_distributions_as_surfaces(ax, mr=None, pool=None)[source]
plot_system_age_distributions_with_bins(ax, mr=None, pool=None)[source]
plot_total_contents(ax)[source]
system_age_distributions()[source]
property total_contents

CompartmentalSystems.bins.TstBin module

class CompartmentalSystems.bins.TstBin.TstBin(tss, smin, pmin, content, facecolors=None, offset=0)[source]

Bases: CompartmentalSystems.bins.TimeBin.TimeBin

plot(ax)[source]

CompartmentalSystems.bins.density_algorithm module

CompartmentalSystems.bins.density_algorithm.gains(pool_number, internal_losses)[source]
CompartmentalSystems.bins.density_algorithm.losses(old_rectangles, death_rates, time)[source]

CompartmentalSystems.bins.getsizeof module

CompartmentalSystems.bins.getsizeof.total_size(o, handlers={}, verbose=False)[source]

Returns the approximate memory footprint of an object and all of its contents.

Automatically finds the contents of the following builtin containers and their subclasses: tuple, list, deque, dict, set and frozenset. To search other containers, add handlers to iterate over their contents:

handlers = {SomeContainerClass: iter,

OtherContainerClass: OtherContainerClass.get_elements}

CompartmentalSystems.bins.gv module

CompartmentalSystems.bins.gv.default_data_type()[source]
CompartmentalSystems.bins.gv.indexed_color(index)[source]
CompartmentalSystems.bins.gv.indexed_filled_marker(index)[source]
CompartmentalSystems.bins.gv.rotated_access(_list, index)[source]

CompartmentalSystems.bins.plot_helpers module

class CompartmentalSystems.bins.plot_helpers.SinglePlotFigureHandler(figure_filename)[source]

Bases: object

CompartmentalSystems.bins.plot_helpers.add_xhist_data_to_scatter(plot_ax, data, label, fontsize, show_grid=True)[source]
CompartmentalSystems.bins.plot_helpers.cc(arg, alpha=None)[source]

Module contents