bucky.util.util
Generic utility functions/classes used in the model.
TqdmLoggingHandler
Logging handler that is friendly with tqdm.
dotdict
dot.notation access to dictionary attributes.
_banner()
_banner
A banner for the CLI.
bin_age_csv(filename, out_filename)
bin_age_csv
Group ages in the Census csv to match the bins used by Prem et al.
date_to_t_int(dates, start_date)
date_to_t_int
Find the indices of a list of dates internally used by time indexed arrays in the model.
estimate_IFR(age)
estimate_IFR
Estimate the best fit IFR for a given age.
get_runid()
get_runid
Gets a UUID based of the current datatime and caches it
map_array(a, d)
map_array
Function similar to pandas map but for np arrays.
remove_chars(seq)
remove_chars
Remove all non digit characters from a string, but cleanly passthrough non strs.
bucky.util.util.
Bases: logging.Handler
logging.Handler
See: https://stackoverflow.com/questions/38543506/change-logging-print-function-to-tqdm-write-so-logging-doesnt-interfere-wit
emit
Emit message.
Bases: dict
dict
__delattr__
__getattr__
__setattr__
__deepcopy__
Return a deepcopy of the dict.
filename (str) – Location of Census CSV
str
out_filename (str) – Output filename for binned data
See https://www.medrxiv.org/content/10.1101/2020.07.23.20160895v4.full.pdf for the fit
age (numpy.ndarray or cupy.ndarray if using CuPy) – Array of ages to calculate IFR for
numpy.ndarray
cupy.ndarray
ifr – The calculated best fit IFR
numpy.ndarray or cupy.ndarray if using CuPy
Deprecated since version 0.8.0.
seq (Any) – Strings will be modified, any other type is directly returned
Any
The original sequence, minus non-digit characters if input was a string
bucky.util.update_data_repos
bucky.viz