// GPA Test image 1 by mjh v2.0
// Creates a single lattice fringe image with an interface

number ncols = 512
number nrows = ncols
number ocol = ncols/2
number orow = nrows/2

image pic := realimage("GPA test 1", 4, ncols, ncols)

SetScale(pic,0.02,0.02)
SetUnitString(pic,"nm")

number gx1 = 1/10
number gy1 = gx1
number gx2 = gx1 - 1/60
number gy2 = gy1


pic = tert(icol<ocol, cos(2*Pi()*(gx1*(icol-ocol)+gy1*(orow-irow))), cos(2*Pi()*(gx2*(icol-ocol)+gy2*(orow-irow))))

pic = pic + GaussianRandom()*0.4

showimage(pic)