hertzforge.report.views¶
views
¶
A report's blocks as the protocol's views (schema/PROTOCOL.md, Views).
Step 2 of the reports plan (the maintainers repo's REPORTS_PLAN.md): the
shell's viz kit, the same ViewRenderer every module draws with, draws a
report too. page_blocks builds the report as the page builds it
(report._report_payload: bound, captioned, numbered, in display units,
thinned for the file) and block_views turns each built block into views:
- a plot into a
spectrum, its averaging frames intoregions, a synthesized curve a follower of the curve it models. One control channel against its requirement has its zones shaded (bands, named bykey), its lines outside an abort limit marked (regionsof kindoverandunder), its numbers boxed (readouts) and the requirement's band to open on (x_home); several channels on one plot are the spectrum'sgroups(target, response and limits each), the limits as lines; - a grid into a
spectruma channel and the layout that places them, a row a node and a column a direction (_grid); - a scene into a
shape3dwith its modes; - a table into a
table; - a bar chart into
bars, judged here as the page judged it; - a coherence map and a MAC into a
matrix; - a verdict into a
reading; a photo into animage; - a stage into the
waterfallthe app draws for that object.
The page's payload writes a log axis's values as their log10 (it draws in decades); a view carries the values themselves and says the axis is log, so they are put back here.
Functions:
| Name | Description |
|---|---|
axis_of |
An axis from the page's "name [unit]" label: the name with its first |
block_views |
The views one built block draws as (none for text or an unbound |
page_blocks |
The report as the shell's page draws it: each drawn block its |
page_style |
The stylesheet a report's page adds, as its own page adds it: with |
Functions:¶
axis_of
¶
An axis from the page's "name [unit]" label: the name with its first letter raised, the unit (None when there is none) and the scale.
block_views
¶
block_views(built: Mapping[str, Any], block: Mapping[str, Any] | None = None, objects: Mapping[str, Any] | None = None, length_unit: str = '', object_groups: Any = None) -> list[dict[str, Any]]
The views one built block draws as (none for text or an unbound
slot). block and objects are the block as the report holds it and
the project's objects, which only a stage needs; length_unit is the
unit a scene's coordinates are in.
page_blocks
¶
page_blocks(report: Any, objects: Mapping[str, Any], unit_system: Any = None, object_groups: Any = None) -> list[dict[str, Any]]
The report as the shell's page draws it: each drawn block its
kind ('text' with its html, 'figure' with its views, or
'unbound' with what it was), its number (label), caption, note
and the index of the report block it came from (block), so an edit
reaches the block whichever of its figures was clicked.
page_style
¶
The stylesheet a report's page adds, as its own page adds it: with the report identity on, the printed page's margins (the laboratory, the report's number and revision, its title and page n of N); with the flash report on and a run log held, the log's tight setting. Empty otherwise.