boris-behav-obs 9.1__py2.py3-none-any.whl → 9.1.1__py2.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.
- boris/connections.py +3 -1
- boris/dialog.py +9 -5
- boris/edit_event.py +3 -8
- boris/event_operations.py +17 -9
- boris/version.py +2 -2
- {boris_behav_obs-9.1.dist-info → boris_behav_obs-9.1.1.dist-info}/METADATA +1 -1
- {boris_behav_obs-9.1.dist-info → boris_behav_obs-9.1.1.dist-info}/RECORD +11 -11
- {boris_behav_obs-9.1.dist-info → boris_behav_obs-9.1.1.dist-info}/LICENSE.TXT +0 -0
- {boris_behav_obs-9.1.dist-info → boris_behav_obs-9.1.1.dist-info}/WHEEL +0 -0
- {boris_behav_obs-9.1.dist-info → boris_behav_obs-9.1.1.dist-info}/entry_points.txt +0 -0
- {boris_behav_obs-9.1.dist-info → boris_behav_obs-9.1.1.dist-info}/top_level.txt +0 -0
boris/connections.py
CHANGED
|
@@ -160,7 +160,9 @@ def connections(self):
|
|
|
160
160
|
self.actionAll_transitions.triggered.connect(lambda: transitions.transitions_matrix(self, "frequency"))
|
|
161
161
|
self.actionNumber_of_transitions.triggered.connect(lambda: transitions.transitions_matrix(self, "number"))
|
|
162
162
|
|
|
163
|
-
self.actionFrequencies_of_transitions_after_behaviors.triggered.connect(
|
|
163
|
+
self.actionFrequencies_of_transitions_after_behaviors.triggered.connect(
|
|
164
|
+
lambda: transitions.transitions_matrix(self, "frequencies_after_behaviors")
|
|
165
|
+
)
|
|
164
166
|
|
|
165
167
|
# menu playback
|
|
166
168
|
self.actionJumpTo.triggered.connect(self.jump_to)
|
boris/dialog.py
CHANGED
|
@@ -20,15 +20,16 @@ This file is part of BORIS.
|
|
|
20
20
|
|
|
21
21
|
"""
|
|
22
22
|
|
|
23
|
+
from decimal import Decimal as dec
|
|
24
|
+
from typing import Union
|
|
25
|
+
import datetime as dt
|
|
23
26
|
import logging
|
|
24
|
-
import
|
|
27
|
+
import math
|
|
25
28
|
import pathlib as pl
|
|
26
|
-
import traceback
|
|
27
29
|
import platform
|
|
28
|
-
import datetime as dt
|
|
29
30
|
import subprocess
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
import sys
|
|
32
|
+
import traceback
|
|
32
33
|
|
|
33
34
|
from PySide6.QtCore import Qt, Signal, qVersion, QRect, QTime, QDateTime, QSize
|
|
34
35
|
from PySide6.QtWidgets import (
|
|
@@ -409,6 +410,9 @@ class get_time_widget(QWidget):
|
|
|
409
410
|
set time on time widget
|
|
410
411
|
"""
|
|
411
412
|
|
|
413
|
+
if math.isnan(new_time):
|
|
414
|
+
return
|
|
415
|
+
|
|
412
416
|
self.pb_sign.setText("-" if new_time < 0 else "+")
|
|
413
417
|
|
|
414
418
|
# seconds
|
boris/edit_event.py
CHANGED
|
@@ -21,6 +21,7 @@ This file is part of BORIS.
|
|
|
21
21
|
"""
|
|
22
22
|
|
|
23
23
|
from decimal import Decimal as dec
|
|
24
|
+
import math
|
|
24
25
|
|
|
25
26
|
from PySide6.QtWidgets import (
|
|
26
27
|
QDialog,
|
|
@@ -67,14 +68,7 @@ class DlgEditEvent(QDialog, Ui_Form):
|
|
|
67
68
|
for w in (self.lb_frame_idx, self.sb_frame_idx, self.cb_set_frame_idx_na):
|
|
68
69
|
w.setVisible(False)
|
|
69
70
|
|
|
70
|
-
if (observation_type in (cfg.LIVE, cfg.MEDIA)) or (observation_type == cfg.IMAGES and self.time_value
|
|
71
|
-
# self.time_widget = duration_widget.Duration_widget(self.time_value)
|
|
72
|
-
# if time_format == cfg.S:
|
|
73
|
-
# self.time_widget.set_format_s()
|
|
74
|
-
# if time_format == cfg.HHMMSS:
|
|
75
|
-
# self.time_widget.set_format_hhmmss()
|
|
76
|
-
|
|
77
|
-
# future time widget
|
|
71
|
+
if (observation_type in (cfg.LIVE, cfg.MEDIA)) or (observation_type == cfg.IMAGES and not math.isnan(self.time_value)):
|
|
78
72
|
self.time_widget = dialog.get_time_widget(self.time_value)
|
|
79
73
|
|
|
80
74
|
if time_format == cfg.S:
|
|
@@ -87,6 +81,7 @@ class DlgEditEvent(QDialog, Ui_Form):
|
|
|
87
81
|
self.horizontalLayout_2.insertWidget(0, self.time_widget)
|
|
88
82
|
|
|
89
83
|
if observation_type == cfg.IMAGES:
|
|
84
|
+
self.time_widget = dialog.get_time_widget(self.time_value)
|
|
90
85
|
# hide frame index widgets
|
|
91
86
|
for w in (self.lb_frame_idx, self.sb_frame_idx, self.cb_set_frame_idx_na, self.pb_set_to_current_time):
|
|
92
87
|
w.setVisible(False)
|
boris/event_operations.py
CHANGED
|
@@ -78,10 +78,13 @@ def add_event(self):
|
|
|
78
78
|
)
|
|
79
79
|
editWindow.setWindowTitle("Add a new event")
|
|
80
80
|
|
|
81
|
-
sortedSubjects = [
|
|
81
|
+
sortedSubjects = [cfg.NO_FOCAL_SUBJECT] + sorted([self.pj[cfg.SUBJECTS][x][cfg.SUBJECT_NAME] for x in self.pj[cfg.SUBJECTS]])
|
|
82
|
+
|
|
83
|
+
print(f"{sortedSubjects=}")
|
|
82
84
|
|
|
83
85
|
editWindow.cobSubject.addItems(sortedSubjects)
|
|
84
|
-
|
|
86
|
+
if self.currentSubject:
|
|
87
|
+
editWindow.cobSubject.setCurrentIndex(editWindow.cobSubject.findText(self.currentSubject, Qt.MatchFixedString))
|
|
85
88
|
|
|
86
89
|
sortedCodes = sorted([self.pj[cfg.ETHOGRAM][x][cfg.BEHAVIOR_CODE] for x in self.pj[cfg.ETHOGRAM]])
|
|
87
90
|
|
|
@@ -103,7 +106,9 @@ def add_event(self):
|
|
|
103
106
|
if self.pj[cfg.ETHOGRAM][idx][cfg.BEHAVIOR_CODE] == editWindow.cobCode.currentText():
|
|
104
107
|
event = self.full_event(idx)
|
|
105
108
|
|
|
106
|
-
event[cfg.SUBJECT] =
|
|
109
|
+
event[cfg.SUBJECT] = (
|
|
110
|
+
"" if editWindow.cobSubject.currentText() == cfg.NO_FOCAL_SUBJECT else editWindow.cobSubject.currentText()
|
|
111
|
+
)
|
|
107
112
|
if editWindow.leComment.toPlainText():
|
|
108
113
|
event[cfg.COMMENT] = editWindow.leComment.toPlainText()
|
|
109
114
|
|
|
@@ -152,7 +157,9 @@ def add_event(self):
|
|
|
152
157
|
if self.pj[cfg.ETHOGRAM][idx][cfg.BEHAVIOR_CODE] == editWindow.cobCode.currentText():
|
|
153
158
|
event = self.full_event(idx)
|
|
154
159
|
|
|
155
|
-
event[cfg.SUBJECT] =
|
|
160
|
+
event[cfg.SUBJECT] = (
|
|
161
|
+
"" if editWindow.cobSubject.currentText() == cfg.NO_FOCAL_SUBJECT else editWindow.cobSubject.currentText()
|
|
162
|
+
)
|
|
156
163
|
if editWindow.leComment.toPlainText():
|
|
157
164
|
event[cfg.COMMENT] = editWindow.leComment.toPlainText()
|
|
158
165
|
|
|
@@ -684,10 +691,9 @@ def edit_event(self):
|
|
|
684
691
|
if self.pj[cfg.ETHOGRAM][key][cfg.BEHAVIOR_CODE] == edit_window.cobCode.currentText():
|
|
685
692
|
event = self.full_event(key)
|
|
686
693
|
# subject
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
event[cfg.SUBJECT] = edit_window.cobSubject.currentText()
|
|
694
|
+
event[cfg.SUBJECT] = (
|
|
695
|
+
"" if edit_window.cobSubject.currentText() == cfg.NO_FOCAL_SUBJECT else edit_window.cobSubject.currentText()
|
|
696
|
+
)
|
|
691
697
|
|
|
692
698
|
event[cfg.COMMENT] = edit_window.leComment.toPlainText()
|
|
693
699
|
|
|
@@ -746,7 +752,9 @@ def edit_event(self):
|
|
|
746
752
|
else:
|
|
747
753
|
event[cfg.TIME] = edit_window.time_widget.get_time()
|
|
748
754
|
|
|
749
|
-
event[cfg.SUBJECT] =
|
|
755
|
+
event[cfg.SUBJECT] = (
|
|
756
|
+
"" if edit_window.cobSubject.currentText() == cfg.NO_FOCAL_SUBJECT else edit_window.cobSubject.currentText()
|
|
757
|
+
)
|
|
750
758
|
event[cfg.COMMENT] = edit_window.leComment.toPlainText()
|
|
751
759
|
event["row"] = pj_event_idx
|
|
752
760
|
event["original_modifiers"] = self.pj[cfg.OBSERVATIONS][self.observationId][cfg.EVENTS][pj_event_idx][
|
boris/version.py
CHANGED
|
@@ -12,7 +12,7 @@ boris/cmd_arguments.py,sha256=oWb-FvhKLbKJhATlTHy9muWu8XnnUfOZ-3Fmz2M8Yzc,1848
|
|
|
12
12
|
boris/coding_pad.py,sha256=fBKdp7DDyupySJosIYtqNd8s2E-GruzCgVhDFsoVWKE,10986
|
|
13
13
|
boris/config.py,sha256=cy4MSVFMHYaEHpHdncljuiaMSTpV6rFNm1OyVYF28Bc,17295
|
|
14
14
|
boris/config_file.py,sha256=1-2ZmTvKET57rwrLR1dXblt0AxMpGB1LAiHxu-Sy8es,13543
|
|
15
|
-
boris/connections.py,sha256=
|
|
15
|
+
boris/connections.py,sha256=y_KkIj3WQQEepJASATHBpZaqwT-ERyFNovy2Q8e7FAA,19321
|
|
16
16
|
boris/converters.py,sha256=c1Jps-URoglY5ILQHz-pCCf6-4DFUHZLtqr_ofsrFg0,11722
|
|
17
17
|
boris/converters_ui.py,sha256=uu7LOBV_fKv2DBdOqsqPwjGsjgONr5ODBoscAA-EP48,9900
|
|
18
18
|
boris/cooccurence.py,sha256=NV3lPhzKptyYh_pSjx1a_FqwaKstqIwj46GpNcyJ4aY,10236
|
|
@@ -21,11 +21,11 @@ boris/core_qrc.py,sha256=T3ki5e2Pj0I0QBGz63MPUgZzl8F_VHZwSq074mRNBDU,650669
|
|
|
21
21
|
boris/core_ui.py,sha256=SeC26uveDCjrCBLsRPuQ6FaapKfON_HIRcQStEDLhl4,76384
|
|
22
22
|
boris/db_functions.py,sha256=Uw9wWH_Pe-qNzpV1k21YG_jKsoOmfY_iiK_7ARZHGDc,13352
|
|
23
23
|
boris/dev.py,sha256=9pUElbjl9g17rFUJXX5aVSu55_iIKIuDxNdrB0DI_d0,3671
|
|
24
|
-
boris/dialog.py,sha256=
|
|
24
|
+
boris/dialog.py,sha256=IAX5_CtTfEUGm5lhzxajjx0oVTs8HNEAw2twTW8AmkE,32859
|
|
25
25
|
boris/duration_widget.py,sha256=GjZgCAMGOcsNjoPiRImEVe6yMkH2vuNoh44ulpd5nlg,6924
|
|
26
|
-
boris/edit_event.py,sha256=
|
|
26
|
+
boris/edit_event.py,sha256=2hpxn9DYuJW1CK02hF4iU0--J_0C_KTiN9gGZ1frJBc,7678
|
|
27
27
|
boris/edit_event_ui.py,sha256=vhglQrhkF9tt0HVlkXnkG7symW0eOFA7nhbk6l_qn3k,7772
|
|
28
|
-
boris/event_operations.py,sha256=
|
|
28
|
+
boris/event_operations.py,sha256=ys1DxZ6iooMvvq_hzpPVZSW0dF9Trbx921XV3jeKOxw,38209
|
|
29
29
|
boris/events_cursor.py,sha256=VPY_ygD0fxE5lp25mcd2l00XQXurCR6hprffF4tKRbU,2078
|
|
30
30
|
boris/events_snapshots.py,sha256=PjWzQvUGQtIcEc_7FDsRphf7fAhhTccQgYc2eQSA65g,27621
|
|
31
31
|
boris/exclusion_matrix.py,sha256=ff88xD6aqc8bpIuj9ZCz9ju_HeqqgibQwoaJrIOJ6RI,5272
|
|
@@ -78,7 +78,7 @@ boris/time_budget_functions.py,sha256=1-7_G84SDs7rp1EWr5zHInzRVDUkUdIfm_AX0516ce
|
|
|
78
78
|
boris/time_budget_widget.py,sha256=_yYzLa6aJRWHRataek_ciXMEKGW75HA9y0auhAJwzbA,43137
|
|
79
79
|
boris/transitions.py,sha256=_aZJfJWv3EBrtmQ7qsdTCayQo6uWU7BXqtQQgflEhr4,12250
|
|
80
80
|
boris/utilities.py,sha256=zwWpH-lozAUj_8K6Gf2Hl-BSW0aRdWo37HGXTWQ86qk,52782
|
|
81
|
-
boris/version.py,sha256=
|
|
81
|
+
boris/version.py,sha256=MwBl656ww2Munfb847fzP6VQ6OX5HrRbTL8ngrLBaS8,787
|
|
82
82
|
boris/video_equalizer.py,sha256=FartoGghFK-T53zklP70rPKYqTuzL8qdvfGlsOF2wwc,5854
|
|
83
83
|
boris/video_equalizer_ui.py,sha256=1CG3s79eM4JAbaCx3i1ILZXLceb41_gGXlOLNfpBgnw,10142
|
|
84
84
|
boris/video_operations.py,sha256=mh3iR__Sm2KnV44L_sW2pOo3AgLwlM7wiTnnqQiAVs4,9381
|
|
@@ -95,9 +95,9 @@ boris/portion/dict.py,sha256=SyHxc7PfDw2ufNLFQycwJtzmRfL48rDp4UrM2KN7IWc,11282
|
|
|
95
95
|
boris/portion/func.py,sha256=3TkQtFKLfsqntwd27HSGHceFhnXHmT-EbNMqktElC5Q,2174
|
|
96
96
|
boris/portion/interval.py,sha256=bAdUiJjGeUAPgsBAImwNeviiwfQq5odfhFZccAWzOTA,20299
|
|
97
97
|
boris/portion/io.py,sha256=ppNeRpiLNrocF1yzGeuEUIhYMf2LfsR-cji3d0nmvUs,6371
|
|
98
|
-
boris_behav_obs-9.1.dist-info/LICENSE.TXT,sha256=WJ7YI-moTFb-uVrFjnzzhGJrnL9P2iqQe8NuED3hutI,35141
|
|
99
|
-
boris_behav_obs-9.1.dist-info/METADATA,sha256=
|
|
100
|
-
boris_behav_obs-9.1.dist-info/WHEEL,sha256=SrDKpSbFN1G94qcmBqS9nyHcDMp9cUS9OC06hC0G3G0,109
|
|
101
|
-
boris_behav_obs-9.1.dist-info/entry_points.txt,sha256=-Vl37ZFjZYK5wTSDf5LAzd2cVLON1Pfy1xkx490Wxak,47
|
|
102
|
-
boris_behav_obs-9.1.dist-info/top_level.txt,sha256=fJSgm62S7WesiwTorGbOO4nNN0yzgZ3klgfGi3Px4qI,6
|
|
103
|
-
boris_behav_obs-9.1.dist-info/RECORD,,
|
|
98
|
+
boris_behav_obs-9.1.1.dist-info/LICENSE.TXT,sha256=WJ7YI-moTFb-uVrFjnzzhGJrnL9P2iqQe8NuED3hutI,35141
|
|
99
|
+
boris_behav_obs-9.1.1.dist-info/METADATA,sha256=zuFFmX5VePSe15dz0kKJdQR-TulX0i47xsTTwUkEnLw,42102
|
|
100
|
+
boris_behav_obs-9.1.1.dist-info/WHEEL,sha256=SrDKpSbFN1G94qcmBqS9nyHcDMp9cUS9OC06hC0G3G0,109
|
|
101
|
+
boris_behav_obs-9.1.1.dist-info/entry_points.txt,sha256=-Vl37ZFjZYK5wTSDf5LAzd2cVLON1Pfy1xkx490Wxak,47
|
|
102
|
+
boris_behav_obs-9.1.1.dist-info/top_level.txt,sha256=fJSgm62S7WesiwTorGbOO4nNN0yzgZ3klgfGi3Px4qI,6
|
|
103
|
+
boris_behav_obs-9.1.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|