// Script function: Randomly generate 1 or 2 in each pixel

// Unless named starting with GlobalSino, EM, My, Self, the function commands are defined 
//by Gatan DM, please see at link: http://www.globalsino.com/EM/page2597.html


Image GlobalSinoImage = IntegerImage("GlobalSino Image",4,0,25,25) // Declare a variable 'GlobalSinoImage' as a 4-byte unsigned integer image
GlobalSinoImage = Random() // Copy a random value [0,1) in each pixel
GlobalSinoImage = round (GlobalSinoImage)+1
ShowImage(GlobalSinoImage)