Field Notes Journal

Call Analysis

The analysis stage is designed to identify individual bat pulses in a recording and extract simple measurements describing their timing and structure.

This is intended as a practical, repeatable way to turn recordings into structured data for further exploration, rather than a formal classification system.

Two analysis modes are currently supported:

Both modes preserve pulse timing and behavioural structure, but only time-expansion recordings retain reliable frequency and amplitude information. Heterodyne recordings therefore support temporal and behavioural analysis, while spectral measurements must be treated cautiously or omitted entirely.

Overview

For suitable recordings (particularly cleaned time-expansion recordings), the analysis works in the following stages:

# Summary Description
1 Detect pulse regions The waveform is analysed to identify individual call pulses based on amplitude over time
2 Identify feeding buzz A cluster of closely spaced pulses at the end of a sequence is detected as a terminal feeding buzz
3 Extract pulse metrics Each detected pulse is measured (timing, amplitude, decay shape, and frequency characteristics)
4 Output Results are written as a JSON file alongside a waveform plot with detected regions highlighted

The result is a structured description of each pulse in the recording, suitable for further analysis or visualisation.

Pulse Detection

The waveform is first converted into a smoothed amplitude envelope. This makes it easier to identify the overall shape of each call (a sharp attack followed by a decaying tail).

A dynamic threshold is then applied to this envelope to identify regions of activity:

These steps produce a set of candidate pulse regions.

Each region is then refined so that it captures:

The aim is to preserve the natural structure of each pulse rather than to isolate only the loudest peak.

Feeding Buzz Detection

Bat calls often end in a feeding buzz — a rapid sequence of closely spaced pulses as the bat approaches prey.

The analysis identifies this by:

Pulses within this cluster are marked as part of the terminal buzz.

Because these pulses are shorter and more densely packed than earlier calls, a second-pass peak detector is applied within the buzz region to recover pulses that may not have been fully captured by the main detector.

Pulse Measurements

For each detected pulse, a set of simple measurements is calculated.

Timing

For time-expansion recordings, these are also reported in estimated real time by applying the expansion factor.

Amplitude and Shape

These describe the overall shape of the pulse in the time domain.

Frequency Content

A short-time Fourier transform (STFT) is applied within each pulse to estimate:

For time-expansion recordings, these frequencies are scaled back to estimated real bat frequencies using the expansion factor.

Output

The analysis produces two outputs:

Output Description
Waveform plot A waveform view with detected pulse regions shaded, making it easy to visually verify the detection
JSON file A structured file containing one entry per detected pulse, including all measured properties

This JSON output is intended as a starting point for:

An example waveform that has been passed through the call analysis is shown below, with the feeding buzz highlighted:

Waveform with Feeding Buzz Highlighted
Waveform with Feeding Buzz Highlighted

Tool

Spectrogram Viewer

A tool for exploring bat recordings through spectrograms and pulse-level analysis

The analyses presented in this section were developed using the Spectrogram Viewer, a command-line application designed for examining bat echolocation recordings.

The tool combines waveform and spectrogram visualisation with noise reduction, pulse detection, and behavioural call analysis, allowing recordings to be explored in detail.

Structured outputs, including pulse measurements and JSON analysis files, can be exported for downstream analysis and notebook-based workflows.

The application, example workflows, and instructions on how to run it are provided in the GitHub repository.

View on GitHub