Skip to content

[Umbrella] Compose VAFT event/state products into a plasma-evolution timeline and physics-association framework #667

Description

@HongSik-Yun-Fusion

Summary

VAFT already has several domain-specific efforts that detect or represent plasma events, states, actuator commands, measured responses, and physics-model outputs. What is still missing is a common composition layer that connects these existing products along one discharge timeline without duplicating their domain logic.

This issue establishes a general plasma-evolution timeline and a physics-association layer for both normal and off-normal operation.

Conceptually:

actuator history
+ diagnostic events
+ plasma states / transitions
+ equilibrium / stability / response quantities
        ↓
common plasma-evolution timeline
        ↓
event / state / physics association
        ↓
shot-level and database-scale analysis

The key rule is:

Keep each domain-specific detector or data product as the source of truth; the common framework composes and references them rather than reimplementing them.


Existing VAFT groundwork

This work should build on, not replace, existing issues:

The new layer should generalize the common patterns already present across these efforts.


Scope

1. Minimal common event contract

Define the smallest domain-independent contract needed to compose existing event-like products, for example:

event identity
time
category
source product / diagnostic
method
quality / confidence
flags
provenance

Do not force all domains into a large class hierarchy if their existing result objects can satisfy the common contract through adapters.

2. Distinguish events, states, and transitions

Keep temporal markers and finite-duration physical states semantically separate.

Examples:

plasma_onset      -> event
L_mode            -> state
lh_transition     -> transition
mode_locking      -> transition/event boundary
current_quench    -> state/interval

A transition should be able to relate state_before and state_after where defensible.

3. Preserve actuator-command vs response semantics

Follow the separation already established by #229 and #617:

programmed actuator command
        !=
measured actuator response
        !=
plasma response

The timeline should reference these independently rather than collapsing them into one actuator event.

4. Compose a shot-level plasma timeline

Provide a common composition API that can sort and query events from independent producers, conceptually:

timeline = compose_plasma_timeline(
    plasma_onset=...,
    gas_timing=...,
    disruption_events=...,
    actuator_schedule=...,
    optional_events=...,
)

The timeline must preserve source ownership and provenance.

5. Represent state intervals

Support interval composition from authoritative event/state boundaries so that downstream analysis can query the physical state at a given time, for example:

pre_plasma
plasma_present
beam_heated
L_mode / H_mode
locked
current_quench

The first implementation should use explicit interval composition, not a large automatic state machine.

6. Add generic temporal relations

Generalize patterns already used in #616 and #617:

Δt(gas_response, plasma_onset)
Δt(nbi_on, lh_transition)
Δt(mode_locking, current_quench_start)
Δt(rmp_on, penetration)

Missing and ambiguous associations must remain explicit.

7. Associate events/states with physics products

Equilibrium, stability, and plasma-response quantities remain owned by their existing data products. Do not duplicate them inside the timeline.

Instead support operations such as:

sample metric at event time
summarize metric over state interval
compare metric before/after transition

Examples:

Δ'(t_lock)
q95(t_transition)
βN over H-mode interval
response metric before/after penetration

This creates the bridge between event characterization and physics/stability calculations without coupling detectors to individual solvers.


Intended applications

The same framework should eventually support trajectories such as:

prefill
→ plasma onset
→ current ramp-up
→ equilibrium formation
→ auxiliary heating
→ L-H transition
→ flat-top
RMP on
→ plasma response evolution
→ penetration / locking
→ suppression or recovery
MHD precursor
→ thermal collapse
→ current-quench sequence
→ plasma-wall interaction

Disruption analysis therefore remains one specialization of the more general plasma-evolution representation.


Implementation phases

Phase 1 — inventory and composition contract

  • inventory current event/state-like result objects;
  • define the minimal common event contract;
  • implement shot-level chronological composition;
  • preserve source/provenance;
  • add generic event-to-event timing utilities.

Phase 2 — connect existing products

Connect at least:

Phase 3 — state intervals

Add minimal interval composition for existing states such as pre-plasma, plasma-present, and current-quench intervals, with actuator-derived states where semantics are unambiguous.

Phase 4 — physics association

Add generic APIs to:

  • sample a physics quantity at an event;
  • summarize it over a state interval;
  • compare it before and after a transition.

Phase 5 — extend to additional physics domains

Candidates include:

  • L-H / H-L transition;
  • NBI / EC heating states;
  • mode locking / unlocking;
  • RMP penetration / recovery;
  • flux closure / equilibrium formation;
  • additional disruption precursor chains.

Provenance principles

Every composed event or relation must retain enough information to trace:

source product / diagnostic
algorithm or definition
parameter set
software version where available
time convention
quality / ambiguity flags
literature provenance where applicable

For literature-defined detectors, keep the relationship explicit:

published scientific definition
    ↓
independent VAFT implementation
    ↓
reproducible validation

The framework does not target software or algorithmic parity with any external event-analysis system.


Acceptance criteria


Non-goals

The initial responsibility of this framework is temporal alignment, semantic composition, provenance, and physics association.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions