shnitsel.vis.plot.spectra3d#

Functions#

_inlabel(s, ax[, ha, va])

ski_plots(spectra[, threshold])

Plot spectra for different times on top of each other,

pcm_plots(spectra)

Represent fosc as colour in a plot of fosc against time and energy.

Module Contents#

_inlabel(s, ax, ha='center', va='center')#
ski_plots(spectra, threshold=np.inf)#

Plot spectra for different times on top of each other, along with a dashed “ski”-line that tracks the maximum. One plot per statecomb; plots stacked vertically. Expected to be used on data produced by spectra.spectra_all_times.

Parameters:
  • spectra (xarray.DataArray) – DataArray containing fosc values organized along ‘energy’, ‘time’ and ‘statecomb’ dimensions.

  • threshold (float) – The “ski” line will not be drawn between successive points for which the change in energy-coordinate is greater than this.

Return type:

Figure object corresponding to plot.

pcm_plots(spectra)#

Represent fosc as colour in a plot of fosc against time and energy. The colour scale is logarithmic. One plot per statecomb; plots stacked horizontally. Expected to be used on data produced by spectra.spectra_all_times.

Parameters:

spectra (xarray.DataArray) – DataArray containing fosc values organized along ‘energy’, ‘time’ and ‘statecomb’ dimensions.

Return type:

Figure object corresponding to plot.

Examples

>>> import shnitsel as st
>>> from shnitsel.core.plot import spectra3d
>>> spectra_data = (
        st.io.read(path)
        .st.get_inter_state()
        .st.assign_fosc()
        .st.spectra_all_times())
>>> spectra3d.pcm_plots(spectra_data)