<p>Here are some general rules for setting the click length within PAMGuard:</p>
<ul>
<li>Min Click Separation is calculated by [hydrophone separation in meters / (speed of sound * sampling rate)]. If you only have a single hydrophone then 326 samples is a good place to start for most dolphins when sampling at 250 kSamples/s.</li>
<li>Max Click Length should be the SUM of the values for Pre Sample and Post Sample AND should be greater that your Min Click Separation. For example if you set Pre Sample to 400, Post Sample to 800, then Max Click Length is 1200. Setting this way will keep you from cutting off parts of your signal.</li>
<li>If you are capturing more than one dolphin click in your waveform then just reduce bin lengths uniformly across all fields following those general rules.</li>
<li>Also always R-click on the waveform display and have it should you a fixed bin length. Don't let it zoom in and out with every detection. That way you will have a better sense of signal length as you work through your data.</li>
</ul>
<p>Good Luck!</p>

CC BY-SA 4.0
2023-02-11T11:21:32.813Z
Thank you so much Jennifer. You said that for the min click separation If I only have a single hydrophone then 326 samples is a good place to start but when sampling at 250 kSamples/s. I use a 128 Khz , it is still good to use this value? Also, the definition of min click separation wouldn't be the distance in time from the end of a click until another appears?                                                                                           
Also, I don't understand why the max click length must be bigger than min click separation.
Anaa
CC BY-SA 4.0
2023-02-11T11:22:53.430Z
In max click length , the default vaules of pamguard (that appear in the new picture that I've uploaded) consider much longer the max click length than the sum of pre and post, I thought this was for leaving space for the real click.
Anaa
CC BY-SA 4.0
2023-02-10T01:32:15.383Z
2023-02-10T01:32:15.383Z
Jennifer McCullough - NOAA Fed
<p>Starting with 326 samples is always a good place to start because it will insure that you capture data. Do some test runs with your data. If your are capturing more than one click per detection bin then just reduce the samples. An important note is the PAMGuard default values are very general and may not work for the species you are trying to capture. These are my rules of thumb for processing data in PAMGuard over the last 10 years with varying datasets. If you need more assistance feel free to reach out directly once you have run test data.</p>

CC BY-SA 4.0
2023-02-13T19:29:42.373Z
2023-02-14T06:29:49.133Z
2023-02-14T06:29:49.133Z
Jennifer McCullough - NOAA Fed
<p>As far as I know, in the click detector parameters, the max click length takes into account the max real click length, pre samples and post samples.
In this way, max click length = pre samples + max real click length + post sample.</p>
<p>For a sample rate of 128 kHz, knowing from the literature that the maximum click length of a Tursiops Truncatus is 0.08 ms, this would be about 11 samples.</p>
<p>So if I put 11 samples for the max real click length plus 20 samples for pre and 20 samples for post, this would give a total of 50 samples for the maximum click length.</p>
<p>I've chosen to put 384 samples for the min click separation as the literature says that the minimum ICI for Tursiops Truncatus is 3 ms.</p>
<p>I ran a test with the following click length tab of the click detector:</p>
<p>Min click separation: 384 samples</p>
<p>Max click length: 50 samples</p>
<p>Pre-sample: 20 samples</p>
<p>Post-sample:  20 samples</p>
<p>After this configuration, the detector detects a lot of clicks, and that's maybe because it is dividing one click into several clicks because of choosing these parameters.</p>
<p>However, if I choose 256 samples (2 ms) as the maximum click length with a pre sample of 80 and a post sample of 80, the max real click length that it would consider would be 256-160 =96 samples. 96 samples would be around 0.7 ms which is almost 10 times larger than the maximum click length following literature...</p>
<p>Min click separation:384 samples</p>
<p>Max click length: 256 samples</p>
<p>Pre-sample: 80 samples</p>
<p>Post-sample: 80 samples</p>
<p>Also, in the click classifier I am setting a click length range of 0 to 0.8 because  if I follow literature ( setting 0 to 0.08 as the click length range of the click detector), the program doesn't detect anything.</p>
<p>Maybe Pamguard is not considering as click length the same as what the literature considers.</p>
<p>My recordings have a lot of noise so Tursiops could change the temporal characteristic of the click but I think 10 times larger is a lot.</p>
<p>I'd really appreciate if someone could help me.</p>
<p><a href="https://i.sstatic.net/uOWp8.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/uOWp8.png" alt="enter image description here" /></a></p>
<p>Thank you.</p>

<pamguard><detector><maximum-click-length>
Click length parameter of click detector module in PAMGuard
# Click length parameter of click detector module in PAMGuard

(Asked by: username_0 on 2023-02-07)

As far as I know, in the click detector parameters, the max click length takes into account the max real click length, pre samples and post samples.
In this way, max click length = pre samples + max real click length + post sample.

For a sample rate of 128 kHz, knowing from the literature that the maximum click length of a Tursiops Truncatus is 0.08 ms, this would be about 11 samples.

So if I put 11 samples for the max real click length plus 20 samples for pre and 20 samples for post, this would give a total of 50 samples for the maximum click length.

I've chosen to put 384 samples for the min click separation as the literature says that the minimum ICI for Tursiops Truncatus is 3 ms.

I ran a test with the following click length tab of the click detector:

Min click separation: 384 samples

Max click length: 50 samples

Pre-sample: 20 samples

Post-sample: 20 samples

After this configuration, the detector detects a lot of clicks, and that's maybe because it is dividing one click into several clicks because of choosing these parameters.

However, if I choose 256 samples (2 ms) as the maximum click length with a pre sample of 80 and a post sample of 80, the max real click length that it would consider would be 256-160 =96 samples. 96 samples would be around 0.7 ms which is almost 10 times larger than the maximum click length following literature...

Min click separation:384 samples

Max click length: 256 samples

Pre-sample: 80 samples

Post-sample: 80 samples

Also, in the click classifier I am setting a click length range of 0 to 0.8 because if I follow literature ( setting 0 to 0.08 as the click length range of the click detector), the program doesn't detect anything.

Maybe Pamguard is not considering as click length the same as what the literature considers.

My recordings have a lot of noise so Tursiops could change the temporal characteristic of the click but I think 10 times larger is a lot.

I'd really appreciate if someone could help me.

[![enter image description here](https://i.sstatic.net/uOWp8.png)](https://i.sstatic.net/uOWp8.png)

Thank you.

**Tags:** pamguard, detector, maximum-click-length


---

## 2 answers

### Answer by username_1 on 2023-02-10. Score: 5

Here are some general rules for setting the click length within PAMGuard:

* Min Click Separation is calculated by [hydrophone separation in meters / (speed of sound \* sampling rate)]. If you only have a single hydrophone then 326 samples is a good place to start for most dolphins when sampling at 250 kSamples/s.
* Max Click Length should be the SUM of the values for Pre Sample and Post Sample AND should be greater that your Min Click Separation. For example if you set Pre Sample to 400, Post Sample to 800, then Max Click Length is 1200. Setting this way will keep you from cutting off parts of your signal.
* If you are capturing more than one dolphin click in your waveform then just reduce bin lengths uniformly across all fields following those general rules.
* Also always R-click on the waveform display and have it should you a fixed bin length. Don't let it zoom in and out with every detection. That way you will have a better sense of signal length as you work through your data.

Good Luck!

> **Comments:**
> **username_0**: Thank you so much username_1. You said that for the min click separation If I only have a single hydrophone then 326 samples is a good place to start but when sampling at 250 kSamples/s. I use a 128 Khz , it is still good to use this value? Also, the definition of min click separation wouldn't be the distance in time from the end of a click until another appears?                                                                                            Also, I don't understand why the max click length must be bigger than min click separation.  
> **username_0**: In max click length , the default vaules of pamguard (that appear in the new picture that I've uploaded) consider much longer the max click length than the sum of pre and post, I thought this was for leaving space for the real click.  

---

### Answer by username_1 on 2023-02-13. Score: 1

Starting with 326 samples is always a good place to start because it will insure that you capture data. Do some test runs with your data. If your are capturing more than one click per detection bin then just reduce the samples. An important note is the PAMGuard default values are very general and may not work for the species you are trying to capture. These are my rules of thumb for processing data in PAMGuard over the last 10 years with varying datasets. If you need more assistance feel free to reach out directly once you have run test data.


---

