celldetective 1.3.9.post5__py3-none-any.whl → 1.4.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. celldetective/__init__.py +0 -3
  2. celldetective/_version.py +1 -1
  3. celldetective/events.py +2 -4
  4. celldetective/exceptions.py +11 -0
  5. celldetective/extra_properties.py +132 -0
  6. celldetective/filters.py +7 -1
  7. celldetective/gui/InitWindow.py +37 -46
  8. celldetective/gui/__init__.py +3 -9
  9. celldetective/gui/about.py +19 -15
  10. celldetective/gui/analyze_block.py +34 -19
  11. celldetective/gui/base_annotator.py +786 -0
  12. celldetective/gui/base_components.py +23 -0
  13. celldetective/gui/classifier_widget.py +86 -94
  14. celldetective/gui/configure_new_exp.py +163 -46
  15. celldetective/gui/control_panel.py +76 -146
  16. celldetective/gui/{signal_annotator.py → event_annotator.py} +533 -1438
  17. celldetective/gui/generic_signal_plot.py +11 -13
  18. celldetective/gui/gui_utils.py +54 -23
  19. celldetective/gui/help/neighborhood.json +2 -2
  20. celldetective/gui/json_readers.py +5 -4
  21. celldetective/gui/layouts.py +265 -31
  22. celldetective/gui/{signal_annotator2.py → pair_event_annotator.py} +433 -635
  23. celldetective/gui/plot_measurements.py +21 -17
  24. celldetective/gui/plot_signals_ui.py +125 -72
  25. celldetective/gui/process_block.py +283 -188
  26. celldetective/gui/processes/compute_neighborhood.py +594 -0
  27. celldetective/gui/processes/downloader.py +37 -34
  28. celldetective/gui/processes/measure_cells.py +19 -8
  29. celldetective/gui/processes/segment_cells.py +47 -11
  30. celldetective/gui/processes/track_cells.py +18 -13
  31. celldetective/gui/seg_model_loader.py +21 -62
  32. celldetective/gui/settings/__init__.py +7 -0
  33. celldetective/gui/settings/_settings_base.py +70 -0
  34. celldetective/gui/{retrain_signal_model_options.py → settings/_settings_event_model_training.py} +54 -109
  35. celldetective/gui/{measurement_options.py → settings/_settings_measurements.py} +54 -92
  36. celldetective/gui/{neighborhood_options.py → settings/_settings_neighborhood.py} +10 -13
  37. celldetective/gui/settings/_settings_segmentation.py +49 -0
  38. celldetective/gui/{retrain_segmentation_model_options.py → settings/_settings_segmentation_model_training.py} +38 -92
  39. celldetective/gui/{signal_annotator_options.py → settings/_settings_signal_annotator.py} +78 -103
  40. celldetective/gui/{btrack_options.py → settings/_settings_tracking.py} +85 -116
  41. celldetective/gui/styles.py +2 -1
  42. celldetective/gui/survival_ui.py +49 -95
  43. celldetective/gui/tableUI.py +53 -25
  44. celldetective/gui/table_ops/__init__.py +0 -0
  45. celldetective/gui/table_ops/merge_groups.py +118 -0
  46. celldetective/gui/thresholds_gui.py +617 -1221
  47. celldetective/gui/viewers.py +107 -42
  48. celldetective/gui/workers.py +8 -4
  49. celldetective/io.py +137 -57
  50. celldetective/links/zenodo.json +145 -144
  51. celldetective/measure.py +94 -53
  52. celldetective/neighborhood.py +342 -268
  53. celldetective/preprocessing.py +56 -35
  54. celldetective/regionprops/_regionprops.py +16 -5
  55. celldetective/relative_measurements.py +50 -29
  56. celldetective/scripts/analyze_signals.py +4 -1
  57. celldetective/scripts/measure_cells.py +5 -5
  58. celldetective/scripts/measure_relative.py +20 -12
  59. celldetective/scripts/segment_cells.py +4 -10
  60. celldetective/scripts/segment_cells_thresholds.py +3 -3
  61. celldetective/scripts/track_cells.py +10 -8
  62. celldetective/scripts/train_segmentation_model.py +18 -6
  63. celldetective/signals.py +29 -14
  64. celldetective/tracking.py +14 -3
  65. celldetective/utils.py +91 -62
  66. {celldetective-1.3.9.post5.dist-info → celldetective-1.4.1.dist-info}/METADATA +24 -16
  67. celldetective-1.4.1.dist-info/RECORD +123 -0
  68. {celldetective-1.3.9.post5.dist-info → celldetective-1.4.1.dist-info}/WHEEL +1 -1
  69. tests/gui/__init__.py +0 -0
  70. tests/gui/test_new_project.py +228 -0
  71. tests/gui/test_project.py +99 -0
  72. tests/test_preprocessing.py +2 -2
  73. celldetective/models/segmentation_effectors/ricm_bf_all_last/config_input.json +0 -79
  74. celldetective/models/segmentation_effectors/ricm_bf_all_last/ricm_bf_all_last +0 -0
  75. celldetective/models/segmentation_effectors/ricm_bf_all_last/training_instructions.json +0 -37
  76. celldetective/models/segmentation_effectors/test-transfer/config_input.json +0 -39
  77. celldetective/models/segmentation_effectors/test-transfer/test-transfer +0 -0
  78. celldetective/models/signal_detection/NucCond/classification_loss.png +0 -0
  79. celldetective/models/signal_detection/NucCond/classifier.h5 +0 -0
  80. celldetective/models/signal_detection/NucCond/config_input.json +0 -1
  81. celldetective/models/signal_detection/NucCond/log_classifier.csv +0 -126
  82. celldetective/models/signal_detection/NucCond/log_regressor.csv +0 -282
  83. celldetective/models/signal_detection/NucCond/regression_loss.png +0 -0
  84. celldetective/models/signal_detection/NucCond/regressor.h5 +0 -0
  85. celldetective/models/signal_detection/NucCond/scores.npy +0 -0
  86. celldetective/models/signal_detection/NucCond/test_confusion_matrix.png +0 -0
  87. celldetective/models/signal_detection/NucCond/test_regression.png +0 -0
  88. celldetective/models/signal_detection/NucCond/validation_confusion_matrix.png +0 -0
  89. celldetective/models/signal_detection/NucCond/validation_regression.png +0 -0
  90. celldetective-1.3.9.post5.dist-info/RECORD +0 -129
  91. tests/test_qt.py +0 -103
  92. {celldetective-1.3.9.post5.dist-info → celldetective-1.4.1.dist-info}/entry_points.txt +0 -0
  93. {celldetective-1.3.9.post5.dist-info → celldetective-1.4.1.dist-info/licenses}/LICENSE +0 -0
  94. {celldetective-1.3.9.post5.dist-info → celldetective-1.4.1.dist-info}/top_level.txt +0 -0
