Boris 10.0.2__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 +30 -0
- boris/__main__.py +25 -0
- boris/about.py +144 -0
- boris/add_modifier.py +635 -0
- boris/add_modifier_ui.py +303 -0
- boris/advanced_event_filtering.py +454 -0
- boris/analysis_plugins/__init__.py +0 -0
- boris/analysis_plugins/export_to_feral.py +337 -0
- boris/analysis_plugins/irr_cohen_kappa.py +175 -0
- boris/analysis_plugins/irr_cohen_kappa_with_modifiers.py +185 -0
- boris/analysis_plugins/irr_weighted_cohen_kappa.py +217 -0
- boris/analysis_plugins/irr_weighted_cohen_kappa_with_modifiers.py +247 -0
- boris/analysis_plugins/latency.py +131 -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 +307 -0
- boris/behavior_shortcut_qevent.py +194 -0
- boris/behaviors_coding_map.py +239 -0
- boris/boris_cli.py +363 -0
- boris/cmd_arguments.py +49 -0
- boris/coding_pad.py +281 -0
- boris/column_visibility.py +127 -0
- boris/config.py +838 -0
- boris/config_file.py +408 -0
- boris/connections.py +434 -0
- boris/converters.py +334 -0
- boris/converters_ui.py +224 -0
- boris/cooccurence.py +248 -0
- boris/core.py +6020 -0
- boris/core_qrc.py +16022 -0
- boris/core_ui.py +1118 -0
- boris/db_functions.py +317 -0
- boris/dev.py +134 -0
- boris/dialog.py +1164 -0
- boris/duration_widget.py +238 -0
- boris/edit_event.py +247 -0
- boris/edit_event_ui.py +230 -0
- boris/event_operations.py +1031 -0
- boris/events_cursor.py +61 -0
- boris/events_snapshots.py +652 -0
- boris/exclusion_matrix.py +144 -0
- boris/export_events.py +1107 -0
- boris/export_observation.py +1210 -0
- boris/external_processes.py +324 -0
- boris/geometric_measurement.py +941 -0
- boris/gui_utilities.py +138 -0
- boris/image_overlay.py +72 -0
- boris/import_observations.py +242 -0
- boris/ipc_mpv.py +494 -0
- boris/irr.py +633 -0
- boris/keyboard_utils.py +51 -0
- boris/latency.py +242 -0
- boris/measurement_widget.py +161 -0
- boris/media_file.py +114 -0
- boris/menu_options.py +218 -0
- boris/modifier_coding_map_creator.py +1013 -0
- boris/modifiers_coding_map.py +157 -0
- boris/mpv.py +2016 -0
- boris/mpv2.py +2202 -0
- boris/observation.py +1464 -0
- boris/observation_operations.py +2772 -0
- boris/observation_ui.py +683 -0
- boris/observations_list.py +336 -0
- boris/otx_parser.py +420 -0
- boris/param_panel.py +201 -0
- boris/param_panel_ui.py +305 -0
- boris/player_dock_widget.py +248 -0
- boris/plot_data_module.py +520 -0
- boris/plot_events.py +683 -0
- boris/plot_events_rt.py +237 -0
- boris/plot_spectrogram_rt.py +343 -0
- boris/plot_spectrogram_rt_mpl.py +336 -0
- boris/plot_waveform_rt.py +262 -0
- boris/plot_waveform_rt_mpl.py +258 -0
- boris/plugins.py +966 -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 +741 -0
- boris/preferences_ui.py +852 -0
- boris/project.py +2151 -0
- boris/project_functions.py +2094 -0
- boris/project_import_export.py +1103 -0
- boris/project_ui.py +794 -0
- boris/qrc_boris.py +10389 -0
- boris/select_modifiers.py +312 -0
- boris/select_observations.py +209 -0
- boris/select_subj_behav.py +286 -0
- boris/state_events.py +200 -0
- boris/subjects_pad.py +107 -0
- boris/synthetic_time_budget.py +295 -0
- boris/time_budget_functions.py +1137 -0
- boris/time_budget_widget.py +1057 -0
- boris/transitions.py +359 -0
- boris/utilities.py +1831 -0
- boris/version.py +25 -0
- boris/video_equalizer.py +158 -0
- boris/video_equalizer_ui.py +248 -0
- boris/video_operations.py +314 -0
- boris/video_render_widget.py +395 -0
- boris/view_df.py +131 -0
- boris/view_df_ui.py +75 -0
- boris/write_event.py +540 -0
- boris-10.0.2.dist-info/METADATA +156 -0
- boris-10.0.2.dist-info/RECORD +115 -0
- boris-10.0.2.dist-info/WHEEL +5 -0
- boris-10.0.2.dist-info/entry_points.txt +3 -0
- boris-10.0.2.dist-info/licenses/LICENSE.TXT +674 -0
- boris-10.0.2.dist-info/top_level.txt +1 -0
boris/__init__.py
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"""
|
|
2
|
+
BORIS
|
|
3
|
+
Behavioral Observation Research Interactive Software
|
|
4
|
+
|
|
5
|
+
Copyright 2012-2026 Olivier Friard
|
|
6
|
+
|
|
7
|
+
This file is part of BORIS.
|
|
8
|
+
|
|
9
|
+
BORIS is free software; you can redistribute it and/or modify
|
|
10
|
+
it under the terms of the GNU General Public License as published by
|
|
11
|
+
the Free Software Foundation; either version 3 of the License, or
|
|
12
|
+
any later version.
|
|
13
|
+
|
|
14
|
+
BORIS is distributed in the hope that it will be useful,
|
|
15
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
GNU General Public License for more details.
|
|
18
|
+
|
|
19
|
+
You should have received a copy of the GNU General Public License
|
|
20
|
+
along with this program; if not see <http://www.gnu.org/licenses/>.
|
|
21
|
+
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
name = "BORIS"
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def main():
|
|
28
|
+
from .core import main as core_main
|
|
29
|
+
|
|
30
|
+
return core_main()
|
boris/__main__.py
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"""
|
|
2
|
+
BORIS
|
|
3
|
+
Behavioral Observation Research Interactive Software
|
|
4
|
+
Copyright 2012-2026 Olivier Friard
|
|
5
|
+
|
|
6
|
+
This file is part of BORIS.
|
|
7
|
+
|
|
8
|
+
BORIS is free software; you can redistribute it and/or modify
|
|
9
|
+
it under the terms of the GNU General Public License as published by
|
|
10
|
+
the Free Software Foundation; either version 3 of the License, or
|
|
11
|
+
any later version.
|
|
12
|
+
|
|
13
|
+
BORIS is distributed in the hope that it will be useful,
|
|
14
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
GNU General Public License for more details.
|
|
17
|
+
|
|
18
|
+
You should have received a copy of the GNU General Public License
|
|
19
|
+
along with this program; if not see <http://www.gnu.org/licenses/>.
|
|
20
|
+
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
from boris import main
|
|
24
|
+
|
|
25
|
+
main()
|
boris/about.py
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"""
|
|
2
|
+
BORIS
|
|
3
|
+
Behavioral Observation Research Interactive Software
|
|
4
|
+
Copyright 2012-2026 Olivier Friard
|
|
5
|
+
|
|
6
|
+
This file is part of BORIS.
|
|
7
|
+
|
|
8
|
+
BORIS is free software; you can redistribute it and/or modify
|
|
9
|
+
it under the terms of the GNU General Public License as published by
|
|
10
|
+
the Free Software Foundation; either version 3 of the License, or
|
|
11
|
+
any later version.
|
|
12
|
+
|
|
13
|
+
BORIS is distributed in the hope that it will be useful,
|
|
14
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
GNU General Public License for more details.
|
|
17
|
+
|
|
18
|
+
You should have received a copy of the GNU General Public License
|
|
19
|
+
along with this program; if not see <http://www.gnu.org/licenses/>.
|
|
20
|
+
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
import platform
|
|
24
|
+
import subprocess
|
|
25
|
+
import sys
|
|
26
|
+
|
|
27
|
+
import matplotlib
|
|
28
|
+
import numpy as np
|
|
29
|
+
import pandas as pd
|
|
30
|
+
from PySide6.QtGui import QPixmap
|
|
31
|
+
from PySide6.QtWidgets import QMessageBox
|
|
32
|
+
|
|
33
|
+
from . import config as cfg
|
|
34
|
+
from . import utilities as util
|
|
35
|
+
from . import version
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def actionAbout_activated(self):
|
|
39
|
+
"""
|
|
40
|
+
About dialog
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
programs_versions: list[str] = ["MPV media player"]
|
|
44
|
+
|
|
45
|
+
mpv_lib_version, mpv_lib_file_path, mpv_api_version = util.mpv_lib_version()
|
|
46
|
+
programs_versions.append(
|
|
47
|
+
(
|
|
48
|
+
f"Library version: {mpv_lib_version} file: {mpv_lib_file_path}\n"
|
|
49
|
+
f"MPV API version: {mpv_api_version}\n"
|
|
50
|
+
f"python-mpv version: {util.python_mpv_script_version()}"
|
|
51
|
+
)
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
# ffmpeg
|
|
55
|
+
if self.ffmpeg_bin == "ffmpeg" and sys.platform.startswith("linux"):
|
|
56
|
+
ffmpeg_true_path: str = subprocess.getoutput("which ffmpeg")
|
|
57
|
+
else:
|
|
58
|
+
ffmpeg_true_path = self.ffmpeg_bin
|
|
59
|
+
programs_versions.extend(
|
|
60
|
+
[
|
|
61
|
+
"\nFFmpeg",
|
|
62
|
+
subprocess.getoutput(cmd=f'"{self.ffmpeg_bin}" -version').split(sep="\n")[0],
|
|
63
|
+
f"Path: {ffmpeg_true_path}",
|
|
64
|
+
"https://www.ffmpeg.org",
|
|
65
|
+
]
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
# numpy
|
|
69
|
+
programs_versions.extend(["\nNumpy", f"version {np.__version__}", "https://numpy.org"])
|
|
70
|
+
|
|
71
|
+
# matplotlib
|
|
72
|
+
programs_versions.extend(["\nMatplotlib", f"version {matplotlib.__version__}", "https://matplotlib.org"])
|
|
73
|
+
|
|
74
|
+
# pandas
|
|
75
|
+
programs_versions.extend(["\nPandas", f"version {pd.__version__}", "https://pandas.pydata.org"])
|
|
76
|
+
|
|
77
|
+
# graphviz
|
|
78
|
+
gv_result = subprocess.getoutput(cmd="dot -V")
|
|
79
|
+
|
|
80
|
+
programs_versions.extend(["\nGraphViz", gv_result if "graphviz" in gv_result else "not installed", "https://www.graphviz.org/"])
|
|
81
|
+
|
|
82
|
+
about_dialog: QMessageBox = QMessageBox()
|
|
83
|
+
# about_dialog.setIconPixmap(QPixmap(":/boris_unito"))
|
|
84
|
+
about_dialog.setIconPixmap(QPixmap(":/dbios_unito"))
|
|
85
|
+
|
|
86
|
+
about_dialog.setWindowTitle(f"About {cfg.programName}")
|
|
87
|
+
about_dialog.setStandardButtons(QMessageBox.StandardButton.Ok)
|
|
88
|
+
about_dialog.setDefaultButton(QMessageBox.StandardButton.Ok)
|
|
89
|
+
about_dialog.setEscapeButton(QMessageBox.StandardButton.Ok)
|
|
90
|
+
|
|
91
|
+
about_dialog.setInformativeText(
|
|
92
|
+
(
|
|
93
|
+
f"<b>{cfg.programName}</b> v. {version.__version__} - {version.__version_date__}"
|
|
94
|
+
"<p>Copyright © 2012-2026 Olivier Friard - Marco Gamba<br>"
|
|
95
|
+
"Department of Life Sciences and Systems Biology<br>"
|
|
96
|
+
"University of Torino - Italy<br>"
|
|
97
|
+
"<br>"
|
|
98
|
+
'BORIS is released under the <a href="https://www.gnu.org/copyleft/gpl.html">GNU General Public License</a><br>'
|
|
99
|
+
'See <a href="https://www.boris.unito.it">www.boris.unito.it</a> for more details.<br>'
|
|
100
|
+
"<br>"
|
|
101
|
+
"The authors would like to acknowledge Valentina Matteucci for her precious help."
|
|
102
|
+
"<hr>"
|
|
103
|
+
"How to cite BORIS:<br>"
|
|
104
|
+
"Friard, O. and Gamba, M. (2016), BORIS: a free, versatile open-source event-logging software for video/audio "
|
|
105
|
+
"coding and live observations. Methods Ecol Evol, 7: 1325–1330.<br>"
|
|
106
|
+
'<a href="https://besjournals.onlinelibrary.wiley.com/doi/full/10.1111/2041-210X.12584">DOI:10.1111/2041-210X.12584</a>'
|
|
107
|
+
)
|
|
108
|
+
)
|
|
109
|
+
"""
|
|
110
|
+
n = "\n"
|
|
111
|
+
current_system = platform.uname()
|
|
112
|
+
details = (
|
|
113
|
+
f"Operating system: {current_system.system} {current_system.release} {current_system.version} \n"
|
|
114
|
+
f"CPU: {current_system.machine} {current_system.processor}\n\n"
|
|
115
|
+
f"Python {platform.python_version()} ({'64-bit' if sys.maxsize > 2**32 else '32-bit'})"
|
|
116
|
+
f"Qt {qVersion()} - PySide {PySide6.__version__}\n"
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
r, memory = util.mem_info()
|
|
120
|
+
if not r:
|
|
121
|
+
details += (
|
|
122
|
+
f"Memory (RAM) Total: {memory.get('total_memory', 'Not available'):.2f} Mb "
|
|
123
|
+
f"Free: {memory.get('free_memory', 'Not available'):.2f} Mb\n\n"
|
|
124
|
+
)
|
|
125
|
+
"""
|
|
126
|
+
|
|
127
|
+
details = util.get_systeminfo()
|
|
128
|
+
|
|
129
|
+
details += "\n".join(programs_versions)
|
|
130
|
+
"""
|
|
131
|
+
memory_in_use = f"{utilities.rss_memory_used(self.pid)} Mb" if utilities.rss_memory_used(self.pid) != -1 else "Not available"
|
|
132
|
+
percent_memory_in_use = (f"({utilities.rss_memory_percent_used(self.pid):.1f} % of total memory)"
|
|
133
|
+
if utilities.rss_memory_percent_used(self.pid) != -1
|
|
134
|
+
else "")
|
|
135
|
+
"""
|
|
136
|
+
"""
|
|
137
|
+
f"Total memory: {psutil.virtual_memory().total / 1024 / 1024 / 1024:.1f} Gb "
|
|
138
|
+
f"({100 - psutil.virtual_memory().percent :.1f} % available){n}"
|
|
139
|
+
f"Memory in use by BORIS: {memory_in_use} {percent_memory_in_use}{n}{n}"
|
|
140
|
+
"""
|
|
141
|
+
|
|
142
|
+
about_dialog.setDetailedText(details)
|
|
143
|
+
|
|
144
|
+
_ = about_dialog.exec()
|