Exemplo n.º 1
0
def overlay(line):
    '''
    overlay scan1 scan2
      display scan1 in the viewport of scan2. The 
      window limits are defined by scan2
    '''
    ifc.command( "overlay " + line)
Exemplo n.º 2
0
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)
Exemplo n.º 3
0
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)
Exemplo n.º 4
0
def setY(line):
    '''
    setY nameGqe index y-value

      index starts at 0
      this function sets the currentIndex
    '''
    ifc.command( "setY " + line)
Exemplo n.º 5
0
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)
Exemplo n.º 6
0
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)
Exemplo n.º 7
0
def y2my(line):
    '''
    inverts y (y -> -y) 

    Examples
    --------
    y2my s1
      creates s1_y2my

    y2my s1 s2

    '''
    ifc.command( "y2my " + line)
Exemplo n.º 8
0
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)
Exemplo n.º 9
0
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)
Exemplo n.º 10
0
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)
Exemplo n.º 11
0
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
Exemplo n.º 12
0
def createPDF(line):
    '''
    Create a pdf file
    '''
    ifc.command( "createPDF " + line)
Exemplo n.º 13
0
def setTitle(line):
    '''
    setTitle einTitel
    '''
    ifc.command( "setTitle " + line)
Exemplo n.º 14
0
def cls(line):
    '''
    cls - clear the screen
    '''
    ifc.command( "cls")
Exemplo n.º 15
0
def info(line):
    '''
    prints information about scans
    '''
    ifc.command( "info " + line)
Exemplo n.º 16
0
def moveStart(line):
    '''
    moveStart scan1 destination
      startes the move of scan1.motorNameList[0] to destination
    '''
    ifc.command( "moveStart " + line)
Exemplo n.º 17
0
def move(line):
    '''
    move scan1 destination
      moves the scan1.motorNameList[0] to destination
    '''
    ifc.command( "move " + line)
Exemplo n.º 18
0
def noop(line):
    '''
    noop 
      no operation (except testing)
    '''
    ifc.command( "noop " + line)
Exemplo n.º 19
0
def show(line):
    '''
    print the list of scans
    '''
    ifc.command( "show " + line)
Exemplo n.º 20
0
def read(line):
    '''
    print the list of scans
    '''
    ifc.command( "read " + line)
Exemplo n.º 21
0
def write(line):
    '''
    write a .fio file
    '''
    ifc.command( "write " + line)
Exemplo n.º 22
0
def setWsViewport(line):
    '''
    setWsViewport DINA4
    '''
    ifc.command( "setWsViewport " + line)
Exemplo n.º 23
0
def setComment(line):
    '''
    setComment aComment
    '''
    ifc.command( "setComment " + line)
Exemplo n.º 24
0
def setText(line):
    '''
    setText nameGqe nameText string SomeText x 0.1 y 0.9 hAlign left vAlign top color red 
    '''
    ifc.command( "setText " + line)