trackingdata more documentation
This commit is contained in:
parent
2c62ee28a9
commit
3206950f5e
@ -102,18 +102,18 @@ class TrackingData(QObject):
|
|||||||
# embed()
|
# embed()
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def assignTracks(self, tracks):
|
def assignTracks(self, tracks:np.ndarray):
|
||||||
"""assignTracks _summary_
|
"""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
|
Parameters
|
||||||
----------
|
----------
|
||||||
tracks : _type_
|
tracks : np.ndarray
|
||||||
_description_
|
The track information.
|
||||||
|
|
||||||
Returns
|
Returns
|
||||||
-------
|
-------
|
||||||
_type_
|
None
|
||||||
_description_
|
|
||||||
"""
|
"""
|
||||||
if len(tracks) != self.numDetections:
|
if len(tracks) != self.numDetections:
|
||||||
logging.error("DataController: Size of passed tracks does not match data!")
|
logging.error("DataController: Size of passed tracks does not match data!")
|
||||||
@ -285,13 +285,13 @@ def main():
|
|||||||
tracks = data["track"]
|
tracks = data["track"]
|
||||||
cogs = all_cogs[tracks==1]
|
cogs = all_cogs[tracks==1]
|
||||||
all_dists = neighborDistances(cogs, 2, False)
|
all_dists = neighborDistances(cogs, 2, False)
|
||||||
plt.hist(all_dists[1:, 0], bins=1000)
|
# plt.hist(all_dists[1:, 0], bins=1000)
|
||||||
print(np.percentile(all_dists[1:, 0], 99))
|
# print(np.percentile(all_dists[1:, 0], 99))
|
||||||
print(np.percentile(all_dists[1:, 0], 1))
|
# print(np.percentile(all_dists[1:, 0], 1))
|
||||||
plt.gca().set_xscale("log")
|
# plt.gca().set_xscale("log")
|
||||||
plt.gca().set_yscale("log")
|
# plt.gca().set_yscale("log")
|
||||||
# plt.hist(all_dists[1:, 1], bins=100)
|
# plt.hist(all_dists[1:, 1], bins=100)
|
||||||
plt.show()
|
# plt.show()
|
||||||
# def compute_neighbor_distances(cogs, window=10):
|
# def compute_neighbor_distances(cogs, window=10):
|
||||||
# distances = []
|
# distances = []
|
||||||
# for i in range(len(cogs)):
|
# for i in range(len(cogs)):
|
||||||
@ -305,7 +305,5 @@ def main():
|
|||||||
# neighbor_distances = compute_neighbor_distances(cogs)
|
# neighbor_distances = compute_neighbor_distances(cogs)
|
||||||
embed()
|
embed()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
Loading…
Reference in New Issue
Block a user