@@ -1,10 +1,12 @@
1
- from PyQt5.QtWidgets import QMainWindow, QPushButton, QHBoxLayout, QLabel, QWidget, QGridLayout, QFrame, \
2
- QTabWidget, QVBoxLayout, QMessageBox, QScrollArea, QDesktopWidget
1
+ from PyQt5.QtWidgets import QPushButton, QHBoxLayout, QLabel, QGridLayout, QFrame, \
2
+ QTabWidget, QVBoxLayout, QScrollArea, QDesktopWidget
3
+ from celldetective.gui import CelldetectiveMainWindow, CelldetectiveWidget
4
+
3
5
  from PyQt5.QtCore import Qt, QSize
4
- from celldetective.gui.gui_utils import center_window, QHSeperationLine, QCheckableComboBox
5
- from celldetective.utils import _extract_labels_from_config, ConfigSectionMap, extract_experiment_channels, extract_identity_col
6
+ from celldetective.gui.gui_utils import center_window, QHSeperationLine, QCheckableComboBox, generic_message
7
+ from celldetective.utils import _extract_labels_from_config, config_section_to_dict, extract_identity_col
6
8
  from celldetective.gui import ConfigEditor, ProcessPanel, PreprocessingPanel, AnalysisPanel, NeighPanel
7
- from celldetective.io import get_experiment_wells, get_config, get_spatial_calibration, get_temporal_calibration, get_experiment_concentrations, get_experiment_cell_types, get_experiment_antibodies, get_experiment_pharmaceutical_agents
9
+ from celldetective.io import extract_position_name, get_experiment_wells, get_config, get_spatial_calibration, get_temporal_calibration, get_experiment_concentrations, get_experiment_cell_types, get_experiment_antibodies, get_experiment_pharmaceutical_agents, get_experiment_populations, extract_well_name_and_number
8
10
  from natsort import natsorted
