学习2:利用宏设置评价函数
REM ex30501
REM this program shows how to set default merit function
REM assume the lens is defined in ex30401
tp = 0 #type is RMS
data = 1 #spot radius
ref = 0 #centroid reference
method = 1 #gaussian quadrature
ring = 3
arm = 6
grid = 4
delornot = 0 #not delete vignetted rays
ax=1 #assume axial symmetry
lat = 1 #ignore lateral color
st = 1 #put the default merit function start at the beginning
ow = 1 #no xweight, overall weight = 1
DEFAULTMERIT tp,data,ref,method,ring,arm,grid,delornot,ax,lat,st,ow
PRINT
PRINT "The final merit function value is ", MFCN()