boris-behav-obs 9.2__py2.py3-none-any.whl → 9.2.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.
@@ -359,8 +359,10 @@ def event_filtering(self):
359
359
  selected_observations,
360
360
  start_coding=start_coding,
361
361
  end_coding=end_coding,
362
- start_interval=start_interval,
363
- end_interval=end_interval,
362
+ # start_interval=start_interval,
363
+ # end_interval=end_interval,
364
+ start_interval=None,
365
+ end_interval=None,
364
366
  maxTime=max_media_duration_all_obs,
365
367
  show_include_modifiers=False,
366
368
  show_exclude_non_coded_behaviors=False,
@@ -368,7 +370,7 @@ def event_filtering(self):
368
370
  n_observations=len(selected_observations),
369
371
  )
370
372
 
371
- if parameters == {}:
373
+ if not parameters:
372
374
  return
373
375
 
374
376
  if not parameters[cfg.SELECTED_SUBJECTS] or not parameters[cfg.SELECTED_BEHAVIORS]:
@@ -216,6 +216,8 @@ def behavior_binary_table(self):
216
216
  selected_observations,
217
217
  start_coding=start_coding,
218
218
  end_coding=end_coding,
219
+ # start_interval=start_interval,
220
+ # end_interval=end_interval,
219
221
  start_interval=start_interval,
220
222
  end_interval=end_interval,
221
223
  maxTime=max_media_duration_all_obs,
@@ -224,7 +226,7 @@ def behavior_binary_table(self):
224
226
  by_category=False,
225
227
  n_observations=len(selected_observations),
226
228
  )
227
- if parameters == {}:
229
+ if not parameters:
228
230
  return
229
231
  if not parameters[cfg.SELECTED_SUBJECTS] or not parameters[cfg.SELECTED_BEHAVIORS]:
230
232
  QMessageBox.warning(None, cfg.programName, "Select subject(s) and behavior(s) to analyze")
boris/cooccurence.py CHANGED
@@ -106,8 +106,10 @@ def get_cooccurence(self):
106
106
  selected_observations,
107
107
  start_coding=start_coding,
108
108
  end_coding=end_coding,
109
- start_interval=start_interval,
110
- end_interval=end_interval,
109
+ # start_interval=start_interval,
110
+ # end_interval=end_interval,
111
+ start_interval=None,
112
+ end_interval=None,
111
113
  maxTime=max_media_duration_all_obs,
112
114
  n_observations=len(selected_observations),
113
115
  show_include_modifiers=False,
boris/core.py CHANGED
@@ -3631,6 +3631,18 @@ class MainWindow(QMainWindow, Ui_MainWindow):
3631
3631
  else:
3632
3632
  current_time = self.getLaps()
3633
3633
 
3634
+ # check if observation time interval
3635
+ if self.pj[cfg.OBSERVATIONS][self.observationId].get(cfg.OBSERVATION_TIME_INTERVAL, [0, 0])[1]:
3636
+ # check if current time outside of interval
3637
+ if current_time >= self.pj[cfg.OBSERVATIONS][self.observationId].get(cfg.OBSERVATION_TIME_INTERVAL, [None, None])[1]:
3638
+ self.beep("beep")
3639
+ self.liveTimer.stop()
3640
+ self.liveObservationStarted = False
3641
+ # set current time to end of observation interval
3642
+ current_time = dec(self.pj[cfg.OBSERVATIONS][self.observationId].get(cfg.OBSERVATION_TIME_INTERVAL, [None, None])[1])
3643
+ self.pb_live_obs.setText("Live observation finished")
3644
+
3645
+
3634
3646
  self.lb_current_media_time.setText(util.convertTime(self.timeFormat, current_time))
3635
3647
 
3636
3648
  # extract State events
@@ -3660,13 +3672,6 @@ class MainWindow(QMainWindow, Ui_MainWindow):
3660
3672
  self.liveTimer.stop()
3661
3673
  self.pb_live_obs.setText("Live observation stopped (scan sampling)")
3662
3674
 
3663
- # observation time interval
3664
- if self.pj[cfg.OBSERVATIONS][self.observationId].get(cfg.OBSERVATION_TIME_INTERVAL, [0, 0])[1]:
3665
- if current_time >= self.pj[cfg.OBSERVATIONS][self.observationId].get(cfg.OBSERVATION_TIME_INTERVAL, [0, 0])[1]:
3666
- self.beep("beep")
3667
- self.liveTimer.stop()
3668
- self.liveObservationStarted = False
3669
- self.pb_live_obs.setText("Live observation finished")
3670
3675
 
