visualdynamics.gui.app_icon¶
app_icon
¶
The application's icon: four FRFs on the waterfall stage.
The 3-D view of data (the waterfall stage, with channels receding and
colored by level) is what the application looks like, so it is what the
tile shows. The curves are accelerances synthesized from the
demonstration plate's own modes, without noise, and drawn from the
viewpoint viz.waterfall.place_camera gives the stage.
The icon is drawn with QPainter and numpy only, so it can be built on a machine with no GL context. Under Qt's offscreen platform, which is where an icon build runs, VTK's render widget crashes the process. The synthesis takes about a fifth of a second and the drawing is cached, so each size is drawn once per run.
The tile differs from a plot in two ways. The vertical is stretched to
fill the tile, because the stage's view projects wide and short. And
the color and height range is clipped to the top DECADES decades:
without the clip, one deep antiresonance takes up the whole range and
every peak reads flat green.
Functions:
| Name | Description |
|---|---|
colormap |
|
synthesized_levels |
The four curves as levels in 0..1, used for both color and |
stage_basis |
(right, up), the stage's home view, from |
curve_count |
How many curves a tile of |
screen_curves |
The curves as (N, 2) pixel paths, front first. |
draw_app_icon |
The icon at |
app_icon |
The icon at the sizes a window manager asks for, 16 to 512 |
Functions:¶
colormap
¶
values in 0..1 as an (N, 3) array of RGB on theme.VIRIDIS,
the ramp everything that paints by level uses.
synthesized_levels
cached
¶
The four curves as levels in 0..1, used for both color and height.
Accelerances without noise from the demonstration plate's own modes
(ShapeSet.synthesize_frf), as log magnitude, clipped to the top
DECADES decades of the set and normalized. Cached.
Source code in src/visualdynamics/gui/app_icon.py
stage_basis
cached
¶
(right, up), the stage's home view, from
viz.waterfall.stage_basis. The icon uses the same view as the
application's default 3-D view of data and the report's 3-D
figure.
Source code in src/visualdynamics/gui/app_icon.py
curve_count
¶
How many curves a tile of size pixels shows: three below
SMALL (96 pixels), four otherwise.
screen_curves
¶
The curves as (N, 2) pixel paths, front first.
Projected through the stage basis, then fitted to the tile on each axis separately. The stage's view projects wide and short, and a uniform fit would leave the tile empty at the top and bottom; an icon may be stretched where a plot may not.
Source code in src/visualdynamics/gui/app_icon.py
draw_app_icon
cached
¶
The icon at size pixels square, as a QImage.
Cached: the synthesis takes about a fifth of a second, the drawing less, and every caller asks for the same few sizes.
Source code in src/visualdynamics/gui/app_icon.py
app_icon
cached
¶
The icon at the sizes a window manager asks for, 16 to 512 pixels.
Each size is drawn, not scaled from one image: below 96 pixels the
fourth curve is left out, because four curves in thirty pixels
cannot be told apart. tools/make_app.py renders the same drawing
into a Mac .icns, so the Dock and the window show the same icon.