# Running a Hit-Ratio Based Mask-Margin Test

1. To access the mask test Margin settings:

   1. Click Setup in the mask test results content window.
   2. In the Mask Test Setup dialog box, select the Margin tab.
2. In the Margin Type field, select Auto.
3. Select Hit Ratio as the Auto Mask Margin Settings and enter the desired Auto Margin Hit Ratio. Typically this is 5.0E−5 (allows 1 violation in every 20000 samples).
4. Close the dialog box.
5. Choose Measure > Limit Tests > Measurement Limits....
6. In the Measurements Limit Test dialog box, click All Off (located in the top-right corner of the dialog box).
7. Along the dialog box's left side, click one of 16 available (tab label is Off) limit test definitions.
8. In the top of the panel, select Enable limit test on the following measurement as shown in the following figure.
9. If there is more than one Mask turned on, select the mask in the Measurement Type list. In the associated Measurements list, select Margin Uncertainty (Mask X), where "X" is the number of the mask.
10. Enter the remaining settings as shown in the following figure. Set the Lower Limit and Upper Limit to set the percentage range of margin uncertainty that you want to stop the mask margin testing. In this picture, ±3% is entered. When the uncertainty drops within this limit, the testing stops.

11. Close the dialog box.

12. Click Stop/Single on the menu bar to stop data acquisition.
13. Click Clear on the menu bar to clear the display.
14. Click Run on the menu bar to run the test.
15. When the limit test completes, in the Mask Test results panel you'll notice that a red dot is shown next to the +/− entry. This entry shows the uncertainty percentage that stopped the testing. Increasing the test limits will shorter the test times.
16. When the limit test completes, the Mask Test results panel includes a red dot next to the Margin Uncertainty entry as shown in the following figure. This entry shows the uncertainty percentage that stopped the testing. Increasing the test limits shortens the test times.