boris-behav-obs 9.7.12__py3-none-any.whl → 9.7.15__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/analysis_plugins/export_to_feral.py +336 -0
- boris/config.py +5 -2
- boris/converters_ui.py +2 -3
- boris/core.py +127 -124
- boris/plot_spectrogram_rt.py +41 -72
- boris/preferences.py +34 -3
- boris/preferences_ui.py +48 -18
- boris/project_functions.py +7 -10
- boris/version.py +2 -2
- {boris_behav_obs-9.7.12.dist-info → boris_behav_obs-9.7.15.dist-info}/METADATA +2 -2
- {boris_behav_obs-9.7.12.dist-info → boris_behav_obs-9.7.15.dist-info}/RECORD +15 -15
- boris/analysis_plugins/_export_to_feral.py +0 -225
- {boris_behav_obs-9.7.12.dist-info → boris_behav_obs-9.7.15.dist-info}/WHEEL +0 -0
- {boris_behav_obs-9.7.12.dist-info → boris_behav_obs-9.7.15.dist-info}/entry_points.txt +0 -0
- {boris_behav_obs-9.7.12.dist-info → boris_behav_obs-9.7.15.dist-info}/licenses/LICENSE.TXT +0 -0
- {boris_behav_obs-9.7.12.dist-info → boris_behav_obs-9.7.15.dist-info}/top_level.txt +0 -0
boris/plot_spectrogram_rt.py
CHANGED
|
@@ -183,7 +183,7 @@ class Plot_spectrogram_RT(QWidget):
|
|
|
183
183
|
|
|
184
184
|
return {"media_length": self.media_length, "frame_rate": self.frame_rate}
|
|
185
185
|
|
|
186
|
-
def plot_spectro(self, current_time: float, force_plot: bool = False) -> tuple[float, bool]:
|
|
186
|
+
def plot_spectro(self, current_time: float | None, force_plot: bool = False) -> tuple[float, bool] | None:
|
|
187
187
|
"""
|
|
188
188
|
plot sound spectrogram centered on the current time
|
|
189
189
|
|
|
@@ -192,6 +192,31 @@ class Plot_spectrogram_RT(QWidget):
|
|
|
192
192
|
force_plot (bool): force plot even if media paused
|
|
193
193
|
"""
|
|
194
194
|
|
|
195
|
+
def spectrogram(self, x, window_type, nfft, noverlap, vmin, vmax) -> None:
|
|
196
|
+
window = matplotlib.mlab.window_hanning
|
|
197
|
+
|
|
198
|
+
if window_type == "hanning":
|
|
199
|
+
window = matplotlib.mlab.window_hanning
|
|
200
|
+
|
|
201
|
+
if window_type == "hamming":
|
|
202
|
+
window = signal.get_window(window_type, nfft)
|
|
203
|
+
|
|
204
|
+
if window_type == "blackmanharris":
|
|
205
|
+
window = signal.get_window(window_type, nfft)
|
|
206
|
+
|
|
207
|
+
# print(f"{self.frame_rate=} {vmin=} {vmax=} {window_type=} {nfft=} {noverlap=}")
|
|
208
|
+
self.ax.specgram(
|
|
209
|
+
x,
|
|
210
|
+
mode="psd",
|
|
211
|
+
NFFT=nfft,
|
|
212
|
+
Fs=self.frame_rate,
|
|
213
|
+
noverlap=noverlap,
|
|
214
|
+
window=window,
|
|
215
|
+
cmap=self.spectro_color_map,
|
|
216
|
+
vmin=vmin,
|
|
217
|
+
vmax=vmax,
|
|
218
|
+
)
|
|
219
|
+
|
|
195
220
|
if not force_plot and current_time == self.time_mem:
|
|
196
221
|
return
|
|
197
222
|
|
|
@@ -199,40 +224,21 @@ class Plot_spectrogram_RT(QWidget):
|
|
|
199
224
|
|
|
200
225
|
self.ax.clear()
|
|
201
226
|
|
|
202
|
-
window_type =
|
|
227
|
+
window_type = self.config_param.get(cfg.SPECTROGRAM_WINDOW_TYPE, cfg.SPECTROGRAM_DEFAULT_WINDOW_TYPE)
|
|
203
228
|
nfft = int(self.config_param.get(cfg.SPECTROGRAM_NFFT, cfg.SPECTROGRAM_DEFAULT_NFFT))
|
|
204
229
|
noverlap = self.config_param.get(cfg.SPECTROGRAM_NOVERLAP, cfg.SPECTROGRAM_DEFAULT_NOVERLAP)
|
|
205
|
-
|
|
206
|
-
|
|
230
|
+
if self.config_param.get(cfg.SPECTROGRAM_USE_VMIN_VMAX, cfg.SPECTROGRAM_USE_VMIN_VMAX_DEFAULT):
|
|
231
|
+
vmin = self.config_param.get(cfg.SPECTROGRAM_VMIN, cfg.SPECTROGRAM_DEFAULT_VMIN)
|
|
232
|
+
vmax = self.config_param.get(cfg.SPECTROGRAM_VMAX, cfg.SPECTROGRAM_DEFAULT_VMAX)
|
|
233
|
+
else:
|
|
234
|
+
vmin, vmax = None, None
|
|
207
235
|
|
|
208
236
|
if current_time is None:
|
|
209
237
|
return
|
|
210
238
|
|
|
211
239
|
# start
|
|
212
240
|
if current_time <= self.interval / 2:
|
|
213
|
-
self.
|
|
214
|
-
self.sound_info[: int(self.interval * self.frame_rate)],
|
|
215
|
-
mode="psd",
|
|
216
|
-
NFFT=nfft,
|
|
217
|
-
Fs=self.frame_rate,
|
|
218
|
-
noverlap=noverlap,
|
|
219
|
-
window=signal.get_window(window_type, nfft),
|
|
220
|
-
# matplotlib.mlab.window_hanning
|
|
221
|
-
# if window_type == "hanning"
|
|
222
|
-
# else matplotlib.mlab.window_hamming
|
|
223
|
-
# if window_type == "hamming"
|
|
224
|
-
# else matplotlib.mlab.window_blackmanharris
|
|
225
|
-
# if window_type == "blackmanharris"
|
|
226
|
-
# else matplotlib.mlab.window_hanning,
|
|
227
|
-
cmap=self.spectro_color_map,
|
|
228
|
-
vmin=vmin,
|
|
229
|
-
vmax=vmax,
|
|
230
|
-
# mode="psd",
|
|
231
|
-
## NFFT=1024,
|
|
232
|
-
# Fs=self.frame_rate,
|
|
233
|
-
## noverlap=900,
|
|
234
|
-
# cmap=self.spectro_color_map,
|
|
235
|
-
)
|
|
241
|
+
spectrogram(self, self.sound_info[: int(self.interval * self.frame_rate)], window_type, nfft, noverlap, vmin, vmax)
|
|
236
242
|
|
|
237
243
|
self.ax.set_xlim(current_time - self.interval / 2, current_time + self.interval / 2)
|
|
238
244
|
|
|
@@ -242,29 +248,7 @@ class Plot_spectrogram_RT(QWidget):
|
|
|
242
248
|
elif current_time >= self.media_length - self.interval / 2:
|
|
243
249
|
i = int(round(len(self.sound_info) - (self.interval * self.frame_rate), 0))
|
|
244
250
|
|
|
245
|
-
self.
|
|
246
|
-
self.sound_info[i:],
|
|
247
|
-
mode="psd",
|
|
248
|
-
NFFT=nfft,
|
|
249
|
-
Fs=self.frame_rate,
|
|
250
|
-
noverlap=noverlap,
|
|
251
|
-
window=signal.get_window(window_type, nfft),
|
|
252
|
-
# matplotlib.mlab.window_hanning
|
|
253
|
-
# if window_type == "hanning"
|
|
254
|
-
# else matplotlib.mlab.window_hamming
|
|
255
|
-
# if window_type == "hamming"
|
|
256
|
-
# else matplotlib.mlab.window_blackmanharris
|
|
257
|
-
# if window_type == "blackmanharris"
|
|
258
|
-
# else matplotlib.mlab.window_hanning,
|
|
259
|
-
cmap=self.spectro_color_map,
|
|
260
|
-
vmin=vmin,
|
|
261
|
-
vmax=vmax,
|
|
262
|
-
# mode="psd",
|
|
263
|
-
## NFFT=1024,
|
|
264
|
-
# Fs=self.frame_rate,
|
|
265
|
-
## noverlap=900,
|
|
266
|
-
# cmap=self.spectro_color_map,
|
|
267
|
-
)
|
|
251
|
+
spectrogram(self, self.sound_info[i:], window_type, nfft, noverlap, vmin, vmax)
|
|
268
252
|
|
|
269
253
|
lim1 = current_time - (self.media_length - self.interval / 2)
|
|
270
254
|
lim2 = lim1 + self.interval
|
|
@@ -279,32 +263,18 @@ class Plot_spectrogram_RT(QWidget):
|
|
|
279
263
|
|
|
280
264
|
# middle
|
|
281
265
|
else:
|
|
282
|
-
|
|
266
|
+
spectrogram(
|
|
267
|
+
self,
|
|
283
268
|
self.sound_info[
|
|
284
269
|
int(round((current_time - self.interval / 2) * self.frame_rate, 0)) : int(
|
|
285
270
|
round((current_time + self.interval / 2) * self.frame_rate, 0)
|
|
286
271
|
)
|
|
287
272
|
],
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
# matplotlib.mlab.window_hanning
|
|
294
|
-
# if window_type == "hanning"
|
|
295
|
-
# else matplotlib.mlab.window_hamming
|
|
296
|
-
# if window_type == "hamming"
|
|
297
|
-
# else matplotlib.mlab.window_blackmanharris
|
|
298
|
-
# if window_type == "blackmanharris"
|
|
299
|
-
# else matplotlib.mlab.window_hanning,
|
|
300
|
-
cmap=self.spectro_color_map,
|
|
301
|
-
vmin=vmin,
|
|
302
|
-
vmax=vmax,
|
|
303
|
-
# mode="psd",
|
|
304
|
-
## NFFT=1024,
|
|
305
|
-
# Fs=self.frame_rate,
|
|
306
|
-
## noverlap=900,
|
|
307
|
-
# cmap=self.spectro_color_map,
|
|
273
|
+
window_type,
|
|
274
|
+
nfft,
|
|
275
|
+
noverlap,
|
|
276
|
+
vmin,
|
|
277
|
+
vmax,
|
|
308
278
|
)
|
|
309
279
|
|
|
310
280
|
self.ax.xaxis.set_major_locator(mticker.FixedLocator(self.ax.get_xticks().tolist()))
|
|
@@ -314,6 +284,5 @@ class Plot_spectrogram_RT(QWidget):
|
|
|
314
284
|
self.ax.axvline(x=self.interval / 2, color=self.cursor_color, linestyle="-")
|
|
315
285
|
|
|
316
286
|
self.ax.set_ylim(self.sb_freq_min.value(), self.sb_freq_max.value())
|
|
317
|
-
"""self.figure.subplots_adjust(wspace=0, hspace=0)"""
|
|
318
287
|
|
|
319
288
|
self.canvas.draw()
|
boris/preferences.py
CHANGED
|
@@ -55,14 +55,38 @@ class Preferences(QDialog, Ui_prefDialog):
|
|
|
55
55
|
self.pbOK.clicked.connect(self.accept)
|
|
56
56
|
self.pbCancel.clicked.connect(self.reject)
|
|
57
57
|
|
|
58
|
+
self.pb_reset_spectro_values.clicked.connect(self.reset_spectro_values)
|
|
59
|
+
self.cb_use_vmin_vmax.toggled.connect(self.cb_vmin_vmax_changed)
|
|
60
|
+
|
|
58
61
|
self.flag_refresh = False
|
|
59
62
|
|
|
60
63
|
# Create a monospace QFont
|
|
61
|
-
monospace_font = QFont("Courier New")
|
|
64
|
+
monospace_font = QFont("Courier New")
|
|
62
65
|
monospace_font.setStyleHint(QFont.Monospace)
|
|
63
66
|
monospace_font.setPointSize(12)
|
|
64
67
|
self.pte_plugin_code.setFont(monospace_font)
|
|
65
68
|
|
|
69
|
+
def reset_spectro_values(self):
|
|
70
|
+
"""
|
|
71
|
+
reset spectrogram values to default
|
|
72
|
+
"""
|
|
73
|
+
self.cbSpectrogramColorMap.setCurrentIndex(cfg.SPECTROGRAM_COLOR_MAPS.index(cfg.SPECTROGRAM_DEFAULT_COLOR_MAP))
|
|
74
|
+
self.sb_time_interval.setValue(cfg.SPECTROGRAM_DEFAULT_TIME_INTERVAL)
|
|
75
|
+
self.cb_window_type.setCurrentText(cfg.SPECTROGRAM_DEFAULT_WINDOW_TYPE)
|
|
76
|
+
self.cb_NFFT.setCurrentText(cfg.SPECTROGRAM_DEFAULT_NFFT)
|
|
77
|
+
self.sb_noverlap.setValue(cfg.SPECTROGRAM_DEFAULT_NOVERLAP)
|
|
78
|
+
self.cb_use_vmin_vmax.setChecked(cfg.SPECTROGRAM_USE_VMIN_VMAX_DEFAULT)
|
|
79
|
+
self.cb_vmin_vmax_changed()
|
|
80
|
+
self.sb_vmin.setValue(cfg.SPECTROGRAM_DEFAULT_VMIN)
|
|
81
|
+
self.sb_vmax.setValue(cfg.SPECTROGRAM_DEFAULT_VMAX)
|
|
82
|
+
|
|
83
|
+
def cb_vmin_vmax_changed(self):
|
|
84
|
+
"""
|
|
85
|
+
activate or de-activate vmin and vmax
|
|
86
|
+
"""
|
|
87
|
+
for w in (self.sb_vmin, self.sb_vmax, self.label_vmin, self.label_vmin_2, self.label_vmax, self.label_vmax_2):
|
|
88
|
+
w.setEnabled(self.cb_use_vmin_vmax.isChecked())
|
|
89
|
+
|
|
66
90
|
def browse_plugins_dir(self):
|
|
67
91
|
"""
|
|
68
92
|
get the personal plugins directory
|
|
@@ -99,7 +123,7 @@ class Preferences(QDialog, Ui_prefDialog):
|
|
|
99
123
|
dialog.MessageDialog(
|
|
100
124
|
"BORIS",
|
|
101
125
|
("Refresh will re-initialize all your preferences and close BORIS"),
|
|
102
|
-
|
|
126
|
+
(cfg.CANCEL, "Refresh preferences"),
|
|
103
127
|
)
|
|
104
128
|
== "Refresh preferences"
|
|
105
129
|
):
|
|
@@ -348,6 +372,11 @@ def preferences(self):
|
|
|
348
372
|
preferencesWindow.cb_NFFT.setCurrentText(self.config_param.get(cfg.SPECTROGRAM_NFFT, cfg.SPECTROGRAM_DEFAULT_NFFT))
|
|
349
373
|
# noverlap
|
|
350
374
|
preferencesWindow.sb_noverlap.setValue(self.config_param.get(cfg.SPECTROGRAM_NOVERLAP, cfg.SPECTROGRAM_DEFAULT_NOVERLAP))
|
|
375
|
+
# use vmin/xmax
|
|
376
|
+
preferencesWindow.cb_use_vmin_vmax.setChecked(
|
|
377
|
+
self.config_param.get(cfg.SPECTROGRAM_USE_VMIN_VMAX, cfg.SPECTROGRAM_USE_VMIN_VMAX_DEFAULT)
|
|
378
|
+
)
|
|
379
|
+
preferencesWindow.cb_vmin_vmax_changed()
|
|
351
380
|
# vmin
|
|
352
381
|
preferencesWindow.sb_vmin.setValue(self.config_param.get(cfg.SPECTROGRAM_VMIN, cfg.SPECTROGRAM_DEFAULT_VMIN))
|
|
353
382
|
# vmax
|
|
@@ -370,7 +399,7 @@ def preferences(self):
|
|
|
370
399
|
|
|
371
400
|
while True:
|
|
372
401
|
if preferencesWindow.exec():
|
|
373
|
-
if preferencesWindow.sb_vmin.value() >= preferencesWindow.sb_vmax.value():
|
|
402
|
+
if preferencesWindow.cb_use_vmin_vmax.isChecked() and preferencesWindow.sb_vmin.value() >= preferencesWindow.sb_vmax.value():
|
|
374
403
|
QMessageBox.warning(self, cfg.programName, "Spectrogram parameters: the vmin value must be lower than the vmax value.")
|
|
375
404
|
continue
|
|
376
405
|
|
|
@@ -484,6 +513,8 @@ def preferences(self):
|
|
|
484
513
|
self.config_param[cfg.SPECTROGRAM_NFFT] = preferencesWindow.cb_NFFT.currentText()
|
|
485
514
|
# noverlap
|
|
486
515
|
self.config_param[cfg.SPECTROGRAM_NOVERLAP] = preferencesWindow.sb_noverlap.value()
|
|
516
|
+
# use vmin/vmax
|
|
517
|
+
self.config_param[cfg.SPECTROGRAM_USE_VMIN_VMAX] = preferencesWindow.cb_use_vmin_vmax.isChecked()
|
|
487
518
|
# vmin
|
|
488
519
|
self.config_param[cfg.SPECTROGRAM_VMIN] = preferencesWindow.sb_vmin.value()
|
|
489
520
|
# vmax
|
boris/preferences_ui.py
CHANGED
|
@@ -27,7 +27,7 @@ class Ui_prefDialog(object):
|
|
|
27
27
|
if not prefDialog.objectName():
|
|
28
28
|
prefDialog.setObjectName(u"prefDialog")
|
|
29
29
|
prefDialog.setWindowModality(Qt.WindowModality.WindowModal)
|
|
30
|
-
prefDialog.resize(
|
|
30
|
+
prefDialog.resize(899, 757)
|
|
31
31
|
self.horizontalLayout_17 = QHBoxLayout(prefDialog)
|
|
32
32
|
self.horizontalLayout_17.setObjectName(u"horizontalLayout_17")
|
|
33
33
|
self.verticalLayout_2 = QVBoxLayout()
|
|
@@ -413,6 +413,20 @@ class Ui_prefDialog(object):
|
|
|
413
413
|
self.groupBox.setObjectName(u"groupBox")
|
|
414
414
|
self.verticalLayout_8 = QVBoxLayout(self.groupBox)
|
|
415
415
|
self.verticalLayout_8.setObjectName(u"verticalLayout_8")
|
|
416
|
+
self.horizontalLayout_24 = QHBoxLayout()
|
|
417
|
+
self.horizontalLayout_24.setObjectName(u"horizontalLayout_24")
|
|
418
|
+
self.pb_reset_spectro_values = QPushButton(self.groupBox)
|
|
419
|
+
self.pb_reset_spectro_values.setObjectName(u"pb_reset_spectro_values")
|
|
420
|
+
|
|
421
|
+
self.horizontalLayout_24.addWidget(self.pb_reset_spectro_values)
|
|
422
|
+
|
|
423
|
+
self.horizontalSpacer_9 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
|
|
424
|
+
|
|
425
|
+
self.horizontalLayout_24.addItem(self.horizontalSpacer_9)
|
|
426
|
+
|
|
427
|
+
|
|
428
|
+
self.verticalLayout_8.addLayout(self.horizontalLayout_24)
|
|
429
|
+
|
|
416
430
|
self.horizontalLayout_7 = QHBoxLayout()
|
|
417
431
|
self.horizontalLayout_7.setObjectName(u"horizontalLayout_7")
|
|
418
432
|
self.label_7 = QLabel(self.groupBox)
|
|
@@ -521,12 +535,26 @@ class Ui_prefDialog(object):
|
|
|
521
535
|
|
|
522
536
|
self.verticalLayout_8.addLayout(self.horizontalLayout_20)
|
|
523
537
|
|
|
538
|
+
self.horizontalLayout_25 = QHBoxLayout()
|
|
539
|
+
self.horizontalLayout_25.setObjectName(u"horizontalLayout_25")
|
|
540
|
+
self.cb_use_vmin_vmax = QCheckBox(self.groupBox)
|
|
541
|
+
self.cb_use_vmin_vmax.setObjectName(u"cb_use_vmin_vmax")
|
|
542
|
+
|
|
543
|
+
self.horizontalLayout_25.addWidget(self.cb_use_vmin_vmax)
|
|
544
|
+
|
|
545
|
+
self.horizontalSpacer_10 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
|
|
546
|
+
|
|
547
|
+
self.horizontalLayout_25.addItem(self.horizontalSpacer_10)
|
|
548
|
+
|
|
549
|
+
|
|
550
|
+
self.verticalLayout_8.addLayout(self.horizontalLayout_25)
|
|
551
|
+
|
|
524
552
|
self.horizontalLayout_21 = QHBoxLayout()
|
|
525
553
|
self.horizontalLayout_21.setObjectName(u"horizontalLayout_21")
|
|
526
|
-
self.
|
|
527
|
-
self.
|
|
554
|
+
self.label_vmin = QLabel(self.groupBox)
|
|
555
|
+
self.label_vmin.setObjectName(u"label_vmin")
|
|
528
556
|
|
|
529
|
-
self.horizontalLayout_21.addWidget(self.
|
|
557
|
+
self.horizontalLayout_21.addWidget(self.label_vmin)
|
|
530
558
|
|
|
531
559
|
self.sb_vmin = QSpinBox(self.groupBox)
|
|
532
560
|
self.sb_vmin.setObjectName(u"sb_vmin")
|
|
@@ -536,10 +564,10 @@ class Ui_prefDialog(object):
|
|
|
536
564
|
|
|
537
565
|
self.horizontalLayout_21.addWidget(self.sb_vmin)
|
|
538
566
|
|
|
539
|
-
self.
|
|
540
|
-
self.
|
|
567
|
+
self.label_vmin_2 = QLabel(self.groupBox)
|
|
568
|
+
self.label_vmin_2.setObjectName(u"label_vmin_2")
|
|
541
569
|
|
|
542
|
-
self.horizontalLayout_21.addWidget(self.
|
|
570
|
+
self.horizontalLayout_21.addWidget(self.label_vmin_2)
|
|
543
571
|
|
|
544
572
|
self.horizontalSpacer_7 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
|
|
545
573
|
|
|
@@ -550,10 +578,10 @@ class Ui_prefDialog(object):
|
|
|
550
578
|
|
|
551
579
|
self.horizontalLayout_22 = QHBoxLayout()
|
|
552
580
|
self.horizontalLayout_22.setObjectName(u"horizontalLayout_22")
|
|
553
|
-
self.
|
|
554
|
-
self.
|
|
581
|
+
self.label_vmax = QLabel(self.groupBox)
|
|
582
|
+
self.label_vmax.setObjectName(u"label_vmax")
|
|
555
583
|
|
|
556
|
-
self.horizontalLayout_22.addWidget(self.
|
|
584
|
+
self.horizontalLayout_22.addWidget(self.label_vmax)
|
|
557
585
|
|
|
558
586
|
self.sb_vmax = QSpinBox(self.groupBox)
|
|
559
587
|
self.sb_vmax.setObjectName(u"sb_vmax")
|
|
@@ -563,10 +591,10 @@ class Ui_prefDialog(object):
|
|
|
563
591
|
|
|
564
592
|
self.horizontalLayout_22.addWidget(self.sb_vmax)
|
|
565
593
|
|
|
566
|
-
self.
|
|
567
|
-
self.
|
|
594
|
+
self.label_vmax_2 = QLabel(self.groupBox)
|
|
595
|
+
self.label_vmax_2.setObjectName(u"label_vmax_2")
|
|
568
596
|
|
|
569
|
-
self.horizontalLayout_22.addWidget(self.
|
|
597
|
+
self.horizontalLayout_22.addWidget(self.label_vmax_2)
|
|
570
598
|
|
|
571
599
|
self.horizontalSpacer_8 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
|
|
572
600
|
|
|
@@ -695,7 +723,7 @@ class Ui_prefDialog(object):
|
|
|
695
723
|
|
|
696
724
|
self.retranslateUi(prefDialog)
|
|
697
725
|
|
|
698
|
-
self.tabWidget.setCurrentIndex(
|
|
726
|
+
self.tabWidget.setCurrentIndex(4)
|
|
699
727
|
|
|
700
728
|
|
|
701
729
|
QMetaObject.connectSlotsByName(prefDialog)
|
|
@@ -739,6 +767,7 @@ class Ui_prefDialog(object):
|
|
|
739
767
|
self.pbBrowseFFmpegCacheDir.setText(QCoreApplication.translate("prefDialog", u"...", None))
|
|
740
768
|
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_ffmpeg), QCoreApplication.translate("prefDialog", u"FFmpeg framework", None))
|
|
741
769
|
self.groupBox.setTitle(QCoreApplication.translate("prefDialog", u"Spectrogram", None))
|
|
770
|
+
self.pb_reset_spectro_values.setText(QCoreApplication.translate("prefDialog", u"Reset to default values", None))
|
|
742
771
|
self.label_7.setText(QCoreApplication.translate("prefDialog", u"Color map", None))
|
|
743
772
|
self.label_12.setText(QCoreApplication.translate("prefDialog", u"Default time interval (s)", None))
|
|
744
773
|
self.label_16.setText(QCoreApplication.translate("prefDialog", u"Window type", None))
|
|
@@ -753,10 +782,11 @@ class Ui_prefDialog(object):
|
|
|
753
782
|
self.cb_NFFT.setItemText(3, QCoreApplication.translate("prefDialog", u"2048", None))
|
|
754
783
|
|
|
755
784
|
self.label_18.setText(QCoreApplication.translate("prefDialog", u"noverlap", None))
|
|
756
|
-
self.
|
|
757
|
-
self.
|
|
758
|
-
self.
|
|
759
|
-
self.
|
|
785
|
+
self.cb_use_vmin_vmax.setText(QCoreApplication.translate("prefDialog", u"Use vmin/vmax", None))
|
|
786
|
+
self.label_vmin.setText(QCoreApplication.translate("prefDialog", u"vmin", None))
|
|
787
|
+
self.label_vmin_2.setText(QCoreApplication.translate("prefDialog", u"dBFS", None))
|
|
788
|
+
self.label_vmax.setText(QCoreApplication.translate("prefDialog", u"vmax", None))
|
|
789
|
+
self.label_vmax_2.setText(QCoreApplication.translate("prefDialog", u"dBFS", None))
|
|
760
790
|
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_spectro), QCoreApplication.translate("prefDialog", u"Spectrogram/Wave form", None))
|
|
761
791
|
self.label_10.setText(QCoreApplication.translate("prefDialog", u"<html><head/><body><p>List of colors for behaviors. See <a href=\"https://matplotlib.org/api/colors_api.html\"><span style=\" text-decoration: underline; color:#0000ff;\">matplotlib colors</span></a></p></body></html>", None))
|
|
762
792
|
self.pb_reset_behav_colors.setText(QCoreApplication.translate("prefDialog", u"Reset colors to default", None))
|
boris/project_functions.py
CHANGED
|
@@ -22,25 +22,22 @@ Copyright 2012-2025 Olivier Friard
|
|
|
22
22
|
import gzip
|
|
23
23
|
import json
|
|
24
24
|
import logging
|
|
25
|
-
import pandas as pd
|
|
26
|
-
import numpy as np
|
|
27
|
-
from pathlib import Path
|
|
28
25
|
import sys
|
|
29
26
|
from decimal import Decimal as dec
|
|
27
|
+
from pathlib import Path
|
|
30
28
|
from shutil import copyfile
|
|
31
|
-
from typing import List, Tuple
|
|
29
|
+
from typing import Dict, List, Tuple
|
|
32
30
|
|
|
31
|
+
import numpy as np
|
|
32
|
+
import pandas as pd
|
|
33
33
|
import tablib
|
|
34
|
-
from PySide6.QtWidgets import QMessageBox, QTableWidgetItem, QAbstractItemView
|
|
35
34
|
from PySide6.QtCore import Qt
|
|
35
|
+
from PySide6.QtWidgets import QAbstractItemView, QMessageBox, QTableWidgetItem
|
|
36
36
|
|
|
37
37
|
from . import config as cfg
|
|
38
|
-
from . import db_functions
|
|
39
|
-
from . import dialog
|
|
40
|
-
from . import observation_operations
|
|
38
|
+
from . import db_functions, dialog, observation_operations, version
|
|
41
39
|
from . import portion as I
|
|
42
40
|
from . import utilities as util
|
|
43
|
-
from . import version
|
|
44
41
|
|
|
45
42
|
|
|
46
43
|
def check_observation_exhaustivity(
|
|
@@ -1805,7 +1802,7 @@ def explore_project(self) -> None:
|
|
|
1805
1802
|
if results:
|
|
1806
1803
|
self.results_dialog = dialog.View_explore_project_results()
|
|
1807
1804
|
self.results_dialog.setWindowTitle("Explore project results")
|
|
1808
|
-
self.results_dialog.setWindowFlags(Qt.WindowStaysOnTopHint)
|
|
1805
|
+
self.results_dialog.setWindowFlags(Qt.WindowType.WindowStaysOnTopHint)
|
|
1809
1806
|
self.results_dialog.double_click_signal.connect(double_click_explore_project)
|
|
1810
1807
|
txt = f"<b>{len(results)}</b> events"
|
|
1811
1808
|
txt2 = ""
|
boris/version.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: boris-behav-obs
|
|
3
|
-
Version: 9.7.
|
|
3
|
+
Version: 9.7.15
|
|
4
4
|
Summary: BORIS - Behavioral Observation Research Interactive Software
|
|
5
5
|
Author-email: Olivier Friard <olivier.friard@unito.it>
|
|
6
6
|
License-Expression: GPL-3.0-only
|
|
@@ -51,7 +51,7 @@ It provides also some analysis tools like time budget and some plotting function
|
|
|
51
51
|
<!-- The BO-RIS paper has more than [ citations](https://www.boris.unito.it/citations) in peer-reviewed scientific publications. -->
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
The BORIS paper has more than
|
|
54
|
+
The BORIS paper has more than 2475 citations in peer-reviewed scientific publications.
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
|
|
@@ -10,13 +10,13 @@ boris/behaviors_coding_map.py,sha256=xIGJxp2eghrpiGDmYH73eJPERuyc4A_54uT-Got3zTs
|
|
|
10
10
|
boris/boris_cli.py,sha256=Bc51DEMcD79ZZfM9pCzpaWU6iT6b8gNwR3n8fr42_4E,13193
|
|
11
11
|
boris/cmd_arguments.py,sha256=85zDEIW6UiXRb0TQWDxR664pQQtG5J-7Ipv91y3JixQ,2065
|
|
12
12
|
boris/coding_pad.py,sha256=DjUkuTfqzajll3KoOguGWV4WClOs9IDYYa6wUiGOiCU,10978
|
|
13
|
-
boris/config.py,sha256=
|
|
13
|
+
boris/config.py,sha256=eg5IucJWUtyf0r6ug2o-JVBBk6lyZA6lHrMLfTSWRjg,18156
|
|
14
14
|
boris/config_file.py,sha256=4jBGMaVzjoVKSeOBEHXVjbsyubN08ghQTsrm4s7Kqsw,13551
|
|
15
15
|
boris/connections.py,sha256=KsC17LnS4tRM6O3Nu3mD1H9kQ7uYhhad9229jXfGF94,19774
|
|
16
16
|
boris/converters.py,sha256=n6gDM9x2hS-ZOoHLruiifuXxnC7ERsUukiFokhHZPoQ,11678
|
|
17
|
-
boris/converters_ui.py,sha256=
|
|
17
|
+
boris/converters_ui.py,sha256=Azd7DGDFVcpYD5zheHcYPIFTggUV2exNfw6LN0AXN4A,9925
|
|
18
18
|
boris/cooccurence.py,sha256=tVERC-V8MWjWHlGEfDuu08iS94qjt4do-38jwI62QaY,10367
|
|
19
|
-
boris/core.py,sha256=
|
|
19
|
+
boris/core.py,sha256=j4uuor1aEmI7jJ10u52bMeCvL05kkg4vxDHIWa9ayJY,234870
|
|
20
20
|
boris/core_qrc.py,sha256=Hz51Xw70ZIlDbYB281nfGtCm43_ItYhamMu2T5X8Tu8,639882
|
|
21
21
|
boris/core_ui.py,sha256=uDAI9mbadBe2mSsgugzNfRHxASc6Mu5kUf5tB9CZCjY,77445
|
|
22
22
|
boris/db_functions.py,sha256=TfCJ0Hq0pTFOKrZz3RzdvnR-NKCmrPHU2qL9BSXeeGQ,13379
|
|
@@ -57,13 +57,13 @@ boris/player_dock_widget.py,sha256=rdP0w6Wac7R3UMqJeHl7GNvT1hElu_x_VgNkg4Ut-6s,5
|
|
|
57
57
|
boris/plot_data_module.py,sha256=Xq70HDlAtvganwNmbRDUA3iKV-415zS9W1H1x0itXWE,16594
|
|
58
58
|
boris/plot_events.py,sha256=tKiUWH0TNSkK7xz5Vf0tAD3KiuAalv6UZEVtOnoFpWY,24059
|
|
59
59
|
boris/plot_events_rt.py,sha256=xJmjwqhQxCN4FDBYRQ0O2eHm356Rbexzr3m1qTefMDU,8326
|
|
60
|
-
boris/plot_spectrogram_rt.py,sha256=
|
|
60
|
+
boris/plot_spectrogram_rt.py,sha256=umNoJ8_tJmWjbkQtiZSaumW3a5AWFoKhDstsX-rovVA,9613
|
|
61
61
|
boris/plot_waveform_rt.py,sha256=JM4TtN7IFZqLRY4k4rJ-U0DMvGdQ2FFlwH2xVOyrx68,7595
|
|
62
62
|
boris/plugins.py,sha256=AzjKLPsqBk-K8wPM3HXe4w-sNaDU1bQm2XEoLr4Zx0k,17234
|
|
63
|
-
boris/preferences.py,sha256=
|
|
64
|
-
boris/preferences_ui.py,sha256=
|
|
63
|
+
boris/preferences.py,sha256=U2Q3IsWYh6LmUFmkKfe4oUapWlGZYjawrJuQcJlIGYU,23451
|
|
64
|
+
boris/preferences_ui.py,sha256=gy0Ilxzlexdz9A6CSNto9uYdUrzNzNZ8RK-534cnfBA,36620
|
|
65
65
|
boris/project.py,sha256=4dE4nqo8at1lz9KykprF5Rr62R78yu4vBrTfde1gQ-g,86438
|
|
66
|
-
boris/project_functions.py,sha256=
|
|
66
|
+
boris/project_functions.py,sha256=BIP-IkGjOB3qGmxcErLf-ZY65eRQ5tfsdBOuAUBPsuM,83533
|
|
67
67
|
boris/project_import_export.py,sha256=oBG1CSXfKISsb3TLNT-8BH8kZPAzxIYSNemlLVH1Lh8,38560
|
|
68
68
|
boris/project_ui.py,sha256=yB-ewhHt8S8DTTRIk-dNK2tPMNU24lNji9fDW_Xazu8,38805
|
|
69
69
|
boris/qrc_boris.py,sha256=aH-qUirYY1CGxmTK1SFCPvuZfazIHX4DdUKF1gxZeYM,675008
|
|
@@ -78,7 +78,7 @@ boris/time_budget_functions.py,sha256=SbGyTF2xySEqBdRJZeWFTirruvK3r6pwM6e4Gz17W1
|
|
|
78
78
|
boris/time_budget_widget.py,sha256=z-tyITBtIz-KH1H2OdMB5a8x9QQLK7Wu96-zkC6NVDA,43213
|
|
79
79
|
boris/transitions.py,sha256=okyDCO-Vn4p_Fixd8cGiSIaUhUxG5ePIOqGSuP52g_c,12246
|
|
80
80
|
boris/utilities.py,sha256=Ae3YjXkulJYQxbE4Fpvle4tX2nA_qJQhAn980sTFHqw,58805
|
|
81
|
-
boris/version.py,sha256=
|
|
81
|
+
boris/version.py,sha256=kjJCPT94QiOth7BoW4mL3qdROWDKxbrH7zqNc-4cJVU,788
|
|
82
82
|
boris/video_equalizer.py,sha256=cm2JXe1eAPkqDzxYB2OMKyuveMBdq4a9-gD1bBorbn4,5823
|
|
83
83
|
boris/video_equalizer_ui.py,sha256=1CG3s79eM4JAbaCx3i1ILZXLceb41_gGXlOLNfpBgnw,10142
|
|
84
84
|
boris/video_operations.py,sha256=dSpD1cnDm7DiTUirIcCYE1Olb5HlY8-S4CpLynyT1L8,11054
|
|
@@ -86,8 +86,8 @@ boris/view_df.py,sha256=fhcNMFFVbQ4ZTpPwN_4Bg66DDIoV25zaPryZUsOxsKg,3338
|
|
|
86
86
|
boris/view_df_ui.py,sha256=CaMeRH_vQ00CTDDFQn73ZZaS-r8BSTWpL-dMCFqzJ_Q,2775
|
|
87
87
|
boris/write_event.py,sha256=xC-dUjgPS4-tvrQfvyL7O_xi-tyQI7leSiSV8_x8hgg,23817
|
|
88
88
|
boris/analysis_plugins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
89
|
-
boris/analysis_plugins/_export_to_feral.py,sha256=_eirrreEn3Udp4POBG8cA1Gno4e-x_LFYXfvDhy11fg,7417
|
|
90
89
|
boris/analysis_plugins/_latency.py,sha256=9kCdFDtb5Zdao1xFpioi_exm_IxyGm6RlY3Opn6GUFo,2030
|
|
90
|
+
boris/analysis_plugins/export_to_feral.py,sha256=Icho_3e-2Y9Z1i_56TxnYigxsoWcRHm14XzE55p3nNM,11428
|
|
91
91
|
boris/analysis_plugins/irr_cohen_kappa.py,sha256=OqmivIE6i1hTcFVMp0EtY0Sr7C1Jm9t0D4IKbDfTJ7U,4268
|
|
92
92
|
boris/analysis_plugins/irr_cohen_kappa_with_modifiers.py,sha256=DtzFLRToR9GdkmWYDcCmpSvxHGpguVp-_n8F-t7ND7c,4461
|
|
93
93
|
boris/analysis_plugins/irr_weighted_cohen_kappa.py,sha256=xpDjcDkwPtTM3SI9UC2RIhma1nqFU_qcGSMq7QpMMHc,6435
|
|
@@ -102,9 +102,9 @@ boris/portion/dict.py,sha256=uNM-LEY52CZ2VNMMW_C9QukoyTvPlQf8vcbGa1lQBHI,11281
|
|
|
102
102
|
boris/portion/func.py,sha256=mSQr20YS1ug7R1fRqBg8LifjtXDRvJ6Kjc3WOeL9P34,2172
|
|
103
103
|
boris/portion/interval.py,sha256=sOlj3MAGGaB-JxCkigS-n3qw0fY7TANAsXv1pavr8J4,19931
|
|
104
104
|
boris/portion/io.py,sha256=kpq44pw3xnIyAlPwaR5qRHKRdZ72f8HS9YVIWs5k2pk,6367
|
|
105
|
-
boris_behav_obs-9.7.
|
|
106
|
-
boris_behav_obs-9.7.
|
|
107
|
-
boris_behav_obs-9.7.
|
|
108
|
-
boris_behav_obs-9.7.
|
|
109
|
-
boris_behav_obs-9.7.
|
|
110
|
-
boris_behav_obs-9.7.
|
|
105
|
+
boris_behav_obs-9.7.15.dist-info/licenses/LICENSE.TXT,sha256=WJ7YI-moTFb-uVrFjnzzhGJrnL9P2iqQe8NuED3hutI,35141
|
|
106
|
+
boris_behav_obs-9.7.15.dist-info/METADATA,sha256=ChZTII6E_pBMlhygq_8kCAG7opReGArvYgGSWWlsXE4,5204
|
|
107
|
+
boris_behav_obs-9.7.15.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
108
|
+
boris_behav_obs-9.7.15.dist-info/entry_points.txt,sha256=k__8XvFi4vaA4QFvQehCZjYkKmZH34HSAJI2iYCWrMs,52
|
|
109
|
+
boris_behav_obs-9.7.15.dist-info/top_level.txt,sha256=fJSgm62S7WesiwTorGbOO4nNN0yzgZ3klgfGi3Px4qI,6
|
|
110
|
+
boris_behav_obs-9.7.15.dist-info/RECORD,,
|