

// Script function: Create Tags


// 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 GlobalSinoImageA, GlobalSinoImageB
GetTwoImages("Select two images", GlobalSinoImageA, GlobalSinoImageB)

image EMgeneratedImage = abs(GlobalSinoImageA-GlobalSinoImageB)
ShowImage(EMgeneratedImage)

SetStringNote(EMgeneratedImage, "GlobalSino generated image", "")
SetStringNote(EMgeneratedImage, "Source info: image A: From", GetName(GlobalSinoImageA))
SetStringNote(EMgeneratedImage, "Source info: image B: From", GetName(GlobalSinoImageB))

string EMstring
GetStringNote(GlobalSinoImageA, "Microscope Info:Illumination Mode", EMstring)
SetStringNote(EMgeneratedImage, "Microscope Info:Illumination Mode", EMstring)

number EMvolt
GetNumberNote(GlobalSinoImageA, "Microscope Info:Voltage", EMvolt)
SetNumberNote(EMgeneratedImage, "Source info:image A: High Tension", EMvolt)

number EMmagnification
GetNumberNote(GlobalSinoImageB, "Microscope Info:Indicated Magnification", EMmagnification)
SetNumberNote(EMgeneratedImage, "Source info:image B: Indicated Magnification", EMmagnification) 
// Note: Words in "" are case-sensitive