trackingdata more documentation

This commit is contained in:
Jan Grewe 2025-02-21 08:20:56 +01:00
parent 2c62ee28a9
commit 3206950f5e

View File

@ -102,18 +102,18 @@ class TrackingData(QObject):
# embed()
pass
def assignTracks(self, tracks):
"""assignTracks _summary_
def assignTracks(self, tracks:np.ndarray):
"""assigns the given tracks to the user-selected detections. If the sizes of
provided tracks and the user selection do not match and error is logged and the tracks are not set.
Parameters
----------
tracks : _type_
_description_
tracks : np.ndarray
The track information.
Returns
-------
_type_
_description_
None
"""
if len(tracks) != self.numDetections:
logging.error("DataController: Size of passed tracks does not match data!")
@ -285,13 +285,13 @@ def main():
tracks = data["track"]
cogs = all_cogs[tracks==1]
all_dists = neighborDistances(cogs, 2, False)
plt.hist(all_dists[1:, 0], bins=1000)
print(np.percentile(all_dists[1:, 0], 99))
print(np.percentile(all_dists[1:, 0], 1))
plt.gca().set_xscale("log")
plt.gca().set_yscale("log")
# plt.hist(all_dists[1:, 0], bins=1000)
# print(np.percentile(all_dists[1:, 0], 99))
# print(np.percentile(all_dists[1:, 0], 1))
# plt.gca().set_xscale("log")
# plt.gca().set_yscale("log")
# plt.hist(all_dists[1:, 1], bins=100)
plt.show()
# plt.show()
# def compute_neighbor_distances(cogs, window=10):
# distances = []
# for i in range(len(cogs)):
@ -305,7 +305,5 @@ def main():
# neighbor_distances = compute_neighbor_distances(cogs)
embed()
if __name__ == "__main__":
main()