|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
Public Member Functions | |
| None | __post_init__ (self) |
| ParamSpec | param (self, str name) |
| tuple[ParamSpec,...] | params_for (self, str model) |
| dict[str, Param] | validate (self, dict[str, Param] given, str model="") |
| dict[str, Curve] | validate_curves (self, dict[str, Curve] given, str model="") |
| dict[str, str] | validate_options (self, dict[str, str] given, str model="") |
| dict[str, Param] | defaults (self, str model="") |
| dict[str, Any] | to_dict (self) |
Public Attributes | |
| type | |
| description | |
Static Public Attributes | |
| tuple | params = () |
| tuple | ports = () |
| tuple | states = () |
| tuple | curves = () |
| tuple | options = () |
| tuple | models = ("default",) |
Static Protected Attributes | |
| dict | _by_name = field(default_factory=dict, repr=False) |
| None feedtwin.model.spec.ComponentSpec.__post_init__ | ( | self | ) |
Definition at line 176 of file spec.py.
References feedtwin.model.spec._duplicates(), actuator_testing_gui.ActuatorTestingWindow.curves, feedtwin.model.catalog.Part.curves, feedtwin.model.component.ComponentInstance.curves, curves, gui.App.curves, lc_calibration_gui.LCPlotWindow.curves, feedtwin.model.curve.CurveSpec.models, models, feedtwin.model.spec.OptionSpec.models, feedtwin.model.spec.ParamSpec.models, feedtwin.model.component.ComponentInstance.options, options, feedtwin.comps.correlations.FittingContext.params, feedtwin.model.catalog.Part.params, feedtwin.model.component.ComponentInstance.params, and params.
| dict[str, Param] feedtwin.model.spec.ComponentSpec.defaults | ( | self, | |
| str | model = "" ) |
Every defaulted parameter for a model. What a new instance starts as.
Definition at line 358 of file spec.py.
References feedtwin.model.curve.CurveSpec.models, models, feedtwin.model.spec.OptionSpec.models, feedtwin.model.spec.ParamSpec.models, and params_for().
| ParamSpec feedtwin.model.spec.ComponentSpec.param | ( | self, | |
| str | name ) |
| tuple[ParamSpec, ...] feedtwin.model.spec.ComponentSpec.params_for | ( | self, | |
| str | model ) |
Parameters that apply to one fidelity model.
Definition at line 205 of file spec.py.
References feedtwin.comps.correlations.FittingContext.params, feedtwin.model.catalog.Part.params, feedtwin.model.component.ComponentInstance.params, and params.
Referenced by defaults().
| dict[str, Any] feedtwin.model.spec.ComponentSpec.to_dict | ( | self | ) |
A plain-data description -- what the Phase 10 inspector consumes.
Definition at line 367 of file spec.py.
Referenced by calibration_robustness.SystemConfig.save(), engine.control.robust_ddp.data_models.ControllerConfig.to_json(), and engine.control.robust_ddp.data_models.ControllerConfig.to_yaml().
| dict[str, Param] feedtwin.model.spec.ComponentSpec.validate | ( | self, | |
| dict[str, Param] | given, | ||
| str | model = "" ) |
Check a configuration and return it with defaults filled in.
Every check that can be made without solving anything is made here, and
all failures are reported together rather than one per run -- fixing a
config six errors at a time beats six edit-run cycles.
Raises:
SpecError: unknown or missing parameters, wrong dimensions, or
values outside declared bounds.
Definition at line 209 of file spec.py.
References feedtwin.model.spec._bounds_problem(), _by_name, feedtwin.model.curve.CurveSpec.models, models, feedtwin.model.spec.OptionSpec.models, feedtwin.model.spec.ParamSpec.models, feedtwin.comps.correlations.FittingContext.params, feedtwin.model.catalog.Part.params, feedtwin.model.component.ComponentInstance.params, params, type, radio_link::Frame.type, radio_rx_t.type, and rec_t.type.
| dict[str, Curve] feedtwin.model.spec.ComponentSpec.validate_curves | ( | self, | |
| dict[str, Curve] | given, | ||
| str | model = "" ) |
Check tabulated data the same way scalars are checked. Same three failures as :meth:`validate`: unknown name, missing when required, wrong dimension on either axis. A Cv-versus-position curve whose x axis is a pressure is exactly as wrong as a scalar bore in psi, and should fail in the same place.
Definition at line 276 of file spec.py.
References actuator_testing_gui.ActuatorTestingWindow.curves, feedtwin.model.catalog.Part.curves, feedtwin.model.component.ComponentInstance.curves, curves, gui.App.curves, lc_calibration_gui.LCPlotWindow.curves, feedtwin.model.curve.CurveSpec.models, models, feedtwin.model.spec.OptionSpec.models, and feedtwin.model.spec.ParamSpec.models.
| dict[str, str] feedtwin.model.spec.ComponentSpec.validate_options | ( | self, | |
| dict[str, str] | given, | ||
| str | model = "" ) |
Check categorical choices and fill in defaults.
Definition at line 324 of file spec.py.
References feedtwin.model.curve.CurveSpec.models, models, feedtwin.model.spec.OptionSpec.models, feedtwin.model.spec.ParamSpec.models, feedtwin.model.component.ComponentInstance.options, and options.
|
staticprotected |
Definition at line 174 of file spec.py.
Referenced by param(), and validate().
|
static |
Definition at line 171 of file spec.py.
Referenced by __post_init__(), and validate_curves().
|
static |
Definition at line 173 of file spec.py.
Referenced by __post_init__(), defaults(), validate(), validate_curves(), and validate_options().
|
static |
Definition at line 172 of file spec.py.
Referenced by __post_init__(), and validate_options().
|
static |
Definition at line 168 of file spec.py.
Referenced by __post_init__(), params_for(), test_robust_ddp_dynamics.TestDynamics.test_blowdown_decreases_pressure(), test_robust_ddp_dynamics.TestDynamics.test_control_clamping(), test_robust_ddp_dynamics.TestDynamics.test_copv_blowdown(), test_robust_ddp_dynamics.TestDynamics.test_feed_pressure_lag(), test_robust_ddp_ddp_solver.TestDDPSolver.test_forward_rollout(), test_robust_ddp_dynamics.TestDynamics.test_linearize_accuracy(), test_robust_ddp_dynamics.TestDynamics.test_linearize_shape(), test_robust_ddp_dynamics.TestDynamics.test_pressurization_increases_pressure(), test_robust_ddp_dynamics.TestDynamics.test_state_non_negative(), test_robust_ddp_dynamics.TestDynamics.test_step_basic(), test_robust_ddp_robustness.TestRobustness.test_tube_propagate_basic(), test_robust_ddp_robustness.TestRobustness.test_tube_propagate_validation(), test_robust_ddp_robustness.TestRobustness.test_tube_propagate_widens(), test_robust_ddp_robustness.TestRobustness.test_tube_propagate_with_large_w_bar(), test_robust_ddp_dynamics.TestDynamics.test_ullage_volume_increases(), test_robust_ddp_dynamics.TestDynamics.test_zero_mass_flow(), and validate().
| feedtwin.model.spec.ComponentSpec.type |
Definition at line 370 of file spec.py.
Referenced by feedtwin.pid.document.PidNode.is_annotation(), feedtwin.pid.document.PidNode.is_inline(), feedtwin.pid.document.PidNode.is_instrument(), feedtwin.pid.document.PidNode.is_source(), feedtwin.model.catalog.Part.to_dict(), feedtwin.model.component.ComponentInstance.to_dict(), and validate().