How to use TF32 software for bat sound analysis

Transcription

How to use TF32 software for bat sound analysis
page
How to use TF32 software for bat sound analysis
Contents
1. Getting started (page 1)
2. Selecting the best calls for analysis (page 4)
3. Selecting calls and zooming in (page 5)
4. Checking and adjusting settings (page 6)
5.
6.
7.
8.
Measuring peak frequency (page 11)
Measuring start and end frequency (page 13)
Measuring interpulse interval (IPI) (page 14)
Measuring call duration (page 15)
1. Getting started
TF32 was developed by Paul H. Milenkovic at the University of Wisconsin-Madison. It was designed for speech
analysis but is also a good tool for bat sound analysis. A Demo version is available to download free of charge at
http://userpages.chorus.net/cspeech/ (or simply do a web search for TF32) and this provides all the functions
described in this booklet.
When you have saved it to your computer you will need to Run it each time you open the software. Ignore the
warning about it being an unverified publisher, it's safe to use.
Open a power spectrum by clicking on View - Open - Spec .
1
Open a sound file by clicking on Files – Open, then browse to a file saved on your computer.
The file will need to be in standard .wav format. Some other formats are supported, none of which are commonly
used for recording bat sounds (see user documentation at the TF32 website).
If your files are in an unsupported format there are various sound conversion programs that enable you to convert
different formats to .wav format. Doing a web search on “audio converter” will bring up links to various packages
that can be downloaded, some with free trial periods. The files needed to be converted to .wav files with the
following specifications: PCM uncompressed, 44100 Hz, 16 bits, stereo (or mono if your original files are in mono).
To listen to the file press the Play button.
If you have a number of files in the same folder you can click to the previous one or the next one by clicking the
Prev and Next buttons.
2
The screen will be divided into three displays when viewed in full screen (the power spectrum is displayed in a
separate window when TF32 is viewed in less than full screen).
A is the oscillogram which plots amplitude in decibels (vertical axis) against time (horizontal axis). If you are
looking at a stereo recording, two oscillograms will be displayed, one for each channel (as in the example above). If
you are looking at a mono recording, only one oscillogram will be displayed.
Use this for measuring call duration and interpulse intervals (the number of milliseconds between calls).
B is the sonogram/spectrogram which plots frequency (vertical axis) against time (horizontal axis).
Use this for examining the structure of the calls and measuring start and end frequency.
C is the power spectrum which plots amplitude (vertical axis) against frequency.
Use this for measuring the peak frequency (also known as Frequency of Maximum Energy of FmaxE).
3
2. Selecting the best calls for analysis
Change the amplitude scale on the oscillogram to 20.000 Volts/2 by clicking on the down arrow to the right of the
box circled above. You can also do this by right-clicking on the oscillogram and selecting ‘scale down’. This displays
the full amplitude range of the oscillogram and enables you to examine the signal to noise ratio.
Clipped calls (where the sound is overloaded and the oscillogram spikes are cut off)
should not ideally be analysed. When sound is extremely loud and calls are clipped
the result can be spurious harmonics which are distortions of the recorded sound.
In the example on the right the spikes go off the top of the scale in the middle of the
sequence which makes these calls less suitable for analysis. It is better to select the
earlier calls in this sequence.
If calls are too quiet (as in the example on the right) or the signal to noise ratio is
too poor these are also less suitable for analysis. When bats are very far away the
higher frequencies may not be captured and this can be misleading.
4
3. Selecting calls and zooming in
Click on the screen to insert left and right selection cursors. Once you have inserted cursors you can move them by
clicking on them and dragging them to left or right in order to enclose selected calls. Select around five calls for
closer examination. Click on the zoom in button (down arrow in top right hand corner).
The zoomed in view is shown below. The call structure is now becoming clearer and the calls appear to have
frequency modulated (FM) sweeps ending in quasi-constant frequency (QCF) tails (combining to produce a reverse
‘J’ shape).
The end of each call is slightly obscured by background noise but this can be cleaned up by adjusting the
spectrogram settings as shown on the following pages.
5
4. Checking and adjusting settings
It is worth checking the spectrogram settings as these will make a difference to how the bat calls appear on your
screen. At least one of these settings is often essential to get right while the others can aid identification.
Click on the TimeFreqA button to display the spectrogram settings.
Selecting the correct channel
The most important setting to check is the Ch box which selects which channel you are looking at from a stereo
recording. If your recording is in mono or you recorded from an FD-only detector (e.g. the BatBox Baton) then the
channel selection box does not appear. Ensure you have the same channel selected in the spectrogram and power
spectrum (both circled above).
If you recorded from a detector which outputs time expansion (TE) or frequency division (FD) signals in one channel
and heterodyne in the other channel, ensure you are viewing the TE or FD channel.
In the Ch box click up and down between channels 1 and 2 to check which one looks like the TE/FD channel. In the
heterodyne channel, calls are often squashed down at the bottom of the screen (just discernible in the screenshot
below) if you were tuned in to the peak frequency when listening to the bats in the field.
6
Depending on what frequency you were tuned to, heterodyne recordings can sometimes resemble TE and FD
recordings except the call sequences will tend to veer up and down quite markedly (corresponding to tuning around
on the detector in the field) whereas in TE and FD the call sequences typically show more gradual shifts in
frequency range as the bat responds to changes in its surroundings.
Other settings
The other settings are also worth playing around with as they can bring out the call structure more clearly and aid
identification.
Preemphasis
Checking this box increases the dB of higher frequencies for speech analysis
and changes the spectrogram. This is not normally done for bat sound
analysis so uncheck this box.
BW (Hz)
Spectrograms are made up of a series of overlapping windows that give a representation of the sound wave in
terms of time and frequency. If the windows are set wider on the time axis they will be correspondingly narrower
on the frequency axis and hence the frequency resolution will be finer. If the windows are set wider on the
frequency axis they will be correspondingly narrower on the time axis and hence the time resolution will be finer.
The BW (Hz) box sets the frequency bandwidth of the spectrogram windows. It is normally fine to stick with the
default value of 300 (below) which gives a good compromise between frequency and time resolution. If
experimenting with different values you can click ‘Apply’ to preview the spectrogram with the new bandwidth
before hitting ‘OK’.
7
A lower value, e.g. 100 (below), gives higher resolution on the frequency scale but lower resolution on the time
scale. It is worth setting a lower value if you want to make more precise measurements of start and end frequency
(see page 12), though remember that start frequency is not always reliable since high frequencies are more likely to
attenuate so the highest frequencies in the call may not have been picked up by the bat detector.
A higher value, e.g. 500 (below), gives lower resolution on the frequency scale but higher resolution on the time
scale. Time measurements are best taken from the oscillogram (see pages 13 and 14).
8
Frequency range (kHz)
This determines the upper frequency limit of the spectrogram. The set of values you can choose from depends on
your screen resolution. You can also adjust this by right-clicking on the spectrogram and selecting ‘scale up’ or
‘scale down’.
A value above 11.4 kHz is ideal, since this will be high enough to display the highest frequency calls used by a UK
bat species, i.e. the echolocation calls of the lesser horseshoe bat which have a maximum frequency of around 114
kHz (or 11.4 kHz when reduced by 10 on a TE or FD detector). 12.705 is selected in the screenshot below.
A high upper frequency limit will mean that a wider frequency range is displayed and some bat calls can look
somewhat squashed into the lower half of the screen. If you wish to focus on species that use lower frequencies
than horseshoe bats then you can set a lower upper frequency limit which will make the calls larger on the screen
and this can make them easier to interpret.
Unfortunately, in this case the next value down for upper frequency range was 6.352 which can cut off the higher
end of pipistrelle calls (see below). However a value such as this is ideal for looking more closely at the structure of
species such as noctule, Leisler’s bat, serotine and barbastelle as these all tend to emit calls with a start frequency
below 63.52 kHz, so it is worth experimenting with this option to see what gives the clearest picture for the call
sequence you are looking at.
9
Floor (dB)
The floor setting acts like a threshold setting the minimum dB level shown on the spectrogram display. It is useful
for minimising the amount of background noise that is displayed and can give a “cleaner” look to the spectrogram.
This screenshot shows the
default setting of -72 dB.
This recording contains
background noise which
shows up quite strongly
behind the bat sounds.
A setting of -80 dB makes the
quieter frequencies in the bat
calls show up more strongly
but also increases the amount
of background noise displayed
which obscures the bat calls
even more.
A setting of -60 dB reduces
the amount of background
noise visible so that the bat
calls stand out more clearly.
The call structure is now
more easily discernible and
you can say with more
confidence that these calls
have the FM sweeps and QCF
components characteristic of
pipistrelle calls.
As you lower the floor setting the quieter frequencies in the calls will disappear, so you need to take care not to set
this so low that you are losing important information about the calls.
10
Dynamic range (dB)
This sets the dB span and affects the contrast of the display. A low value of 32 (below) gives a high contrast display
where the calls will stand out more clearly from the background noise but you may lose some information from the
quieter parts of the calls. A high value call gives a lower contrast display that retains more information on quieter
sounds but the calls may not stand out so clearly from the background noise. The default value of 48 dB is usually a
good compromise but it is worth experimenting.
5. Measuring peak frequency
Click to the left and right of the call you wish to measure. This will insert selection cursors which can be dragged to
left or right until you have precisely enclosed the required call.
Tick the LTA (Long Time Average) box (circled) to average the power spectrum over the region of time between
the selection cursors.
11
The power spectrum (lower section of the display) plots the amplitude in decibels of frequencies contained between
the selection cursors. Click on the power spectrum display to insert a cursor that can be dragged left and right
across the power spectrum.
Drag the cursor until it crosses just past the highest peak in the power spectrum. The peak frequency information is
displayed in the lower of the two rows of values (followed by “pk”) at the top right hand corner of power spectrum
(circled above).
Move the measurement cursor to left and right on either side of the peak until the “pk” values displayed remain
constant. If you move it too far along it will eventually display a reading for the next lower peak it crosses, so take
care not to move the cursor too far from the highest peak.
The upper set of values give a reading for wherever the power spectrum cursor is currently positioned. As you move
the cursor left and right along the horizontal frequency scale in the power spectrum you will see the corresponding
frequency cursor move up and down the vertical frequency scale in the spectrogram.
As TF32 displays the frequencies outputted by the bat detector, the frequency readings need to be multiplied by 10
(or whatever time expansion factor the detector was set to) in order to convert to the frequencies in the original
bat calls. In the above example the peak frequency of the selected call is 5.347 kHz, or 53.47 kHz when converted.
If you were using a time expansion detector set to a factor other than 10 (e.g. 32) then the frequency readings in
TF32 need to multiplied by that factor.
12
6. Measuring start and end frequency
Untick the LTA box so that the frequency cursor moves to the middle of the selection cursors.
To measure the start frequency, drag the power spectrum cursor until the frequency cursor is positioned at the
highest frequency visible in the call.
Read off the upper of the two frequency values to the upper right hand corner of the power spectrum. In this
example the start frequency is 78.38 kHz (after converting from the bat detector output frequencies to the bat call
frequencies by multiplying by ten).
To measure the end frequency, drag the power spectrum cursor until the
frequency cursor is positioned at the lowest frequency visible in the call,
as shown on the right.
Again read off the upper of the two frequency values to the upper right
hand corner of the power spectrum.
13
7. Measuring interpulse interval (IPI)
To measure the interpulse interval (IPI) between two calls, drag the left selection cursor to the start of one call
and the right selection cursor to the start of the next call. Use the oscillogram rather than the spectrogram to
determine where each call starts, as time readings from the spectrogram will vary depending on the spectrogram
settings. The time between the calls is displayed in the upper right hand corner. In this example the IPI is 95.782
milliseconds. (NB if examining recordings from a time expansion detector you will need to divide this reading by 10
in order to get the correct value).
To take the average IPI between several calls, drag the left cursor to the start of the first call and the right cursor
to the start of the last call. To calculate the average for (n) calls, read off the time value in the top right hand
corner of the screen and divide it by the number of intervals (n-1) so for 5 calls there are 4 intervals. (For the
example below 315.760 ms  4 intervals = 79ms).
14
8. Measuring call duration
To measure the call duration, move the left selection cursor to the start of the call and the right selection cursor to
the end of the call. Again use the oscillogram rather than the spectrogram to determine where each call starts and
ends, as time readings from the spectrogram will vary depending on the spectrogram settings.
It can be difficult to decide where the start and end of the call is. This is always a subjective judgement to a certain
extent when using this method. Try to be consistent and use a similar point on the oscillogram as where you define
the ‘start’ and ‘end’ to be each time. In the example below the call has been taken to be the main burst of sound
that looks like a distinct ‘blob’ on the oscillogram. Based on the evidence of the spectrogram, the quieter burst of
sound following the initial burst was assumed to be distortion or an echo of the call.
In this example the call duration was measured as 6.440 milliseconds.
Thanks to David Lee and Paul H. Milenkovic for providing some of the information included in this booklet.
15
Bat Conservation Trust, Quadrant House, 250 Kennington
Lane, London SE11 5RD www.bats.org.uk