tools

progress_bar

class TSA.tools.progress_bar(imax, refresh=1, length=50)

A simple progress bar for quick and easy user output

add_time(iteration)

store the current time and iteration

plot_time(axis=None)

plot the time vs iterations on the axis if given

print_bar(i)

update the progress bar

misc functions

TSA.tools.get_img(path)

Load an image as a numpy array

TSA.tools.set_seed(seed)

Use this to set ALL the random seeds to a fixed value and take out any randomness from cuda kernels

TSA.tools.percent_print(i, i_max, interval=1, length=50)

Print a progress bar or percentage value :param i: The current iteration number :type i: int :param i_max: The total number of iterations to complete :type i_max: int :param interval: The frequency of updating the progress bar (set high for long

simulations)
Returns:updated – Whether the update bar was updated
Return type:bool