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 run(self): """Runs the script""" # Plot all Measurements self.basePlots = plot_all_measurements(self.data, self.config, self.xaxis, self.name, do_not_plot = self.donts) self.PlotDict["BasePlots"] = self.basePlots self.PlotDict["All"] = self.basePlots # Histogram Plot self.Histogram = dospecialPlots(self.data, self.config, self.name, "concatHistogram", self.measurements, **self.config[self.name].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.name, "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.name, "Violin", self.measurements) if self.Violin: self.PlotDict["Violin"] = self.Violin self.PlotDict["All"] += self.Violin # singleHist Plot self.singleHist = dospecialPlots(self.data, self.config, self.name, "Histogram", self.measurements, **self.config[self.name].get("AuxOptions", {}).get("singleHistogram", {})) if self.singleHist: self.PlotDict["singleHistogram"] = self.singleHist self.PlotDict["All"] = self.PlotDict["All"] + self.singleHist # Reconfig the plots to be sure self.PlotDict["All"] = config_layout(self.PlotDict["All"], **self.config[self.name].get("Layout", {})) return self.PlotDict
def run(self): """Runs the script""" # 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", {})) return self.PlotDict
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