Decimator

Decimators can be used to drop the frequency of raw audio data.

For example, you may have a raw audio data stream sampled at 96kHz (you might have sampled at this search for odontocete clicks); you also want to search for baleen whale sounds at around 100Hz. It would be inefficient to run the baleen whale detector on the 96kHz data. However, by using the Decimator to produce a new raw data stream at a few 100Hz and running the baleen whale detector on this, the total amount of processing will be reduced, spectrogram displays will also be more clearer.

A decimator can be inserted anywhere in the PAMGuard data model where there are raw audio data.

Creating a Decimator

From the File>Add modules>Sound Processing menu, or from the pop-up menu on the data model display select “Decimator”. Enter a name for the new decimator module (e.g. “2kHz”, etc) and press Ok.

Configure the Decimator

The Decimator module requires a source of raw data before it can operate. This may come directly from a Sound Acquisition module (e.g. a sound card or a National Instruments board) or from processed data such as the output from a filter, another decimator, etc.

To configure the decimator, go to the Detection>“your decimator name …”> menu

Decimator Dialog

Select the input data source and specify the sample rate of the output data.

Filter Settings

It is important that data are filtered correctly prior to decimation, otherwise aliasing will occur: that’s when higher frequencies in the data ‘fold’ down onto lower frequencies. You therefore need to filter the data at half the sample rate of the output data. Pressing the default button will generate a 6 pole Butterworth filter at the right frequency. If you want to do something different, you can press the filter settings dialog and the filter dialog will appear (see the Filters Design help page).

Interpolation

PAMGuard can handle decimation to frequencies which are not an exact submultiple of the original frequency, e.g. from a 500kHz input sample rate, to 48kHz output sample rate.

If you are decimating to a frequency that is not a submultiple, then you should consider using interpolation to improve the quality of the output data. Linear interpolation will use data points either side of the required sample point, quadratic will use the three closest samples. Both these methods use a small additional amount of CPU.

OSZAR »