You are on page 1of 2

Marker search with image correlation

See also Chapter 6.8 Marker search with image grabbing (in Operator Manual).

Briefly in 5 steps.

1. Create a JOY marker


2. Grab image reference marker
3. Place in the ini file the line export PG_USER_JOYMARKER=….
4. Create script for JOY marker search
5. Select in cjob marker search for JOY markers

Create a JOY marker


A marker named JOY is reserved in the machine and can be used for manual or scripting mode.
To use a JOY marker, this marker has to be created, the size and shape is not imported. Example
> pg marker create rectangle positive 20,20 JOY

Grab image reference marker


Before grabbing the reference marker make sure that the marker is looking perfect and well centred.

If it is a cross, like on the marker plate of the holder, than the maker can be auto centred by cross
search. Example

> pg marker create cross positive 100,100 4,4 crossp4 # total length 100um, line with 4um

extra setting can be used for finding the cross :

> pg marker set crossp4 israd 100


> pg marker set crossp4 msytol 40
> pg marker set crossp4 msxtol 40
> pg marker set crossp4 nelgm 1
> pg marker set crossp4 edsx 1
> pg marker set crossp4 edsy 1
> pg marker set crossp4 fsstp 4 or 2
> pg marker set crossp4 csfstp 4 or 2
To show all settings : pg info marker ident cross4p --test=par

Find the centre of the cross


> mvm 0,0 /rel crossp4

Grab the images at the same resolution as the pattern !


> pg adjust resolution …nm or > pg select pattern <pattern Name>
> pg image grab 0,0 100,100 512,512 cross1 # scane size is 100* 512 / resolution [nm]

Bas Ketelaars Raith B.V. D20160808


View grab images
Go to the images directory in our environment, and check the image with program ImageJ, command
ij
> ij
In menu goto : File -> Import -> Raw and select the image
Import settings : Image type : 16-bit Unsigned, With : 512 pixels, Height : 512 pixels, Offset to first
image : 0 bytes, Number of images : 1, Gap between images 0 bytes, Checked (only): Little-endian
byte order.

ini file
Create at your environment in the directory “jobs” a ini file (empty asci –file ) with the name
identical with filename.job but with extension filename.ini .
Add the following line
export PG_USER_JOYMARKER=$PG_SCRIPTS”\imgcorr”

Create script for JOY marker search


Create at your environment in directory “scripts” a file with the name imgcorr (empty asci-file) .

Add the following lines:

#! /bin/bash
. script_init_template

position1=`mpg tab` # get current position


pg image grab 0,0 100,100 512,512 cross1 # grab images

# Job will not stop by error message


trap '' ERR

# good contrast then (check in for hand )


pg move pos `pg image coorrelate cross1 crossC` # do correlation and move stage

# if bad contrast then


position2=`pg image correlate cross1 crossC | head -2 | tail -1`
pg move pos `pg update ${position2} "+" ${position1}` # move stage

echo "Marker Calc: " ${position1} "Found: " `mpg tab`

script_init_template # Switch back ON, stop by error message

Make the file imgcorr executable with


> chmod +x imgcorr

Select in cjob marker search for JOY markers


Goto cjob and change ‘normal’marker search to JOY markers.
Save and export

Bas Ketelaars Raith B.V. D20160808

You might also like