Ejemplo n.º 1
0
    def plot(self,
             fds1,
             parameter=None,
             curves=None,
             parameter_vth=None,
             vg_ext=None,
             backend=None,
             save_plot=None):
        """
		plot(fds1, parameter = None, method = None,cc_crit = None, curves = None, save = None, A=None, B=None)
			Class method that plots the extracted :math:`I_{ON}` values.

		Parameters
		----------
		fds1 : FoMpy Dataset
			Structure of data containing the most important parameters of a semiconductor's IV curve.
			Needed for generating the plot of any FoM.
		parameter : array_like
			Array of extracted FoM values to be plotted.
		curves : array_like
			Array of data containing the IV curves.
		parameter_vth : array_like
			Array of extracted vth values, as a method to obtain ION depends on them.		
		vg_ext : float
			Gate voltage value used to calculate IOFF at.
		backend : str
			String containing the name of the backend chosen to either plot or save the plots. The backends available are:
			'Agg', which only works whenever saving plots to files (non-GUI) and 'TkAgg' a GUI tools for visualizing the plots.
			'TkAgg' requires the package python3-tk installed in order to run.			
		save_plot : bool
			If True the generated plot is save to the defined path.

		"""
        temp_plot = plotter()
        for i in range(len(fds1.dataset)):
            try:
                if (vg_ext is not None) and (type(vg_ext) is float):
                    temp_plot.fomplot(i,
                                      fds1,
                                      fom='ion',
                                      voltages=curves[i][:, 0],
                                      currents=curves[i][:, 1],
                                      parameter=parameter[i],
                                      vg_ext=vg_ext,
                                      backend=backend,
                                      save_plot=save_plot)
                else:
                    temp_plot.fomplot(i,
                                      fds1,
                                      fom='ion',
                                      voltages=curves[i][:, 0],
                                      currents=curves[i][:, 1],
                                      parameter=parameter[i],
                                      parameter_vth=parameter_vth[i],
                                      backend=backend,
                                      save_plot=save_plot)
            except (TypeError, ValueError):
                pass
Ejemplo n.º 2
0
    def plot(self,
             fds1,
             parameter=None,
             curves=None,
             parameter_ss=None,
             vg_start=None,
             vg_end=None,
             vt_sd_medio=None,
             backend=None,
             save_plot=None):
        """
		plot(fds1, parameter = None, method = None,cc_crit = None, curves = None, save = None, A=None, B=None)
			Class method that plots the extracted :math:`SS` values.

		Parameters
		----------
		fds1 : FoMpy Dataset
			Structure of data containing the most important parameters of a semiconductor's IV curve.
			Needed for generating the plot of any FoM.
		parameter : array_like
			Array of extracted FoM values to be plotted.
		curves : array_like
			Array of data containing the IV curves.
		parameter_ss : array_like
			Array of extracted ss values.		
		vg_start : float
			Gate voltage defining the start of the interval in which the Subthreshold Swing is extracted.
		vg_end : float
			Gate voltage defining the end of the interval in which the Subthreshold Swing is extracted.
		vg_sd_medio : float
			Value in the middle of the interval between zero and vth extracted with the SD method.
			It is used only for defining a limit in the plot.
		backend : str
			String containing the name of the backend chosen to either plot or save the plots. The backends available are:
			'Agg', which only works whenever saving plots to files (non-GUI) and 'TkAgg' a GUI tools for visualizing the plots.
			'TkAgg' requires the package python3-tk installed in order to run.			
		save_plot : bool
			If True the generated plot is save to the defined path.

		"""
        temp_plot = plotter()
        for i in range(len(fds1.dataset)):
            try:
                temp_plot.fomplot(i,
                                  fds1,
                                  fom='ss',
                                  voltages=curves[i][:, 0],
                                  currents=curves[i][:, 1],
                                  parameter=parameter[i],
                                  vg_start=vg_start,
                                  vg_end=vg_end,
                                  vt_sd_medio=vt_sd_medio[i],
                                  backend=backend,
                                  save_plot=save_plot)
            except (TypeError, ValueError):
                pass
