Class Scan

Here is the output of the PySpectra.Scan? command:

 
Init signature: PySpectra.Scan(name=None, **kwargs)
Docstring:     
    A Scan contains 2 arrays, x and y, and graphics attributes
      x and y can be numpy arrays or python lists

    PySpectra.Scan( name = 'name', filename = 'test.fio', x = 1, y = 2)
      read the data from a file

    PySpectra.Scan( name = 'name', x = xArr, y = yArr)
      pass the data as arrays

    PySpectra.Scan( name = 'name', x = xArr)
      y values assumed to be zero

    PySpectra.Scan( name = 'name', y = yArr)
      x values assumed to channel numbers

    PySpectra.Scan( name = 'name', xMin = 0., xMax = 10., nPts = 101)
    PySpectra.Scan( name = 'name')
      the same as PySpectra.Scan( name = 'name', xMin = 0., xMax = 10., nPts = 101)

    PySpectra.Scan( name = "textContainer", textOnly = True)
      no data, just Texts, fill with gqe.addText()

    The attributes of the constructor: 
        autoscaleX, 
        autoscaleY
                    default: True
        comment:    string
                    the global comment
        colSpan:    def.: 1
        doty:       bool
                    if True, the x-axis tick mark labels are dates, def. False
        fileName:   string
        flagMCA     data from MCA, don't use for movements
        isChecked   selected for display
        listWidgetItem used by pySpectraQuiClass to store the item of the GQE list
        motorNameList: 
                    set by 
                      /home/kracht/Misc/pySpectra/PySpectra/pyspDoor.py
                    used by
                      /home/kracht/Misc/pySpectra/PySpectra/pyspDoor.py
                      /home/kracht/Misc/tngGui/tngGui/lib/moveMotor.py
        showGridX, 
        showGridY:  True/False
        lineColor:  'red', 'green', 'blue', 'yellow', 'cyan', 'magenta', 'black', 'NONE'
        lineStyle:  'None', 'SOLID', 'DASHED', 'DOTTED', 'DASHDOTTED'
                    if None, the line is not plotted
        lineWidth:  float: 1.0, 1.2, 1.4, 1.6, 1.8, 2.0
                    line width, def.: 1
        overlay:    string 
                    the name of the scan occupying the target viewport 
        symbol:     string
                    o - circle, s - square, t - triangle, d - diamond, + - plus
        symbolColor: 
                    def.: NONE
        symbolSize: float
                    def.: 5
        textOnly:   True/False (def.)
                    if True, Scan has no data, just Texts, fill with addText()
        xLabel,
        yLabel:     string
                    the description of the x- or y-axis
        xLog, 
        yLog:       bool
                    def. False

    To add texts
      Scan.addText()

#!/usr/bin/env python3
#
# example code for displaying some data
#
import PySpectra, HasyUtils, time, random
import numpy as np

def main():
    MAX = 25
    pos = [float(n)/MAX for n in range( MAX)]
    rd = [random.random() for n in range( MAX)]

    PySpectra.Scan( name = 'random', x = pos, y = rd)

    PySpectra.display()

    print( "Press <space> to quit")
    while 1:
        PySpectra.processEvents()
        key = HasyUtils.inkey()
        if key == 32:
            return 
        time.sleep( 0.1)
    
    return 

if __name__ == "__main__":
    main()
    
File:           /usr/lib/python3/dist-packages/PySpectra/GQE.py
Type:           type