9
11
  from glob import glob
10
12
  import os
@@ -15,11 +17,10 @@ import gc
15
17
  import subprocess
16
18
  from celldetective.gui.viewers import StackVisualizer
17
19
  from celldetective.utils import extract_experiment_channels
18
- from celldetective.gui import Styles
19
20
  import pandas as pd
20
21
 
21
22
 
22
- class ControlPanel(QMainWindow, Styles):
23
+ class ControlPanel(CelldetectiveMainWindow):
23
24
 
24
25
  def __init__(self, parent_window=None, exp_dir=""):
25
26
 
@@ -29,21 +30,20 @@ class ControlPanel(QMainWindow, Styles):
29
30
  if not self.exp_dir.endswith(os.sep):
30
31
  self.exp_dir = self.exp_dir+os.sep
31
32
  self.setWindowTitle("celldetective")
32
- self.setWindowIcon(self.celldetective_icon)
33
33
  self.parent_window = parent_window
34
34
 
35
35
  self.init_wells_and_positions()
36
36
  self.load_configuration()
37
37
 
38
- self.w = QWidget()
38
+ self.w = CelldetectiveWidget()
39
39
  self.grid = QGridLayout(self.w)
40
40
  self.grid.setSpacing(5)
41
- self.grid.setContentsMargins(10,10,10,10) #left top right bottom
41
+ self.grid.setContentsMargins(10, 10, 10, 10) # left top right bottom
42
42
 
43
43
  self.to_disable = []
44
44
  self.generate_header()
45
- self.ProcessEffectors = ProcessPanel(self,'effectors')
46
- self.ProcessTargets = ProcessPanel(self,'targets')
45
+ self.ProcessPopulations = [ProcessPanel(self, pop) for pop in self.populations]
46
+
47
47
  self.NeighPanel = NeighPanel(self)
48
48
  self.PreprocessingPanel = PreprocessingPanel(self)
49
49
 
@@ -57,9 +57,10 @@ class ControlPanel(QMainWindow, Styles):
57
57
  self.SurvivalBlock = AnalysisPanel(self,title='Survival')
58
58
 
59
59
  grid_process.addWidget(self.PreprocessingPanel)
60
- grid_process.addWidget(self.ProcessEffectors)
61
- grid_process.addWidget(self.ProcessTargets)
60
+ for panel in self.ProcessPopulations:
61
+ grid_process.addWidget(panel)
62
62
  grid_process.addWidget(self.NeighPanel)
63
+
63
64
  grid_analyze.addWidget(self.SurvivalBlock)
64
65
 
65
66
  self.scroll=QScrollArea()
@@ -92,7 +93,6 @@ class ControlPanel(QMainWindow, Styles):
92
93
  self.screen_width = desktop.screenGeometry().width()
93
94
  self.scroll.setMinimumWidth(440)
94
95
 
95
- self.setAttribute(Qt.WA_DeleteOnClose)
96
96
  center_window(self)
97
97
 
98
98
 
@@ -108,11 +108,9 @@ class ControlPanel(QMainWindow, Styles):
108
108
  self.wells = get_experiment_wells(self.exp_dir) #natsorted(glob(self.exp_dir + "W*" + os.sep))
