I tried to find online resources on how the click train function of the click detector (the in-built click train detector), in PAMGuard, works. Unfortunately, I didn't find anything useful. I also tried myself with some recordings of sperm whales, but I wasn't able to understand how it works. This tool was not part of my project but was something I wanted to play with, for my knowledge and future use. Does anyone know of some material I can learn by?

  • 2
    $\begingroup$ Hi Cristina, are you using the click train detector module or the in-built click train detector in the Click Detector module? Also, would be helpful to add what species you are trying to use it with and an example screenshot of your data? I can then answer your question more fully. $\endgroup$
    – user213
    Jul 11, 2022 at 8:36
  • 1
    $\begingroup$ Hi Jamie. I tried the in-built function with sperm whale's recordings of echolocation clicks. It was for "fun", because not part of my project. I wanted to learn how to use it for future studies. I am not sure what kind of screenshot I can publish - one with the bearing time display? $\endgroup$ Jul 12, 2022 at 15:53
  • 1
    $\begingroup$ Hi Cristina. Some more info like the array you are using (stereo towed array, SoundTrap, something else?) and a screenshot of the click detector to get a feel of the data would be helpful. i can then provide a mini tutorial. $\endgroup$
    – user213
    Jul 13, 2022 at 10:51

2 Answers 2


Here’s a quick tutorial on how to get started with the PAMGuard click train detector. The click train detector can work in real time and viewer mode; here we’ll use it in in viewer mode assuming that you have already run clicks through a click detector. Note that comprehensive help files are here.

Go to File-> Add Modules-> Detectors-> Click Train Detector. This will add the click train detection module. Next go to Settings-> Click Train Detection-> Detection Settings… to bring up the click train detector settings.

The settings are split into three sections, Detection, Pre classifier and Classification. The detection stage detects any repeating pattern of transients. The pre classifier stage allows for some very basic classification which can get rid of a large number of false positives. Any click trains which remain after the pre-classifier stage are saved to the database. The classification stage then classifies click trains to species and can be re-run independently of the detection stage (a lot faster).

First set up the Detection stage – use species defaults if they exist – otherwise it’s a game of trial and error. Check out the help files here for a description of each input parameter – I usually find that the MHT Kernal settings are not that important and it’s the X^2 Variables (the sliding bars) you need to mess around with to make the detector work well – the value of each parameter (e.g. ICI, amplitude, bearing) is essentially a weight which defines how important the parameter is in defining a click trains (the higher the value the less important). For example, a high value in ICI means that a click train does not need a particularly regular ICI and a low value in bearing would mean a click train must have a very regular change in bearing per unit time. Below are some settings I used to detect sperm whales.

Some detection settings

To check settings work I would set a very lax Pre-classifier and Classifier. Then go to Settings -> Click Train Detector -> Reanalyse clicks and run the detector on a relevent section of data.

Click trains will appear as different colours on the bearing time display in the click detector (if not, make sure you have selected click trains in the right click menu). You can use the display to explore whether the click train detector is working well - generally it will tend to fragment click trains, however, also make sure you check closely - many click trains tend to have echoes or may be more than one animal; this will make it look like the click train detector is not working well when in fact it's de-interleaving quite complex click trains.

enter image description here

Once you are happy with the detection stage it's time to set up the classifier. Multiple classifiers can be added and can be set up to classify species based on a bunch of metrics, such as the average spectrum of the click trains, ICI, bearing etc. It's a similar idea to the in-built click classifier in the click detector module. Again, a comprehensive description of the classification settings can be found here.

When ready, select Settings -> Click Train Detector -> Reanalyse clicks and select All data in the drop down menu to process the entire dataset - this can take a while as the click train algorithm is fairly processor heavy.

Note that the click train detector is a work in progress. It can take quite a bit of messing around to optomise the settings and we hope to make this easier in the future. Also not that the module can use CPOD data as an input - we are working on FPOD data but it's low on the priority list of PAMGuard tasks currently.

  • 2
    $\begingroup$ Thank you Jamie for your well-comprehensive answer and link to the helper. I found it really useful to understand this function. I am sorry I did not answer before about data, but your answer is just perfect. It's the basic knowledge I needed to understand the detector. I think that my data are not just good for this analysis and it's okay, my fault. But thank you for answering anyway. $\endgroup$ Jul 17, 2022 at 8:57
  • 1
    $\begingroup$ No worries. I hope it will be helpful for other folk. Why is your data not suitable? $\endgroup$
    – user213
    Jul 17, 2022 at 18:04

I cannot talk about PAMGuard, maybe Doug will chime in.

Typically, I would consider a click belonging to a click train, if

  • the Inter-Click-Interval (ICI) does not change very much,
  • the pulse power estimate is peaking up and is either similar to previous clicks or is part of a scan
  • in case you see the intra-head reflection (IPI), then this IPI should be constant (apert from measurement errors)
  • you can identify a surface reflection trailing the direct arriving click and this delay should also vary not much, but may have a significant trend

This is rather easily done with Excel with a single sperm whale, but become a little bit more complex if you have multiple sperm whales

  • $\begingroup$ Thank you for your answer! I'm pretty okay doing it as a manual analysis, but I wanted to have something more automated. And in theory the PAMGuard function works for that, but I didn't understand how $\endgroup$ Jul 10, 2022 at 20:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.