organoid_tracker.local_marginalization.local_marginalization_functions module

organoid_tracker.local_marginalization.local_marginalization_functions.build_constraint_matrix(previous_pos, current_pos, links_out, links_in, flow, key_dict, complete_in, complete_out, complete_graph=False)

Constructs a matrix A, such that A*x=0, if x is a set of compatible flows. It also outputs per contraint if the flows have to match up exactly. This does not have to be the case if not all links associated with a node are part of the subset.

organoid_tracker.local_marginalization.local_marginalization_functions.check_completeness(complete_pos, links)

For every node we check if all the links leaving (out) or coming into (in) it are present in the subset (links)

organoid_tracker.local_marginalization.local_marginalization_functions.combine_events(energies)

combines mutually exclusive events

organoid_tracker.local_marginalization.local_marginalization_functions.construct_microstates(links_out, links_in, types, complete_graph=False)

Builds all the vectors encoding possible flow states that have to checked

organoid_tracker.local_marginalization.local_marginalization_functions.energy_to_prob(energy)
organoid_tracker.local_marginalization.local_marginalization_functions.find_local_set(previous_pos, current_pos, links, steps=2, first_backward=True)

Defines local subset of nodes and links based on the distance to the target node of the link of interest. Link is defined by the current cell position and ist previous one. Distance from the source node is used if the first step is not backward in time.

organoid_tracker.local_marginalization.local_marginalization_functions.get_flows_and_energies(previous_pos, current_pos, local_links, experiment, integrate_ignore_penalty=False, complete_graph=True, ignore_penalty=2)

Get the allowed integer flows and associated energies for every element in the subset

organoid_tracker.local_marginalization.local_marginalization_functions.local_marginalization(position1, position2, experiment, steps=3, verbose=False, complete_graph=False, scale=1)

Constructs subgraph, retrieves flows and energies and performs marginalization

organoid_tracker.local_marginalization.local_marginalization_functions.marginalization(energies, constraint_matrix, constraint_matrix_link, exact_match, exact_match_link, microstates=None)

Performs marginalization

organoid_tracker.local_marginalization.local_marginalization_functions.minimal_marginalization(position1, position2, experiment, scale=1)

Performs a marginalization on a susbet containing all the links with the same target node as the link of interest.

organoid_tracker.local_marginalization.local_marginalization_functions.prob_to_energy(prob)