Ejemplo n.º 3
0
    def plot(self,
             fds1,
             curve_high=None,
             curve_low=None,
             parameter_vt_high=None,
             parameter_vt_low=None,
             corriente_low=None,
             backend=None,
             save_plot=None):
        """
		plot(fds1, parameter = None, method = None,cc_crit = None, curves = None, save = None, A=None, B=None)
			Class method that plots the extracted :math:`DIBL` values.

		Parameters
		----------
		fds1 : FoMpy Dataset
			Structure of data containing the most important parameters of a semiconductor's IV curve.
			Needed for generating the plot of any FoM.
		curve_high : array_like
			Array of data containing the IV curves at high drain bias.
		curve_low : array_like
			Array of data containing the IV curves at low drain bias.			
		parameter_vt_high : float
			Voltage value of high drain bias.
		parameter_vt_low : float
			Voltage value of low drain bias.
		corriente_low : float
			Current at the vth value extracted for the curve at low drain bias.
		backend : str
			String containing the name of the backend chosen to either plot or save the plots. The backends available are:
			'Agg', which only works whenever saving plots to files (non-GUI) and 'TkAgg' a GUI tools for visualizing the plots.
			'TkAgg' requires the package python3-tk installed in order to run.
		save_plot : bool
			If True the generated plot is save to the defined path.

		"""
        temp_plot = plotter()
        for i in range(len(fds1.dataset)):
            try:
                # print(i)
                temp_plot.fomplot(i,
                                  fds1,
                                  fom='dibl',
                                  curve_high=curve_high[i],
                                  curve_low=curve_low[i],
                                  vth_high=parameter_vt_high[i],
                                  vth_low=parameter_vt_low[i],
                                  corriente_low=corriente_low[i],
                                  backend=backend,
                                  save_plot=save_plot)
            except (TypeError, ValueError):
                pass
Ejemplo n.º 4
0
    def plot(self,
             fds1,
             parameter=None,
             method=None,
             cc_criteria=None,
             curves=None,
             backend=None,
             save_plot=None,
             A=None,
             B=None):
        """
		plot(fds1, parameter = None, method = None,cc_crit = None, curves = None, save = None, A=None, B=None)
			Class method that plots the extracted :math:`V_{TH}` values.

		Parameters
		----------
		fds1 : FoMpy Dataset
			Structure of data containing the most important parameters of a semiconductor's IV curve.
			Needed for generating the plot of any FoM.
		parameter : array_like
			Array of extracted FoM values to be plotted.
		method : str
			Keyword indicating the desired method of extraction of the FoMs. The list of available methods includes: 'SD', 'CC', 'TD' and 'LE'. If method is not defined the 'SD' is selected by default.
		cc_criteria : float
				Current criteria used to extract vth with the CC criteria for the fomplot.
		curves : array_like
			Array of data containing the IV curves.
		backend : str
			String containing the name of the backend chosen to either plot or save the plots. The backends available are:
			'Agg', which only works whenever saving plots to files (non-GUI) and 'TkAgg' a GUI tools for visualizing the plots.
			'TkAgg' requires the package python3-tk installed in order to run.			
		save_plot : bool
			If True the generated plot is save to the defined path.
		A, B: float
			Parameters obtained during the vth LE extraction method used for the plots.

		"""

        temp_plot = plotter()
        for i in range(len(fds1.dataset)):
            try:
                if (method is not 'LE'):
                    temp_plot.fomplot(i,
                                      fds1,
                                      fom='vth',
                                      voltages=curves[i][:, 0],
                                      currents=curves[i][:, 1],
                                      parameter=parameter[i],
                                      method=method,
                                      cc_criteria=cc_criteria,
                                      backend=backend,
                                      save_plot=save_plot)
                else:
                    temp_plot.fomplot(i,
                                      fds1,
                                      fom='vth',
                                      voltages=curves[i][:, 0],
                                      currents=curves[i][:, 1],
                                      parameter=parameter[i],
                                      method=method,
                                      cc_criteria=cc_criteria,
                                      backend=backend,
                                      save_plot=save_plot,
                                      A=A[i],
                                      B=B[i])
            except (TypeError, ValueError):
                i = i + i
