postprocessor.core.functions.tracks

Functions to process, filter and merge tracks.

Functions

clean_tracks(tracks[, min_len, min_gr])

Clean small non-growing tracks and return the reduced dataframe

get_avg_gr(track)

Get average growth rate for a track.

get_avg_grs(tracks)

Get average growth rate for a group of tracks

get_closest_pairs(pre, post[, tol])

Calculate a cost matrix the Hungarian algorithm to pick the best set of options

get_contiguous_pairs(tracks)

Get all pair of contiguous track ids from a tracks dataframe.

get_dMetric(pre, post[, tol])

Calculate a cost matrix

get_dMetric_wrap(lst, **kwargs)

get_joinable(tracks[, smooth, tol, window, ...])

Get the pair of track (without repeats) that have a smaller error than the tolerance.

get_joint_ids(merging_seqs)

Convert a series of merges into a dictionary where the key is the cell_id of destination and the value a list of the other track ids that were merged into the key

get_last_i(x, i)

get_means(x, i)

get_tracks_ntps(tracks)

get_val(x, n)

get_vec_closest_pairs(lst, **kwargs)

join_track_pair(target, source)

join_tracks(tracks, joinable_pairs[, drop])

Join pairs of tracks from later tps towards the start.

load_test_dset()

localid_to_idx(local_ids, contig_trap)

Fetch then original ids from a nested list with joinable local_ids

max_nonstop_ntps(track)

max_ntps(track)

merge_tracks(tracks[, drop])

Join tracks that are contiguous and within a volume threshold of each other

plot_joinable(tracks, joinable_pairs)

Convenience plotting function for debugging and data vis

rec_bottom(d, k)

solve_matrices(dMetric, prepost[, tol])

Solve the distance matrices obtained in get_dMetric and/or merged from independent dMetric matrices

solve_matrices_wrap(dMetric, edges, **kwargs)

solve_matrix(dMetric)

Solve cost matrix focusing on getting the smallest cost at each iteration.