def run(self): """Runs the script""" # Convert the units to the desired ones for meas in zip(*[iter(self.measurements)] * 2): unit = (self.config["relaxation_time"].get("Relax", {}).get( "UnitConversion", None)) if unit: self.data = convert_to_EngUnits(self.data, meas[1], unit) # Plot all Measurements together for x, y in zip(*[iter(self.measurements)] * 2): self.Plots.append( holoplot("Relax", self.data, self.config["relaxation_time"], x, y)) # Add the individual plots self.allPlots = self.Plots[0] self.individual = self.Plots[0] for plot in self.Plots[1:]: self.allPlots *= plot self.individual += plot self.PlotDict["All"] = self.allPlots + self.individual # Reconfig the plots to be sure self.PlotDict["All"] = config_layout( self.PlotDict["All"], **self.config.get("Relaxation time", {}).get("Layout", {})) return self.PlotDict
def run(self): """Runs the script""" # Convert the units to the desired ones for meas in self.measurements: unit = self.config[self.analysisname].get(meas, {}).get("UnitConversion", None) if unit: self.data = convert_to_EngUnits(self.data, meas, unit) # Scale data first for plots_data in self.to_plot: try: self.data["All"][plots_data[1]] = self.data["All"][plots_data[1]] * float(plots_data[2]) * float(plots_data[3]) # Take the y axis and multipy area and scaling for meas in self.data['keys']: self.data[meas]["data"][plots_data[1]] = self.data[meas]["data"][plots_data[1]] * float(plots_data[2]) * float(plots_data[3]) # Take the y axis and multipy area and scaling except: pass # Plot all Measurements self.PlotDict["All"] = None for plots_data in self.to_plot: try: # If key is not there error happens if self.PlotDict["All"]: self.PlotDict["All"] += Simple2DPlot(self.data, self.config, plots_data[1], plots_data[0], self.analysisname) else: self.PlotDict["All"] = Simple2DPlot(self.data, self.config, plots_data[1], plots_data[0], self.analysisname) except: self.log.warning("Key '{}' not found in data. Skipping.".format(plots_data[1])) # Do CCE self.do_CCE() # Reconfig the plots to be sure self.PlotDict["All"] = config_layout(self.PlotDict["All"], **self.config.get(self.analysisname, {}).get("Layout", {})) return self.PlotDict
def __init__(self, data, configs): # Do the analysis of the gate diode files as the last one. if not all( analysis_type[0:6] == "IV_GCD" for analysis_type in data[list(data.keys())[0]]["header"][2] ): data = self.file_order(data) self.log = logging.getLogger(__name__) self.data = convert_to_df(data, abs=False, keys="all") self.config = configs self.df = [] self.basePlots = None self.basePlots_2 = None self.name = "IV_PQC" self.PlotDict = {"Name": "IV"} self.capincluded = False # Add different columns to the data frame; self.data["columns"].insert(3, "CapacityCopy") self.data["columns"].insert(4, "derivative") self.data["columns"].insert(5, "derivative2") self.data["columns"].insert(6, "1C2") self.data["columns"].insert(7, "derivative1C2") self.data["columns"].insert(8, "x") self.data["columns"].insert(9, "N") self.data["columns"].insert(10, "firstderivative_gate") self.capincluded = True self.measurements = self.data["columns"] self.xaxis = self.measurements[0] # Select your x axis, normally voltage. # Convert the units to the desired ones for meas in self.measurements: unit = self.config[self.name].get(meas, {}).get("UnitConversion", None) if unit: self.data = convert_to_EngUnits(self.data, meas, unit)
def __init__(self, data, configs): self.log = logging.getLogger(__name__) self.config = configs self.analysisName = "Stripscan" self.data = convert_to_df(data, abs=self.config.get("abs_value_only", False)) self.data = rename_columns( self.data, self.config.get(self.analysisName, {}).get("Measurement_aliases", {}), ) self.finalPlot = None self.df = [] self.measurements = self.data["columns"] self.donts = () if "Pad" in self.measurements: padidx = self.measurements.index("Pad") self.xrow = "Pad" else: self.log.error("No 'Pad' column found in data. Analysis cannot be done!") return self.PlotDict = {"Name": self.analysisName} self.donts = ["Pad", "Name"] # Convert the units to the desired ones for meas in self.measurements: unit = ( self.config[self.analysisName].get(meas, {}).get("UnitConversion", None) ) if unit: self.data = convert_to_EngUnits(self.data, meas, unit)
def run(self): """Runs the script""" for it, entry in enumerate(self.data["keys"]): print(entry) currents = self.data[entry]["data"]["Current"].values plateau = self.config[self.analysisname].get("plateau", 0.02) sum = 0 n = 0 voltages = self.data[entry]["data"]["Voltage"].values for i in range(len(currents)): #print(currents[len(currents)-1-i]) if 1 - (currents[len(currents) - 1 - i] / currents[len(currents) - 1 - i - 1]) > plateau: sum = 0 for j in range(i): sum += currents[len(currents) - 1 - j] n = i print(voltages[len(voltages) - 1 - i]) break ave = sum * 1. / n maximum = max(currents) diff = maximum - ave #s0 = diff/(1.6e-19*5.415e9*0.00505) #flute2 s0 = diff / (1.6e-19 * 5.415e9 * 0.00723) #flute4 print("max =", maximum) print("average =", ave) print("diff =", diff) print("s0 =", s0) myvalue = "%.3f" % s0 name = "_".join(entry.split("_")[2:5]) label = name + "_s0 = " + myvalue + " cm/s" label = label.replace("-", "_") self.data["keys"][it] = label self.data[label] = self.data.pop(entry) #print(self.data["HPK_VPX33234-001_PSS_HM-WW_1stflute2_GCD_27_5_2020_9h7m27s"]["data"]["Current"].values[-1]) #print(self.config[self.analysisname].get("plateau", 0.02)) # Convert the units to the desired ones for meas in self.measurements: unit = (self.config[self.analysisname].get(meas, {}).get( "UnitConversion", None)) if unit: self.data = convert_to_EngUnits(self.data, meas, unit) # Plot all Measurements self.basePlots = plot( self.data, self.config, self.measurements[0], self.analysisname, do_not_plot=[self.measurements[0]], ) self.PlotDict["All"] = self.basePlots #print(type(self.PlotDict["All"])) return self.PlotDict
def __init__(self, data, configs): self.log = logging.getLogger(__name__) self.config = configs self.analysisName = "IVCV_QTC" self.data = convert_to_df(data, abs=self.config.get("abs_value_only", False)) self.data = rename_columns( self.data, self.config[self.analysisName].get("Measurement_aliases", {}) ) self.basePlots = None self.PlotDict = { "Name": "IVCV" } # Name of analysis and cnavas for all plots generated during this analysis self.capincluded = False if ( "capacitance" in self.data[self.data["keys"][0]]["data"] or "CV" in self.data[self.data["keys"][0]]["data"] ): self.data["columns"].insert(3, "1C2") # because we are adding it later on self.capincluded = True self.measurements = self.data["columns"] self.xaxis = self.measurements[0] # The do not plot list, you can extend this list as you like self.donts = [ "Name", "voltage_1", "Idark", "Idiel", "Rpoly", "Cac", "Cint", "Rint", "Pad", "Istrip", ] if "voltage" in self.measurements: self.xaxis = "voltage" padidx = self.measurements.index("voltage") del self.measurements[padidx] else: self.log.error( "No 'voltage' entry found in data, cannot do IVC analysis. Maybe you have to set an alias for your measurement." ) # Convert the units to the desired ones for meas in self.measurements: unit = ( self.config[self.analysisName].get(meas, {}).get("UnitConversion", None) ) if unit: self.data = convert_to_EngUnits(self.data, meas, unit)
def run(self): """Runs the script""" # Convert the units to the desired ones for meas in self.measurements: unit = (self.config[self.analysisname].get(meas, {}).get( "UnitConversion", None)) if unit: self.data = convert_to_EngUnits(self.data, meas, unit) # Plot all Measurements self.basePlots = plot_all_measurements( self.data, self.config, self.measurements[0], self.analysisname, do_not_plot=[self.measurements[0]], ) self.PlotDict["All"] = self.basePlots # Plot all special Plots: # Histogram Plot self.Histogram = dospecialPlots( self.data, self.config, self.analysisname, "concatHistogram", self.measurements, **self.config[self.analysisname].get( "AuxOptions", {}).get("concatHistogram", {})) if self.Histogram: self.PlotDict["Histogram"] = self.Histogram self.PlotDict["All"] = self.PlotDict["All"] + self.Histogram # Whiskers Plot self.WhiskerPlots = dospecialPlots(self.data, self.config, self.analysisname, "BoxWhisker", self.measurements) if self.WhiskerPlots: self.PlotDict["Whiskers"] = self.WhiskerPlots self.PlotDict["All"] = self.PlotDict["All"] + self.WhiskerPlots # Violin Plot self.Violin = dospecialPlots(self.data, self.config, self.analysisname, "Violin", self.measurements) if self.Violin: self.PlotDict["Violin"] = self.Violin self.PlotDict["All"] = self.PlotDict["All"] + self.Violin # Reconfig the plots to be sure self.PlotDict["All"] = config_layout( self.PlotDict["All"], **self.config.get(self.analysisname, {}).get("Layout", {})) return self.PlotDict
def run(self): """Runs the script""" self.analysis() # Convert the units to the desired ones for meas in self.measurements: unit = (self.config[self.analysisname].get(meas, {}).get( "UnitConversion", None)) if unit: self.data = convert_to_EngUnits(self.data, meas, unit) # Plot all Measurements self.basePlots = plot( self.data, self.config, self.xaxis, self.analysisname, do_not_plot=[self.xaxis], ) self.PlotDict["All"] = self.basePlots # Plot all special Plots: # Histogram Plot self.Histogram = dospecialPlots( self.data, self.config, self.analysisname, "Histogram", self.measurements, **self.config[self.analysisname].get( "AuxOptions", {}).get("singleHistogram", {})) if self.Histogram: self.PlotDict["Histogram"] = self.Histogram self.PlotDict["All"] = self.PlotDict["All"] + self.Histogram # Whiskers Plot self.WhiskerPlots = dospecialPlots(self.data, self.config, self.analysisname, "BoxWhisker", self.measurements) if self.WhiskerPlots: self.PlotDict["Whiskers"] = self.WhiskerPlots self.PlotDict["All"] = self.PlotDict["All"] + self.WhiskerPlots return self.PlotDict
def __init__(self, data, configs): self.log = logging.getLogger(__name__) self.data = convert_to_df(data, abs=False, keys="all") self.config = configs self.df = [] self.basePlots = None self.name = "IV_PQC" self.PlotDict = {"Name": "IV"} self.measurements = self.data["columns"] self.xaxis = "voltage" self.donts = ["timestamp", "voltage"] #hv.renderer('bokeh') c2 = 1 / (self.data['ChuckLeakage-Default_HME_S-PQC_Flute_1-Diode_IV']['data']["current"] * self.data['ChuckLeakage-Default_HME_S-PQC_Flute_1-Diode_IV']['data']["current"]) # Convert the units to the desired ones for meas in self.measurements: unit = self.config[self.name].get(meas, {}).get("UnitConversion", None) if unit: self.data = convert_to_EngUnits(self.data, meas, unit)
def run(self): """Runs the script""" # Convert the units to the desired ones self.original_data = deepcopy(self.data) # Is needed for grading for meas in self.measurements: unit = (self.config[self.analysisName].get(meas, {}).get( "UnitConversion", None)) if unit: self.data = convert_to_EngUnits(self.data, meas, unit) # Add the 1/c^2 data to the dataframes for df in self.data["keys"]: if "CV" in self.data[df]["data"]: self.data[df]["data"].insert( 3, "1C2", 1 / self.data[df]["data"]["CV"].pow(2)) self.data[df]["units"].append("arb. units") self.data[df]["measurements"].append("1C2") elif "capacitance" in self.data[df]["data"]: self.data[df]["data"].insert( 3, "1C2", 1 / self.data[df]["data"]["capacitance"].pow(2)) self.data[df]["units"].append("arb. units") self.data[df]["measurements"].append("1C2") # Add the measurement to the list # Plot all Measurements self.basePlots = plot_all_measurements( self.data, self.config, self.xaxis, self.analysisName, do_not_plot=self.donts, ) # self.basePlots = applyPlotOptions(self.basePlots, {'Curve': {'color': "hv.Cycle('PiYG')"}}) self.PlotDict["BasePlots"] = self.basePlots self.PlotDict["All"] = self.basePlots # Add full depletion point to 1/c^2 curve if (self.config[self.analysisName].get("1C2", {}).get( "DoFullDepletionCalculation", False)): try: if (self.basePlots.Overlay. CV_CURVES_hyphen_minus_Full_depletion.children): c2plot = self.basePlots.Overlay.CV_CURVES_hyphen_minus_Full_depletion.opts( clone=True) else: c2plot = self.basePlots.Curve.CV_CURVES_hyphen_minus_Full_depletion.opts( clone=True) fdestimation = self.find_full_depletion( c2plot, self.data, self.config, PlotLabel="Full depletion estimation", ) self.PlotDict["All"] += fdestimation self.PlotDict["BasePlots"] += fdestimation except Exception as err: self.log.warning( "No full depletion calculation possible... Error: {}". format(err)) # Whiskers Plot self.WhiskerPlots = dospecialPlots(self.data, self.config, self.analysisName, "BoxWhisker", self.measurements) if self.WhiskerPlots: self.PlotDict["Whiskers"] = self.WhiskerPlots self.PlotDict["All"] = self.PlotDict["All"] + self.WhiskerPlots # Histogram Plot self.HistogramPlots = dospecialPlots(self.data, self.config, self.analysisName, "Histogram", self.measurements) if self.HistogramPlots: self.PlotDict["Histogram"] = self.HistogramPlots self.PlotDict["All"] = self.PlotDict["All"] + self.HistogramPlots # Reconfig the plots to be sure self.PlotDict["All"] = config_layout( self.PlotDict["All"], **self.config[self.analysisName].get("Layout", {})) self.PlotDict["data"] = self.data # Grade the sensor try: self.grade_Sensor() except: self.log.critical( "Some error happend while evaluating grade of sensor. This can happen!", exc_info=True) return self.PlotDict