109
109
  self.positions = []
110
110
  for w in self.wells:
111
- w = os.path.split(w[:-1])
112
- root = w[0]
113
- w = w[1]
114
- positions_path = natsorted(glob(os.sep.join([root, w, f"{w[1:]}*{os.sep}"])))
115
- self.positions.append([os.path.split(pos[:-1])[1] for pos in positions_path])
111
+ well_name, well_nbr = extract_well_name_and_number(w)
112
+ positions_path = natsorted(glob(os.sep.join([w,f"{well_nbr}*", os.sep])))
113
+ self.positions.append([extract_position_name(pos) for pos in positions_path])
116
114
 
117
115
  def generate_header(self):
118
116
 
@@ -274,15 +272,9 @@ class ControlPanel(QMainWindow, Styles):
274
272
  movies = glob(self.pos + os.sep.join(['movie', f"{self.movie_prefix}*.tif"]))
275
273
 
276
274
  if len(movies) == 0:
277
- msgBox = QMessageBox()
278
- msgBox.setIcon(QMessageBox.Warning)
279
- msgBox.setText("Please select a position containing a movie...")
280
- msgBox.setWindowTitle("Warning")
281
- msgBox.setStandardButtons(QMessageBox.Ok)
282
- returnValue = msgBox.exec()
283
- if returnValue == QMessageBox.Ok:
284
- self.current_stack = None
285
- return None
275
+ generic_message("Please select a position containing a movie...")
276
+ self.current_stack = None
277
+ return None
286
278
  else:
287
279
  self.current_stack = movies[0]
288
280
 
@@ -321,13 +313,15 @@ class ControlPanel(QMainWindow, Styles):
321
313
  print('Reading experiment configuration...')
322
314
  self.exp_config = get_config(self.exp_dir)
323
315
 
316
+ self.populations = get_experiment_populations(self.exp_dir)
324
317
  self.PxToUm = get_spatial_calibration(self.exp_dir)
325
318
  self.FrameToMin = get_temporal_calibration(self.exp_dir)
326
319
 
327
- self.len_movie = int(ConfigSectionMap(self.exp_config,"MovieSettings")["len_movie"])
328
- self.shape_x = int(ConfigSectionMap(self.exp_config,"MovieSettings")["shape_x"])
329
- self.shape_y = int(ConfigSectionMap(self.exp_config,"MovieSettings")["shape_y"])
330
- self.movie_prefix = ConfigSectionMap(self.exp_config,"MovieSettings")["movie_prefix"]
320
+
321
+ self.len_movie = int(config_section_to_dict(self.exp_config, "MovieSettings")["len_movie"])
322
+ self.shape_x = int(config_section_to_dict(self.exp_config, "MovieSettings")["shape_x"])
323
+ self.shape_y = int(config_section_to_dict(self.exp_config, "MovieSettings")["shape_y"])
324
+ self.movie_prefix = config_section_to_dict(self.exp_config, "MovieSettings")["movie_prefix"]
331
325
 
332
326
  # Read channels
333
327
  self.exp_channels, channel_indices = extract_experiment_channels(self.exp_dir)
@@ -341,7 +335,7 @@ class ControlPanel(QMainWindow, Styles):
341
335
  self.antibodies = get_experiment_antibodies(self.exp_dir)
342
336
  self.pharmaceutical_agents = get_experiment_pharmaceutical_agents(self.exp_dir)
343
337
 
344
- self.metadata = ConfigSectionMap(self.exp_config,"Metadata")
338
+ self.metadata = config_section_to_dict(self.exp_config, "Metadata")
345
339
  print('Experiment configuration successfully read...')
346
340
 
347
341
  def closeEvent(self, event):
@@ -350,7 +344,7 @@ class ControlPanel(QMainWindow, Styles):
350
344
  Close child windows if closed.
