From 69044f7505fdcec546466397b62f6905a8c22401 Mon Sep 17 00:00:00 2001 From: kapoorlab Date: Sat, 16 Dec 2023 14:18:09 +0100 Subject: [PATCH] add a densenet 2d --- src/napatrackmater/Trackvector.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/napatrackmater/Trackvector.py b/src/napatrackmater/Trackvector.py index 69a9e634..42d70002 100644 --- a/src/napatrackmater/Trackvector.py +++ b/src/napatrackmater/Trackvector.py @@ -463,9 +463,13 @@ def _final_morphological_dynamic_vectors(self, track_id): self.unique_track_properties[track_id] = current_tracklets_properties def plot_mitosis_times(self, full_dataframe, save_path=""): - time_counter = Counter(self.cell_id_times) - times = list(time_counter.keys()) - counts = list(time_counter.values()) + + dividing_events = full_dataframe[full_dataframe['Dividing'] == 1] + + dividing_counts = dividing_events['t'].value_counts().sort_index() + + times = dividing_counts.index + counts = dividing_counts.values data = {"Time": times, "Count": counts} df = pd.DataFrame(data) np.save(save_path + "_counts.npy", df.to_numpy())