boris-behav-obs 9.7.7__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/__init__.py +26 -0
- boris/__main__.py +25 -0
- boris/about.py +143 -0
- boris/add_modifier.py +635 -0
- boris/add_modifier_ui.py +303 -0
- boris/advanced_event_filtering.py +455 -0
- boris/analysis_plugins/__init__.py +0 -0
- boris/analysis_plugins/_latency.py +59 -0
- boris/analysis_plugins/irr_cohen_kappa.py +109 -0
- boris/analysis_plugins/irr_cohen_kappa_with_modifiers.py +112 -0
- boris/analysis_plugins/irr_weighted_cohen_kappa.py +157 -0
- boris/analysis_plugins/irr_weighted_cohen_kappa_with_modifiers.py +162 -0
- boris/analysis_plugins/list_of_dataframe_columns.py +22 -0
- boris/analysis_plugins/number_of_occurences.py +22 -0
- boris/analysis_plugins/number_of_occurences_by_independent_variable.py +54 -0
- boris/analysis_plugins/time_budget.py +61 -0
- boris/behav_coding_map_creator.py +1110 -0
- boris/behavior_binary_table.py +305 -0
- boris/behaviors_coding_map.py +239 -0
- boris/boris_cli.py +340 -0
- boris/cmd_arguments.py +49 -0
- boris/coding_pad.py +280 -0
- boris/config.py +785 -0
- boris/config_file.py +356 -0
- boris/connections.py +409 -0
- boris/converters.py +333 -0
- boris/converters_ui.py +225 -0
- boris/cooccurence.py +250 -0
- boris/core.py +5901 -0
- boris/core_qrc.py +15958 -0
- boris/core_ui.py +1107 -0
- boris/db_functions.py +324 -0
- boris/dev.py +134 -0
- boris/dialog.py +1108 -0
- boris/duration_widget.py +238 -0
- boris/edit_event.py +245 -0
- boris/edit_event_ui.py +233 -0
- boris/event_operations.py +1040 -0
- boris/events_cursor.py +61 -0
- boris/events_snapshots.py +596 -0
- boris/exclusion_matrix.py +141 -0
- boris/export_events.py +1006 -0
- boris/export_observation.py +1203 -0
- boris/external_processes.py +332 -0
- boris/geometric_measurement.py +941 -0
- boris/gui_utilities.py +135 -0
- boris/image_overlay.py +72 -0
- boris/import_observations.py +242 -0
- boris/ipc_mpv.py +325 -0
- boris/irr.py +634 -0
- boris/latency.py +244 -0
- boris/measurement_widget.py +161 -0
- boris/media_file.py +115 -0
- boris/menu_options.py +213 -0
- boris/modifier_coding_map_creator.py +1013 -0
- boris/modifiers_coding_map.py +157 -0
- boris/mpv.py +2016 -0
- boris/mpv2.py +2193 -0
- boris/observation.py +1453 -0
- boris/observation_operations.py +2538 -0
- boris/observation_ui.py +679 -0
- boris/observations_list.py +337 -0
- boris/otx_parser.py +442 -0
- boris/param_panel.py +201 -0
- boris/param_panel_ui.py +305 -0
- boris/player_dock_widget.py +198 -0
- boris/plot_data_module.py +536 -0
- boris/plot_events.py +634 -0
- boris/plot_events_rt.py +237 -0
- boris/plot_spectrogram_rt.py +316 -0
- boris/plot_waveform_rt.py +230 -0
- boris/plugins.py +431 -0
- boris/portion/__init__.py +31 -0
- boris/portion/const.py +95 -0
- boris/portion/dict.py +365 -0
- boris/portion/func.py +52 -0
- boris/portion/interval.py +581 -0
- boris/portion/io.py +181 -0
- boris/preferences.py +510 -0
- boris/preferences_ui.py +770 -0
- boris/project.py +2007 -0
- boris/project_functions.py +2041 -0
- boris/project_import_export.py +1096 -0
- boris/project_ui.py +794 -0
- boris/qrc_boris.py +10389 -0
- boris/qrc_boris5.py +2579 -0
- boris/select_modifiers.py +312 -0
- boris/select_observations.py +210 -0
- boris/select_subj_behav.py +286 -0
- boris/state_events.py +197 -0
- boris/subjects_pad.py +106 -0
- boris/synthetic_time_budget.py +290 -0
- boris/time_budget_functions.py +1136 -0
- boris/time_budget_widget.py +1039 -0
- boris/transitions.py +365 -0
- boris/utilities.py +1810 -0
- boris/version.py +24 -0
- boris/video_equalizer.py +159 -0
- boris/video_equalizer_ui.py +248 -0
- boris/video_operations.py +310 -0
- boris/view_df.py +104 -0
- boris/view_df_ui.py +75 -0
- boris/write_event.py +538 -0
- boris_behav_obs-9.7.7.dist-info/METADATA +139 -0
- boris_behav_obs-9.7.7.dist-info/RECORD +109 -0
- boris_behav_obs-9.7.7.dist-info/WHEEL +5 -0
- boris_behav_obs-9.7.7.dist-info/entry_points.txt +2 -0
- boris_behav_obs-9.7.7.dist-info/licenses/LICENSE.TXT +674 -0
- boris_behav_obs-9.7.7.dist-info/top_level.txt +1 -0
boris/menu_options.py
ADDED
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
"""
|
|
2
|
+
BORIS
|
|
3
|
+
Behavioral Observation Research Interactive Software
|
|
4
|
+
Copyright 2012-2025 Olivier Friard
|
|
5
|
+
|
|
6
|
+
This program is free software; you can redistribute it and/or modify
|
|
7
|
+
it under the terms of the GNU General Public License as published by
|
|
8
|
+
the Free Software Foundation; either version 2 of the License, or
|
|
9
|
+
(at your option) any later version.
|
|
10
|
+
|
|
11
|
+
This program is distributed in the hope that it will be useful,
|
|
12
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
GNU General Public License for more details.
|
|
15
|
+
|
|
16
|
+
You should have received a copy of the GNU General Public License
|
|
17
|
+
along with this program; if not, write to the Free Software
|
|
18
|
+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
|
19
|
+
MA 02110-1301, USA.
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
import logging
|
|
23
|
+
from . import config as cfg
|
|
24
|
+
from PySide6.QtCore import QSize
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def update_windows_title(self):
|
|
28
|
+
"""
|
|
29
|
+
update the main window title
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
if not self.project:
|
|
33
|
+
project_name = ""
|
|
34
|
+
else:
|
|
35
|
+
if self.pj[cfg.PROJECT_NAME]:
|
|
36
|
+
project_name = self.pj[cfg.PROJECT_NAME]
|
|
37
|
+
else:
|
|
38
|
+
if self.projectFileName:
|
|
39
|
+
project_name = f"Unnamed project ({self.projectFileName})"
|
|
40
|
+
else:
|
|
41
|
+
project_name = "Unnamed project"
|
|
42
|
+
|
|
43
|
+
self.setWindowTitle(
|
|
44
|
+
f"{self.observationId + ' - ' * (self.observationId != '')}{project_name}{'*' * self.projectChanged}{(' - ' * (project_name != ''))}{cfg.programName}"
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def update_menu(self):
|
|
49
|
+
"""
|
|
50
|
+
enable/disable menu option
|
|
51
|
+
"""
|
|
52
|
+
logging.debug("function: menu_options")
|
|
53
|
+
|
|
54
|
+
project_opened = self.project
|
|
55
|
+
observation_is_active = self.observationId != ""
|
|
56
|
+
project_contains_obs = self.pj[cfg.OBSERVATIONS] != {}
|
|
57
|
+
|
|
58
|
+
update_windows_title(self)
|
|
59
|
+
|
|
60
|
+
self.toolBar.setIconSize(
|
|
61
|
+
QSize(
|
|
62
|
+
self.config_param.get(cfg.TOOLBAR_ICON_SIZE, cfg.DEFAULT_TOOLBAR_ICON_SIZE_VALUE),
|
|
63
|
+
self.config_param.get(cfg.TOOLBAR_ICON_SIZE, cfg.DEFAULT_TOOLBAR_ICON_SIZE_VALUE),
|
|
64
|
+
)
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
# enabled if project loaded
|
|
68
|
+
for action in (
|
|
69
|
+
self.actionEdit_project,
|
|
70
|
+
self.actionSave_project,
|
|
71
|
+
self.actionSave_project_as,
|
|
72
|
+
self.actionExport_project,
|
|
73
|
+
self.actionCheck_project,
|
|
74
|
+
self.actionClose_project,
|
|
75
|
+
self.actionNew_observation,
|
|
76
|
+
self.actionRemove_path_from_media_files,
|
|
77
|
+
self.action_create_observations,
|
|
78
|
+
self.action_obs_list,
|
|
79
|
+
self.actionExport_observations_list,
|
|
80
|
+
self.actionExplore_project,
|
|
81
|
+
self.menuExport_events,
|
|
82
|
+
self.actionLoad_observations_file,
|
|
83
|
+
self.actionExportEvents_2,
|
|
84
|
+
self.actionExport_aggregated_events,
|
|
85
|
+
self.menuas_behavioural_sequences,
|
|
86
|
+
self.actionExport_events_as_Praat_TextGrid,
|
|
87
|
+
self.actionJWatcher,
|
|
88
|
+
self.actionCheckStateEvents,
|
|
89
|
+
self.actionCheckStateEventsSingleObs,
|
|
90
|
+
self.actionClose_unpaired_events,
|
|
91
|
+
self.actionRunEventOutside,
|
|
92
|
+
):
|
|
93
|
+
action.setEnabled(project_opened)
|
|
94
|
+
|
|
95
|
+
# observations
|
|
96
|
+
|
|
97
|
+
# enabled if project contain one or more observations
|
|
98
|
+
for w in (
|
|
99
|
+
self.actionOpen_observation,
|
|
100
|
+
self.actionEdit_observation_2,
|
|
101
|
+
self.actionView_observation,
|
|
102
|
+
self.actionObservationsList,
|
|
103
|
+
self.action_obs_list,
|
|
104
|
+
self.actionExport_observations_list,
|
|
105
|
+
self.actionCheckStateEvents,
|
|
106
|
+
self.actionExplore_project,
|
|
107
|
+
self.actionClose_unpaired_events,
|
|
108
|
+
self.menuExport_events,
|
|
109
|
+
self.menuCreate_subtitles_2,
|
|
110
|
+
self.actionExtract_events_from_media_files,
|
|
111
|
+
self.actionExtract_frames_from_media_files,
|
|
112
|
+
self.actionRemove_observations,
|
|
113
|
+
self.menuMedia_file_Images_directories,
|
|
114
|
+
# self.actionSet_paths_relative_to_project_directory,
|
|
115
|
+
):
|
|
116
|
+
w.setEnabled(project_contains_obs)
|
|
117
|
+
|
|
118
|
+
# enabled if current observation
|
|
119
|
+
for action in (
|
|
120
|
+
self.actionAdd_event,
|
|
121
|
+
self.actionClose_observation,
|
|
122
|
+
self.actionDelete_all_events,
|
|
123
|
+
self.actionSelect_observations,
|
|
124
|
+
self.actionDelete_selected_events,
|
|
125
|
+
self.actionEdit_event,
|
|
126
|
+
self.actionEdit_event_time,
|
|
127
|
+
self.actionCopy_events,
|
|
128
|
+
self.actionPaste_events,
|
|
129
|
+
self.actionFind_events,
|
|
130
|
+
self.actionFind_replace_events,
|
|
131
|
+
self.actionCloseObs,
|
|
132
|
+
self.actionCurrent_Time_Budget,
|
|
133
|
+
self.actionPlot_current_observation,
|
|
134
|
+
self.actionFind_in_current_obs,
|
|
135
|
+
self.actionEdit_selected_events,
|
|
136
|
+
self.actionPlot_current_time_budget,
|
|
137
|
+
):
|
|
138
|
+
action.setEnabled(observation_is_active)
|
|
139
|
+
|
|
140
|
+
# enabled if media observation
|
|
141
|
+
for action in (
|
|
142
|
+
self.actionMedia_file_information,
|
|
143
|
+
self.actionJumpForward,
|
|
144
|
+
self.actionJumpBackward,
|
|
145
|
+
self.actionJumpTo,
|
|
146
|
+
self.action_change_time_offset_of_players,
|
|
147
|
+
self.action_deinterlace,
|
|
148
|
+
self.actionZoom_level,
|
|
149
|
+
self.actionRotate_current_video,
|
|
150
|
+
self.actionDisplay_subtitles,
|
|
151
|
+
self.actionPlay,
|
|
152
|
+
self.actionReset,
|
|
153
|
+
self.actionFaster,
|
|
154
|
+
self.actionSlower,
|
|
155
|
+
self.actionNormalSpeed,
|
|
156
|
+
self.actionPrevious,
|
|
157
|
+
self.actionNext,
|
|
158
|
+
self.actionSnapshot,
|
|
159
|
+
self.actionFrame_backward,
|
|
160
|
+
self.actionFrame_forward,
|
|
161
|
+
self.actionVideo_equalizer,
|
|
162
|
+
self.actionShow_spectrogram,
|
|
163
|
+
self.actionShow_the_sound_waveform,
|
|
164
|
+
self.actionPlot_events_in_real_time,
|
|
165
|
+
self.actionShow_data_files,
|
|
166
|
+
self.menuImage_overlay_on_video_2,
|
|
167
|
+
self.actionAdd_image_overlay_on_video,
|
|
168
|
+
self.actionRemove_image_overlay,
|
|
169
|
+
self.actionAdd_frame_indexes,
|
|
170
|
+
):
|
|
171
|
+
action.setEnabled(self.playerType == cfg.MEDIA)
|
|
172
|
+
|
|
173
|
+
# geometric measurements
|
|
174
|
+
self.action_geometric_measurements.setEnabled(observation_is_active and self.geometric_measurements_mode is False)
|
|
175
|
+
self.actionCoding_pad.setEnabled(observation_is_active)
|
|
176
|
+
self.actionSubjects_pad.setEnabled(observation_is_active)
|
|
177
|
+
self.actionBehaviors_coding_map.setEnabled(observation_is_active)
|
|
178
|
+
|
|
179
|
+
for action in (
|
|
180
|
+
self.actionJumpForward,
|
|
181
|
+
self.actionJumpBackward,
|
|
182
|
+
self.actionJumpTo,
|
|
183
|
+
self.actionReset,
|
|
184
|
+
self.actionPrevious,
|
|
185
|
+
self.actionNext,
|
|
186
|
+
self.actionSnapshot,
|
|
187
|
+
self.actionFrame_backward,
|
|
188
|
+
self.actionFrame_forward,
|
|
189
|
+
):
|
|
190
|
+
action.setEnabled(self.playerType in [cfg.MEDIA, cfg.IMAGES])
|
|
191
|
+
|
|
192
|
+
# Analysis
|
|
193
|
+
for w in [
|
|
194
|
+
self.actionTime_budget,
|
|
195
|
+
self.actionTime_budget_by_behaviors_category,
|
|
196
|
+
self.actionTime_budget_report,
|
|
197
|
+
self.action_behavior_binary_table,
|
|
198
|
+
self.action_advanced_event_filtering,
|
|
199
|
+
self.action_latency,
|
|
200
|
+
self.action_cooccurence,
|
|
201
|
+
self.menuPlot_events,
|
|
202
|
+
self.menuInter_rater_reliability,
|
|
203
|
+
self.menuSimilarities,
|
|
204
|
+
self.menuCreate_transitions_matrix,
|
|
205
|
+
self.actionSynthetic_binned_time_budget,
|
|
206
|
+
]:
|
|
207
|
+
w.setEnabled(project_contains_obs)
|
|
208
|
+
|
|
209
|
+
# statusbar labels
|
|
210
|
+
for w in (self.lbTimeOffset, self.lb_obs_time_interval):
|
|
211
|
+
w.setVisible(self.playerType == cfg.MEDIA)
|
|
212
|
+
|
|
213
|
+
logging.debug("function: menu_options finished")
|