Patent ID: 6842245

Claim:
A pattern test device comprising: an imaging section for imaging a first mask pattern in a mask area to generate test pattern data and for imaging a second mask pattern in the mask area to generate further test pattern data; a reference data generator for generating reference pattern data corresponding to said test pattern data based on design data from which said first mask pattern is generated, said reference pattern data generator setting a first sub-area and a second sub-area in said mask area based on said test pattern data and said further test pattern data; a threshold selecting section for selecting a first threshold or a second threshold for a test location in said mask area, depending on said test location residing in said first sub-area or said second sub-area; a comparator for comparing said test pattern data against said reference pattern data to generate difference data therebetween; and a judgment section for judging presence or absence of a defect at said test location by comparing said difference data against said first or second threshold selected by said threshold selecting section.