plot_xsecs
plot_xsecs(processes="all", layout="overlay", fig=None, ax=None, energy_unit="eV", xsec_unit="Mb", energy_log=True, xsecs_log=True, title=None, grid=True, show=True, save=False, filename="")
Plots photo cross sections against photon energy or wavelength. Drawing, unit conversion, and labelling are delegated to jaff.plotting.Plotter.plot_xsec. Does nothing (logs a message and returns None) if xsecs_dict is None or no requested process has data. Cross-section data are stored as photon energies in eV and cross sections in cm²; both are converted to the requested units before plotting.
Parameters
- processes : str or list[str] or None, optional
- Which cross-section processes to draw.
"all"(default) orNoneplots every process that has data; a single key or a list of keys selects a subset. Valid keys:"photo_absorption","photodecay"(the reaction's single ionization/dissociation channel). An invalid key raisesKeyError. - layout : str, optional
"overlay"(default) draws all processes on one axes;"subplots"gives each process its own stacked panel.- fig, ax : matplotlib.figure.Figure / matplotlib.axes.Axes or None, optional
- Existing figure/axes to draw on (overlay layout only). Created if
None. - energy_unit : str, optional
- Horizontal-axis unit:
"eV"(default),"erg","nm", or"um". - xsec_unit : str, optional
- Cross-section unit:
"Mb"(default),"cm^2", or"barn". - energy_log : bool, optional
- Log-scale the energy axis. Default
True. - xsecs_log : bool, optional
- Log-scale the cross-section axis. Default
True. - title : str or None, optional
- Plot title. Defaults to the LaTeX reaction equation.
- grid : bool, optional
- Draw a grid. Default
True. - show : bool, optional
- Display the figure. Default
True. - save : bool, optional
- Save to
filename(format inferred from the extension). DefaultFalse. - filename : str, optional
- Output path. Defaults to
"<reaction>_<process>.png".
Returns
- tuple[matplotlib.figure.Figure, matplotlib.axes.Axes] or None
- The figure and axes (overlay) or array of axes (subplots);
Nonewhen there is no data to plot.