simba-uw-tf-dev 4.6.4__py3-none-any.whl → 4.6.6__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.
- simba/data_processors/cuda/geometry.py +45 -27
- simba/data_processors/cuda/image.py +1620 -1600
- simba/data_processors/cuda/statistics.py +17 -9
- simba/data_processors/egocentric_aligner.py +24 -6
- simba/data_processors/kleinberg_calculator.py +6 -2
- simba/feature_extractors/feature_subsets.py +12 -5
- simba/feature_extractors/straub_tail_analyzer.py +0 -2
- simba/mixins/statistics_mixin.py +9 -2
- simba/sandbox/analyze_runtimes.py +30 -0
- simba/sandbox/cuda/egocentric_rotator.py +374 -374
- simba/sandbox/proboscis_to_tip.py +28 -0
- simba/sandbox/test_directionality.py +47 -0
- simba/sandbox/test_nonstatic_directionality.py +27 -0
- simba/sandbox/test_pycharm_cuda.py +51 -0
- simba/sandbox/test_simba_install.py +41 -0
- simba/sandbox/test_static_directionality.py +26 -0
- simba/sandbox/test_static_directionality_2d.py +26 -0
- simba/sandbox/verify_env.py +42 -0
- simba/ui/pop_ups/fsttc_pop_up.py +27 -25
- simba/ui/pop_ups/kleinberg_pop_up.py +3 -2
- simba/utils/data.py +0 -1
- simba/utils/errors.py +441 -440
- simba/utils/lookups.py +1203 -1203
- simba/utils/read_write.py +38 -13
- simba/video_processors/egocentric_video_rotator.py +41 -36
- simba/video_processors/video_processing.py +5247 -5233
- simba/video_processors/videos_to_frames.py +41 -31
- {simba_uw_tf_dev-4.6.4.dist-info → simba_uw_tf_dev-4.6.6.dist-info}/METADATA +2 -2
- {simba_uw_tf_dev-4.6.4.dist-info → simba_uw_tf_dev-4.6.6.dist-info}/RECORD +33 -24
- {simba_uw_tf_dev-4.6.4.dist-info → simba_uw_tf_dev-4.6.6.dist-info}/LICENSE +0 -0
- {simba_uw_tf_dev-4.6.4.dist-info → simba_uw_tf_dev-4.6.6.dist-info}/WHEEL +0 -0
- {simba_uw_tf_dev-4.6.4.dist-info → simba_uw_tf_dev-4.6.6.dist-info}/entry_points.txt +0 -0
- {simba_uw_tf_dev-4.6.4.dist-info → simba_uw_tf_dev-4.6.6.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import os
|
|
2
|
+
from simba.mixins.feature_extraction_mixin import FeatureExtractionMixin
|
|
3
|
+
from simba.mixins.config_reader import ConfigReader
|
|
4
|
+
from simba.utils.read_write import read_df, get_fn_ext, read_video_info, write_df
|
|
5
|
+
|
|
6
|
+
CONFIG_PATH = r"C:\troubleshooting\srami0619\project_folder\project_config.ini"
|
|
7
|
+
BASE = 'prob_base'
|
|
8
|
+
TIP = 'prob_tip'
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
config = ConfigReader(config_path=CONFIG_PATH, read_video_info=True, create_logger=False)
|
|
12
|
+
animal_cnt = config.animal_cnt
|
|
13
|
+
for file_cnt, file_path in enumerate(config.outlier_corrected_paths):
|
|
14
|
+
file_name = get_fn_ext(file_path)[1]
|
|
15
|
+
_, px_per_mm, fps = read_video_info(video_name=file_name, video_info_df=config.video_info_df)
|
|
16
|
+
data_df = read_df(file_path=file_path)
|
|
17
|
+
save_path = os.path.join(config.features_dir, f'{file_name}.csv')
|
|
18
|
+
for animal_id in range(1, animal_cnt+1):
|
|
19
|
+
print(f'Analysing file {file_name}, animal {animal_id} ({file_cnt + 1}/{len(config.outlier_corrected_paths)})')
|
|
20
|
+
base_cols = [f'{BASE}_{animal_id}_x', f'{BASE}_{animal_id}_y']
|
|
21
|
+
tip_cols = [f'{TIP}_{animal_id}_x', f'{TIP}_{animal_id}_y']
|
|
22
|
+
prob_data, tip_data = data_df[base_cols], data_df[tip_cols]
|
|
23
|
+
data_df[f'animal_{animal_id}_base_tip_distance'] = FeatureExtractionMixin().keypoint_distances(a=prob_data.values, b=tip_data.values, px_per_mm=px_per_mm, in_centimeters=False)
|
|
24
|
+
write_df(df=data_df, file_type='csv', save_path=save_path, verbose=True)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"""Test directionality_to_nonstatic_target function"""
|
|
2
|
+
import sys
|
|
3
|
+
import numpy as np
|
|
4
|
+
|
|
5
|
+
print(f"Python: {sys.executable}")
|
|
6
|
+
print("="*60)
|
|
7
|
+
|
|
8
|
+
try:
|
|
9
|
+
from simba.data_processors.cuda.geometry import directionality_to_nonstatic_target
|
|
10
|
+
print("✓ Function imported successfully")
|
|
11
|
+
except Exception as e:
|
|
12
|
+
print(f"✗ Error importing function: {e}")
|
|
13
|
+
import traceback
|
|
14
|
+
traceback.print_exc()
|
|
15
|
+
sys.exit(1)
|
|
16
|
+
|
|
17
|
+
# Create test data
|
|
18
|
+
print("\nCreating test data...")
|
|
19
|
+
left_ear = np.random.randint(0, 500, (10, 2)).astype(np.int32)
|
|
20
|
+
right_ear = np.random.randint(0, 500, (10, 2)).astype(np.int32)
|
|
21
|
+
nose = np.random.randint(0, 500, (10, 2)).astype(np.int32)
|
|
22
|
+
target = np.random.randint(0, 500, (10, 2)).astype(np.int32)
|
|
23
|
+
|
|
24
|
+
print(f"left_ear shape: {left_ear.shape}, dtype: {left_ear.dtype}")
|
|
25
|
+
print(f"right_ear shape: {right_ear.shape}, dtype: {right_ear.dtype}")
|
|
26
|
+
print(f"nose shape: {nose.shape}, dtype: {nose.dtype}")
|
|
27
|
+
print(f"target shape: {target.shape}, dtype: {target.dtype}")
|
|
28
|
+
|
|
29
|
+
# Test the function
|
|
30
|
+
print("\nTesting directionality_to_nonstatic_target...")
|
|
31
|
+
try:
|
|
32
|
+
result = directionality_to_nonstatic_target(
|
|
33
|
+
left_ear=left_ear,
|
|
34
|
+
right_ear=right_ear,
|
|
35
|
+
nose=nose,
|
|
36
|
+
target=target
|
|
37
|
+
)
|
|
38
|
+
print(f"✓ SUCCESS! Result shape: {result.shape}")
|
|
39
|
+
print(f"Result: {result}")
|
|
40
|
+
except Exception as e:
|
|
41
|
+
print(f"✗ Error running function: {e}")
|
|
42
|
+
import traceback
|
|
43
|
+
traceback.print_exc()
|
|
44
|
+
sys.exit(1)
|
|
45
|
+
|
|
46
|
+
print("\n" + "="*60)
|
|
47
|
+
print("Test passed!")
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"""Test directionality_to_nonstatic_target with int64"""
|
|
2
|
+
import numpy as np
|
|
3
|
+
from simba.data_processors.cuda.geometry import directionality_to_nonstatic_target
|
|
4
|
+
|
|
5
|
+
print("Testing directionality_to_nonstatic_target with int64...")
|
|
6
|
+
|
|
7
|
+
left_ear = np.random.randint(0, 500, (100, 2)).astype(np.int64)
|
|
8
|
+
right_ear = np.random.randint(0, 500, (100, 2)).astype(np.int64)
|
|
9
|
+
nose = np.random.randint(0, 500, (100, 2)).astype(np.int64)
|
|
10
|
+
target = np.random.randint(0, 500, (100, 2)).astype(np.int64)
|
|
11
|
+
|
|
12
|
+
print(f"Arrays shape: {left_ear.shape}, dtype: {left_ear.dtype}")
|
|
13
|
+
|
|
14
|
+
try:
|
|
15
|
+
result = directionality_to_nonstatic_target(
|
|
16
|
+
left_ear=left_ear,
|
|
17
|
+
right_ear=right_ear,
|
|
18
|
+
nose=nose,
|
|
19
|
+
target=target,
|
|
20
|
+
verbose=True
|
|
21
|
+
)
|
|
22
|
+
print(f"✓ SUCCESS! Result shape: {result.shape}, dtype: {result.dtype}")
|
|
23
|
+
print(f"First 5 results:\n{result[:5]}")
|
|
24
|
+
except Exception as e:
|
|
25
|
+
print(f"✗ Error: {e}")
|
|
26
|
+
import traceback
|
|
27
|
+
traceback.print_exc()
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"""Test script to verify PyCharm CUDA environment setup"""
|
|
2
|
+
import sys
|
|
3
|
+
print(f"Python version: {sys.version}")
|
|
4
|
+
print(f"Python path: {sys.executable}")
|
|
5
|
+
|
|
6
|
+
try:
|
|
7
|
+
from numba import cuda
|
|
8
|
+
print(f"\nNumba CUDA available: {cuda.is_available()}")
|
|
9
|
+
if cuda.is_available():
|
|
10
|
+
print(f"CUDA devices: {len(cuda.gpus)}")
|
|
11
|
+
except Exception as e:
|
|
12
|
+
print(f"\nError importing numba.cuda: {e}")
|
|
13
|
+
|
|
14
|
+
try:
|
|
15
|
+
import cupy as cp
|
|
16
|
+
print(f"CuPy version: {cp.__version__}")
|
|
17
|
+
# Test CuPy
|
|
18
|
+
x = cp.array([1, 2, 3, 4, 5])
|
|
19
|
+
print(f"CuPy test array: {x.get()}")
|
|
20
|
+
except Exception as e:
|
|
21
|
+
print(f"Error importing cupy: {e}")
|
|
22
|
+
|
|
23
|
+
try:
|
|
24
|
+
import numpy as np
|
|
25
|
+
print(f"NumPy version: {np.__version__}")
|
|
26
|
+
except Exception as e:
|
|
27
|
+
print(f"Error importing numpy: {e}")
|
|
28
|
+
|
|
29
|
+
try:
|
|
30
|
+
import cv2
|
|
31
|
+
print(f"OpenCV version: {cv2.__version__}")
|
|
32
|
+
except Exception as e:
|
|
33
|
+
print(f"Error importing cv2: {e}")
|
|
34
|
+
|
|
35
|
+
# Test SimBA CUDA imports
|
|
36
|
+
try:
|
|
37
|
+
from simba.data_processors.cuda.geometry import is_inside_rectangle
|
|
38
|
+
print("\n✓ Successfully imported simba.data_processors.cuda.geometry")
|
|
39
|
+
|
|
40
|
+
# Quick test
|
|
41
|
+
test_points = np.array([[150, 150], [300, 300], [50, 50]], dtype=np.int32)
|
|
42
|
+
test_rect = np.array([[100, 100], [400, 400]], dtype=np.int32)
|
|
43
|
+
result = is_inside_rectangle(x=test_points, y=test_rect)
|
|
44
|
+
print(f"✓ is_inside_rectangle test passed: {result}")
|
|
45
|
+
except Exception as e:
|
|
46
|
+
print(f"\n✗ Error importing SimBA CUDA functions: {e}")
|
|
47
|
+
import traceback
|
|
48
|
+
traceback.print_exc()
|
|
49
|
+
|
|
50
|
+
print("\n" + "="*50)
|
|
51
|
+
print("Environment check complete!")
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"""Test SimBA installation in conda environment"""
|
|
2
|
+
import sys
|
|
3
|
+
print(f"Python: {sys.executable}")
|
|
4
|
+
|
|
5
|
+
try:
|
|
6
|
+
import simba
|
|
7
|
+
print("✓ SimBA imported successfully!")
|
|
8
|
+
except Exception as e:
|
|
9
|
+
print(f"✗ Error importing SimBA: {e}")
|
|
10
|
+
import traceback
|
|
11
|
+
traceback.print_exc()
|
|
12
|
+
sys.exit(1)
|
|
13
|
+
|
|
14
|
+
try:
|
|
15
|
+
from simba.data_processors.cuda.geometry import is_inside_rectangle
|
|
16
|
+
print("✓ CUDA geometry functions imported!")
|
|
17
|
+
except Exception as e:
|
|
18
|
+
print(f"✗ Error importing CUDA functions: {e}")
|
|
19
|
+
import traceback
|
|
20
|
+
traceback.print_exc()
|
|
21
|
+
sys.exit(1)
|
|
22
|
+
|
|
23
|
+
try:
|
|
24
|
+
import cupy as cp
|
|
25
|
+
import numpy as np
|
|
26
|
+
print(f"✓ CuPy {cp.__version__} available")
|
|
27
|
+
|
|
28
|
+
# Quick test
|
|
29
|
+
test_points = np.array([[150, 150], [300, 300], [50, 50]], dtype=np.int32)
|
|
30
|
+
test_rect = np.array([[100, 100], [400, 400]], dtype=np.int32)
|
|
31
|
+
result = is_inside_rectangle(x=test_points, y=test_rect)
|
|
32
|
+
print(f"✓ CUDA function test passed: {result}")
|
|
33
|
+
except Exception as e:
|
|
34
|
+
print(f"✗ Error testing CUDA: {e}")
|
|
35
|
+
import traceback
|
|
36
|
+
traceback.print_exc()
|
|
37
|
+
sys.exit(1)
|
|
38
|
+
|
|
39
|
+
print("\n" + "="*50)
|
|
40
|
+
print("All tests passed! SimBA is ready to use.")
|
|
41
|
+
print("="*50)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"""Test directionality_to_static_targets function"""
|
|
2
|
+
import numpy as np
|
|
3
|
+
from simba.data_processors.cuda.geometry import directionality_to_static_targets
|
|
4
|
+
|
|
5
|
+
print("Testing directionality_to_static_targets...")
|
|
6
|
+
|
|
7
|
+
left_ear = np.random.randint(0, 500, (10, 2)).astype(np.int32)
|
|
8
|
+
right_ear = np.random.randint(0, 500, (10, 2)).astype(np.int32)
|
|
9
|
+
nose = np.random.randint(0, 500, (10, 2)).astype(np.int32)
|
|
10
|
+
target = np.array([250, 250], dtype=np.int32)
|
|
11
|
+
|
|
12
|
+
print(f"target shape: {target.shape}, dtype: {target.dtype}")
|
|
13
|
+
|
|
14
|
+
try:
|
|
15
|
+
result = directionality_to_static_targets(
|
|
16
|
+
left_ear=left_ear,
|
|
17
|
+
right_ear=right_ear,
|
|
18
|
+
nose=nose,
|
|
19
|
+
target=target
|
|
20
|
+
)
|
|
21
|
+
print(f"✓ SUCCESS! Result shape: {result.shape}")
|
|
22
|
+
print(f"Result:\n{result}")
|
|
23
|
+
except Exception as e:
|
|
24
|
+
print(f"✗ Error: {e}")
|
|
25
|
+
import traceback
|
|
26
|
+
traceback.print_exc()
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"""Test directionality_to_static_targets with correct 1D target"""
|
|
2
|
+
import numpy as np
|
|
3
|
+
from simba.data_processors.cuda.geometry import directionality_to_static_targets
|
|
4
|
+
|
|
5
|
+
print("Testing directionality_to_static_targets with 1D target (correct)...")
|
|
6
|
+
|
|
7
|
+
left_ear = np.random.randint(0, 500, (100, 2)).astype(np.int32)
|
|
8
|
+
right_ear = np.random.randint(0, 500, (100, 2)).astype(np.int32)
|
|
9
|
+
nose = np.random.randint(0, 500, (100, 2)).astype(np.int32)
|
|
10
|
+
target = np.array([250, 250], dtype=np.int32) # 1D array for static target
|
|
11
|
+
|
|
12
|
+
print(f"target shape: {target.shape}, dtype: {target.dtype}")
|
|
13
|
+
|
|
14
|
+
try:
|
|
15
|
+
result = directionality_to_static_targets(
|
|
16
|
+
left_ear=left_ear,
|
|
17
|
+
right_ear=right_ear,
|
|
18
|
+
nose=nose,
|
|
19
|
+
target=target
|
|
20
|
+
)
|
|
21
|
+
print(f"✓ SUCCESS! Result shape: {result.shape}")
|
|
22
|
+
print(f"First 5 results:\n{result[:5]}")
|
|
23
|
+
except Exception as e:
|
|
24
|
+
print(f"✗ Error: {e}")
|
|
25
|
+
import traceback
|
|
26
|
+
traceback.print_exc()
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"""Verify CUDA environment is properly configured"""
|
|
2
|
+
from numba import cuda
|
|
3
|
+
import cupy as cp
|
|
4
|
+
import numba
|
|
5
|
+
|
|
6
|
+
print("="*60)
|
|
7
|
+
print("CUDA Environment Verification")
|
|
8
|
+
print("="*60)
|
|
9
|
+
print(f"Numba version: {numba.__version__}")
|
|
10
|
+
print(f"CuPy version: {cp.__version__}")
|
|
11
|
+
print(f"CUDA available: {cuda.is_available()}")
|
|
12
|
+
if cuda.is_available():
|
|
13
|
+
print(f"CUDA devices: {len(cuda.gpus)}")
|
|
14
|
+
for i, gpu in enumerate(cuda.gpus):
|
|
15
|
+
print(f" GPU {i}: {gpu}")
|
|
16
|
+
|
|
17
|
+
# Test the function
|
|
18
|
+
print("\n" + "="*60)
|
|
19
|
+
print("Testing directionality_to_nonstatic_target...")
|
|
20
|
+
try:
|
|
21
|
+
from simba.data_processors.cuda.geometry import directionality_to_nonstatic_target
|
|
22
|
+
import numpy as np
|
|
23
|
+
|
|
24
|
+
left_ear = np.random.randint(0, 500, (10, 2)).astype(np.int32)
|
|
25
|
+
right_ear = np.random.randint(0, 500, (10, 2)).astype(np.int32)
|
|
26
|
+
nose = np.random.randint(0, 500, (10, 2)).astype(np.int32)
|
|
27
|
+
target = np.random.randint(0, 500, (10, 2)).astype(np.int32)
|
|
28
|
+
|
|
29
|
+
result = directionality_to_nonstatic_target(
|
|
30
|
+
left_ear=left_ear,
|
|
31
|
+
right_ear=right_ear,
|
|
32
|
+
nose=nose,
|
|
33
|
+
target=target
|
|
34
|
+
)
|
|
35
|
+
print(f"✓ Function works! Result shape: {result.shape}")
|
|
36
|
+
except Exception as e:
|
|
37
|
+
print(f"✗ Error: {e}")
|
|
38
|
+
import traceback
|
|
39
|
+
traceback.print_exc()
|
|
40
|
+
|
|
41
|
+
print("\n" + "="*60)
|
|
42
|
+
print("Environment is ready!")
|
simba/ui/pop_ups/fsttc_pop_up.py
CHANGED
|
@@ -7,25 +7,29 @@ from typing import Union
|
|
|
7
7
|
from simba.data_processors.fsttc_calculator import FSTTCCalculator
|
|
8
8
|
from simba.mixins.config_reader import ConfigReader
|
|
9
9
|
from simba.mixins.pop_up_mixin import PopUpMixin
|
|
10
|
-
from simba.ui.tkinter_functions import CreateLabelFrameWithIcon, Entry_Box
|
|
10
|
+
from simba.ui.tkinter_functions import (CreateLabelFrameWithIcon, Entry_Box,
|
|
11
|
+
SimbaCheckbox)
|
|
11
12
|
from simba.utils.checks import check_int
|
|
12
|
-
from simba.utils.enums import
|
|
13
|
+
from simba.utils.enums import Formats, Keys, Links
|
|
13
14
|
from simba.utils.errors import CountError
|
|
14
15
|
|
|
15
16
|
|
|
16
17
|
class FSTTCPopUp(PopUpMixin, ConfigReader):
|
|
17
|
-
def __init__(self,
|
|
18
|
+
def __init__(self,
|
|
19
|
+
config_path: Union[str, os.PathLike]):
|
|
18
20
|
|
|
19
|
-
PopUpMixin.__init__(self, title="FORWARD SPIKE TIME TILING COEFFICIENTS", icon='dependency')
|
|
20
21
|
ConfigReader.__init__(self, config_path=config_path, read_video_info=False)
|
|
22
|
+
if len(self.clf_names) < 2:
|
|
23
|
+
raise CountError(msg=f'Cannot compute FSTTC: Needs project with at least 2 classified behaviors, got {len(self.clf_names)}', source=self.__class__.__name__)
|
|
24
|
+
|
|
25
|
+
PopUpMixin.__init__(self, title="FORWARD SPIKE TIME TILING COEFFICIENTS", icon='dependency')
|
|
21
26
|
settings_frm = CreateLabelFrameWithIcon( parent=self.main_frm, header="SETTINGS", icon_name=Keys.DOCUMENTATION.value, icon_link=Links.FSTTC.value,)
|
|
22
|
-
self.time_delta_eb = Entry_Box(settings_frm, "TIME-DELTA",
|
|
23
|
-
|
|
24
|
-
graph_cb =
|
|
25
|
-
self.join_bouts_within_delta_var =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
time_delta_at_onset_cb = Checkbutton( settings_frm, text="TIME-DELTA AT BOUT START", font=Formats.FONT_REGULAR.value, variable=self.time_delta_at_onset_var)
|
|
27
|
+
self.time_delta_eb = Entry_Box(parent=settings_frm, fileDescription="TIME-DELTA", labelwidth=25, validation="numeric", entry_box_width=20, img='timer_2')
|
|
28
|
+
|
|
29
|
+
graph_cb, self.graph_cb_var = SimbaCheckbox(parent=settings_frm, font=Formats.FONT_REGULAR.value, val=False, txt_img='line_chart_blue', txt="CREATE GRAPH")
|
|
30
|
+
join_bouts_within_delta_cb, self.join_bouts_within_delta_var = SimbaCheckbox(parent=settings_frm, font=Formats.FONT_REGULAR.value, val=False, txt_img='join_purple', txt="JOIN BOUTS WITHIN TIME-DELTA")
|
|
31
|
+
time_delta_at_onset_cb, self.time_delta_at_onset_var = SimbaCheckbox(parent=settings_frm, font=Formats.FONT_REGULAR.value, val=False, txt_img='play', txt="TIME-DELTA AT BOUT START")
|
|
32
|
+
|
|
29
33
|
settings_frm.grid(row=0, column=0, sticky=NW)
|
|
30
34
|
self.time_delta_eb.grid(row=0, column=0, sticky="NW")
|
|
31
35
|
join_bouts_within_delta_cb.grid(row=1, column=0, sticky="NW")
|
|
@@ -43,22 +47,20 @@ class FSTTCPopUp(PopUpMixin, ConfigReader):
|
|
|
43
47
|
targets.append(behaviour)
|
|
44
48
|
|
|
45
49
|
if len(targets) < 2:
|
|
46
|
-
raise CountError(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
join_bouts_within_delta=self.join_bouts_within_delta_var.get(),
|
|
55
|
-
time_delta_at_onset=self.time_delta_at_onset_var.get(),
|
|
56
|
-
behavior_lst=targets,
|
|
57
|
-
create_graphs=self.graph_cb_var.get(),
|
|
58
|
-
)
|
|
50
|
+
raise CountError(msg="FORWARD SPIKE TIME TILING COEFFICIENTS REQUIRE 2 OR MORE BEHAVIORS.", source=self.__class__.__name__,)
|
|
51
|
+
|
|
52
|
+
fsttc_calculator = FSTTCCalculator(config_path=self.config_path,
|
|
53
|
+
time_window=self.time_delta_eb.entry_get,
|
|
54
|
+
join_bouts_within_delta=self.join_bouts_within_delta_var.get(),
|
|
55
|
+
time_delta_at_onset=self.time_delta_at_onset_var.get(),
|
|
56
|
+
behavior_lst=targets,
|
|
57
|
+
create_graphs=self.graph_cb_var.get())
|
|
59
58
|
fsttc_calculator.run()
|
|
60
59
|
|
|
61
60
|
|
|
62
|
-
|
|
61
|
+
|
|
63
62
|
|
|
64
63
|
#_ = FSTTCPopUp(config_path=r"C:\troubleshooting\multi_animal_dlc_two_c57\project_folder\project_config.ini")
|
|
64
|
+
|
|
65
|
+
#_ = FSTTCPopUp(config_path=r"C:\troubleshooting\mitra\project_folder\project_config.ini")
|
|
66
|
+
|
|
@@ -7,11 +7,12 @@ from typing import Union
|
|
|
7
7
|
from simba.data_processors.kleinberg_calculator import KleinbergCalculator
|
|
8
8
|
from simba.mixins.config_reader import ConfigReader
|
|
9
9
|
from simba.mixins.pop_up_mixin import PopUpMixin
|
|
10
|
-
from simba.ui.tkinter_functions import (CreateLabelFrameWithIcon, Entry_Box,
|
|
10
|
+
from simba.ui.tkinter_functions import (CreateLabelFrameWithIcon, Entry_Box,
|
|
11
|
+
SimbaButton, SimBADropDown, SimBALabel)
|
|
11
12
|
from simba.utils.checks import check_float, check_int
|
|
12
13
|
from simba.utils.enums import Formats, Keys, Links
|
|
13
14
|
from simba.utils.errors import NoChoosenClassifierError, NoDataError
|
|
14
|
-
from simba.utils.read_write import
|
|
15
|
+
from simba.utils.read_write import get_current_time, str_2_bool
|
|
15
16
|
|
|
16
17
|
INSTRUCTIONS_TXT = 'Results in the project_folder/csv/machine_results folder are overwritten.\n If saving the originals, the original un-smoothened data is saved in a subdirectory of \nthe project_folder/csv/machine_results folder'
|
|
17
18
|
|
simba/utils/data.py
CHANGED
|
@@ -48,7 +48,6 @@ from simba.utils.errors import (BodypartColumnNotFoundError, CountError,
|
|
|
48
48
|
InvalidFileTypeError, InvalidInputError,
|
|
49
49
|
NoFilesFoundError, NoROIDataError,
|
|
50
50
|
SimBAModuleNotFoundError)
|
|
51
|
-
from simba.utils.lookups import get_current_time
|
|
52
51
|
from simba.utils.printing import stdout_success, stdout_warning
|
|
53
52
|
from simba.utils.read_write import (find_core_cnt, find_video_of_file,
|
|
54
53
|
get_current_time, get_fn_ext,
|