HTML Report Generation¶
PyRolL includes a class capable of generating an HTML page presenting the simulation results, which can be archived and
printed. The report can be generated by use of the CLI through the report
command.
The report includes per default key properties of all units, plots of incoming and outgoing profiles in each roll pass, as well as some plots of key values along the whole sequence. The contents of the report can be modified using hooks.
The report includes tables listing properties of units or the whole sequence. One can customize the properties shown
there by providing hook implementations. For the table listing unit properties use the unit_properties()
hook.
For the table listing properties of the whole sequence, use the sequence_properties()
hook. The hook
implementations must return in both cases a mapping from string keys to values. The keys are printed in the first column
of the table. The values may be of any type, but they should have meaningful __str__
methods to lead to feasible
results.
The report includes several plots. Plots visualizing the whole sequence of units or parts of it can be added by
providing an implementation of the sequence_plot()
hook. Plots visualizing a single unit can be added by
providing an implementation of the unit_plot()
hook. The hook implementations must return in both cases an
instance of matplotlib’s Figure
class.
Class Documentation¶
Hooks¶
- sequence_plot(units: List[Unit]) Figure ¶
Generate a matplotlib figure visualizing the whole pass sequence, f.e. plot the distribution of roll forces. All loaded hook implementations are listed in the report.
- sequence_properties(units: List[Unit]) Mapping[str, Any] ¶
Extract some data from the unit sequence to be listed in the report. Return a mapping of label names to values. All hookimpls will be joined in order of definition.
- unit_plot(unit: Unit) Figure ¶
Generate a matplotlib figure visualizing a unit. All loaded hook implementations are listed in the report.
- unit_properties(unit: Unit) Mapping[str, Any] ¶
Extract some data from a unit to be listed in the report. Return a mapping of label names to values. All hookimpls will be joined in order of definition.