ANY-maze Help > The ANY-maze reference > The Protocol page > The elements of a protocol > Behaviour > Freezing detection > Using the old, pre-version 7, freezing detection system

Using the old, pre-version 7, freezing detection system

Introduction

In version 7 of ANY-maze, the freezing detection system was updated and simplified. However, you can still use the pre-version 7 freezing detection system if you wish, by selecting the option to Use old method to detect freezing. Note, however, that once you start performing tests in an experiment, the freezing detection method cannot be changed.

Setting the freezing thresholds

The old (pre-version 7) freezing detection system is based on a freezing score.  This is a unit-less value whose exact calculation method is rather complex, but what's important is that the more (non-noise) movement there is in the image, the higher this score will be. So, to determine that the animal is freezing, ANY-maze requires that this score goes below a certain value, but the question is 'what value?'.

The answer to this is that you can specify the value yourself. By default, ANY-maze will use a value of 30 but you could reduce this if you want the animal to be really freezing, or you could raise it if you'd like to be a little less strict about what constitutes freezing.

In fact, you specify two threshold values; one which determines when the animal should be considered to be freezing (this is the one value described above), and another to determine when the animal should be considered as having stopped freezing. To understand this, consider the following sequence of freezing scores recorded at 10Hz:

120, 52, 40, 30, 28, 31, 27, 20, 18, 26, 28, 43, 60, 76

Assuming the freezing on threshold is 30, then after 0.3 seconds we see the start of a freezing episode, but 0.2 seconds later the freezing score goes to 31 before dropping back to less than 30 and staying there for a further half a second. So, is this two freezing episodes or just one? Well, if the freezing off threshold is also 30 then this would be scored as two episodes, but you would probably score it as one. To address this, you can set the off threshold to be slightly higher than the on threshold (40 is typically used); this means that once the freezing score goes below the on threshold, it must rise to above the off threshold before freezing will be considered to have ended. Thus by using two thresholds, ANY-maze introduces some hysteresis into the freezing detection, avoiding very rapid on/off switching which could otherwise occur.

Of course, you don't have to use this feature - if you set the on and off thresholds to the same value then no hysteresis will be used.

By the way, one of the options in the What to display while testing page of the protocol is the Freezing score; this isn't particularly useful, except that you can use it to get an idea of the kind of scores you might want to use as your freezing on and off thresholds. To do this, just set the score to be shown and then test some animals. As they're tested, you can see when you think they freeze and see what score ANY-maze is giving them; you can then use these scores as your thresholds to automatically detect freezing bouts.

Another place where ANY-maze displays the freezing score is in the Test data report, where you can see every score recorded throughout the test.

Like almost everything in the protocol, freezing thresholds can be changed at any time, including after a test has been performed. If you do this, then the new thresholds will be applied to any performed tests and their freezing results will be updated accordingly - you don't need to do anything to make this happen; it's automatic.

© Copyright 2003-2026 Stoelting Co. All rights reserved

ANY-maze help topic T0360