Ejemplo n.º 5
0
def plot(fds1,
         fds2=None,
         plot_type=None,
         fom=None,
         parameter=None,
         method=None,
         bins=None,
         cc_criteria=None,
         vg_ext=None,
         vg_start=None,
         vg_end=None,
         cont_parameter=None,
         backend=None,
         save_plot=None):
    """
	Wrapper function that plots the most common figures in semiconductor simulations.

	Parameters
	----------
	fds1 : FoMpy Dataset
		Structure of data containing the most important parameters of a semiconductor's IV curve.
		Needed for generating the plot of any FoM.
	fds2 : FoMpy Dataset
		additional structure of data containing the most important parameters of a semiconductor's IV curve.
		Needed for generating the plot of the calibration and the DIBL.
	plot_type : str
		Keyword indicating the type of plot to generate. The list of available plots includes:
		'iv', 'hist', 'qq', 'varplot', 'calib' and 'fomplot'.
	fom : str
		Keyword indicating the FoM to be plotted. The list of available methods includes:
		'vth', 'ioff', 'ion', 'ss', 'ratio', 'power' and 'dibl'.
	parameter : array_like
		Array of extracted FoM values to be plotted.
	method : str
		Keyword indicating the desired method of extraction of the FoMs. The list of available methods includes:
		'SD'(default), 'CC', 'TD' and 'LE'. If method is not defined the 'SD' is selected by default.
	bins : int
		It defines the number of equal-width bins in the given range.
	cc_criteria : float
		Current criteria used to extract vth with the CC criteria for the fomplot.
	vg_ext : float
		Gate voltage value used to calculate a FoM like IOFF or ION.
	vg_start : float
		Gate voltage defining the start of the interval in which the Subthreshold Swing is extracted.
	vg_end : float
		Gate voltage defining the end of the interval in which the Subthreshold Swing is extracted.
	backend : str
		String containing the name of the backend chosen to either plot or save the plots. The backends available are:
		'Agg'(default), which only works whenever saving plots to files (non-GUI) and 'TkAgg' a GUI tool for visualizing the plots on a pop-up window.
		'TkAgg' requires the package python3-tk installed in order to run.
	save_plot : bool
		If True the generated plot is save to the defined path.

	"""

    plot = plotter()
    if (str(plot_type) is 'iv'):
        plot.iv(fds1, backend=backend, save_plot=save_plot)
    elif (str(plot_type) is 'hist'):
        plot.hist(parameter=parameter,
                  bins=bins,
                  backend=backend,
                  cont_parameter=cont_parameter,
                  save_plot=save_plot)
    elif (str(plot_type) is 'qq'):
        plot.qq(parameter=parameter, backend=backend, save_plot=save_plot)
    elif (str(plot_type) is 'varplot'):
        plot.varplot(fds1, backend=backend, save_plot=save_plot)
    elif (str(plot_type) == 'calib'):
        plot = plotter()
        plot.calib(fds1, fds2, backend=backend, save_plot=save_plot)
    elif (plot_type is None):
        if (str(fom) == 'vth'):
            temp_vth = vth_ext()
            if (method is not 'LE'):
                parameter_vth, curves = temp_vth.extraction(
                    fds1, method, cc_criteria)
                temp_vth.plot(fds1=fds1,
                              parameter=parameter_vth,
                              method=method,
                              cc_criteria=cc_criteria,
                              curves=curves,
                              backend=backend,
                              save_plot=save_plot)
            else:
                parameter_vth, curves, A, B = temp_vth.extraction(
                    fds1, method, cc_criteria)
                temp_vth.plot(fds1=fds1,
                              parameter=parameter_vth,
                              method=method,
                              cc_criteria=cc_criteria,
                              curves=curves,
                              backend=backend,
                              save_plot=save_plot,
                              A=A,
                              B=B)
        elif (str(fom) == 'ioff'):
            temp_ioff = ioff_ext()
            parameter_ioff, curves = temp_ioff.extraction(fds1, vg_ext)
            temp_ioff.plot(fds1=fds1,
                           parameter=parameter_ioff,
                           curves=curves,
                           vg_ext=vg_ext,
                           backend=backend,
                           save_plot=save_plot)
        elif (str(fom) == 'ion'):
            temp_ion = ion_ext()
            if (vg_ext is not None) and (type(vg_ext) is float):
                parameter_ion, curves = temp_ion.extraction(fds1,
                                                            vg_ext=vg_ext)
                print(parameter_ion)
                temp_ion.plot(fds1=fds1,
                              parameter=parameter_ion,
                              curves=curves,
                              vg_ext=vg_ext,
                              backend=backend,
                              save_plot=save_plot)
            else:
                temp_vth = vth_ext()
                if (method is not 'LE'):
                    parameter_vth, curves = temp_vth.extraction(
                        fds1, method, cc_criteria)
                else:
                    parameter_vth, curves, A, B = temp_vth.extraction(
                        fds1, method, cc_criteria)
                parameter_ion, curves = temp_ion.extraction(fds1,
                                                            vth=parameter_vth)
                temp_ion.plot(fds1=fds1,
                              parameter=parameter_ion,
                              curves=curves,
                              parameter_vth=parameter_vth,
                              backend=backend,
                              save_plot=save_plot)
        elif (str(fom) == 'ss'):
            temp_ss = ss_ext()

            if (vg_end is None):
                if (vg_start is None):
                    vg_start = 0.0
                temp_vth = vth_ext()
                if (method is not 'LE'):
                    parameter_vth, curves = temp_vth.extraction(
                        fds1, method, cc_criteria)
                    parameter_ss, curves, vt_sd_medio = temp_ss.extraction(
                        fds1, parameter_vth, vg_start=vg_start, vg_end=vg_end)
                else:
                    parameter_vth, curves, A, B = temp_vth.extraction(
                        fds1, method, cc_criteria)
                    parameter_ss, curves, vt_sd_medio = temp_ss.extraction(
                        fds1, parameter_vth, vg_start=vg_start, vg_end=vg_end)
            elif (vg_end is not None):
                if (vg_start is None):
                    vg_start = 0.0
                temp_vth = vth_ext()
                if (method is not 'LE'):
                    parameter_vth, curves = temp_vth.extraction(
                        fds1, method, cc_criteria)
                    parameter_ss, curves, vt_sd_medio = temp_ss.extraction(
                        fds1, parameter_vth, vg_start=vg_start, vg_end=vg_end)
                else:
                    parameter_vth, curves, A, B = temp_vth.extraction(
                        fds1, method, cc_criteria)
                    parameter_ss, curves, vt_sd_medio = temp_ss.extraction(
                        fds1, parameter_vth, vg_start=vg_start, vg_end=vg_end)
            else:
                pass
            temp_ss.plot(fds1=fds1,
                         parameter=parameter_ss,
                         curves=curves,
                         vg_start=vg_start,
                         vg_end=vg_end,
                         vt_sd_medio=vt_sd_medio,
                         backend=backend,
                         save_plot=save_plot)
        elif (str(fom) == 'dibl'):
            temp = dibl_ext()
            parameter_dibl, curve_high, curve_low, vth_high, vth_low, corriente_low = temp.extraction(
                fds1, fds2, method)
            temp.plot(fds1,
                      curve_high,
                      curve_low,
                      vth_high,
                      vth_low,
                      corriente_low,
                      backend=backend,
                      save_plot=save_plot)