351
345
  """
352
346
 
353
- for process_block in [self.ProcessTargets, self.ProcessEffectors]:
347
+ for process_block in self.ProcessPopulations:
354
348
  try:
355
349
  if process_block.SegModelLoader:
356
350
  process_block.SegModelLoader.close()
@@ -436,14 +430,8 @@ class ControlPanel(QMainWindow, Styles):
436
430
  """
437
431
 
438
432
  if self.well_list.isMultipleSelection():
439
- msgBox = QMessageBox()
440
- msgBox.setIcon(QMessageBox.Critical)
441
- msgBox.setText("Please select a single well...")
442
- msgBox.setWindowTitle("Error")
443
- msgBox.setStandardButtons(QMessageBox.Ok)
444
- returnValue = msgBox.exec()
445
- if returnValue == QMessageBox.Ok:
446
- return False
433
+ generic_message("Please select a single well...")
434
+ return False
447
435
  else:
448
436
  self.well_index = self.well_list.getSelectedIndices() #[self.well_list.currentIndex()]
449
437
 
@@ -451,14 +439,8 @@ class ControlPanel(QMainWindow, Styles):
451
439
 
452
440
  pos = self.positions[w_idx]
453
441
  if not self.position_list.isSingleSelection():
454
- msgBox = QMessageBox()
455
- msgBox.setIcon(QMessageBox.Critical)
456
- msgBox.setText("Please select a single position...")
457
- msgBox.setWindowTitle("Error")
458
- msgBox.setStandardButtons(QMessageBox.Ok)
459
- returnValue = msgBox.exec()
460
- if returnValue == QMessageBox.Ok:
461
- return False
442
+ generic_message("Please select a single position...")
443
+ return False
462
444
  else:
463
445
  pos_indices = self.position_list.getSelectedIndices()
464
446
 
@@ -483,127 +465,75 @@ class ControlPanel(QMainWindow, Styles):
483
465
  def update_position_options(self):
484
466
 
485
467
  self.pos = self.position_list.currentText()
486
- panels = [self.ProcessEffectors, self.ProcessTargets]
487
468
 
488
469
  if self.position_list.isMultipleSelection() or not self.position_list.isAnySelected():
489
470
 
490
- for p in panels:
471
+ for p in self.ProcessPopulations:
491
472
  p.check_seg_btn.setEnabled(False)
492
473
  p.check_tracking_result_btn.setEnabled(False)
474
+ p.view_tab_btn.setEnabled(True)
475
+ p.signal_analysis_action.setEnabled(True)
476
+ p.check_seg_btn.setEnabled(False)
477
+ p.check_tracking_result_btn.setEnabled(False)
478
+ p.check_measurements_btn.setEnabled(False)
479
+ p.check_signals_btn.setEnabled(False)
480
+ p.delete_tracks_btn.hide()
493
481
 
494
- self.ProcessTargets.view_tab_btn.setEnabled(True)
495
- self.ProcessEffectors.view_tab_btn.setEnabled(True)
496
- self.NeighPanel.view_tab_btn.setEnabled(True)
497
- self.ProcessEffectors.signal_analysis_action.setEnabled(True)
498
- self.ProcessTargets.signal_analysis_action.setEnabled(True)
499
-
500
- self.ProcessTargets.check_seg_btn.setEnabled(False)
501
- self.ProcessEffectors.check_seg_btn.setEnabled(False)
502
-
503
- self.ProcessTargets.check_tracking_result_btn.setEnabled(False)
504
- self.ProcessEffectors.check_tracking_result_btn.setEnabled(False)
505
-
506
- self.ProcessEffectors.check_measurements_btn.setEnabled(False)
507
- self.ProcessTargets.check_measurements_btn.setEnabled(False)
508
- #self.ProcessTargets.signal_analysis_action.setEnabled(False)
509
- #self.ProcessEffectors.signal_analysis_action.setEnabled(False)
510
482
 
511
- self.ProcessTargets.check_signals_btn.setEnabled(False)
512
- self.ProcessEffectors.check_signals_btn.setEnabled(False)
483
+ self.NeighPanel.view_tab_btn.setEnabled(True)
513
484
  self.NeighPanel.check_signals_btn.setEnabled(False)
