visualdynamics.gui.run_log_forms¶
run_log_forms
¶
The Run Log's forms: the test header in full, the readings each kind of test takes, the findings, and the predictions read beside what is observed.
Every form here is an EntryForm (gui.run_log_dock): its event time
taken when it opens, Enter writing it, Esc putting it away, and nothing
written when a box cannot be read. What a form computes from what is
typed is shown under its boxes as it is typed (EntryForm.live): a
sweep's current against the continuous rating, a shot's pulses against
the budget, a notch's place in the plan and the notch predicted there.
Each of those is read through the function the package keeps for it
(run_log_model.project, judge_pulses, notch_in_plan, and the
predictions' own readings), so a form says what the log will say once
the entry is written.
The header comes in three forms: the test opened, the roll to the
next test (every field offered as it stands and carried unless
changed), and the current test's header, where each field changed is a
header change and the fields carried from the last test are marked
until they are confirmed. Its fields are grouped as HEADER_GROUPS
lists them, and every field of run_log.HEADER_FIELDS is in one group.
The predictions are the ones the window drew for the project open
in it: the notch the limit channels would cut (core.limit_prediction)
and the drives the specification asks for (core.drive_prediction).
The window hands each one to the dock when it is drawn
(RunLogPanel.offer_prediction), and the dock shows it beside what is
read: a notch entry beside the predicted notch at its band, and the
level row's drive beside the predicted drive. Nothing is predicted here.
With none drawn, which is always so for a log kept with no project, the
place it would be shown says so.
Classes:
| Name | Description |
|---|---|
Predictions |
The predictions the window drew for the project open in it: the |
Functions:
| Name | Description |
|---|---|
header_form |
The header form |
header_changes |
The header fields among |
same |
Whether a header field typed as |
sweep_form |
A sine sweep: its direction, n of N, rate, span, level and the |
sweep_text |
A sweep's rms current against the header's continuous rating, in |
shot_form |
A shock shot: its polarity, n of N, level and pulses (one when |
shot_text |
The four checks answered and owed, and the pulse count so far and |
result_form |
A survey or functional run's result and who ran it, written as |
notch_form |
A notch: its axis, channel, band and depth. Live: whether it is |
notch_text |
A notch's place in the plan, then the prediction beside it. |
predicted_notch_text |
The notch the limit prediction cuts at |
drive_text |
The drive predicted for the test's setup (each drive demand in |
deviation_form |
A deviation: the fact at the console, and its cause, effect and |
anomaly_form |
An anomaly opened, numbered across the log, with its owner. |
disposition_form |
An anomaly dispositioned, by its number: the latest open one is |
setting_form |
A setting changed. A change to a limit, a tolerance or an abort |
opinion_form |
An opinion given to the customer in conversation, and to whom. |
Classes¶
Predictions
dataclass
¶
The predictions the window drew for the project open in it: the
notch prediction (core.limit_prediction.LimitPrediction) and the
drive prediction (core.drive_prediction.DrivePrediction), each None
until one is drawn, with the objects each was made from in words.
Functions:¶
header_form
¶
The header form name: 'open test' (every field blank, the kind
needed), 'roll' (every field offered as the current test has it,
carried unless changed) or 'header' (the current test's header,
each field changed written as a header change, the carried fields
marked and confirmed with Confirm). Files named on the opening or
the roll are attached by SHA-256.
Source code in src/visualdynamics/gui/run_log_forms.py
header_changes
¶
The header fields among values (a header form's) that differ
from header, the fields as they stand.
Source code in src/visualdynamics/gui/run_log_forms.py
same
¶
Whether a header field typed as value is the held value: a
planned notch list compared as it is written back, so a band stored
as two numbers and one typed as text are the same band.
Source code in src/visualdynamics/gui/run_log_forms.py
sweep_form
¶
A sine sweep: its direction, n of N, rate, span, level and the amplifier's rms current, judged live against the header's continuous rating, which is what a sine test budgets. n is offered as the next sweep of the run; N, the rate, the span and the level as the last sweep had them.
Source code in src/visualdynamics/gui/run_log_forms.py
sweep_text
¶
sweep_text(header: Mapping[str, Any], form: EntryForm) -> str
A sweep's rms current against the header's continuous rating, in
words (run_log_model.project's rms current check): not judged,
with why, when the rating, the current or the level is missing.
Source code in src/visualdynamics/gui/run_log_forms.py
shot_form
¶
A shock shot: its polarity, n of N, level and pulses (one when
blank), and the four checks made after every shot. Live: which
checks are answered, and the pulses so far and with this shot
against the header's budget (run_log_model.judge_pulses).
Source code in src/visualdynamics/gui/run_log_forms.py
shot_text
¶
The four checks answered and owed, and the pulse count so far and with the shot being typed, against the header's budget.
Source code in src/visualdynamics/gui/run_log_forms.py
result_form
¶
result_form(taken: datetime) -> EntryForm
A survey or functional run's result and who ran it, written as the run's stop.
Source code in src/visualdynamics/gui/run_log_forms.py
notch_form
¶
notch_form(taken: datetime, seen: Snapshot | None, axis: str | None, predictions: Callable[[], Predictions]) -> EntryForm
A notch: its axis, channel, band and depth. Live: whether it is
in the header's planned list (run_log_model.notch_in_plan, the
rule a written notch is held by), and the notch predicted at its
band beside it, from the predictions as predictions() gives them
when the form is read.
Source code in src/visualdynamics/gui/run_log_forms.py
notch_text
¶
notch_text(header: Mapping[str, Any], form: EntryForm, predictions: Predictions) -> str
A notch's place in the plan, then the prediction beside it.
Source code in src/visualdynamics/gui/run_log_forms.py
predicted_notch_text
¶
predicted_notch_text(predictions: Predictions, band: Any, depth_db: float | None) -> str
The notch the limit prediction cuts at band beside the notch
observed there, each predicted notch in the prediction's own words
(Notch.describe); with no band typed, the prediction's verdict.
'no prediction in a project' when the window has drawn none.
Source code in src/visualdynamics/gui/run_log_forms.py
drive_text
¶
drive_text(predictions: Predictions, header: Mapping[str, Any], fields: Mapping[str, Any]) -> str
The drive predicted for the test's setup (each drive demand in
the prediction's own words, Demand.describe) beside the drive the
level row reads, its drive fraction projected to full level
(run_log_model.project). 'no prediction in a project' when the
window has drawn none.
Source code in src/visualdynamics/gui/run_log_forms.py
deviation_form
¶
A deviation: the fact at the console, and its cause, effect and approval when they are known (now, or later by correction); the names typed are recorded as agreed at the console. It answers the hold of the entry it names, offered as the latest an unplanned notch or a change to the test raised.
Source code in src/visualdynamics/gui/run_log_forms.py
anomaly_form
¶
anomaly_form(taken: datetime) -> EntryForm
An anomaly opened, numbered across the log, with its owner.
Source code in src/visualdynamics/gui/run_log_forms.py
disposition_form
¶
An anomaly dispositioned, by its number: the latest open one is offered.
Source code in src/visualdynamics/gui/run_log_forms.py
setting_form
¶
setting_form(taken: datetime) -> EntryForm
A setting changed. A change to a limit, a tolerance or an abort band is a change to the test and holds it until a deviation names it.