Answers.Body: <p>Sperm whales' IPI have been measured since a long time from manual methods and then automated methods. Different approaches can be used:</p>
  <ol>
  <li>Spectogram - waveform display</li>
  <li>Cepstral analysis</li>
  <li>Autocorrelation analysis</li>
  </ol>
  <p>The manual method (really time consuming, although found to be precise and accurate) uses primarily the recognition of the pulses using a spectrogram and/or a waveform display of the sound. An example is shown in the image below.</p>
  <p><a href="https://i.sstatic.net/rThkk.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/rThkk.png" alt="spectrogram-waveform of a sperm whale's click" /></a></p>
  <p>Here is it possible to see two different clicks from the same recording. Practically, clicks and so pulses, can be quite good and recognisable or not. These are still good to have a measurement. Now, the distance can be measures as the difference in time (ms) from one pulse to the subsequent one. The right distance is a matter of experience, errors and lots of measures to then obtain a good mean. To avoid errors, using both spectogram and waveform is suggested, as it may be clearer in one then the other, as in the image. A correct distance should be peak-to peak (from the pulses) but it's not always the right choice. The thing is that, it should be measure as it's measure a wavelength: from peak to peak, from trough to trough, in order to have always the same and right distance between two pulses.</p>
  <p>Then, there are other methods, such as the cepstral analysis, that require the construction of a cepstrum. This is another way of showing the sound and it's good for IPI measures as it focuses on delayed version of a signal. In this way, the subsequent pulses of a click are the echos (with a delayed time of arrival) of the first pulse. For every single click they show the subsequent pulses with a certain time distance in the x-axis. In the below image, only an average cepstrum is shown as the paper was focused on the minimum n° of subsequent clicks needed to have a reliable estimation (<a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.463.1996&amp;rep=rep1&amp;type=pdf" rel="nofollow noreferrer">Teloni et al., 2007</a>). Cepstral analysis requires at least a semi-automated approach, as it can be even more time-consuming than spectrogram method.</p>
  <p><a href="https://i.sstatic.net/M4Ztb.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/M4Ztb.png" alt="Average cepstrum same whale same dive different n° clicks" /></a></p>
  <p>Finally, the autocorrelation method can be used. This approach uses repetitive correlations of the click waveform with a replica that is time delayed. Peaks in the function occur when the shift in time between the replica and the original is equal to an integer multiple of the IPI. Thus, the delay between peaks of the autocorrelation of a click corresponds to the IPI (image below from <a href="http://dx.doi.org/10.1121/1.1689346" rel="nofollow noreferrer">Rhinelander and Dawson (2004)</a>). <a href="https://i.sstatic.net/JzyTw.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/JzyTw.png" alt="autocorrelation of a click" /></a></p>
  <p>These methods are the basic approaches that can be used. At the moment, mostly autocorrelation and cepstral analysis (together or individually) are used with semi-automated or automated methods. As shown before, they require a good amount of clicks to be averaged and obtain the IPI. Thus, for multiple recordings it can be highly time-consuming.
  Many MATLAB scripts have been used from researchers. More accessible is PAMGuard, which offers the IPI plugin (<a href="https://doi.org/10.1121/1.4816564" rel="nofollow noreferrer">Miller et al., 2013</a>). It is based on cepstral analysis and it is mostly automated.
  A really good software, completely automated, is CABLE (<a href="https://doi.org/10.1121/1.5082291" rel="nofollow noreferrer">Beslin et al., 2018</a>. It is really useful and gives directly the IPI estimation of multiple whales if present in the recording. Although, it requires high quality recordings and clicks, because it is very selective on good clicks that can be used for IPI estimation (usually a few clicks pass the filters).</p>
  <p>Full references and supplementary material:</p>
  <p>Marcolin, C. (2022). Sviluppo di un protocollo acustico a bordo di navi da whale watching per stimare la taglia di Capodogli a largo di São Miguel, Azzorre. <a href="https://unire.unige.it/bitstream/handle/123456789/4252/tesi19302397.pdf?sequence=1" rel="nofollow noreferrer">https://unire.unige.it/bitstream/handle/123456789/4252/tesi19302397.pdf?sequence=1</a></p>
  <p>Miller, B. S., Growcott, A., Slooten, E., and Dawson, S. M. (2013). Acoustically derived growth rates of sperm whales (Physeter macrocephalus) in Kaikoura, New Zealand. J. Acoust. Soc. Am., 134, 2438–45. <a href="https://doi.org/10.1121/1.48165644" rel="nofollow noreferrer">https://doi.org/10.1121/1.48165644</a>.</p>
  <p>Møhl, B., Wahlberg, M., Madsen, P. T., Miller, L. A., &amp; Surlykke, A. (2000). Sperm whale clicks: Directionality and source level revisited. The journal of the Acoustical Society of America, 107(1), 638-648. <a href="https://doi.org/10.1121/1.428329" rel="nofollow noreferrer">https://doi.org/10.1121/1.428329</a></p>
  <p>Møhl, B., Wahlberg, M., Madsen, P. T., Heerfordt, A., and Lund, A. (2003). “The monopulsed nature of sperm whale clicks.” J. Acoust. Soc. Am. 114(2), 1143–1154. <a href="https://doi.org/10.1121/1.1586258" rel="nofollow noreferrer">https://doi.org/10.1121/1.1586258</a></p>
  <p>Rhinelander, M. Q., &amp; Dawson, S. M. (2004). Measuring sperm whales from their clicks: Stability of interpulse intervals and validation that they indicate whale length. The Journal of the Acoustical Society of America, 115(4), 1826-1831. <a href="http://dx.doi.org/10.1121/1.1689346" rel="nofollow noreferrer">http://dx.doi.org/10.1121/1.1689346</a></p>
  <p>Teloni, V., Zimmer, W. M., Wahlberg, M., &amp; Madsen, P. T. (2007). Consistent acoustic size estimation of sperm whales using clicks recorded from unknown aspects. J. Cetacean Res. Manage, 9(2), 127-136. <a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.463.1996&amp;rep=rep1&amp;type=pdf" rel="nofollow noreferrer">http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.463.1996&amp;rep=rep1&amp;type=pdf</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-05T22:22:02.240Z
Answers.LastActivityDate: 2022-07-06T18:37:46.030Z
Answers.LastEditDate: 2022-07-06T18:37:46.030Z
Answers.UserDisplayName: Cristina Marcolin
Answers.Body: <p>To add to @CristinaMarcolin's answer, note that the following paper ...</p>
  <blockquote>
  <p>Bøttcher, A., Gero, S., Beedholm, K., Whitehead, H. and Madsen, P.T.,
  2018. Variability of the inter-pulse interval in sperm whale clicks with implications for size estimation and individual identification.
  The Journal of the Acoustical Society of America, 144(1), pp.365-374.
  doi: <a href="https://doi.org/10.1121/1.5047657" rel="noreferrer">https://doi.org/10.1121/1.5047657</a></p>
  </blockquote>
  <p>... used all 3 analysis methods you listed for automated sperm whale IPI measurement (<strong>envelope</strong>, <strong>cepstrum</strong>, and <strong>cross-correlation</strong>), tested and compared these, and found that the envelope approach resulted in the amount of least dispersion.</p>
  <p>(Side note: paper is freely available <a href="https://marinebioacoustics.files.wordpress.com/2018/07/bottcher_etal_2018.pdf" rel="noreferrer">here</a>).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-06T14:50:59.840Z
Answers.Text: Thank you for adding this useful paper, I didn't think about it
Answers.UserDisplayName: Cristina Marcolin
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-06T08:06:44.163Z
Answers.LastActivityDate: 2022-07-06T09:27:24.883Z
Answers.LastEditDate: 2022-07-06T09:27:24.883Z
Answers.UserDisplayName: Chloe
Body: <p>It's pretty easy to find the definition of a sperm whale's IPI (interpulse interval) and the methods that can be used to do it. Papers usually show some spectrograms with different pulses (<a href="https://doi.org/10.1121/1.428329" rel="noreferrer">Møhl et al., 2001</a>, <a href="https://doi.org/10.1121/1.1586258" rel="noreferrer">Møhl et al., 2003</a>, <a href="https://doi.org/10.1121/1.1689346" rel="noreferrer">Rhinelander and Dawson, 2004</a>). But then the method itself is not well explained, thus it's almost impossible to learn it unless someone gives advice.
  So, how do you measure sperm whales' IPI in a practical way?</p>
  
Tags: <recording><analysis><measurement>
Title: How to measure sperm whale's IPI?
ThreadText: # How to measure sperm whale's IPI?
  
  (Asked by: username_0 on 2022-07-05)
  
  It's pretty easy to find the definition of a sperm whale's IPI (interpulse interval) and the methods that can be used to do it. Papers usually show some spectrograms with different pulses ([Møhl et al., 2001](https://doi.org/10.1121/1.428329), [Møhl et al., 2003](https://doi.org/10.1121/1.1586258), [Rhinelander and Dawson, 2004](https://doi.org/10.1121/1.1689346)). But then the method itself is not well explained, thus it's almost impossible to learn it unless someone gives advice.
  So, how do you measure sperm whales' IPI in a practical way?
  
  **Tags:** recording, analysis, measurement
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2022-07-05. Score: 12
  
  Sperm whales' IPI have been measured since a long time from manual methods and then automated methods. Different approaches can be used:
  
  1. Spectogram - waveform display
  2. Cepstral analysis
  3. Autocorrelation analysis
  
  The manual method (really time consuming, although found to be precise and accurate) uses primarily the recognition of the pulses using a spectrogram and/or a waveform display of the sound. An example is shown in the image below.
  
  [![spectrogram-waveform of a sperm whale's click](https://i.sstatic.net/rThkk.png)](https://i.sstatic.net/rThkk.png)
  
  Here is it possible to see two different clicks from the same recording. Practically, clicks and so pulses, can be quite good and recognisable or not. These are still good to have a measurement. Now, the distance can be measures as the difference in time (ms) from one pulse to the subsequent one. The right distance is a matter of experience, errors and lots of measures to then obtain a good mean. To avoid errors, using both spectogram and waveform is suggested, as it may be clearer in one then the other, as in the image. A correct distance should be peak-to peak (from the pulses) but it's not always the right choice. The thing is that, it should be measure as it's measure a wavelength: from peak to peak, from trough to trough, in order to have always the same and right distance between two pulses.
  
  Then, there are other methods, such as the cepstral analysis, that require the construction of a cepstrum. This is another way of showing the sound and it's good for IPI measures as it focuses on delayed version of a signal. In this way, the subsequent pulses of a click are the echos (with a delayed time of arrival) of the first pulse. For every single click they show the subsequent pulses with a certain time distance in the x-axis. In the below image, only an average cepstrum is shown as the paper was focused on the minimum n° of subsequent clicks needed to have a reliable estimation ([Teloni et al., 2007](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.463.1996&rep=rep1&type=pdf)). Cepstral analysis requires at least a semi-automated approach, as it can be even more time-consuming than spectrogram method.
  
  [![Average cepstrum same whale same dive different n° clicks](https://i.sstatic.net/M4Ztb.png)](https://i.sstatic.net/M4Ztb.png)
  
  Finally, the autocorrelation method can be used. This approach uses repetitive correlations of the click waveform with a replica that is time delayed. Peaks in the function occur when the shift in time between the replica and the original is equal to an integer multiple of the IPI. Thus, the delay between peaks of the autocorrelation of a click corresponds to the IPI (image below from [Rhinelander and Dawson (2004)](http://dx.doi.org/10.1121/1.1689346)). [![autocorrelation of a click](https://i.sstatic.net/JzyTw.png)](https://i.sstatic.net/JzyTw.png)
  
  These methods are the basic approaches that can be used. At the moment, mostly autocorrelation and cepstral analysis (together or individually) are used with semi-automated or automated methods. As shown before, they require a good amount of clicks to be averaged and obtain the IPI. Thus, for multiple recordings it can be highly time-consuming.
  Many MATLAB scripts have been used from researchers. More accessible is PAMGuard, which offers the IPI plugin ([Miller et al., 2013](https://doi.org/10.1121/1.4816564)). It is based on cepstral analysis and it is mostly automated.
  A really good software, completely automated, is CABLE ([Beslin et al., 2018](https://doi.org/10.1121/1.5082291). It is really useful and gives directly the IPI estimation of multiple whales if present in the recording. Although, it requires high quality recordings and clicks, because it is very selective on good clicks that can be used for IPI estimation (usually a few clicks pass the filters).
  
  Full references and supplementary material:
  
  Marcolin, C. (2022). Sviluppo di un protocollo acustico a bordo di navi da whale watching per stimare la taglia di Capodogli a largo di São Miguel, Azzorre. <https://unire.unige.it/bitstream/handle/123456789/4252/tesi19302397.pdf?sequence=1>
  
  Miller, B. S., Growcott, A., Slooten, E., and Dawson, S. M. (2013). Acoustically derived growth rates of sperm whales (Physeter macrocephalus) in Kaikoura, New Zealand. J. Acoust. Soc. Am., 134, 2438–45. <https://doi.org/10.1121/1.48165644>.
  
  Møhl, B., Wahlberg, M., Madsen, P. T., Miller, L. A., & Surlykke, A. (2000). Sperm whale clicks: Directionality and source level revisited. The journal of the Acoustical Society of America, 107(1), 638-648. <https://doi.org/10.1121/1.428329>
  
  Møhl, B., Wahlberg, M., Madsen, P. T., Heerfordt, A., and Lund, A. (2003). “The monopulsed nature of sperm whale clicks.” J. Acoust. Soc. Am. 114(2), 1143–1154. <https://doi.org/10.1121/1.1586258>
  
  Rhinelander, M. Q., & Dawson, S. M. (2004). Measuring sperm whales from their clicks: Stability of interpulse intervals and validation that they indicate whale length. The Journal of the Acoustical Society of America, 115(4), 1826-1831. <http://dx.doi.org/10.1121/1.1689346>
  
  Teloni, V., Zimmer, W. M., Wahlberg, M., & Madsen, P. T. (2007). Consistent acoustic size estimation of sperm whales using clicks recorded from unknown aspects. J. Cetacean Res. Manage, 9(2), 127-136. <http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.463.1996&rep=rep1&type=pdf>
  
  
  ---
  
  ### Answer by username_1 on 2022-07-06. Score: 8
  
  To add to @CristinaMarcolin's answer, note that the following paper ...
  
  > Bøttcher, A., Gero, S., Beedholm, K., Whitehead, H. and Madsen, P.T.,
  > 2018. Variability of the inter-pulse interval in sperm whale clicks with implications for size estimation and individual identification.
  > The Journal of the Acoustical Society of America, 144(1), pp.365-374.
  > doi: <https://doi.org/10.1121/1.5047657>
  
  ... used all 3 analysis methods you listed for automated sperm whale IPI measurement (**envelope**, **cepstrum**, and **cross-correlation**), tested and compared these, and found that the envelope approach resulted in the amount of least dispersion.
  
  (Side note: paper is freely available [here](https://marinebioacoustics.files.wordpress.com/2018/07/bottcher_etal_2018.pdf)).
  
  > **Comments:**
  > **username_0**: Thank you for adding this useful paper, I didn't think about it  
  
  ---
  
  