3671
3676
  def start_live_observation(self):
3672
3677
  """
@@ -3769,8 +3774,10 @@ class MainWindow(QMainWindow, Ui_MainWindow):
3769
3774
  selected_observations,
3770
3775
  start_coding=start_coding,
3771
3776
  end_coding=end_coding,
3772
- start_interval=start_interval,
3773
- end_interval=end_interval,
3777
+ # start_interval=start_interval,
3778
+ # end_interval=end_interval,
3779
+ start_interval=None,
3780
+ end_interval=None,
3774
3781
  maxTime=max_media_duration_all_obs,
3775
3782
  show_include_modifiers=False,
3776
3783
  show_exclude_non_coded_behaviors=False,
boris/export_events.py CHANGED
@@ -76,7 +76,7 @@ def export_events_as_behavioral_sequences(self, separated_subjects=False, timed=
76
76
  else:
77
77
  max_media_duration_all_obs = None
78
78
  start_coding, end_coding = dec("NaN"), dec("NaN")
79
- start_interval, end_interval = dec("NaN"), dec("NaN")
79
+ start_interval, end_interval = None, None
80
80
 
81
81
  parameters = select_subj_behav.choose_obs_subj_behav_category(
82
82
  self,
@@ -169,7 +169,7 @@ def export_tabular_events(self, mode: str = "tabular") -> None:
169
169
  else:
170
170
  max_media_duration_all_obs = None
171
171
  start_coding, end_coding = dec("NaN"), dec("NaN")
172
- start_interval, end_interval = dec("NaN"), dec("NaN")
172
+ start_interval, end_interval = None, None
173
173
 
174
174
  parameters = select_subj_behav.choose_obs_subj_behav_category(
175
175
  self,
@@ -373,7 +373,7 @@ def export_aggregated_events(self):
373
373
  else:
374
374
  max_media_duration_all_obs = None
375
375
  start_coding, end_coding = dec("NaN"), dec("NaN")
376
- start_interval, end_interval = dec("NaN"), dec("NaN")
376
+ start_interval, end_interval = None, None
377
377
 
378
378
  parameters = select_subj_behav.choose_obs_subj_behav_category(
379
379
  self,
@@ -681,8 +681,10 @@ def export_events_as_textgrid(self) -> None:
681
681
  selected_observations,
682
682
  start_coding=start_coding,
683
683
  end_coding=end_coding,
684
- start_interval=start_interval,
685
- end_interval=end_interval,
684
+ # start_interval=start_interval,
685
+ # end_interval=end_interval,
686
+ start_interval=None,
687
+ end_interval=None,
686
688
  show_include_modifiers=False,
687
689
  show_exclude_non_coded_behaviors=False,
688
690
  maxTime=max_obs_length,
boris/gui_utilities.py CHANGED
@@ -31,32 +31,40 @@ def save_geometry(widget: QWidget, widget_name: str):
31
31
  save window geometry in ini file
32
32
  """
33
33
 
34
- try:
35
- ini_file_path = pl.Path.home() / pl.Path(".boris")
36
- if ini_file_path.is_file():
34
+ ini_file_path = pl.Path.home() / pl.Path(".boris")
35
+ if ini_file_path.is_file():
36
+ try:
37
37
  settings = QSettings(str(ini_file_path), QSettings.IniFormat)
38
38
  settings.setValue(f"{widget_name} geometry", widget.saveGeometry())
39
- except Exception:
40
- logging.warning(f"error during saving {widget_name} geometry")
39
+ except Exception:
40
+ logging.warning(f"error during saving {widget_name} geometry")
41
41
 
42
42
 
43
- def restore_geometry(widget: QWidget, widget_name: str, default_geometry):
43
+ def restore_geometry(widget: QWidget, widget_name: str, default_width_height):
44
44
  """
45
45
  restore window geometry in ini file
46
46
  """
47
+ def default_resize(widget, default_width_height):
48
+ if default_width_height != (0, 0):
49
+ try:
50
+ widget.resize(default_width_height[0], default_width_height[1])
51
+ except Exception:
52
+ logging.warning("Error during restoring default")
53
+
47
54
 
55
+ logging.debug(f'restore geometry function for {widget_name}')
48
56
  try:
49
57
  ini_file_path = pl.Path.home() / pl.Path(".boris")
50
58
  if ini_file_path.is_file():
51
59
  settings = QSettings(str(ini_file_path), QSettings.IniFormat)
60
+ print(settings.value(f"{widget_name} geometry"))
52
61
  widget.restoreGeometry(settings.value(f"{widget_name} geometry"))
62
+ logging.debug(f'geometry restored for {widget_name} {settings.value(f"{widget_name} geometry")}')
63
+ else:
64
+ default_resize(widget, default_width_height)
53
65
  except Exception:
54
66
  logging.warning(f"error during restoring {widget_name} geometry")
55
- if default_geometry != (0, 0):
56
- try:
57
- widget.resize(default_geometry[0], default_geometry[1])
58
- except Exception:
59
- logging.warning("Error during restoring default")
67
+ default_resize(widget, default_width_height)
60
68
 
61
69
 
62
70
  def set_icons(self, theme_mode: str) -> None:
@@ -71,8 +71,10 @@ def synthetic_time_budget(self) -> None:
71
71
  selected_observations,
72
72
  start_coding=start_coding,
73
73
  end_coding=end_coding,
74
- start_interval=start_interval,
75
- end_interval=end_interval,
74
+ # start_interval=start_interval,
75
+ # end_interval=end_interval,
76
+ start_interval=None,
77
+ end_interval=None,
76
78
  maxTime=max_media_duration_all_obs,
77
79
  show_exclude_non_coded_behaviors=False,
78
80
  by_category=False,
@@ -201,8 +203,10 @@ def synthetic_binned_time_budget(self) -> None:
201
203
  selected_observations,
202
204
  start_coding=start_coding,
203
205
  end_coding=end_coding,
204
- start_interval=start_interval,
205
- end_interval=end_interval,
206
+ # start_interval=start_interval,
207
+ # end_interval=end_interval,
208
+ start_interval=None,
209
+ end_interval=None,
206
210
  maxTime=max_media_duration_all_obs,
207
211
  show_exclude_non_coded_behaviors=False,
208
212
  by_category=False,
@@ -221,7 +225,7 @@ def synthetic_binned_time_budget(self) -> None:
221
225
  # ask for excluding behaviors durations from total time
222
226
  cancel_pressed, synth_tb_param[cfg.EXCLUDED_BEHAVIORS] = self.filter_behaviors(
223
227
  title="Select behaviors to exclude",
224
- text=("The duration of the selected behaviors will " "be subtracted from the total time"),
228
+ text=("The duration of the selected behaviors will be subtracted from the total time"),
225
229
  table="",
226
230
  behavior_type=[cfg.STATE_EVENT],
227
231
  )
@@ -436,8 +436,10 @@ def time_budget(self, mode: str, mode2: str = "list"):
436
436
  selected_observations,
437
437
  start_coding=start_coding,
438
438
  end_coding=end_coding,
439
- start_interval=start_interval,
440
- end_interval=end_interval,
439
+ # start_interval=start_interval,
440
+ # end_interval=end_interval,
441
+ start_interval=None,
442
+ end_interval=None,
441
443
  maxTime=max_media_duration_all_obs,
442
444
  by_category=(mode == "by_category"),
443
445
  n_observations=len(selected_observations),
@@ -744,7 +746,7 @@ def time_budget(self, mode: str, mode2: str = "list"):
744
746
 
745
747
  self.tb.twTB.resizeColumnsToContents()
746
748
 
747
- gui_utilities.restore_geometry(self.tb, "time budget", (0, 0))
749
+ gui_utilities.restore_geometry(self.tb, "time budget", (800, 600))
748
750
 
749
751
  self.tb.show()
750
752
 
boris/version.py CHANGED
@@ -20,5 +20,5 @@ This file is part of BORIS.
20
20
 
