kdotpy
Loading...
Searching...
No Matches
kdotpy.ploto.auxil Namespace Reference

Functions

 observable (eidata, params, obs, which=None, filename="", regularize=True)
 
 integrated_observable (params, ee, int_obs, energies=None, filename="", title=None, title_val=None, idos=None, orange=None, xlabel=None, ylabel=None)
 
 transitions (data, filename="", xrange=None, legend=False, title=None, showplot=False, paramstr="", plotvar=None, colormap='hot_r', deltaemax=None, **plotopts)
 
 potential (params, pot, filename="", **kwds)
 
 q_z (params, qty, filename="", title=None, ylabel=None, yunit=None, legend=False, text=None)
 
 q_yz (params, data, filename="", colormap="Blues", positive=False, symmetric=False, legend=False, ylabel="V", yunit="meV", text="", aspect="auto", contours=True)
 

Function Documentation

◆ integrated_observable()

kdotpy.ploto.auxil.integrated_observable ( params,
ee,
int_obs,
energies = None,
filename = "",
title = None,
title_val = None,
idos = None,
orange = None,
xlabel = None,
ylabel = None )
Plot sum of observables for all states below a certain energy or integrated DOS value.

    Arguments:
    params      PhysParams instance
    ee          numpy array with energy values (values for horizontal axis)
    int_obs     Data (integrated observable)
    energies    Special energies (Fermi energy, chemical potential) to be shown
    filename    Output filename
    title       Plot title
    title_val   None, number, tuple, list or array. If a number, print this
                value in the plot title using % formatting. A tuple can be used
                for multiple values. If a list or array, take the subsequent
                values for the subsequent plot.
    idos        numpy array with integrated DOS values. If this is given, plot
                as function of integrated DOS rather than energy.
    orange      Range of observable values
    xlabel      Label of the horizontal axis
    ylabel      Label of the vertical axis

    Returns:
    matplotlib Figure instance

◆ observable()

kdotpy.ploto.auxil.observable ( eidata,
params,
obs,
which = None,
filename = "",
regularize = True )
Plot value of an observable as function of momentum or magnetic field.

    Arguments:
    eidata      DiagData instance
    params      PhysParams instance
    obs         The observable id
    which       Which states to include in the plot. This can be either None
                (plot all states) or a 2-tuple of integers or None, which
                specifies the range of bindex values that should be shown.
    filename    Output filename
    regularize  Whether to connect states with apparently matching observable
                curves, rather than following the bindex value.

    Returns:
    matplotlib Figure instance

◆ potential()

kdotpy.ploto.auxil.potential ( params,
pot,
filename = "",
** kwds )
Plot potential as function of z.
    Thin wrapper for ploto.q_z() and ploto.q_yz()

◆ q_yz()

kdotpy.ploto.auxil.q_yz ( params,
data,
filename = "",
colormap = "Blues",
positive = False,
symmetric = False,
legend = False,
ylabel = "V",
yunit = "meV",
text = "",
aspect = "auto",
contours = True )
Plot quantity as function of y and z

    Arguments:
    params     PhysParams instance.
    pot        Array of dim 2. The potential energy of the electrons in meV.
    filename   String. The file name.
    colormap   String or None. A valid matplotlib or kdotpy colormap. If None,
               take the value from the configuration value 'color_potential'.
    positive   True or False. Whether the quantity is strictly positive. If
               True, the bottom of the colormap is pinned to 0.
    symmetric  True or False. Whether the quantity is symmetrically negative and
               positive. If True, the centre of the colormap is pinned to 0.
    legend     True, False, or a string. If True or a string, show a legend
               (colour bar). If a string, use that as a legend label.
    ylabel     String. The quantity label for the potential (by default 'V'),
               that is shown in the legend.
    yunit      String. The unit for the potential (by default 'meV'), that is
               shown in the legend.
    text       String. Title of the plot, shown in the plot area.
    aspect     'auto', 'equal', float, or None. If 'auto', the axes will be
               stretched independently to fill the figure (default). If 'equal',
               respect the aspect ratio of the input coordinates. The plot area
               may be shrunk horizontally or vertically to achieve this. See
               also the documentation for matplotlib.pyplot.imshow().
    contours   True or False. Whether to plot contours.

◆ q_z()

kdotpy.ploto.auxil.q_z ( params,
qty,
filename = "",
title = None,
ylabel = None,
yunit = None,
legend = False,
text = None )
Plot a quantity as function of z.

    Arguments:
    params     PhysParams instance. The z values are extracted from this.
    qty        If a list or numpy array of numberical value, this is interpreted
               as the values to be plotted. It may be 1- or 2-dimensional and
               one axis should be of the same length as the number of z values
               extracted from argument params.
               If a string or list of strings, extract this/these variable(s)
               from the PhysParams instance (argument params).
    title      Plot title.
    ylabel     Label of the vertical axis
    yunit      Unit to be shown on the vertical axis
    legend     If False, do not show a legend. A list of strings may be given
               corresponding to the quantities being plotted. If qty is a string
               or list of strings, setting legend = True will show the string(s)
               of qty in the legend.

    Returns:
    None

◆ transitions()

kdotpy.ploto.auxil.transitions ( data,
filename = "",
xrange = None,
legend = False,
title = None,
showplot = False,
paramstr = "",
plotvar = None,
colormap = 'hot_r',
deltaemax = None,
** plotopts )
Plot optical transitions.
    The output is a plot with magnetic field B (or momentum k) on the horizontal
    axis, and the energy difference Delta E of the transitions on the vertical
    axis. The colour encodes the amplitude of the transitions.

    Arguments:
    data        DiagData instance for which the DiagDataPoint elements have a
                valid TransitionsData element (ddp.transitions is not None).
    filename    Output file name
    erange      2-tuple; if present, do not consider states with energies
                outside this range
    xrange      2-tuple; range of the horizontal axis
    legend      Whether to show a legend (colour bar)
    title       Plot title
    showplot    If True, show plot on screen. (Debug option)
    paramstr    String that determines horizontal axis label
    plotvar     If set, plot against these values rather than the 'natural'
                component in the VectorGrid (data.grid). For example, if the
                data is as function of a magnetic field in some direction in
                spherical coordinates, one can use 'bx' to plot against the Bx
                component.
    colormap    matplotlib colormap for colouring the data points
    deltaemax   Maximum value on the vertical axis
    plotopts    Keyword list that catches further unused plot options

    Returns:
    matplotlib Figure instance