fafbseg.flywire.find_mat_version¶
- fafbseg.flywire.find_mat_version(ids, verbose=True, allow_multiple=False, raise_missing=True, dataset=None)[source]¶
Find a materialization version (or live) for given IDs.
- Parameters:
ids (iterable) – Root IDs to check.
verbose (bool) – Whether to print results of search. See also the flywire.utils.silence_find_mat_version context manager to silence output.
allow_multiple (bool) – If True, will track if IDs can be found spread across multiple materialization versions if there is no single one containing all.
raise_missing (bool) – Only relevant if allow_multiple=True. If False, will return versions even if some IDs could not be found.
- Returns:
version (int | “live”) – A single version (including “live”) that contains all given root IDs.
versions (np.ndarray) – If no single version was found and allow_multiple=True will return a vector of len(ids) with the latest version at which the respective ID can be found. Important: “live” version will be return as -1! If raise_missing=False and one or more root IDs could not be found in any of the available materialization versions these IDs will be return as version 0.