starcall.utils
index
/home/nicho/starcall-docs/starcall/utils.py

 
Modules
       
collections
itertools
math
numpy
sys
time

 
Functions
       
format_time(secs)
human_readable(number)
log_env(debug, progress)
mark_dot(image, dot, inner_rad=3, outer_rad=6, color=1)
mark_dots(image, poses)
memory_report()
percent_normalize(image, percent=0.1)
read_multicolumn(table, name, length_column=None)
The complement function to write_multicolumn. Finds all columns like name + '_XX' where
XX is an integer and concatenates the columns to create a 2d array.
If there is also a column name + '_length' it will be used to create a
ragged array, where each row has a different length.
sequence_plot(axis, sequences, separate=False)
simple_progress(iterable, total=None)
standardize_format(image, expected_dims)
Converts an input image into the format
expected, this being:
(width, height), (channels, width, height), (cycle, channels, width, height)
depending on the expected_dims.
to_rgb8(image, percent_norm=0.1, colormap=None)
write_multicolumn(table, name, array, length_column=None)
Splits a 2d array into multiple columns in a dataframe for saving to csv or
similar format. Writes N columns with names name + '_0' to name + '_N' where N is array.shape[1].
Also supports ragged arrays where not every row is the same length, in this case pass
a list of lists. Writes the different number of items in each row to another column named
length_column, which defaults to name + '_length'
The complement function to read_multicolumn which can be used to extract the 2d array
back from the table.