shnitsel.vis.datasheet.figures.dip_trans_hist#

Functions#

single_dip_trans_hist(interstate, sc_label, ...[, ...])

Function to plot a single histogram of interstate dip_trans data.

plot_dip_trans_histograms(inter_state, state_selection)

function to plot all relevant histograms for the provided inter_state data

plot_spectra(spectra, state_selection[, ax, ...])

Create the spectra plot of the system denoted by the results in spectra.

plot_separated_spectra_and_hists(inter_state, ...[, ...])

Create separate spectra plots for ground and excited states.

plot_separated_spectra_and_hists_groundstate(...[, ...])

Function to plot separated spectra and histograms of ground state data only.

Module Contents#

single_dip_trans_hist(interstate, sc_label, state_labels, color, bins=100, ax=None, cmap=None, cnorm=None)#

Function to plot a single histogram of interstate dip_trans data.

Parameters:
  • interstate (InterState) – Inter-state Dataset

  • sc_label (str) – Label to use for the state combination.

  • state_labels (tuple[str,str]) – Labels for the individual states.

  • color (str): Color for the histogram of this state combination.)

  • bins (int, optional) – Number of bins for the histogram. Defaults to 100.

  • ax (Axes, optional) – Axes object to plot into. Defaults to None.

  • cmap (str, optional) – Colormap to use. Defaults to None.

  • cnorm (str, optional) – Norming method to apply to the colormap. Defaults to None.

Returns:

?

Return type:

The result of ax.hist2d will be returned

plot_dip_trans_histograms(inter_state, state_selection, axs=None, cnorm=None)#

function to plot all relevant histograms for the provided inter_state data

Parameters:
  • inter_state (InterState) – Inter-state data to get the transitional dipole data from.

  • state_selection (StateSelection) – State selection object to limit the states included in plotting and to provide state names.

  • axs (Axes, optional) – Axes objects to plot into. If not provided, will be created.

  • cnorm (str, optional) – Optional specification of a colormap norm method. Defaults to None.

Returns:

The list of the results of hist2d() calls for the provided data in inter_state

Return type:

list

plot_spectra(spectra, state_selection, ax=None, lim_num_sc=-1, cmap=None, cnorm=None, mark_peaks=False)#

Create the spectra plot of the system denoted by the results in spectra.

Parameters:
  • spectra (SpectraDictType) – The spectra (t, state combination) -> fosc data to plot. t is expected in fs.

  • ax (Axes, optional) – Axis object to plot into. If not provided, will be created.

  • lim_num_sc (int, optional) – Maximum number of state combinations to consider for the plot.

  • state_selection (StateSelection) – State selection object to limit the states included in plotting and to provide state names.

  • cmap (str | Colormap, optional) – Optional specification of a desired colormap. Defaults to None.

  • cnorm (str | Normalize, optional) – Optional specification of a colormap norm method. Defaults to None.

  • mark_peaks (bool, optional) – Flag whether peaks should be clearly marked. Defaults to False.

Returns:

The axes object into which the graph was plotted

Return type:

Axes

plot_separated_spectra_and_hists(inter_state, spectra_groups, state_selection, fig=None, axs=None, cb_spec_vlines=True)#

Create separate spectra plots for ground and excited states.

Parameters:
  • inter_state (InterState) – The interstate data to use for the spectra plots

  • spectra_groups (tuple[SpectraDictType, SpectraDictType]) – Spectra separated into ground state spectra and excited spectra.

  • state_selection (StateSelection) – State selection object to limit the states included in plotting and to provide state names.

  • fig (Figure| SubFigure) – A figure, consumed by the automatic axes generation. Not used by the function itself.

  • axs (dict[str,Axes], optional) – Axis dictionary object to plot into.

  • cb_spec_vlines (bool, optional) – Whether to mark spectral lines in the energy spectrum. Defaults to True.

Returns:

The axes dict loc=’upper right’, bbox_to_anchor=(1.1, 1.1))after plotting to it.

Return type:

dict[str, Axes]

plot_separated_spectra_and_hists_groundstate(inter_state, spectra_groups, state_selection, fig=None, axs=None, cb_spec_vlines=True, scmap=plt.get_cmap('turbo'))#

Function to plot separated spectra and histograms of ground state data only.

Parameters:
  • inter_state (InterState) – Inter-State dataset containing energy differences

  • spectra_groups (tuple[SpectraDictType, SpectraDictType]) – Tuple holding the spectra groups of ground-state transitions and excited-state transitions.

  • state_selection (StateSelection) – State selection object to limit the states included in plotting and to provide state names.

  • fig (Figure | SubFigure | None, optional) – Figure to plot the graphs to. Defaults to None.

  • axs (dict[str, Axes] | None, optional) – Dict of named axes to plot to. Defaults to None.

  • cb_spec_vlines (bool, optional) – Flag to enable vertical lines in the time-dependent spectra. Defaults to True.

  • scmap (Colormap, optional) – State combination colormap. Defaults to plt.get_cmap(‘turbo’).

Raises:

AssertionError – Could not acquire axes to plot to

Returns:

dict[str, Axes]

Return type:

The named axes after plotting