def getRowForRunNumber(runNumber): runLog = dm.getRunLog() for row in runLog: if int(row[3]) == runNumber: return row
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])
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
def getAvailableTemperatures(): runLog = dm.getRunLog() temperatures = [] for row in runLog: if row[10] not in temperatures: temperatures.append(row[10]) return temperatures
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
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
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
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
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