Skip to content
Snippets Groups Projects
Commit 9bc6ae01 authored by Margert, Andrei's avatar Margert, Andrei
Browse files

Initial commit

parents
Branches
No related tags found
No related merge requests found
data/
output/
tmp/
poetry.lock
# Default ignored files
/shelf/
/workspace.xml
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="jdk" jdkName="Poetry (Ecoacoustics)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Poetry (Ecoacoustics)" project-jdk-type="Python SDK" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/Ecoacoustics.iml" filepath="$PROJECT_DIR$/.idea/Ecoacoustics.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
data:
path: "data/Brazil/package-1/OP1/OP1"
mic:
sensitivity: -4 # dBV
gain: 18 # dB
temporal_alpha_indices:
dB_threshold: 3 # dB
rejectDuration: 0.01
spectrogram:
window: "hann"
nperseg: 1024
noverlap: 512
spectral_alpha_indices:
flim_low: [0, 1500]
flim_mid: [1500, 8000]
flim_hi: [8000, 20000]
mask_param1: 6
mask_param2: 0.5
data:
path: "data/Brazil/package-1/INFOREST1"
mic:
sensitivity: -4 # dBV
gain: 18 # dB
temporal_alpha_indices:
dB_threshold: 3 # dB
rejectDuration: 0.01
spectrogram:
window: "hann"
nperseg: 1024
noverlap: 512
spectral_alpha_indices:
flim_low: [0, 1500]
flim_mid: [1500, 8000]
flim_hi: [8000, 20000]
mask_param1: 6
mask_param2: 0.5
data:
path: "data/Brazil/package-1/INFOREST2/INFOREST2"
mic:
sensitivity: -4 # dBV
gain: 18 # dB
temporal_alpha_indices:
dB_threshold: 3 # dB
rejectDuration: 0.01
spectrogram:
window: "hann"
nperseg: 1024
noverlap: 512
spectral_alpha_indices:
flim_low: [0, 1500]
flim_mid: [1500, 8000]
flim_hi: [8000, 20000]
mask_param1: 6
mask_param2: 0.5
data:
path: "data/Brazil/package-1/FS1/FS1"
mic:
sensitivity: -4 # dBV
gain: 18 # dB
temporal_alpha_indices:
dB_threshold: 3 # dB
rejectDuration: 0.01
spectrogram:
window: "hann"
nperseg: 1024
noverlap: 512
spectral_alpha_indices:
flim_low: [0, 1500]
flim_mid: [1500, 8000]
flim_hi: [8000, 20000]
mask_param1: 6
mask_param2: 0.5
This diff is collapsed.
[tool.poetry]
name = "ecoacoustics"
version = "0.1.0"
description = ""
authors = ["Andrei Margert <andrei.margert@wur.nl>"]
readme = "README.md"
[tool.poetry.dependencies]
python = "^3.9"
scikit-maad = "^1.3.12"
jupyter = "^1.0.0"
matplotlib = "^3.7.1"
pandas = "<2.0.0"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
#!/bin/bash
# define the directory to work with
dir_path=$1
# iterate over the .wav files in the directory
for old_file in "$dir_path"/*.wav
do
# Extract the filename and extension
filename=$(basename -- "$old_file")
extension="${filename##*.}"
filename="${filename%.*}"
# Split the filename into parts using "_" as delimiter
IFS="_"; read -a parts <<< "$filename"; unset IFS
# Pad or truncate the XXX part to 8 characters
parts[0]=$(printf "%-8.8s" "${parts[0]}")
# Replace spaces with 'X'
parts[0]="${parts[0]// /X}"
# Construct new filename
new_file="${parts[0]}_${parts[1]}_${parts[2]}.$extension"
# Rename the file
mv -- "$old_file" "$dir_path/$new_file"
# Or print the new filenames without renaming
# echo $new_file
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment