def plot_evals_vs_paramvals(self, param_name: str, param_vals: ndarray, evals_count: int = 6, subtract_ground: bool = False, num_cpus: int = settings.NUM_CPUS, **kwargs) -> Tuple[Figure, Axes]: """Generates a simple plot of a set of eigenvalues as a function of one parameter. The individual points correspond to the a provided array of parameter values. Parameters ---------- param_name: name of parameter to be varied param_vals: parameter values to be plugged in evals_count: number of desired eigenvalues (sorted from smallest to largest) (default value = 6) subtract_ground: whether to subtract ground state energy from all eigenvalues (default value = False) num_cpus: number of cores to be used for computation (default value: settings.NUM_CPUS) **kwargs: standard plotting option (see separate documentation) """ specdata = self.get_spectrum_vs_paramvals( param_name, param_vals, evals_count=evals_count, subtract_ground=subtract_ground, num_cpus=num_cpus) return plot.evals_vs_paramvals(specdata, which=range(evals_count), **kwargs)
def plot_evals_vs_paramvals(self, which=-1, subtract_ground=False, label_list=None, **kwargs): """Plots eigenvalues of as a function of one parameter, as stored in SpectrumData object. Parameters ---------- which: int or list(int) default: -1, signals to plot all eigenvalues; int>0: plot eigenvalues 0..int-1; list(int) plot the specific eigenvalues (indices listed) subtract_ground: bool, optional whether to subtract the ground state energy, default: False label_list: list(str), optional list of labels associated with the individual curves to be plotted **kwargs: dict standard plotting option (see separate documentation) Returns ------- Figure, Axes """ return plot.evals_vs_paramvals(self, which=which, subtract_ground=subtract_ground, label_list=label_list, **kwargs)
def plot_evals_vs_paramvals(self, which: Union[int, List[int]] = -1, subtract_ground: bool = False, label_list: List[str] = None, **kwargs) -> 'Tuple[Figure, Axes]': """Plots eigenvalues of as a function of one parameter, as stored in SpectrumData object. Parameters ---------- which: default: -1, signals to plot all eigenvalues; int>0: plot eigenvalues 0..int-1; list(int) plot the specific eigenvalues (indices listed) subtract_ground: whether to subtract the ground state energy, default: False label_list: list of labels associated with the individual curves to be plotted **kwargs: standard plotting option (see separate documentation) Returns ------- Figure and Axes objects for further processing """ return plot.evals_vs_paramvals(self, which=which, subtract_ground=subtract_ground, label_list=label_list, **kwargs)
def plot_evals_vs_paramvals(self, param_name, param_vals, evals_count=6, subtract_ground=None, **kwargs): """Generates a simple plot of a set of eigenvalues as a function of one parameter. The individual points correspond to the a provided array of parameter values. Parameters ---------- param_name: str name of parameter to be varied param_vals: ndarray parameter values to be plugged in evals_count: int, optional number of desired eigenvalues (sorted from smallest to largest) (default value = 6) subtract_ground: bool, optional whether to subtract ground state energy from all eigenvalues (default value = False) **kwargs: dict standard plotting option (see separate documentation) Returns ------- Figure, Axes """ specdata = self.get_spectrum_vs_paramvals(param_name, param_vals, evals_count, subtract_ground) return plot.evals_vs_paramvals(specdata, which=range(evals_count), **kwargs)
def plot_evals_vs_paramvals(self, x_range=None, ymax=None, which=-1, subtract_ground=False, title=None, label_list=None, fig_ax=None, **kwargs): """Plots eigenvalues of as a function of one parameter, as stored in SpectrumData object. Parameters ---------- x_range: tuple(float, float), optional ymax: float, optional used to modify the upper boundary for the y-axis which: int or list(int) default: -1, signals to plot all eigenvalues; int>0: plot eigenvalues 0..int-1; list(int) plot the specific eigenvalues (indices listed) subtract_ground: bool, optional whether to subtract the ground state energy, default: False title: str, optional plot title label_list: list(str), optional list of labels associated with the individual curves to be plotted fig_ax: Figure, Axes, optional **kwargs: optional keyword arguments passed on to axes.plot() Returns ------- Figure, Axes """ return plot.evals_vs_paramvals(self, x_range=x_range, ymax=ymax, which=which, subtract_ground=subtract_ground, title=title, label_list=label_list, fig_ax=fig_ax, **kwargs)
def plot_evals_vs_paramvals(self, param_name, param_vals, evals_count=6, subtract_ground=None, x_range=None, ymax=None, filename=None, fig_ax=None): """Generates a simple plot of a set of eigenvalues as a function of one parameter. The individual points correspond to the a provided array of parameter values. Parameters ---------- param_name: str name of parameter to be varied param_vals: ndarray parameter values to be plugged in evals_count: int, optional number of desired eigenvalues (sorted from smallest to largest) (default value = 6) subtract_ground: bool, optional whether to subtract ground state energy from all eigenvalues (default value = False) x_range: (float, float), optional custom x-range for the plot ymax: float, optional custom upper y bound for the plot filename: str, optional write graphics and parameter set to file if path and filename are specified (default value = None) fig_ax: tuple(Figure, Axes), optional fig and ax objects for matplotlib figure addition (default value = None) Returns ------- Figure, Axes """ specdata = self.get_spectrum_vs_paramvals(param_name, param_vals, evals_count, subtract_ground) return plot.evals_vs_paramvals(specdata, which=range(evals_count), x_range=x_range, ymax=ymax, filename=filename, fig_ax=fig_ax)