SPICE Detector - MarineBioAcousticsRC/Triton GitHub Wiki

HOME > Remoras > SPICE Detector

The SPICE Detector Remora provides user interfaces and command line tools for configuring and running an energy detector for impulsive signal types in large acoustic datasets. This detector is designed to be simple and predictable to facilitate acoustic density estimation.

  1. How It Works
  2. How To Use It
    • Step 1: Add SPICE Detector Remora to Triton
    • Step 2: Interactive Detector
    • Step 3: Batch Run Detector
    • Step 4: Convert detections to TPWS
  3. Credits

How It Works

This detector was originally designed for echolocation clicks, but can be adapted for other broadband signals. It uses a two-pass approach in which it looks for candidate energy peaks exceeding a minimum threshold selected by the user in a rapid first pass. Candidate detections are then reviewed in a second pass to evaluate whether they meet additional user-defined criteria.

:warning: Considerations:

The preferred operating mode of this detector is peak-to-peak amplitude-based. This mode incorporates the recording system's sensitivity (transfer function) to impose amplitude threshold criteria in real-world units (dB re 1\muPa). For any application in which detection rates are to be compared over time and/or space, peak-to-peak mode should be used, in order to reduce the influence of varying noise conditions on estimated encounter rates.

Signal-to-noise ratio (SNR) mode is provided as a alternative, but should only be used in cases where a static amplitude threshold cannot be used due to extreme variability in noise conditions. Be aware that detection probabilities and maximum detection ranges will vary wildly minute to minute in SNR mode, therefore it cannot be used
for quantitative monitoring applications. One use case for SNR mode is with towed array data, where vessel noise variability and user inputs lead to inconsistent noise levels.

How To Use It

Step 1: Add SPICE Detector Remora to Triton

Learn how to download or clone the Triton repository with the SPICE Detector Remora in the quick setup section and how to add the Remora to Triton.

Step 2: Interactive Detector

The Interactive Detector provides a user interface that shows the user how their selected settings will operate on the data. The main detection parameters can be tweaked to identify a settings that select the desired signals and will give the user a sense of detection/miss rates.

In the Control Window, use the Remoras pull-down menu, and select SPICE Detector > Interactive detector.

sp_interactive

:warning: In peak to peak mode, a transfer function is required to impose the proper received level threshold. Without a transfer function, estimated received levels will be inaccurate.

To load a transfer function use the Tools menu in the Control Window, and select Load Transfer Function File. For more information on transfer functions, see Section 2.4 of the Triton User Manual PDF.

Step 3: Batch Run Detector

Once desired detection settings have been identified, the Batch Detector is used to run the detector across the full dataset. Depending on the size of the dataset, this process can take anywhere from minutes to days to complete.

In the Control Window, use the Remoras pull-down menu, and select SPICE Detector > Batch Run Detector.

sp_batch

This will bring up the Batch Detector interface, in which detection and post-processing preferences can be verified. Hover your cursor over the field names to reveal tooltips with detailed information on the various parameters.

Output:

For each input .wav or .x.wav file, the detector will save one Matlab file (*.mat) containing the detected events and one text file containing start and end times of detected events, stored as number of seconds elapsed since the file start time.

Variables saved in the Matlab files include:

clickTimes = Detection times

f = Frequency vector associated with spectra

hdr = Header info from audio file

noiseTimes = Times of noise snippets (if saveNoise = TRUE)

p = Detection parameters

ppSignal = Peak to peak amplitudes of detections

snr = SNR of detections

specClickTf = Detection spectra

specNoiseTf = Noise spectra

yFiltBuff = Detection waveforms

yNFilt = Noise waveforms (if saveNoise = TRUE)

If saveForTPWS = FALSE the following additional variables are saved:

durClick = Detection duration.

deltaEnv = Detection envelope energy distribution.

bw3db = Detection 3dB bandwidth.

yFilt = Unbuffered version of detection waveform.

peakFr = Detection peak frequency.

Command Line Option:

The detector can also be run in the Matlab command line as:

spice_detector('mySettingsFile.m')

Step 4: Convert detections to TPWS

After the detector has completed, this tool can be used to aggregate all detected events into large files into TPWS format for detEdit. This format is also used by the Cluster-Tool
Remora.

In the Control Window, use the Remoras pull-down menu, and select SPICE Detector > Convert detections to TPWS.

sp_TPWS