Skip to content

Feature/new waveform format - #195

Open
SBlokhuizen wants to merge 4 commits into
developfrom
feature/new-waveform-format
Open

SBlokhuizen wants to merge 4 commits into
developfrom
feature/new-waveform-format

Conversation

@SBlokhuizen

@SBlokhuizen SBlokhuizen commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

Changes to simplify the waveform format and actor, compared to the version used currently in the PDS.

Changes to waveform YAML syntax

  • Top-level structure changes: removed globals, and added input and output fields.
  • imports: no longer supports MUSCLE3 {port: <name>} values, only URIs are supported
  • Reference syntax changed: {type: import/reference, ref: ...} tendency to {copy: <import>}. References are no longer mixable with analytic tendencies in the same list.
  • Wildcard referencing is removed. The full paths must now explicitly be given.

Changes to waveform Actor

  • Removed overlay mode (writing onto a received IDS, preserving its other fields) and port-based imports
  • Now requires exactly one F_INIT port, always _in. Only its root time is read, which determines which time slice to output the waveforms onto.

Example of the new format for a prescribed transport run in the PDS:

Details
# Example of a prescribed_transport run
dd_version: 4.1.1

input:
  scenario: "imas:hdf5?path=/home/sebbe/projects/iter_python/pds-scenarios/105092/data/in"
  machine: "imas:hdf5?path=/home/sebbe/projects/iter_python/pds-scenarios/105092/data/in_md"

output:
  field:
    equilibrium/vacuum_toroidal_field/r0: 6.2
    equilibrium/vacuum_toroidal_field/b0: -2.65

  plasma_current:
    equilibrium/time_slice/global_quantities/ip:
      - {
          time: [3.82, 8.12, 12.32, 145.22, 150.30, 167.20],
          value: [-1.919e6, -2.696e6, -3.037e6, -3.052e6, -2.705e6, -0.772e6],
        }

  shape:
    equilibrium/time_slice/boundary/outline/r: { copy: scenario }
    equilibrium/time_slice/boundary/outline/z: { copy: scenario }

  flux_state:
    equilibrium/time_slice/global_quantities/psi_boundary: { copy: scenario }
    equilibrium/time_slice/profiles_1d/psi: { copy: scenario }
    equilibrium/time_slice/profiles_1d/f_df_dpsi: { copy: scenario }
    equilibrium/time_slice/profiles_1d/dpressure_dpsi: { copy: scenario }

  wall:
    wall/ids_properties/creation_date: { copy: machine }
    wall/description_2d(:)/type/index: { copy: machine }
    wall/description_2d(:)/limiter/type/name: { copy: machine }
    wall/description_2d(:)/limiter/type/index: { copy: machine }
    wall/description_2d(:)/limiter/type/description: { copy: machine }
    wall/description_2d(:)/limiter/unit(:)/name: { copy: machine }
    wall/description_2d(:)/limiter/unit(:)/component_type/name:
      { copy: machine }
    wall/description_2d(:)/limiter/unit(:)/component_type/index:
      { copy: machine }
    wall/description_2d(:)/limiter/unit(:)/component_type/description:
      { copy: machine }
    wall/description_2d(:)/limiter/unit(:)/outline/r: { copy: machine }
    wall/description_2d(:)/limiter/unit(:)/outline/z: { copy: machine }
    wall/description_2d(:)/vessel/type/name: { copy: machine }
    wall/description_2d(:)/vessel/type/index: { copy: machine }
    wall/description_2d(:)/vessel/type/description: { copy: machine }

  pf_passive:
    pf_passive/ids_properties/comment: { copy: machine }
    pf_passive/ids_properties/creation_date: { copy: machine }
    pf_passive/ids_properties/provenance/node(:)/reference(:)/name:
      { copy: machine }
    pf_passive/loop(:)/name: { copy: machine }
    pf_passive/loop(:)/resistance: { copy: machine }
    pf_passive/loop(:)/resistivity: { copy: machine }
    pf_passive/loop(:)/element(:)/name: { copy: machine }
    pf_passive/loop(:)/element(:)/description: { copy: machine }
    pf_passive/loop(:)/element(:)/turns_with_sign: { copy: machine }
    pf_passive/loop(:)/element(:)/geometry/geometry_type: { copy: machine }
    pf_passive/loop(:)/element(:)/geometry/oblique/r: { copy: machine }
    pf_passive/loop(:)/element(:)/geometry/oblique/z: { copy: machine }
    pf_passive/loop(:)/element(:)/geometry/oblique/length_alpha:
      { copy: machine }
    pf_passive/loop(:)/element(:)/geometry/oblique/length_beta:
      { copy: machine }
    pf_passive/loop(:)/element(:)/geometry/oblique/alpha: { copy: machine }
    pf_passive/loop(:)/element(:)/geometry/oblique/beta: { copy: machine }
    pf_passive/loop(:)/element(:)/geometry/rectangle/r: { copy: machine }
    pf_passive/loop(:)/element(:)/geometry/rectangle/z: { copy: machine }
    pf_passive/loop(:)/element(:)/geometry/rectangle/width: { copy: machine }
    pf_passive/loop(:)/element(:)/geometry/rectangle/height: { copy: machine }

  iron_core:
    iron_core/ids_properties/homogeneous_time: { copy: machine }

  pf_active:
    pf_active/ids_properties/comment: { copy: machine }
    pf_active/ids_properties/provider: { copy: machine }
    pf_active/ids_properties/creation_date: { copy: machine }
    pf_active/ids_properties/provenance/node(:)/reference(:)/name:
      { copy: machine }
    pf_active/coil(:)/name: { copy: machine }
    pf_active/coil(:)/description: { copy: machine }
    pf_active/coil(:)/resistance: { copy: machine }
    pf_active/coil(:)/current_limit_max: { copy: machine }
    pf_active/coil(:)/b_field_max: { copy: machine }
    pf_active/coil(:)/temperature: { copy: machine }
    pf_active/coil(:)/element(:)/turns_with_sign: { copy: machine }
    pf_active/coil(:)/element(:)/geometry/geometry_type: { copy: machine }
    pf_active/coil(:)/element(:)/geometry/rectangle/r: { copy: machine }
    pf_active/coil(:)/element(:)/geometry/rectangle/z: { copy: machine }
    pf_active/coil(:)/element(:)/geometry/rectangle/width: { copy: machine }
    pf_active/coil(:)/element(:)/geometry/rectangle/height: { copy: machine }
    pf_active/coil(:)/element(:)/geometry/outline/r: { copy: machine }
    pf_active/coil(:)/element(:)/geometry/outline/z: { copy: machine }
    pf_active/circuit(:)/name: { copy: machine }
    pf_active/circuit(:)/description: { copy: machine }
    pf_active/circuit(:)/connections: { copy: machine }
    pf_active/supply(:)/name: { copy: machine }
    pf_active/supply(:)/description: { copy: machine }
    pf_active/supply(:)/current_limit_max: { copy: machine }
    pf_active/supply(:)/current_limit_min: { copy: machine }
    pf_active/supply(:)/voltage_limit_max: { copy: machine }
    pf_active/supply(:)/voltage_limit_min: { copy: machine }

  coil_currents:
    pf_active/coil(:)/current/data: { copy: scenario }
    pf_active/coil(1)/current/data: # CS3U
      - {
          time:
            [
              3.84,
              8.07,
              12.29,
              24.96,
              46.07,
              50.29,
              58.74,
              71.41,
              105.19,
              145.25,
              167.18,
            ],
          value:
            [
              -11017,
              -10688,
              -8455,
              -4873,
              -2128,
              207,
              2953,
              2225,
              8469,
              10229,
              6019,
            ],
        }
    pf_active/coil(3)/current/data: # CS1U
      - {
          time:
            [
              3.84,
              8.07,
              12.29,
              41.85,
              46.07,
              58.74,
              62.96,
              105.19,
              145.25,
              150.29,
              167.18,
            ],
          value:
            [
              -11003,
              -6460,
              -4304,
              3999,
              4660,
              1099,
              1251,
              8909,
              18554,
              18969,
              16421,
            ],
        }
    pf_active/coil(4)/current/data: | # CS1L carries the same current as CS1U
      'pf_active/coil(3)/current/data'

