Component Base Class
- class tabascal.components.Component[source]
Base class for all tabascal components
- build_constants() Dict[str, Any][source]
Return arrays that do not change during the forward pass.
Returns a dict of array_name -> array_value. These will be stored in constants as “_c/<ClassName>/array_name” by Model.__init__.
- config_params: Dict[str, Param] = {}
Config parameters this component reads, keyed by their dotted path in the config file. Declared here, next to the code that reads them, so a component and its requirements can never drift apart. Only the components named in
model.componentscontribute to a run’s schema – seetabascal.config_schema.collect_params(). Subclasses extend (and may override) what their base declared; the parameters read outside any component live ontabascal.config.TabConfig.
- require_double(config: Any) None[source]
Raise if this
requires_doublecomponent is run in single precision.Some components only work in double precision: the SGP4/phase trajectory components (differentiable orbits). Those set
requires_double = Trueand call this at the top ofsetupso they fail with a clear message under single precision instead of producing silently-wrong fp32 results. Driven by therequires_doubleflag so it stays in sync with the run-time preflight.
- tabascal.components.axis_extent(x, dx) float[source]
The span of a sampled axis, falling back to its sample spacing.
The default correlation length of a Gaussian-process prior is the extent of the axis it is defined on. A single-sample axis has zero extent, which is not a usable length scale, so the sample spacing (one channel / one integration) stands in for it.