21
21
  """
22
22
 
23
- __version__ = "9.2"
23
+ __version__ = "9.2.1"
24
24
  __version_date__ = "2025-03-17"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: boris-behav-obs
3
- Version: 9.2
3
+ Version: 9.2.1
4
4
  Summary: BORIS - Behavioral Observation Research Interactive Software
5
5
  Author-email: Olivier Friard <olivier.friard@unito.it>
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -3,9 +3,9 @@ boris/__main__.py,sha256=ANjTbXgXDoz2nB1tCtOIllfIVotCa602iebACX7rXaE,764
3
3
  boris/about.py,sha256=KEUz6nryrg8FceVyFsf8sMz-xWd2cGwIUfuVydHxqC4,5366
4
4
  boris/add_modifier.py,sha256=DWqxkKDBm21QH_kPvhpnltwLtFvPxne0VmZ1SY26hj8,26340
5
5
  boris/add_modifier_ui.py,sha256=Y7TLO5uS6zW7zpjXmjA4V_VIp_bFDNtjOTbJ9Q6m-mQ,11601
6
- boris/advanced_event_filtering.py,sha256=DyPHEj2QsTpkkYjBD0iMXqFYCkrMjMcmp1MOuSITtGk,15411
6
+ boris/advanced_event_filtering.py,sha256=VlvU12mL6xYacZOvJAi5uLpHMcmAw5Pvuvmka-PN29c,15469
7
7
  boris/behav_coding_map_creator.py,sha256=PSEYMLvOwt0HR7H4kQZl6dli3q89wezWMv-Ri3EZWWc,37443
8
- boris/behavior_binary_table.py,sha256=SsaPrXyGXwWYPJ_4R0BlfqeV-q1n0vGNDo0HB3ZmQi8,12426
8
+ boris/behavior_binary_table.py,sha256=sr2Wb7NFd-NjfXCL5fqsc_Uf7rvS0p9RxZwVbaFBeig,12502
9
9
  boris/behaviors_coding_map.py,sha256=Pat6U2JHxH8epWH42ZlwzZJ0Rmgl-BKQ5KARjp3GbNg,7291
10
10
  boris/boris_cli.py,sha256=n0OiVvZM1gM6E7yKaff9wlgmpAGK4TK052VRi8AabJo,13196
11
11
  boris/cmd_arguments.py,sha256=oWb-FvhKLbKJhATlTHy9muWu8XnnUfOZ-3Fmz2M8Yzc,1848
@@ -15,8 +15,8 @@ boris/config_file.py,sha256=1-2ZmTvKET57rwrLR1dXblt0AxMpGB1LAiHxu-Sy8es,13543
15
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
- boris/cooccurence.py,sha256=V3HZejWsH-BkCDMCFSRkQ5a75Ne-4elvI3RTxY5YCBk,10299
19
- boris/core.py,sha256=1T60p9giYcBX5DO1cygsyj-7hIpdUqqIMTZb1jsddl4,234461
18
+ boris/cooccurence.py,sha256=tVERC-V8MWjWHlGEfDuu08iS94qjt4do-38jwI62QaY,10367
19
+ boris/core.py,sha256=3NbJcsngnDTaLuXPWblgidKqjzZhJTxzL8N69pwgtkI,234818
20
20
  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
@@ -29,11 +29,11 @@ boris/event_operations.py,sha256=ys1DxZ6iooMvvq_hzpPVZSW0dF9Trbx921XV3jeKOxw,382
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
32
- boris/export_events.py,sha256=YoqE0vHXeDMAk28e6rewI3TODdfMr8YbJsNnJqiXv0Y,39720
32
+ boris/export_events.py,sha256=8h6AenIuXJj-JWlkSS0UR38mhjUjmFv3_5QOyBSpYec,39744
33
33
  boris/export_observation.py,sha256=uPJH_5MXqGm4JSeaSlTikh1i6OKSyLIaZFzS9wp-9qk,50729
34
34
  boris/external_processes.py,sha256=vpmhA4Lj2GblBIrDD0YjesB8HPOgx4K9gSWVhTop4Cg,11927
35
35
  boris/geometric_measurement.py,sha256=4pI-AYpBSFlJBqS-f8dnkgLtj_Z2E5kwwAdh6WwZ4kk,35049
36
- boris/gui_utilities.py,sha256=402qypJ44JkcZ1PDeV79j8Z9faQ473TzEkjjO-scBz0,4170
36
+ boris/gui_utilities.py,sha256=5vjIWbUOHFbqKSti-kT0GoteBBEQ5fUYdNGdMxcg_0A,4607
37
37
  boris/image_overlay.py,sha256=zZAL8MTt2i2s58CuX81Nym3rJ5pKiTeP4AO8WbIUonM,2527
38
38
  boris/import_observations.py,sha256=hwEPIag741AXTFIuxDdZLDvLrsmvaqTkjyTjQu5M_RA,8798
39
39
  boris/irr.py,sha256=o5QN3B2b-02AUkrklMJCitFGsfiUDtmI0MxUbPv2cBg,22472
@@ -73,12 +73,12 @@ boris/select_observations.py,sha256=HM0suMes1YxVwQ-Xakw7ROaxbN0EyeSiZFZNrTQIHAA,
73
73
  boris/select_subj_behav.py,sha256=ulXbsRY-AIyQRSwXhVlvkNRS_eqWaCvkDKTTyOLqvoE,11742
74
74
  boris/state_events.py,sha256=R5CcT_cldnxqhQkvX_V1AMNxH0Nc6jLzMZYiWkeJwAE,7770
75
75
  boris/subjects_pad.py,sha256=lSRRGfLfD10_YpGua8RGVdKhoXlsXawGhNibPkRhuzM,3541
76
- boris/synthetic_time_budget.py,sha256=NwJt6TO6XZwxF2s7ETvqiDEqrz9ad30g1sQ0bVBsN9o,10364
76
+ boris/synthetic_time_budget.py,sha256=sj-5jq7MH-bxPUwKwpi7Xud-jkKTs6PUFlN_01vgimE,10481
77
77
  boris/time_budget_functions.py,sha256=1-7_G84SDs7rp1EWr5zHInzRVDUkUdIfm_AX0516ceQ,52539
78
- boris/time_budget_widget.py,sha256=_yYzLa6aJRWHRataek_ciXMEKGW75HA9y0auhAJwzbA,43137
78
+ boris/time_budget_widget.py,sha256=H_HQHTuMq7U6PlGjJ-pZO4dDaOrYSsAKK697Gb6EQoI,43201
79
79
  boris/transitions.py,sha256=_aZJfJWv3EBrtmQ7qsdTCayQo6uWU7BXqtQQgflEhr4,12250
80
80
  boris/utilities.py,sha256=zwWpH-lozAUj_8K6Gf2Hl-BSW0aRdWo37HGXTWQ86qk,52782
81
- boris/version.py,sha256=4Axxl-LKvQ2Gomtc1ISs8xC-XrfU08mMhJ7JJObW_qk,785
81
+ boris/version.py,sha256=_3fXAvcL2OmwfUOC38JcxwXIb6rqJr_VIPrGA2HMk1k,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.2.dist-info/LICENSE.TXT,sha256=WJ7YI-moTFb-uVrFjnzzhGJrnL9P2iqQe8NuED3hutI,35141
99
- boris_behav_obs-9.2.dist-info/METADATA,sha256=j6x4yuzcQMKV9DydHYBd9CQmpi7PLiuQperTRnLQrZQ,42100
100
- boris_behav_obs-9.2.dist-info/WHEEL,sha256=SrDKpSbFN1G94qcmBqS9nyHcDMp9cUS9OC06hC0G3G0,109
101
- boris_behav_obs-9.2.dist-info/entry_points.txt,sha256=-Vl37ZFjZYK5wTSDf5LAzd2cVLON1Pfy1xkx490Wxak,47
102
- boris_behav_obs-9.2.dist-info/top_level.txt,sha256=fJSgm62S7WesiwTorGbOO4nNN0yzgZ3klgfGi3Px4qI,6
103
- boris_behav_obs-9.2.dist-info/RECORD,,
98
+ boris_behav_obs-9.2.1.dist-info/LICENSE.TXT,sha256=WJ7YI-moTFb-uVrFjnzzhGJrnL9P2iqQe8NuED3hutI,35141
99
+ boris_behav_obs-9.2.1.dist-info/METADATA,sha256=6dLb1vMMq5FHHeDTBpefrr6TIQjgg1pz_VoSMKqA_GE,42102
100
+ boris_behav_obs-9.2.1.dist-info/WHEEL,sha256=Kol19cahXavY536r5Aj6aAgK_6CmctrOu3bgNJMSNJA,109
101
+ boris_behav_obs-9.2.1.dist-info/entry_points.txt,sha256=-Vl37ZFjZYK5wTSDf5LAzd2cVLON1Pfy1xkx490Wxak,47
102
+ boris_behav_obs-9.2.1.dist-info/top_level.txt,sha256=fJSgm62S7WesiwTorGbOO4nNN0yzgZ3klgfGi3Px4qI,6
103
+ boris_behav_obs-9.2.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (76.0.0)
2
+ Generator: setuptools (76.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py2-none-any
5
5
  Tag: py3-none-any