visualdynamics.plot.drive_prediction¶
drive_prediction
¶
The drives a specification asks for, and what they ask of the rig:
three rows from one core.drive_prediction.DrivePrediction.
At the top, each drive's predicted autospectrum on log axes, titled with the drive nearest its limit. In the middle, one channel's predicted autospectrum: a control channel beside its target, with the lines the inverse did not meet shaded, or any other channel the FRF holds, titled with its own limit when it has one. At the bottom, a bar for every quantity judged, its expected peak as a share of its rating, with the rating at 100 % and the quantity that runs out first named in the title.
Nothing is carried by hue alone. The drives are told apart by line style as well as color and named in the legend; the prediction is solid and the target dashed; the unmet lines are hatched as well as shaded; and every bar is labeled with what it is and where, its verdict in the title in words.
Functions:
| Name | Description |
|---|---|
channel_index |
The FRF row a channel names, by index or label; the first control |
channel_words |
The middle row's title: a control channel against its target, or |
bar_rows |
The bars: (name, percent of its rating) for every demand, and a |
build_drive_prediction |
Draw |
summary |
The prediction's verdict in a line, for a title or a status bar. |
Functions:¶
channel_index
¶
The FRF row a channel names, by index or label; the first control channel when none is named.
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
Source code in src/visualdynamics/plot/drive_prediction.py
channel_words
¶
The middle row's title: a control channel against its target, or another channel against its limit.
Source code in src/visualdynamics/plot/drive_prediction.py
bar_rows
¶
The bars: (name, percent of its rating) for every demand, and a note for each one with no rating, which has no bar.
Source code in src/visualdynamics/plot/drive_prediction.py
build_drive_prediction
¶
build_drive_prediction(layout: Any, prediction: Any, *, channel: int | str | None = None, unit_system: Any = None, theme: Any = None) -> tuple[Any, Any, Any]
Draw prediction into a graphics layout as three rows and return
their plots, (drives, channel, shares).
channel picks the middle row's channel, by index or label, the
first control channel by default.
Source code in src/visualdynamics/plot/drive_prediction.py
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 | |
summary
¶
The prediction's verdict in a line, for a title or a status bar.