Пример #1
0
def readScanAttributes():
    selectedScan = scans.get()
    scan = read.scan(selectedScan)
    attributes = read.scanHeader(scan)
    message = "SCAN " + str(selectedScan) + ":\n"
    for k in attributes.keys():
        message = message + str(k) + ' = ' + str(attributes[k]) + '\n'
    attributesMessage.configure(text=message)
Пример #2
0
def readValidity():
    scanNum = scans.get()
    coordNum = coordinates.get()
    scan = read.scan(scanNum)
    coord = read.coordinate(scan, coordNum)
    attrs = read.coordinateHeader(coord)
    scan.close()
    if attrs['Valid'] == 1:
        return True
    else:
        return False
Пример #3
0
def readCoordinateAttributes():
    scanNum = scans.get()
    coordNum = coordinates.get()
    scan = read.scan(scanNum)
    coord = read.coordinate(scan, coordNum)
    attrs = read.coordinateHeader(coord)
    scan.close()
    message = "Scan " + str(scanNum) + " at COORDINATE " + str(
        coordNum) + ":\n"
    for k in attrs.keys():
        message = message + str(k) + ' = ' + str(attrs[k]) + '\n'
    attributesMessage.configure(text=message)
Пример #4
0
def readChannelAttributes():
    selectedScan = scans.get()
    selectedCoordinate = coordinates.get()
    selectedChannel = convertChannelNameToIndex(channels.get())
    scan = read.scan(selectedScan)
    coord = read.coordinate(scan, selectedCoordinate)
    channel = read.channel(coord, selectedChannel)
    attributes = read.channelHeader(channel)
    message = "Scan " + str(selectedScan) + " at coord " + str(
        selectedCoordinate) + " CHANNEL " + selectedChannel + ":\n"
    for k in attributes.keys():
        message = message + str(k) + ' = ' + str(attributes[k]) + '\n'
    attributesMessage.configure(text=message)
Пример #5
0
def rawGraph():
    scanNum = scans.get()
    coordNum = coordinates.get()
    channelNum = convertChannelNameToIndex(channels.get())
    scan = read.scan(scanNum)
    coord = read.coordinate(scan, coordNum)
    channel = read.channel(coord, channelNum)
    attrs = read.channelHeader(channel)
    samplePeriodNano = int(attrs['SamplePeriod'])
    voltage = read.channelData(channel) * (
        (read.channelHeader(channel)['InputRange']) / 65536)
    scan.close()
    time = range(0, samplePeriodNano * (len(voltage)), samplePeriodNano)
    newPlotWindow(
        time, voltage, "Time (ns)", "Voltage (V)", "Raw graph for scan " +
        scanNum + " coord " + coordNum + " channel " + channelNum)