sp_validation.dashboard.style¶
Shared look of the dashboard figures.
Typography and colour semantics follow the UNIONS Paper II (B-modes) figures: Computer Modern via mathtext (no TeX dependency), one hue per estimator family in the B-mode data vectors, grey shading over excluded scales, a boxed in-panel annotation naming the statistic, and the threshold-anchored PTE colormap. Surfaces and ink come from the production page’s parchment palette so the PNGs sit on its cards without a white slab.
Sizes are in inches at print-like font sizes; save() fixes the tight
saved width, and the resolution is chosen per size class so a figure stays
crisp at the width the page shows it.
- save(fig, path, size='full', width=None)[source]¶
Save
figwith a tight bounding box exactly the class width wide.Scales the canvas (keeping its aspect) until the cropped width equals the target, so font sizes in the style are the sizes on the page at that width (the Paper II
savefig_at_widthrecipe).
- label_box(ax, text, loc='upper left', fontsize=None)[source]¶
Boxed in-panel annotation naming the statistic (Paper II convention).
- note(ax, text, loc='lower right', color='#7A6F5C', fontsize=8)[source]¶
Small unboxed annotation, e.g. a PTE, in muted ink.
- blind_stamp(fig, blind, where='top')[source]¶
Mark a figure that shows blinded data vectors, outside the axes.
- header(ax, text, side='left')[source]¶
Panel header above the frame: the panel’s subject on the left in ink, a qualifier (a cut, a sign convention) on the right in muted ink.