boris-behav-obs 8.16.6__py3-none-any.whl → 9.7.1__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.
Files changed (125) hide show
  1. boris/__init__.py +1 -1
  2. boris/__main__.py +1 -1
  3. boris/about.py +24 -40
  4. boris/add_modifier.py +88 -80
  5. boris/add_modifier_ui.py +235 -131
  6. boris/advanced_event_filtering.py +23 -29
  7. boris/analysis_plugins/__init__.py +0 -0
  8. boris/analysis_plugins/_latency.py +59 -0
  9. boris/analysis_plugins/irr_cohen_kappa.py +109 -0
  10. boris/analysis_plugins/irr_cohen_kappa_with_modifiers.py +112 -0
  11. boris/analysis_plugins/irr_weighted_cohen_kappa.py +157 -0
  12. boris/analysis_plugins/irr_weighted_cohen_kappa_with_modifiers.py +162 -0
  13. boris/analysis_plugins/list_of_dataframe_columns.py +22 -0
  14. boris/analysis_plugins/number_of_occurences.py +22 -0
  15. boris/analysis_plugins/number_of_occurences_by_independent_variable.py +54 -0
  16. boris/analysis_plugins/time_budget.py +61 -0
  17. boris/behav_coding_map_creator.py +228 -229
  18. boris/behavior_binary_table.py +33 -50
  19. boris/behaviors_coding_map.py +17 -18
  20. boris/boris_cli.py +6 -25
  21. boris/cmd_arguments.py +12 -1
  22. boris/coding_pad.py +16 -34
  23. boris/config.py +101 -49
  24. boris/config_file.py +55 -64
  25. boris/connections.py +105 -58
  26. boris/converters.py +13 -37
  27. boris/converters_ui.py +187 -110
  28. boris/cooccurence.py +250 -0
  29. boris/core.py +2108 -1275
  30. boris/core_qrc.py +15892 -10829
  31. boris/core_ui.py +941 -806
  32. boris/db_functions.py +17 -42
  33. boris/dev.py +134 -0
  34. boris/dialog.py +461 -242
  35. boris/duration_widget.py +9 -14
  36. boris/edit_event.py +61 -31
  37. boris/edit_event_ui.py +208 -97
  38. boris/event_operations.py +405 -281
  39. boris/events_cursor.py +25 -17
  40. boris/events_snapshots.py +36 -82
  41. boris/exclusion_matrix.py +4 -9
  42. boris/export_events.py +180 -203
  43. boris/export_observation.py +60 -73
  44. boris/external_processes.py +123 -98
  45. boris/geometric_measurement.py +427 -218
  46. boris/gui_utilities.py +91 -14
  47. boris/image_overlay.py +4 -4
  48. boris/import_observations.py +190 -98
  49. boris/ipc_mpv.py +304 -0
  50. boris/irr.py +20 -57
  51. boris/latency.py +31 -24
  52. boris/measurement_widget.py +14 -18
  53. boris/media_file.py +17 -19
  54. boris/menu_options.py +16 -6
  55. boris/modifier_coding_map_creator.py +1013 -0
  56. boris/modifiers_coding_map.py +7 -9
  57. boris/mpv2.py +127 -36
  58. boris/observation.py +493 -210
  59. boris/observation_operations.py +1010 -391
  60. boris/observation_ui.py +573 -363
  61. boris/observations_list.py +51 -58
  62. boris/otx_parser.py +74 -68
  63. boris/param_panel.py +45 -59
  64. boris/param_panel_ui.py +254 -138
  65. boris/player_dock_widget.py +91 -56
  66. boris/plot_data_module.py +18 -53
  67. boris/plot_events.py +56 -153
  68. boris/plot_events_rt.py +16 -30
  69. boris/plot_spectrogram_rt.py +80 -56
  70. boris/plot_waveform_rt.py +23 -48
  71. boris/plugins.py +431 -0
  72. boris/portion/__init__.py +18 -8
  73. boris/portion/const.py +35 -18
  74. boris/portion/dict.py +5 -5
  75. boris/portion/func.py +2 -2
  76. boris/portion/interval.py +21 -41
  77. boris/portion/io.py +41 -32
  78. boris/preferences.py +298 -123
  79. boris/preferences_ui.py +664 -225
  80. boris/project.py +293 -270
  81. boris/project_functions.py +610 -537
  82. boris/project_import_export.py +204 -213
  83. boris/project_ui.py +673 -441
  84. boris/qrc_boris.py +6 -3
  85. boris/qrc_boris5.py +6 -3
  86. boris/select_modifiers.py +62 -90
  87. boris/select_observations.py +19 -197
  88. boris/select_subj_behav.py +67 -39
  89. boris/state_events.py +51 -33
  90. boris/subjects_pad.py +6 -8
  91. boris/synthetic_time_budget.py +25 -17
  92. boris/time_budget_functions.py +169 -169
  93. boris/time_budget_widget.py +71 -86
  94. boris/transitions.py +41 -41
  95. boris/utilities.py +562 -222
  96. boris/version.py +3 -3
  97. boris/video_equalizer.py +16 -14
  98. boris/video_equalizer_ui.py +199 -130
  99. boris/video_operations.py +78 -28
  100. boris/view_df.py +104 -0
  101. boris/view_df_ui.py +75 -0
  102. boris/write_event.py +240 -136
  103. boris_behav_obs-9.7.1.dist-info/METADATA +140 -0
  104. boris_behav_obs-9.7.1.dist-info/RECORD +109 -0
  105. {boris_behav_obs-8.16.6.dist-info → boris_behav_obs-9.7.1.dist-info}/WHEEL +1 -1
  106. boris_behav_obs-9.7.1.dist-info/entry_points.txt +2 -0
  107. boris/README.TXT +0 -22
  108. boris/add_modifier.ui +0 -323
  109. boris/converters.ui +0 -289
  110. boris/core.qrc +0 -37
  111. boris/core.ui +0 -1571
  112. boris/edit_event.ui +0 -233
  113. boris/icons/logo_eye.ico +0 -0
  114. boris/map_creator.py +0 -982
  115. boris/observation.ui +0 -814
  116. boris/param_panel.ui +0 -379
  117. boris/preferences.ui +0 -537
  118. boris/project.ui +0 -1074
  119. boris/vlc_local.py +0 -90
  120. boris_behav_obs-8.16.6.dist-info/LICENSE.TXT +0 -674
  121. boris_behav_obs-8.16.6.dist-info/METADATA +0 -134
  122. boris_behav_obs-8.16.6.dist-info/RECORD +0 -106
  123. boris_behav_obs-8.16.6.dist-info/entry_points.txt +0 -2
  124. {boris → boris_behav_obs-9.7.1.dist-info/licenses}/LICENSE.TXT +0 -0
  125. {boris_behav_obs-8.16.6.dist-info → boris_behav_obs-9.7.1.dist-info}/top_level.txt +0 -0