@SBlokhuizen
SBlokhuizen force-pushed the feature/new-waveform-format branch from 798bcfa to a4f1b53 Compare September 17, 2026 14:55
@SBlokhuizen
SBlokhuizen force-pushed the feature/new-waveform-format branch 6 times, most recently from ae0d4e5 to 9d82c85 Compare September 21, 2026 09:41
@SBlokhuizen
SBlokhuizen force-pushed the feature/new-waveform-format branch from 9d82c85 to 3997316 Compare September 21, 2026 09:47
@SBlokhuizen
SBlokhuizen marked this pull request as ready for review September 21, 2026 09:51
@SBlokhuizen

Copy link
Copy Markdown
Collaborator Author

@DaanVanVugt Could you have a look at this PR? Thanks!

Comment thread waveform_editor/yaml/yaml_parser.py
Comment thread waveform_editor/yaml/yaml_parser.py
Comment thread waveform_editor/export/exporter.py
self.pipe = streams.Pipe()

self.pane = pn.pane.HoloViews(sizing_mode="stretch_both")
self.no_preview_message = pn.pane.Markdown(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this relevant for the format changes? could be split in another pr to tame this monster a bit. or mention it in the pr desc

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is relevant for this PR, because this should be shown if a referenced waveform is selected which is not a time trace, because then we can not visualize it as a waveform.

@SBlokhuizen
SBlokhuizen force-pushed the feature/new-waveform-format branch from bf7eb98 to ab5cbaa Compare September 21, 2026 14:14

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants