xarray-behave 0.35.4__tar.gz → 0.35.5__tar.gz
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.
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/PKG-INFO +1 -1
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/src/xarray_behave/__init__.py +1 -1
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/src/xarray_behave/gui/app.py +17 -3
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/src/xarray_behave/gui/forms/das_predict.yaml +22 -1
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/src/xarray_behave/gui/utils.py +1 -2
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/.github/workflows/publish.yaml +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/.gitignore +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/LICENSE +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/README.md +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/build_env.yml +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/conda/xarray-behave/bld.bat +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/conda/xarray-behave/build.sh +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/conda/xarray-behave/conda_build_config.yaml +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/conda/xarray-behave/meta.yaml +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/condarc.yml +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/doc/demo.ipynb +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/doc/demo_behavioral_features.ipynb +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/doc/demo_behavioral_features_large_group.ipynb +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/doc/ncb.mplstyle +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/pyproject.toml +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/setup.py +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/src/xarray_behave/annot.py +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/src/xarray_behave/event_utils.py +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/src/xarray_behave/gui/__init__.py +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/src/xarray_behave/gui/audio_player.py +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/src/xarray_behave/gui/das.py +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/src/xarray_behave/gui/formbuilder.py +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/src/xarray_behave/gui/forms/das_make.yaml +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/src/xarray_behave/gui/forms/das_train.yaml +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/src/xarray_behave/gui/forms/envelope_computation.yaml +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/src/xarray_behave/gui/forms/export_for_das.yaml +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/src/xarray_behave/gui/forms/from_dir.yaml +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/src/xarray_behave/gui/forms/from_file.yaml +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/src/xarray_behave/gui/forms/from_zarr.yaml +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/src/xarray_behave/gui/forms/spec_freq.yaml +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/src/xarray_behave/gui/icon.png +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/src/xarray_behave/gui/table.py +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/src/xarray_behave/gui/view_dialog.py +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/src/xarray_behave/gui/views.py +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/src/xarray_behave/gui/widgets.py +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/src/xarray_behave/io/__init__.py +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/src/xarray_behave/io/annotations.py +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/src/xarray_behave/io/annotations_manual.py +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/src/xarray_behave/io/audio.py +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/src/xarray_behave/io/balltracks.py +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/src/xarray_behave/io/movieparams.py +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/src/xarray_behave/io/poses.py +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/src/xarray_behave/io/timestamps.py +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/src/xarray_behave/io/tracks.py +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/src/xarray_behave/loaders.py +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/src/xarray_behave/metrics.py +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/src/xarray_behave/xarray_behave.py +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/tests/test_annot.py +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/tests/test_assemble.py +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/tests/test_assemble_metrics.py +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/tests/test_imports.py +0 -0
- {xarray-behave-0.35.4 → xarray-behave-0.35.5}/tests/test_io.py +0 -0
|
@@ -674,6 +674,10 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
|
674
674
|
if form_data["segment_minlen"] is None:
|
|
675
675
|
form_data["segment_minlen"] = 0
|
|
676
676
|
|
|
677
|
+
if form_data["filter_song"] == "no":
|
|
678
|
+
form_data["bandpass_low_freq"] = None
|
|
679
|
+
form_data["bandpass_up_freq"] = None
|
|
680
|
+
|
|
677
681
|
if form_data["file"] != "Current file":
|
|
678
682
|
if form_data["folder"] != " ":
|
|
679
683
|
file_path = form_data["folder"]
|
|
@@ -696,6 +700,9 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
|
696
700
|
segment_thres=form_data["event_thres"],
|
|
697
701
|
segment_fillgap=form_data["segment_fillgap"],
|
|
698
702
|
segment_minlen=form_data["segment_minlen"],
|
|
703
|
+
bandpass_low_freq=form_data["bandpass_low_freq"],
|
|
704
|
+
bandpass_up_freq=form_data["bandpass_up_freq"],
|
|
705
|
+
resample=form_data["resample"],
|
|
699
706
|
)
|
|
700
707
|
return
|
|
701
708
|
elif hasattr(self, "ds") and form_data["file"] == "Current file":
|
|
@@ -721,10 +728,10 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
|
721
728
|
# select batch size so that at least 10 batches are run
|
|
722
729
|
# minimizes loss of annotations from batch size "quantization" errors
|
|
723
730
|
batch_size = 32
|
|
724
|
-
nb_batches =
|
|
731
|
+
nb_batches = int(
|
|
725
732
|
np.floor((audio.shape[0] - ((batch_size - 1) + params["nb_hist"])) / (params["stride"] * (batch_size)))
|
|
726
733
|
)
|
|
727
|
-
while nb_batches
|
|
734
|
+
while nb_batches < 10 and batch_size > 1:
|
|
728
735
|
batch_size -= 1
|
|
729
736
|
|
|
730
737
|
logger.info(" Running inference on audio.")
|
|
@@ -733,10 +740,13 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
|
733
740
|
fs_model = params["samplerate_x_Hz"]
|
|
734
741
|
fs_audio = self.ds.song_raw.attrs["sampling_rate_Hz"]
|
|
735
742
|
|
|
736
|
-
if form_data["
|
|
743
|
+
if form_data["resample"] and fs_audio and fs_audio != fs_model:
|
|
737
744
|
logger.info(f" Resampling. Audio rate is {fs_audio}Hz but model was trained on data with {fs_model}Hz.")
|
|
738
745
|
audio = das.utils.resample(audio, fs_audio, fs_model)
|
|
739
746
|
|
|
747
|
+
import rich
|
|
748
|
+
|
|
749
|
+
rich.print(form_data)
|
|
740
750
|
events, segments, _, _ = das.predict.predict(
|
|
741
751
|
audio,
|
|
742
752
|
model_path,
|
|
@@ -749,6 +759,10 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
|
749
759
|
segment_thres=form_data["event_thres"],
|
|
750
760
|
segment_fillgap=form_data["segment_fillgap"],
|
|
751
761
|
segment_minlen=form_data["segment_minlen"],
|
|
762
|
+
bandpass_low_freq=form_data["bandpass_low_freq"],
|
|
763
|
+
bandpass_up_freq=form_data["bandpass_up_freq"],
|
|
764
|
+
resample=form_data["resample"],
|
|
765
|
+
fs_audio=fs_audio,
|
|
752
766
|
)
|
|
753
767
|
|
|
754
768
|
# Process detected song
|
|
@@ -65,11 +65,32 @@ main:
|
|
|
65
65
|
default: True
|
|
66
66
|
help: Appends '_proposals' to song name. Individual proposals can be corrected and approved.
|
|
67
67
|
|
|
68
|
-
- name:
|
|
68
|
+
- name: resample
|
|
69
69
|
label: Resample audio to rate used for training
|
|
70
70
|
type: bool
|
|
71
71
|
default: True
|
|
72
72
|
|
|
73
|
+
- name: filter_song
|
|
74
|
+
label: Bandpass filter audio
|
|
75
|
+
type: stacked
|
|
76
|
+
default: "no"
|
|
77
|
+
options: "no,yes"
|
|
78
|
+
|
|
79
|
+
"no":
|
|
80
|
+
|
|
81
|
+
"yes":
|
|
82
|
+
- name: bandpass_low_freq
|
|
83
|
+
label: Lower cutoff
|
|
84
|
+
type: double
|
|
85
|
+
default: 50.0
|
|
86
|
+
range: 0.0, 1000000.0
|
|
87
|
+
|
|
88
|
+
- name: bandpass_up_freq
|
|
89
|
+
label: Upper cutoff
|
|
90
|
+
type: double
|
|
91
|
+
default: 10000.0
|
|
92
|
+
range: 0.0, 1000000.0
|
|
93
|
+
|
|
73
94
|
- type: text
|
|
74
95
|
text: '<b>Event detection</b>'
|
|
75
96
|
|
|
@@ -115,8 +115,7 @@ class FastImageWidget(pg.GraphicsLayoutWidget):
|
|
|
115
115
|
image_format ([type], optional): [description]. Defaults to QtGui.QImage.Format_RGB888.
|
|
116
116
|
auto_scale (bool, optional): [description]. Defaults to False.
|
|
117
117
|
"""
|
|
118
|
-
qimg = QtGui.QImage(image, image.shape[1], image.shape[0], image_format)
|
|
119
|
-
# qimg = QtGui.QImage(image.ctypes.data, image.shape[1], image.shape[0], image_format)
|
|
118
|
+
qimg = QtGui.QImage(image, image.shape[1], image.shape[0], 3 * image.shape[1], image_format)
|
|
120
119
|
|
|
121
120
|
qpix = QtGui.QPixmap(qimg)
|
|
122
121
|
self.pixmapItem.setPixmap(qpix)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{xarray-behave-0.35.4 → xarray-behave-0.35.5}/doc/demo_behavioral_features_large_group.ipynb
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{xarray-behave-0.35.4 → xarray-behave-0.35.5}/src/xarray_behave/gui/forms/envelope_computation.yaml
RENAMED
|
File without changes
|
{xarray-behave-0.35.4 → xarray-behave-0.35.5}/src/xarray_behave/gui/forms/export_for_das.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|