A parameter is a record, not a float.
Every number that describes hardware carries where it came from::
Cv:
value: 1.2
unit: Cv
source: manufacturer
reference: "Swagelok SS-8BK-V51 datasheet rev C, table 2"
uncertainty: {kind: relative, value: 0.10}
The value is the least interesting field. What makes a result trustworthy is
knowing which of its inputs were measured on the bench, which came off a
datasheet, and which somebody guessed on a Tuesday -- and today the answer to
that lives in people's heads and evaporates when they graduate.
There is no default for ``source``. Omitting it is a validation error, not a
shrug, because "we don't know where this came from" is exactly the state this
type exists to make impossible. ``DEFAULT`` is available and means something
specific: the library supplied it, and nobody has looked.
Provenance survives into results. A run report can say *this answer rests on
nine measured parameters, four datasheet values and two guesses* -- which is the
difference between a number you can defend in a design review and one you
cannot.
| dict[str, int] feedtwin.model.param.provenance_summary |
( |
dict[str, Param] | params | ) |
|
Count parameters by provenance -- the header of a run report.
Returns a mapping keyed by provenance value, always containing every key so
a report can render a stable table. ``{"measured": 9, "manufacturer": 4,
"estimated": 2, "default": 0}`` says more about how much to trust a result
than any single number in it.
Definition at line 211 of file param.py.