Summary
SpeciesComponentConfig in adept/_vlasov1d/datamodel.py currently inlines envelope fields (center, rise, width, bump_height, bump_or_trough, slope) at the top level instead of nesting them in an EnvelopeConfig.
This makes the model a flat union of fields from different density basis types (sine, linear, exponential, tanh, uniform), all optional, which is fragile and hard to validate per-basis.
Proposed change
Refactor SpeciesComponentConfig to use a nested EnvelopeConfig for the envelope fields, similar to how EMDriverConfig uses envelope: SpaceTimeEnvelopeConfig.
This would require updating the YAML config format for density components, so it's a breaking change that should be coordinated.
Context
This was identified during the pydantic model update that introduced typed *Config models and from_config methods across the vlasov1d module.
Summary
SpeciesComponentConfiginadept/_vlasov1d/datamodel.pycurrently inlines envelope fields (center, rise, width, bump_height, bump_or_trough, slope) at the top level instead of nesting them in anEnvelopeConfig.This makes the model a flat union of fields from different density basis types (sine, linear, exponential, tanh, uniform), all optional, which is fragile and hard to validate per-basis.
Proposed change
Refactor
SpeciesComponentConfigto use a nestedEnvelopeConfigfor the envelope fields, similar to howEMDriverConfigusesenvelope: SpaceTimeEnvelopeConfig.This would require updating the YAML config format for density components, so it's a breaking change that should be coordinated.
Context
This was identified during the pydantic model update that introduced typed
*Configmodels andfrom_configmethods across the vlasov1d module.