Skip to content

Commit 15f6586

Browse files
authored
BatBot upgrade for original Sample Rate (#514)
* support for origsr * update batbot spectrogram script * original sr helper testing helper scripts * updating helper functions * update to batbot 0.1.5 * swap default to original sample rate
1 parent deb3794 commit 15f6586

9 files changed

Lines changed: 993 additions & 112 deletions

File tree

DEPLOYMENT.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@ for a list of environment variables that you'll need to populate for your deploy
127127
spectrogram masks and save them to `PulseMetadata.contours`. When `false` or unset, contour
128128
extraction is skipped and stored contours are empty, which lowers DB storage size. Set to
129129
`true` if you need pulse contour data (e.g. the spectrogram contour overlay in the client).
130+
- `DJANGO_BATAI_USE_ORIGINAL_SR_SPECTROGRAMS` (optional, default `true`): when `true`, Celery
131+
spectrogram tasks use BatBot's original-sample-rate (`.origsr.jpg`) images for uncompressed and
132+
compressed spectrograms instead of the default resampled outputs. Set to `false` to use resampled
133+
images.
130134
- `VITE_API_ROUTE`: this tells the Vue application where the backend (Django) API can be found.
131135
- `DJANGO_BATAI_URL_PATH`: this allows the Django application to be mounted at a subpath in a URL.
132136
It is used by the Django application itself and the nginx configuration at nginx.subpath.template

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,12 @@ Spectrogram processing tasks honor `DJANGO_BATAI_SAVE_SPECTROGRAM_CONTOURS` envi
131131
Set to `False` by default so workers skip contour extraction (less DB storage space); set to `True` if you need
132132
contours in the UI (UI for contours currently disabled due to performance)
133133

134+
### Original sample-rate spectrograms
135+
136+
By default (`DJANGO_BATAI_USE_ORIGINAL_SR_SPECTROGRAMS=true`), BatBot's `.origsr.jpg` outputs are stored as the
137+
uncompressed and compressed spectrogram images (and related masks/waveplots). Set
138+
`DJANGO_BATAI_USE_ORIGINAL_SR_SPECTROGRAMS=false` to use resampled images instead.
139+
134140
### Species Suggestions by Range
135141

136142
The suggested species for a given location are determined by spatial data stored in `/bats_ai/core/data/species-range.geojson`.

0 commit comments

Comments
 (0)