@@ -1,7 +1,7 @@
1
1
  """
2
2
  BORIS
3
3
  Behavioral Observation Research Interactive Software
4
- Copyright 2012-2023 Olivier Friard
4
+ Copyright 2012-2025 Olivier Friard
5
5
 
6
6
 
7
7
  This program is free software; you can redistribute it and/or modify
@@ -24,12 +24,13 @@ Copyright 2012-2023 Olivier Friard
24
24
  import wave
25
25
  import matplotlib
26
26
 
27
- matplotlib.use("Qt5Agg")
28
- import numpy as np
27
+ matplotlib.use("QtAgg")
29
28
 
29
+ import numpy as np
30
+ from scipy import signal
30
31
  from . import config as cfg
31
32
 
32
- from PyQt5.QtWidgets import (
33
+ from PySide6.QtWidgets import (
33
34
  QWidget,
34
35
  QVBoxLayout,
35
36
  QHBoxLayout,
@@ -37,17 +38,15 @@ from PyQt5.QtWidgets import (
37
38
  QLabel,
38
39
  QSpinBox,
39
40
  )
40
- from PyQt5.QtCore import pyqtSignal, QEvent
41
- from PyQt5 import Qt
41
+ from PySide6.QtCore import Signal, QEvent, Qt
42
42
  from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
43
43
  from matplotlib.figure import Figure
44
44
  import matplotlib.ticker as mticker
45
45
 
46
46
 
47
47
  class Plot_spectrogram_RT(QWidget):
48
-
49
48
  # send keypress event to mainwindow
50
- sendEvent = pyqtSignal(QEvent)
49
+ sendEvent = Signal(QEvent)
51
50
 
52
51
  def __init__(self):
53
52
  super().__init__()
@@ -75,7 +74,7 @@ class Plot_spectrogram_RT(QWidget):
75
74
  "+",
76
75
  self,
77
76
  clicked=lambda: self.time_interval_changed(1),
78
- focusPolicy=Qt.Qt.NoFocus,
77
+ focusPolicy=Qt.NoFocus,
79
78
  )
80
79
  )
81
80
  hlayout1.addWidget(
@@ -83,21 +82,17 @@ class Plot_spectrogram_RT(QWidget):
83
82
  "-",
84
83
  self,
85
84
  clicked=lambda: self.time_interval_changed(-1),
86
- focusPolicy=Qt.Qt.NoFocus,
85
+ focusPolicy=Qt.NoFocus,
87
86
  )
88
87
  )
89
88
  layout.addLayout(hlayout1)
90
89
 
91
90
  hlayout2 = QHBoxLayout()
92
91
  hlayout2.addWidget(QLabel("Frequency interval"))
93
- self.sb_freq_min = QSpinBox(
94
- valueChanged=self.frequency_interval_changed, focusPolicy=Qt.Qt.NoFocus
95
- )
92
+ self.sb_freq_min = QSpinBox(valueChanged=self.frequency_interval_changed, focusPolicy=Qt.NoFocus)
96
93
  self.sb_freq_min.setRange(0, 200000)
97
94
  self.sb_freq_min.setSingleStep(100)
98
- self.sb_freq_max = QSpinBox(
99
- valueChanged=self.frequency_interval_changed, focusPolicy=Qt.Qt.NoFocus
100
- )
95
+ self.sb_freq_max = QSpinBox(valueChanged=self.frequency_interval_changed, focusPolicy=Qt.NoFocus)
101
96
  self.sb_freq_max.setRange(0, 200000)
102
97
  self.sb_freq_max.setSingleStep(100)
103
98
  hlayout2.addWidget(self.sb_freq_min)
@@ -118,7 +113,7 @@ class Plot_spectrogram_RT(QWidget):
118
113
  else:
119
114
  return False
120
115
 
121
- def get_wav_info(self, wav_file: str):
116
+ def get_wav_info(self, wav_file: str) -> tuple[np.array, int]:
122
117
  """
123
118
  read wav file and extract information
124
119
 
@@ -134,7 +129,8 @@ class Plot_spectrogram_RT(QWidget):
134
129
  try:
135
130
  wav = wave.open(wav_file, "r")
136
131
  frames = wav.readframes(-1)
137
- sound_info = np.fromstring(frames, dtype=np.int16)
132
+ # sound_info = np.fromstring(frames, dtype=np.int16)
133
+ sound_info = np.frombuffer(frames, dtype=np.int16)
138
134
  frame_rate = wav.getframerate()
139
135
  wav.close()
140
136
  return sound_info, frame_rate
@@ -187,7 +183,7 @@ class Plot_spectrogram_RT(QWidget):
187
183
 
188
184
  return {"media_length": self.media_length, "frame_rate": self.frame_rate}
189
185
 
190
- def plot_spectro(self, current_time: float, force_plot: bool = False):
186
+ def plot_spectro(self, current_time: float, force_plot: bool = False) -> tuple[float, bool]:
191
187
  """
192
188
  plot sound spectrogram centered on the current time
193
189
 
@@ -203,36 +199,68 @@ class Plot_spectrogram_RT(QWidget):
203
199
 
204
200
  self.ax.clear()
205
201
 
202
+ window_type = "blackmanharris" # self.config_param.get(cfg.SPECTROGRAM_WINDOW_TYPE, cfg.SPECTROGRAM_DEFAULT_WINDOW_TYPE)
203
+ nfft = int(self.config_param.get(cfg.SPECTROGRAM_NFFT, cfg.SPECTROGRAM_DEFAULT_NFFT))
204
+ noverlap = self.config_param.get(cfg.SPECTROGRAM_NOVERLAP, cfg.SPECTROGRAM_DEFAULT_NOVERLAP)
205
+ vmin = self.config_param.get(cfg.SPECTROGRAM_VMIN, cfg.SPECTROGRAM_DEFAULT_VMIN)
206
+ vmax = self.config_param.get(cfg.SPECTROGRAM_VMAX, cfg.SPECTROGRAM_DEFAULT_VMAX)
207
+
206
208
  # start
207
209
  if current_time <= self.interval / 2:
208
-
209
210
  self.ax.specgram(
210
- self.sound_info[: int((self.interval) * self.frame_rate)],
211
+ self.sound_info[: int(self.interval * self.frame_rate)],
211
212
  mode="psd",
212
- # NFFT=1024,
213
+ NFFT=nfft,
213
214
  Fs=self.frame_rate,
214
- # noverlap=900,
215
+ noverlap=noverlap,
216
+ window=signal.get_window(window_type, nfft),
217
+ # matplotlib.mlab.window_hanning
218
+ # if window_type == "hanning"
219
+ # else matplotlib.mlab.window_hamming
220
+ # if window_type == "hamming"
221
+ # else matplotlib.mlab.window_blackmanharris
222
+ # if window_type == "blackmanharris"
223
+ # else matplotlib.mlab.window_hanning,
215
224
  cmap=self.spectro_color_map,
225
+ vmin=vmin,
226
+ vmax=vmax,
227
+ # mode="psd",
228
+ ## NFFT=1024,
229
+ # Fs=self.frame_rate,
230
+ ## noverlap=900,
231
+ # cmap=self.spectro_color_map,
216
232
  )
217
233
 
218
- self.ax.set_xlim(
219
- current_time - self.interval / 2, current_time + self.interval / 2
220
- )
234
+ self.ax.set_xlim(current_time - self.interval / 2, current_time + self.interval / 2)
221
235
 
222
236
  # cursor
223
237
  self.ax.axvline(x=current_time, color=self.cursor_color, linestyle="-")
224
238
 
225
239
  elif current_time >= self.media_length - self.interval / 2:
226
-
227
240
  i = int(round(len(self.sound_info) - (self.interval * self.frame_rate), 0))
228
241
 
229
242
  self.ax.specgram(
230
243
  self.sound_info[i:],
231
244
  mode="psd",
232
- # NFFT=1024,
245
+ NFFT=nfft,
233
246
  Fs=self.frame_rate,
234
- # noverlap=900,
247
+ noverlap=noverlap,
248
+ window=signal.get_window(window_type, nfft),
249
+ # matplotlib.mlab.window_hanning
250
+ # if window_type == "hanning"
251
+ # else matplotlib.mlab.window_hamming
252
+ # if window_type == "hamming"
253
+ # else matplotlib.mlab.window_blackmanharris
254
+ # if window_type == "blackmanharris"
255
+ # else matplotlib.mlab.window_hanning,
235
256
  cmap=self.spectro_color_map,
257
+ vmin=vmin,
258
+ vmax=vmax,
259
+ # mode="psd",
260
+ ## NFFT=1024,
261
+ # Fs=self.frame_rate,
262
+ ## noverlap=900,
263
+ # cmap=self.spectro_color_map,
236
264
  )
237
265
 
238
266
  lim1 = current_time - (self.media_length - self.interval / 2)
@@ -240,48 +268,44 @@ class Plot_spectrogram_RT(QWidget):
240
268
 
241
269
  self.ax.set_xlim(lim1, lim2)
242
270
 
243
- self.ax.xaxis.set_major_locator(
244
- mticker.FixedLocator(self.ax.get_xticks().tolist())
245
- )
246
- self.ax.set_xticklabels(
247
- [
248
- str(round(w + self.media_length - self.interval, 1))
249
- for w in self.ax.get_xticks()
250
- ]
251
- )
271
+ self.ax.xaxis.set_major_locator(mticker.FixedLocator(self.ax.get_xticks().tolist()))
272
+ self.ax.set_xticklabels([str(round(w + self.media_length - self.interval, 1)) for w in self.ax.get_xticks()])
252
273
 
253
274
  # cursor
254
- self.ax.axvline(
255
- x=lim1 + self.interval / 2, color=self.cursor_color, linestyle="-"
256
- )
275
+ self.ax.axvline(x=lim1 + self.interval / 2, color=self.cursor_color, linestyle="-")
257
276
 
258
277
  # middle
259
278
  else:
260
-
261
279
  self.ax.specgram(
262
280
  self.sound_info[
263
- int(
264
- round((current_time - self.interval / 2) * self.frame_rate, 0)
265
- ) : int(
281
+ int(round((current_time - self.interval / 2) * self.frame_rate, 0)) : int(
266
282
  round((current_time + self.interval / 2) * self.frame_rate, 0)
267
283
  )
268
284
  ],
269
285
  mode="psd",
270
- # NFFT=1024,
286
+ NFFT=nfft,
271
287
  Fs=self.frame_rate,
272
- # noverlap=900,
288
+ noverlap=noverlap,
289
+ window=signal.get_window(window_type, nfft),
290
+ # matplotlib.mlab.window_hanning
291
+ # if window_type == "hanning"
292
+ # else matplotlib.mlab.window_hamming
293
+ # if window_type == "hamming"
294
+ # else matplotlib.mlab.window_blackmanharris
295
+ # if window_type == "blackmanharris"
296
+ # else matplotlib.mlab.window_hanning,
273
297
  cmap=self.spectro_color_map,
298
+ vmin=vmin,
299
+ vmax=vmax,
300
+ # mode="psd",
301
+ ## NFFT=1024,
302
+ # Fs=self.frame_rate,
303
+ ## noverlap=900,
304
+ # cmap=self.spectro_color_map,
274
305
  )
275
306
 
276
- self.ax.xaxis.set_major_locator(
277
- mticker.FixedLocator(self.ax.get_xticks().tolist())
278
- )
279
- self.ax.set_xticklabels(
280
- [
281
- str(round(current_time + w - self.interval / 2, 1))
282
- for w in self.ax.get_xticks()
283
- ]
284
- )
307
+ self.ax.xaxis.set_major_locator(mticker.FixedLocator(self.ax.get_xticks().tolist()))
308
+ self.ax.set_xticklabels([str(round(current_time + w - self.interval / 2, 1)) for w in self.ax.get_xticks()])
285
309
 
286
310
  # cursor
287
311
  self.ax.axvline(x=self.interval / 2, color=self.cursor_color, linestyle="-")
boris/plot_waveform_rt.py CHANGED
@@ -1,7 +1,7 @@
1
1
  """
2
2
  BORIS
3
3
  Behavioral Observation Research Interactive Software
4
- Copyright 2012-2023 Olivier Friard
4
+ Copyright 2012-2025 Olivier Friard
5
5
 
6
6
 
7
7
  This program is free software; you can redistribute it and/or modify
@@ -25,20 +25,21 @@ import wave
25
25
  from . import config as cfg
26
26
  import matplotlib
27
27
 
28
- matplotlib.use("Qt5Agg")
28
+ matplotlib.use("QtAgg")
29
+
29
30
  import numpy as np
30
- from PyQt5.QtWidgets import QWidget, QVBoxLayout, QHBoxLayout, QPushButton, QLabel
31
- from PyQt5.QtCore import pyqtSignal, QEvent
32
- from PyQt5 import Qt
33
- from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
31
+ from PySide6.QtWidgets import QWidget, QVBoxLayout, QHBoxLayout, QPushButton, QLabel
32
+ from PySide6.QtCore import Signal, QEvent, Qt
33
+ from matplotlib.backends.backend_qtagg import FigureCanvasQTAgg as FigureCanvas
34
34
  from matplotlib.figure import Figure
35
35
  import matplotlib.ticker as mticker
36
36
 
37
+ # matplotlib.pyplot.switch_backend("Qt5Agg")
37
38
 
38
- class Plot_waveform_RT(QWidget):
39
39
 
40
+ class Plot_waveform_RT(QWidget):
40
41
  # send keypress event to mainwindow
41
- sendEvent = pyqtSignal(QEvent)
42
+ sendEvent = Signal(QEvent)
42
43
 
43
44
  def __init__(self):
44
45
  super().__init__()
@@ -66,7 +67,7 @@ class Plot_waveform_RT(QWidget):
66
67
  "+",
67
68
  self,
68
69
  clicked=lambda: self.time_interval_changed(1),
69
- focusPolicy=Qt.Qt.NoFocus,
70
+ focusPolicy=Qt.NoFocus,
70
71
  )
71
72
  )
72
73
  hlayout1.addWidget(
@@ -74,7 +75,7 @@ class Plot_waveform_RT(QWidget):
74
75
  "-",
75
76
  self,
76
77
  clicked=lambda: self.time_interval_changed(-1),
77
- focusPolicy=Qt.Qt.NoFocus,
78
+ focusPolicy=Qt.NoFocus,
78
79
  )
79
80
  )
80
81
  layout.addLayout(hlayout1)
@@ -108,7 +109,8 @@ class Plot_waveform_RT(QWidget):
108
109
  try:
109
110
  wav = wave.open(wav_file, "r")
110
111
  frames = wav.readframes(-1)
111
- signal = np.fromstring(frames, dtype=np.int16)
112
+ # signal = np.fromstring(frames, dtype=np.int16)
113
+ signal = np.frombuffer(frames, dtype=np.int16)
112
114
  frame_rate = wav.getframerate()
113
115
  wav.close()
114
116
  return signal, frame_rate
@@ -172,26 +174,19 @@ class Plot_waveform_RT(QWidget):
172
174
 
173
175
  # start
174
176
  if current_time <= self.interval / 2:
175
-
176
177
  time_ = np.linspace(
177
178
  0,
178
- len(self.sound_info[: int((self.interval) * self.frame_rate)])
179
- / self.frame_rate,
179
+ len(self.sound_info[: int((self.interval) * self.frame_rate)]) / self.frame_rate,
180
180
  num=len(self.sound_info[: int((self.interval) * self.frame_rate)]),
181
181
  )
182
- self.ax.plot(
183
- time_, self.sound_info[: int((self.interval) * self.frame_rate)]
184
- )
182
+ self.ax.plot(time_, self.sound_info[: int((self.interval) * self.frame_rate)])
185
183
 
186
- self.ax.set_xlim(
187
- current_time - self.interval / 2, current_time + self.interval / 2
188
- )
184
+ self.ax.set_xlim(current_time - self.interval / 2, current_time + self.interval / 2)
189
185
 
190
186
  # cursor
191
187
  self.ax.axvline(x=current_time, color=self.cursor_color, linestyle="-")
192
188
 
193
189
  elif current_time >= self.media_length - self.interval / 2:
194
-
195
190
  i = int(round(len(self.sound_info) - (self.interval * self.frame_rate), 0))
196
191
 
197
192
  time_ = np.linspace(
@@ -206,47 +201,27 @@ class Plot_waveform_RT(QWidget):
206
201
 
207
202
  self.ax.set_xlim(lim1, lim2)
208
203
 
209
- self.ax.xaxis.set_major_locator(
210
- mticker.FixedLocator(self.ax.get_xticks().tolist())
211
- )
212
- self.ax.set_xticklabels(
213
- [
214
- str(round(w + self.media_length - self.interval, 1))
215
- for w in self.ax.get_xticks()
216
- ]
217
- )
204
+ self.ax.xaxis.set_major_locator(mticker.FixedLocator(self.ax.get_xticks().tolist()))
205
+ self.ax.set_xticklabels([str(round(w + self.media_length - self.interval, 1)) for w in self.ax.get_xticks()])
218
206
 
219
207
  # cursor
220
- self.ax.axvline(
221
- x=lim1 + self.interval / 2, color=self.cursor_color, linestyle="-"
222
- )
208
+ self.ax.axvline(x=lim1 + self.interval / 2, color=self.cursor_color, linestyle="-")
223
209
 
224
210
  # middle
225
211
  else:
226
-
227
212
  start = (current_time - self.interval / 2) * self.frame_rate
228
213
  end = (current_time + self.interval / 2) * self.frame_rate
229
214
 
230
215
  time_ = np.linspace(
231
216
  0,
232
- len(self.sound_info[int(round(start, 0)) : int(round(end, 0))])
233
- / self.frame_rate,
217
+ len(self.sound_info[int(round(start, 0)) : int(round(end, 0))]) / self.frame_rate,
234
218
  num=len(self.sound_info[int(round(start, 0)) : int(round(end, 0))]),
235
219
  )
236
220
 
237
- self.ax.plot(
238
- time_, self.sound_info[int(round(start, 0)) : int(round(end, 0))]
239
- )
221
+ self.ax.plot(time_, self.sound_info[int(round(start, 0)) : int(round(end, 0))])
240
222
 
241
- self.ax.xaxis.set_major_locator(
242
- mticker.FixedLocator(self.ax.get_xticks().tolist())
243
- )
244
- self.ax.set_xticklabels(
245
- [
246
- str(round(current_time + w - self.interval / 2, 1))
247
- for w in self.ax.get_xticks()
248
- ]
249
- )
223
+ self.ax.xaxis.set_major_locator(mticker.FixedLocator(self.ax.get_xticks().tolist()))
224
+ self.ax.set_xticklabels([str(round(current_time + w - self.interval / 2, 1)) for w in self.ax.get_xticks()])
250
225
 
251
226
  # cursor
252
227
  self.ax.axvline(x=self.interval / 2, color=self.cursor_color, linestyle="-")