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

Functions

List[Type[BaseModel]] _models_in (Any annotation)
Optional[Type[BaseModel]] _dict_value_model (Any annotation)
str _type_name (Any annotation)
Optional[List[Any]] _choices (Any annotation)
Any _default (Any fi)
Any _plain (Any v)
bool _differs (Any value, Any default)
Dict[str, Any] _leaf (str path, str section, Any fi, Any value)
None _walk (BaseModel model, str prefix, str section, List[Dict[str, Any]] out)
Dict[str, Any] config_parameters (BaseModel config)

Variables

 _UNIT = re.compile(r"\[([^\‍[\‍]]{1,28})\‍]")
 _NOT_UNIT = re.compile(r"[A-Z]{4,}| — | - ")
list SECTIONS
 _SECTION_LABEL = dict(SECTIONS)
 LEGACY_SECTIONS = frozenset({"chamber", "nozzle"})
 INTERNAL_SECTIONS = frozenset({"design_valid_for"})

Detailed Description

Every parameter a config carries, and what the schema says about it.

The Parameters workspace lists these: one row per leaf of ``PintleEngineConfig``, with its current
value, its schema default, whether it differs, its units (taken from the ``[unit]`` in its
description) and the description itself. It walks the pydantic models, so a field added to
``config_schemas.py`` appears here without anyone remembering to list it.

A block that is null in the config (``chamber: null``) is one row of kind ``block``; its fields
appear once it is set. Keys a config carries that the schema does not declare (models with
``extra="allow"``) are rows of kind ``undeclared``: they are passed through, so they are shown.

Function Documentation

◆ _choices()

Optional[List[Any]] engine.pipeline.parameter_registry._choices ( Any annotation)
protected
Allowed values of a Literal (possibly Optional) annotation.

Definition at line 102 of file parameter_registry.py.

Referenced by _leaf().

◆ _default()

Any engine.pipeline.parameter_registry._default ( Any fi)
protected

Definition at line 112 of file parameter_registry.py.

Referenced by _leaf().

◆ _dict_value_model()

Optional[Type[BaseModel]] engine.pipeline.parameter_registry._dict_value_model ( Any annotation)
protected
``Dict[str, Model]`` (possibly Optional) -> Model.

Definition at line 73 of file parameter_registry.py.

References _models_in().

Referenced by _walk(), and config_parameters().

◆ _differs()

bool engine.pipeline.parameter_registry._differs ( Any value,
Any default )
protected

Definition at line 130 of file parameter_registry.py.

References _plain().

Referenced by _leaf().

◆ _leaf()

Dict[str, Any] engine.pipeline.parameter_registry._leaf ( str path,
str section,
Any fi,
Any value )
protected

Definition at line 136 of file parameter_registry.py.

References _choices(), _default(), _differs(), _plain(), and _type_name().

Referenced by _walk(), and config_parameters().

◆ _models_in()

List[Type[BaseModel]] engine.pipeline.parameter_registry._models_in ( Any annotation)
protected
The BaseModel classes an annotation can hold (through Optional/Union).

Definition at line 64 of file parameter_registry.py.

References _models_in().

Referenced by _dict_value_model(), _models_in(), _walk(), and config_parameters().

◆ _plain()

Any engine.pipeline.parameter_registry._plain ( Any v)
protected

Definition at line 122 of file parameter_registry.py.

Referenced by _differs(), _leaf(), and _walk().

◆ _type_name()

str engine.pipeline.parameter_registry._type_name ( Any annotation)
protected

Definition at line 85 of file parameter_registry.py.

References _type_name().

Referenced by _leaf(), and _type_name().

◆ _walk()

None engine.pipeline.parameter_registry._walk ( BaseModel model,
str prefix,
str section,
List[Dict[str, Any]] out )
protected

Definition at line 156 of file parameter_registry.py.

References _dict_value_model(), _leaf(), _models_in(), _plain(), and _walk().

Referenced by _walk(), and config_parameters().

◆ config_parameters()

Dict[str, Any] engine.pipeline.parameter_registry.config_parameters ( BaseModel config)
All parameters of ``config`` (a PintleEngineConfig), grouped by section.

Definition at line 184 of file parameter_registry.py.

References _dict_value_model(), _leaf(), _models_in(), and _walk().

Variable Documentation

◆ _NOT_UNIT

engine.pipeline.parameter_registry._NOT_UNIT = re.compile(r"[A-Z]{4,}| — | - ")
protected

Definition at line 23 of file parameter_registry.py.

◆ _SECTION_LABEL

engine.pipeline.parameter_registry._SECTION_LABEL = dict(SECTIONS)
protected

Definition at line 55 of file parameter_registry.py.

◆ _UNIT

engine.pipeline.parameter_registry._UNIT = re.compile(r"\[([^\‍[\‍]]{1,28})\‍]")
protected

Definition at line 21 of file parameter_registry.py.

◆ INTERNAL_SECTIONS

engine.pipeline.parameter_registry.INTERNAL_SECTIONS = frozenset({"design_valid_for"})

Definition at line 61 of file parameter_registry.py.

◆ LEGACY_SECTIONS

engine.pipeline.parameter_registry.LEGACY_SECTIONS = frozenset({"chamber", "nozzle"})

Definition at line 58 of file parameter_registry.py.

◆ SECTIONS

list engine.pipeline.parameter_registry.SECTIONS
Initial value:
1= [
2 ("design_requirements", "Requirements & optimizer"),
3 ("fluids", "Propellants"),
4 ("injector", "Injector"),
5 ("discharge", "Discharge & Cd"),
6 ("spray", "Spray & vaporisation"),
7 ("combustion", "Combustion & CEA"),
8 ("chamber_geometry", "Chamber & nozzle"),
9 ("chamber", "Chamber (legacy)"),
10 ("nozzle", "Nozzle (legacy)"),
11 ("ablative_cooling", "Ablative liner"),
12 ("graphite_insert", "Graphite insert"),
13 ("stainless_steel_case", "Case"),
14 ("regen_cooling", "Regenerative cooling"),
15 ("film_cooling", "Film cooling"),
16 ("stability", "Stability"),
17 ("feed_system", "Feed system"),
18 ("lox_tank", "LOX tank"),
19 ("fuel_tank", "Fuel tank"),
20 ("press_tank", "Pressurant"),
21 ("rocket", "Vehicle"),
22 ("environment", "Environment"),
23 ("thrust", "Thrust profile"),
24 ("pressure_curves", "Pressure curves"),
25 ("solver", "Solver"),
26 ("optimizer", "Optimizer"),
27 ("propellant_preset", "Propellant preset"),
28 ("design_valid_for", "Design state"),
29]

Definition at line 26 of file parameter_registry.py.