trackpy.utils

Functions

catch_keyboard_interrupt(gen[, logger])

A generator that stops on a KeyboardInterrupt

default_pos_columns(ndim)

Sets the default position column names

default_size_columns(ndim, isotropic)

Sets the default size column names

extract(pattern, string, group[, convert])

Extract a pattern from a string.

fit_powerlaw(data[, plot])

Fit a powerlaw by doing a linear regression in log space.

get_pool(processes)

Returns the appropriate pool and map functions if multiprocessing needs to be used, otherwise None, map.

guess_pos_columns(f)

Guess the position columns from a given feature DataFrame

handle_logging()

Send INFO-level log messages to stdout.

ignore_logging()

Reset to factory default logging configuration; remove trackpy's handler.

is_isotropic(value)

Determine whether all elements of a value are equal

lazy_timestamp(partial_timestamp)

Regularize a lazy timestamp like '0:37' -> '00:00:37'.

make_pandas_strict()

Configure Pandas to raise an exception for "chained assignments."

pandas_concat(*args, **kwargs)

Pass sort = False.

pandas_sort(df, by, *args, **kwargs)

Use sort_values() to sort a DataFrame This raises a ValueError if the given value is both a column and an index label, i.e.: ValueError: 'frame' is both an index level and a column label, which is ambiguous.

quiet([suppress])

Suppress trackpy information log messages.

random_walk(N)

record_meta(meta_data, file_obj)

safe_exp(arr)

stats_mode_scalar(a)

Returns a scalar from scipy.stats.mode().

suppress_plotting()

time_interval(raw)

Convert a time interval string into a timedelta type.

timedelta_to_frame(timedeltas, fps)

Convert timedelta times into frame numbers.

timestamp(ts_string)

Convert a timestamp string to a datetime type.

validate_tuple(value, ndim)

Classes

IPythonStreamHandler([stream])

A StreamHandler for logging that clears output between entries.

ReaderCached(reader)

Simple wrapper that provides cacheing of image readers

memo(func)

Decorator.