def overlay(line): ''' overlay scan1 scan2 display scan1 in the viewport of scan2. The window limits are defined by scan2 ''' ifc.command( "overlay " + line)
def setPixelImage(line): ''' setPixelImage nameGqe ix iy val ix, iy in image coordinated ix >= 0 and ix < width iy >= 0 and iy < height ''' ifc.command( "setPixelImage " + line)
def setPixelWorld(line): ''' setPixelWorld nameGqe x y val x, y in physical coordinated x >= xMin and x <= xMax y >= yMin and y <= yMax ''' ifc.command( "setPixelWorld " + line)
def setY(line): ''' setY nameGqe index y-value index starts at 0 this function sets the currentIndex ''' ifc.command( "setY " + line)
def derivative(line): ''' derivative <scan> [<scanNew>] calculates the derivative of a scan a la Spectra Example ------- derivative s1 creates s1_derivative ''' ifc.command( "derivative " + line)
def antiderivative(line): ''' antiderivative <scan> [<scanNew>] creates the antiderivative of a scan (Stammfunktion) a la Spectra Example ------- antiderivative s1 creates s1_antiderivative ''' ifc.command( "antiderivative " + line)
def y2my(line): ''' inverts y (y -> -y) Examples -------- y2my s1 creates s1_y2my y2my s1 s2 ''' ifc.command( "y2my " + line)
def create(line): ''' Create a scan Examples: create s1 uses these defaults: xMin = 0., xMax = 10., nPts = 101 create s1 0 1 11 create name s1 xMin 0. xMax 10. nPts 101 ''' ifc.command( "create " + line)
def delete(line): ''' Delete one or all scans Parameters ---------- None: delete all scans Name: string a list of scans to be deleted Example ------- delete s1 s2 deletes scans s1 and s2 delete deletes all scans ''' ifc.command( "delete " + line)
def display_pysp(line): ''' display one or more or all scans '_pysp' distinguishes this command from IPython/core/display.py Parameters ---------- None: display all scans Name: string a list of scans to be displayed Example ------- display_pysp s1 s2 display scans s1 and s2 display_pysp display all scans ''' ifc.command( "display " + line)
def _execCommand(hsh): ''' passes PySpectra commands to pysp.ipython.ifc.command() called from - toPyspLocal() List of commands: hsh = { 'command': ['cls', 'display']} Single commands hsh = { 'command': 'display'} ''' import PySpectra.ipython.ifc as ifc argout = "n.n." if type(hsh['command']) == list: for cmd in hsh['command']: ret = ifc.command(cmd) if ret != 'done': return "zmqIfc._execCommand: '%s' was answered by %s" % (cmd, ret) return "done" argout = ifc.command(hsh['command']) return argout
def createPDF(line): ''' Create a pdf file ''' ifc.command( "createPDF " + line)
def setTitle(line): ''' setTitle einTitel ''' ifc.command( "setTitle " + line)
def cls(line): ''' cls - clear the screen ''' ifc.command( "cls")
def info(line): ''' prints information about scans ''' ifc.command( "info " + line)
def moveStart(line): ''' moveStart scan1 destination startes the move of scan1.motorNameList[0] to destination ''' ifc.command( "moveStart " + line)
def move(line): ''' move scan1 destination moves the scan1.motorNameList[0] to destination ''' ifc.command( "move " + line)
def noop(line): ''' noop no operation (except testing) ''' ifc.command( "noop " + line)
def show(line): ''' print the list of scans ''' ifc.command( "show " + line)
def read(line): ''' print the list of scans ''' ifc.command( "read " + line)
def write(line): ''' write a .fio file ''' ifc.command( "write " + line)
def setWsViewport(line): ''' setWsViewport DINA4 ''' ifc.command( "setWsViewport " + line)
def setComment(line): ''' setComment aComment ''' ifc.command( "setComment " + line)
def setText(line): ''' setText nameGqe nameText string SomeText x 0.1 y 0.9 hAlign left vAlign top color red ''' ifc.command( "setText " + line)