def addCSVQuotient(self, filename, name, color, fieldX, fieldA, fieldB, mode=DB): # get k such that kFieldA=fieldB data = read_csv.read_csv_bode(filename) signal1 = csvToSignal(data, fieldA, fieldX) signal2 = csvToSignal(data, fieldB, fieldX) if mode == DB: yvarFinal = [ signal2.values[i] - signal1.values[i] for i in range(len(signal1.values)) ] else: yvarFinal = [ signal2.values[i] / signal1.values[i] for i in range(len(signal1.values)) ] self.plotCount.append({ "signal": Senial.Senial(signal1.xvar, yvarFinal), "color": color, "name": name }) return self
def addCSVPlot(self, filename, field, name, color): data = read_csv.read_csv_bode(filename) signal = csvToSignal(data, field) #signal.mode = "csv" self.plotCount.append({"signal": signal, "color": color, "name": name}) return self
def readSignalCsv(csvfile, field): data = read_csv.read_csv_bode(csvfile) signal = csvToSignal(data, field) signal.mode = "csv" return signal