514
- self.ProcessTargets.delete_tracks_btn.hide()
515
- self.ProcessEffectors.delete_tracks_btn.hide()
516
-
517
485
  self.view_stack_btn.setEnabled(False)
518
486
 
519
487
  elif self.well_list.isMultipleSelection():
520
488
 
521
- self.ProcessTargets.view_tab_btn.setEnabled(True)
522
- self.ProcessEffectors.view_tab_btn.setEnabled(True)
489
+ for p in self.ProcessPopulations:
490
+ p.view_tab_btn.setEnabled(True)
491
+ p.signal_analysis_action.setEnabled(True)
492
+ p.delete_tracks_btn.hide()
493
+
494
+
523
495
  self.NeighPanel.view_tab_btn.setEnabled(True)
524
496
  self.view_stack_btn.setEnabled(False)
525
- self.ProcessEffectors.signal_analysis_action.setEnabled(True)
526
- self.ProcessTargets.signal_analysis_action.setEnabled(True)
527
497
  if hasattr(self,'delete_tracks_btn'):
528
498
  self.delete_tracks_btn.hide()
529
- self.ProcessTargets.delete_tracks_btn.hide()
530
- self.ProcessEffectors.delete_tracks_btn.hide()
531
499
  else:
532
500
 
533
501
  if self.well_list.isAnySelected() and self.position_list.isAnySelected():
534
502
 
535
503
  self.locate_selected_position()
536
504
  self.view_stack_btn.setEnabled(True)
537
- # if os.path.exists(os.sep.join([self.pos,'labels_effectors', os.sep])):
538
- self.ProcessEffectors.check_seg_btn.setEnabled(True)
539
- # if os.path.exists(os.sep.join([self.pos,'labels_targets', os.sep])):
540
- self.ProcessTargets.check_seg_btn.setEnabled(True)
541
-
542
- # if os.path.exists(os.sep.join([self.pos,'output','tables','napari_target_trajectories.npy'])):
543
- # self.ProcessTargets.check_tracking_result_btn.setEnabled(True)
544
- # else:
545
- # self.ProcessTargets.check_tracking_result_btn.setEnabled(False)
546
- # if os.path.exists(os.sep.join([self.pos,'output','tables','napari_effector_trajectories.npy'])):
547
- # self.ProcessEffectors.check_tracking_result_btn.setEnabled(True)
548
- # else:
549
- # self.ProcessEffectors.check_tracking_result_btn.setEnabled(False)
550
-
551
- if os.path.exists(os.sep.join([self.pos,'output','tables','trajectories_effectors.csv'])):
552
- df = pd.read_csv(os.sep.join([self.pos,'output','tables','trajectories_effectors.csv']), nrows=1)
553
- id_col = extract_identity_col(df)
554
- self.ProcessEffectors.check_measurements_btn.setEnabled(True)
555
- if id_col=='TRACK_ID':
556
- self.ProcessEffectors.check_signals_btn.setEnabled(True)
557
- self.ProcessEffectors.delete_tracks_btn.show()
558
- self.ProcessEffectors.signal_analysis_action.setEnabled(True)
559
- self.ProcessEffectors.check_tracking_result_btn.setEnabled(True)
505
+ for i,p in enumerate(self.ProcessPopulations):
506
+ p.check_seg_btn.setEnabled(True)
507
+ if os.path.exists(os.sep.join([self.pos,'output','tables',f'trajectories_{self.populations[i]}.csv'])):
508
+ try:
509
+ df = pd.read_csv(os.sep.join([self.pos,'output','tables',f'trajectories_{self.populations[i]}.csv']), nrows=1)
510
+ except Exception as e:
511
+ continue
512
+ id_col = extract_identity_col(df)
513
+ p.check_measurements_btn.setEnabled(True)
514
+
515
+ if id_col=='TRACK_ID':
516
+ p.check_signals_btn.setEnabled(True)
517
+ p.delete_tracks_btn.show()
518
+ p.signal_analysis_action.setEnabled(True)
519
+ p.check_tracking_result_btn.setEnabled(True)
520
+ else:
521
+ p.signal_analysis_action.setEnabled(False)
522
+ p.check_tracking_result_btn.setEnabled(False)
523
+
524
+ p.view_tab_btn.setEnabled(True)
525
+ p.classify_btn.setEnabled(True)
560
526
  else:
