STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
design_audit Namespace Reference

Functions

 _opt (rq, key, default=None)
 _flag (rq, key, default)
 audit (f)

Variables

 ok = all([audit(f) for f in sys.argv[1:]])

Detailed Description

Audit a design against EVERY limit its own config declares, with NO gate slack forgiven.

    python3 scripts/design_audit.py configs/ethalox_8kN_SHIP.yaml [more.yaml ...]

Layer 1's own gates carry tolerances -- the spray-tilt gate forgives
``layer1_resultant_tilt_gate_tol_deg`` (shipped default 1.0 deg) and the O/F gate forgives
15 %. Those exist so a search sitting on a boundary is not thrown away, and they are
reasonable there. They are NOT reasonable in a sign-off: measured, three candidates reported
ALL GATES PASS while exceeding their own declared tilt allowance, because 1.0 deg of slack is
most of the margin the allowance exists to create. This re-checks every limit at face value.

Exits non-zero if any design fails, so it can gate a commit.

Function Documentation

◆ _flag()

design_audit._flag ( rq,
key,
default )
protected

Definition at line 34 of file design_audit.py.

Referenced by audit().

◆ _opt()

design_audit._opt ( rq,
key,
default = None )
protected
A requirement as a float, or ``default`` when the config leaves it unset.

Definition at line 28 of file design_audit.py.

Referenced by audit().

◆ audit()

design_audit.audit ( f)
Every limit is the one THIS config declares (Layer 1's default where it declares none).

An earlier version hardcoded the SHIP numbers -- densities 1140/789, dP/Pc 0.20-0.40,
n <= 30, 90 deg, 40 deg -- so it audited every other design against SHIP's requirements.
A limit the config does not declare and Layer 1 has no default for is skipped and said so.

Definition at line 43 of file design_audit.py.

References _flag(), _opt(), max, and min.

Variable Documentation

◆ ok

design_audit.ok = all([audit(f) for f in sys.argv[1:]])

Definition at line 177 of file design_audit.py.