laser_cholera package

laser_cholera.compute(args)[source]

Subpackages

Submodules

laser_cholera.cli module

Module that contains the command line app.

Why does this file exist, and why not put this in __main__?

You might be tempted to import things from __main__ later, but that will cause problems: the code will get executed twice:

  • When you run python -mlaser_cholera python will execute __main__.py as a script. That means there will not be any laser_cholera.__main__ in sys.modules.

  • When you import __main__ it will get executed again (as a module) because there”s no laser_cholera.__main__ in sys.modules.

Also see (1) from https://click.palletsprojects.com/en/stable/setuptools/

laser_cholera.core module

laser_cholera.core.compute(args)[source]

laser_cholera.iso_codes module

laser_cholera.sc module

laser_cholera.sc.color(s, fg=None, bg=None, style=None)[source]

Add ANSI colors and styles to a string.

Parameters:
  • s (str) – String to format.

  • fg (str|int|tuple) – Foreground color specification.

  • bg (str|int|tuple( bg) – Background color specification.

  • style (str) – Style names, separated by ‘+’

Returns:

Formatted string.

laser_cholera.sc.parse_rgb(s)[source]

Convert string to an RGB color

laser_cholera.sc.printcyan(s, **kwargs)[source]

Alias to print(colors.cyan(s))

laser_cholera.sc.printgreen(s, **kwargs)[source]

Alias to print(colors.green(s))

laser_cholera.sc.printred(s, **kwargs)[source]

Alias to print(colors.red(s))

laser_cholera.test module

class laser_cholera.test.Eradication(model, verbose: bool = False)[source]

Bases: object

check()[source]
plot(fig: Figure | None = None)[source]

laser_cholera.utils module

laser_cholera.utils.sim_duration(start: datetime = datetime.datetime(2025, 3, 24, 0, 0), stop: datetime = datetime.datetime(2025, 4, 24, 0, 0))[source]