561
- self.ProcessEffectors.signal_analysis_action.setEnabled(False)
562
- self.ProcessEffectors.check_tracking_result_btn.setEnabled(False)
563
-
564
- #self.ProcessEffectors.signal_analysis_action.setEnabled(True)
565
- self.ProcessEffectors.view_tab_btn.setEnabled(True)
566
- self.ProcessEffectors.classify_btn.setEnabled(True)
567
- else:
568
- self.ProcessEffectors.check_measurements_btn.setEnabled(False)
569
- self.ProcessEffectors.check_signals_btn.setEnabled(False)
570
- #self.ProcessEffectors.signal_analysis_action.setEnabled(False)
571
- self.ProcessEffectors.view_tab_btn.setEnabled(False)
572
- self.ProcessEffectors.classify_btn.setEnabled(False)
573
- self.ProcessEffectors.delete_tracks_btn.hide()
574
- self.ProcessEffectors.signal_analysis_action.setEnabled(False)
575
-
576
- if os.path.exists(os.sep.join([self.pos,'output','tables','trajectories_targets.csv'])):
577
- df = pd.read_csv(os.sep.join([self.pos,'output','tables','trajectories_targets.csv']), nrows=1)
578
- id_col = extract_identity_col(df)
579
- self.ProcessTargets.check_measurements_btn.setEnabled(True)
580
- if id_col=='TRACK_ID':
581
- self.ProcessTargets.check_signals_btn.setEnabled(True)
582
- self.ProcessTargets.signal_analysis_action.setEnabled(True)
583
- self.ProcessTargets.check_tracking_result_btn.setEnabled(True)
584
- self.ProcessTargets.delete_tracks_btn.show()
585
- else:
586
- self.ProcessTargets.signal_analysis_action.setEnabled(False)
587
- self.ProcessTargets.check_tracking_result_btn.setEnabled(False)
588
-
589
- #self.ProcessTargets.signal_analysis_action.setEnabled(True)
590
- self.ProcessTargets.view_tab_btn.setEnabled(True)
591
- self.ProcessTargets.classify_btn.setEnabled(True)
592
- else:
593
- self.ProcessTargets.check_measurements_btn.setEnabled(False)
594
- self.ProcessTargets.check_signals_btn.setEnabled(False)
595
- #self.ProcessTargets.signal_analysis_action.setEnabled(False)
596
- self.ProcessTargets.view_tab_btn.setEnabled(False)
597
- self.ProcessTargets.classify_btn.setEnabled(False)
598
- self.ProcessTargets.signal_analysis_action.setEnabled(False)
599
- self.ProcessTargets.delete_tracks_btn.hide()
600
- self.ProcessTargets.signal_analysis_action.setEnabled(False)
527
+ p.check_measurements_btn.setEnabled(False)
528
+ p.check_signals_btn.setEnabled(False)
529
+ p.view_tab_btn.setEnabled(False)
530
+ p.classify_btn.setEnabled(False)
531
+ p.delete_tracks_btn.hide()
532
+ p.signal_analysis_action.setEnabled(False)
601
533
 
602
534
  if os.path.exists(os.sep.join([self.pos,'output','tables','trajectories_pairs.csv'])):
603
535
  self.NeighPanel.view_tab_btn.setEnabled(True)
604
536
  self.NeighPanel.check_signals_btn.setEnabled(True)
605
537
  else:
606
538
  self.NeighPanel.view_tab_btn.setEnabled(False)
607
- self.NeighPanel.check_signals_btn.setEnabled(False)
608
-
609
-
539
+ self.NeighPanel.check_signals_btn.setEnabled(False)