예제 #1
0
def getRowForRunNumber(runNumber):

    runLog = dm.getRunLog()

    for row in runLog:
        if int(row[3]) == runNumber:
            return row
예제 #2
0
def getBatchNumber(runNumber=""):

    if runNumber != "":
        runLog = dm.getRunLog()
        for row in runLog:
            if int(row[3]) == runNumber:
                return int(row[5])

    else:
        return int(runInfo[5])
예제 #3
0
def getAllBatchNumbers():

    runLog = dm.getRunLog()
    batchNumbers = [int(runLog[0][5])]

    for row in runLog:
        if int(row[5]) not in batchNumbers:
            batchNumbers.append(int(row[5]))

    return batchNumbers
예제 #4
0
def getAvailableTemperatures():

    runLog = dm.getRunLog()
    temperatures = []

    for row in runLog:
        if row[10] not in temperatures:
            temperatures.append(row[10])

    return temperatures
예제 #5
0
def getAllBatchNumberForSensor(sensor):

    runLog = dm.getRunLog()
    batchNumbers = []

    for row in runLog:
        if sensor in row:
            batch = int(row[5])
            if batch not in batchNumbers:
                batchNumbers.append(batch)

    return batchNumbers
예제 #6
0
def getAvailableSensors():

    runLog = dm.getRunLog()

    availableSensors = []

    for row in runLog:
        for i in range(0, 8):
            if row[13 +
                   i * 5] not in availableSensors and len(row[13 + i * 5]) > 2:
                availableSensors.append(row[13 + i * 5])

    return availableSensors
예제 #7
0
def getRunsWithSensor(sensor=""):

    if sensor == "":
        return getAllRunNumbers()

    runLog = dm.getRunLog()

    runNumbers = []

    for row in runLog:
        if sensor in row:
            if int(row[3]) not in runNumbers:
                runNumbers.append(int(row[3]))

    return runNumbers
예제 #8
0
def getAllRunNumbers(batchNumber=0):

    runLog = dm.getRunLog()

    runNumbers = []

    for row in runLog:

        if int(row[5]) == batchNumber:
            runNumbers.append(int(row[3]))

        elif batchNumber == 0:
            runNumbers.append(int(row[3]))

    return runNumbers
예제 #9
0
def getAllChannelsForSensor(batch, sensor):

    runLog = dm.getRunLog()

    channels = []

    for row in runLog:
        if int(row[5]) == batch:

            for index in range(0, 7):

                if row[13 + index *
                       5] == sensor and "chan" + str(index) not in channels:
                    channels.append("chan" + str(index))

    return channels