Trackletο
- class btrack.btypes.Tracklet(ID: int, data: list[PyTrackObject], *, parent: int | None = None, children: list[int] | None = None, fate: Fates = Fates.UNDEFINED)ο
Bases:
object
A btrack Tracklet object used to store track information.
- Parameters:
- IDint
A unique integer identifier for the tracklet.
- datalist[PyTrackObject]
The objects linked together to form the track.
- parentint
The identifiers of the parent track(s).
- childrenlist
The identifiers of the child tracks.
- fateconstants.Fates, default = constants.Fates.UNDEFINED
An enumerated type describing the fate of the track.
- Attributes:
- xlist[float]
The list of x positions.
- ylist[float]
The list of y positions.
- zlist[float]
The list of z positions.
- tlist[float]
The list of timestamps.
- dummylist[bool]
A list specifying which objects are dummy objects inserted by the tracker.
- parentint, list
The identifiers of the parent track(s).
- generationint
If specified, the generational depth of the tracklet releative to the root.
- refslist[int]
Returns a list of
btrack.btypes.PyTrackObject
identifiers used to build the track. Useful for indexing back into the original data, e.g. table of localizations or h5 file.- labellist[str]
Return the label of each object in the track.
- statelist[int]
Return the numerical label of each object in the track.
- softmaxlist[float]
If defined, return the softmax score for the label of each object in the track.
properties
dict[str, npt.NDArray]Return the properties of the objects.
- rootint,
The identifier of the root ID if a branching tree (ie cell division).
- is_rootboole
Flag to denote root track.
- is_leafbool
Flag to denote leaf track.
- startint, float
First time stamp of track.
- stopint, float
Last time stamp of track.
- kalmannpt.NDArray
Return the complete output of the kalman filter for this track. Note, that this may not have been returned while from the tracker. See
btrack.BayesianTracker.return_kalman
for more details.LBEP
listReturn an LBEP table summarising the track.
Notes
Tracklet object for storing and updating linked lists of track objects. Forms the data structure for an individual tracklet. Track βfatesβ are the selected hypotheses after optimization. Defined in constants.Fates. Intrinsic properties can be accesses as attributes, e.g: track.x returns the track x values.
Attributes Summary
Return the properties of the objects.
Methods Summary
LBEP
()Return an LBEP table summarising the track.
covar
(index)Return the Kalman filter covariance matrix.
in_frame
(frame)Return true or false as to whether the track is in the frame.
mu
(index)Return the Kalman filter mu.
predicted
(index)Return the motion model prediction for the given timestep.
to_array
([properties])Return a representation of the trackled as a numpy array.
to_dict
([properties])Return a dictionary of the tracklet which can be used for JSON export.
trim
(frame[,Β tail])Trim the tracklet and return one with the trimmed data.
Attributes Documentation
- dummyο
- is_leafο
- is_rootο
- kalmanο
- labelο
- propertiesο
Return the properties of the objects.
- refsο
- softmaxο
- startο
- stateο
- stopο
- tο
- xο
- yο
- zο
Methods Documentation
- LBEP() tuple[int, list, list, int | None, None, int] ο
Return an LBEP table summarising the track.
- covar(index: int) ndarray[Any, dtype[_ScalarType_co]] ο
Return the Kalman filter covariance matrix. Note that we are only returning the covariance matrix for the positions (e.g. 3x3).
- in_frame(frame: int) bool ο
Return true or false as to whether the track is in the frame.
- mu(index: int) ndarray[Any, dtype[_ScalarType_co]] ο
Return the Kalman filter mu. Note that we are only returning the mu for the positions (e.g. 3x1).
- predicted(index: int) ndarray[Any, dtype[_ScalarType_co]] ο
Return the motion model prediction for the given timestep.
- to_array(properties: list = ['ID', 't', 'x', 'y', 'z', 'parent', 'root', 'state', 'generation', 'dummy']) ndarray[Any, dtype[_ScalarType_co]] ο
Return a representation of the trackled as a numpy array.
- to_dict(properties: list = ['ID', 't', 'x', 'y', 'z', 'parent', 'root', 'state', 'generation', 'dummy']) dict[str, Any] ο
Return a dictionary of the tracklet which can be used for JSON export. This is an ordered dictionary for nicer JSON output.