Add summary IDS mapper: TRANSPORT.GLOBAL.TIMES.TAUE → tau_energy - #70
Open
smithsp wants to merge 1 commit into
Open
Add summary IDS mapper: TRANSPORT.GLOBAL.TIMES.TAUE → tau_energy#70smithsp wants to merge 1 commit into
smithsp wants to merge 1 commit into
Conversation
Maps DIII-D TRANSPORT MDSplus tree data to the IMAS summary IDS.
New files:
imas_composer/ids/summary.py — SummaryMapper(IDSMapper)
imas_composer/ids/summary.yaml — field ledger
Implemented fields:
summary.global_quantities.tau_energy.value
← \TRANSPORT::TOP.GLOBAL.TIMES.TAUE (seconds, as stored)
summary.global_quantities.tau_energy.time
← dim_of(\TRANSPORT::TOP.GLOBAL.TIMES.TAUE, 0) / 1e3 (ms → s)
The SummaryMapper follows the same DIRECT→COMPUTED two-stage pattern
used by other mappers (tf, nbi, etc.) and is auto-discovered by
IDSFactory via the snake_to_pascal naming convention.
Tests:
tests/test_summary_requirements.py — parametric requirement resolution
tests/test_summary_composition.py — value checks (array, finite,
positive, plausible DIII-D range 0.01–1.0 s, time in seconds,
monotonic, same length as time array)
tests/test_config_summary.yaml — skip OMAS comparison (summary is
a derived IDS in OMAS, not read directly from MDSplus)
Motivation: enables TR-TSV IPB98(y,2) model to compare its predicted
tau_E against the TRANSPORT-tree measured value, and allows any model
in the confinement category to use summary.global_quantities.tau_energy
as a reference for metric computation.
Collaborator
|
This is missing some of the meta information. This is a computed quantity, where did it come from? |
AreWeDreaming
requested changes
Aug 3, 2026
AreWeDreaming
left a comment
Collaborator
There was a problem hiding this comment.
The convention (and i guess it is not documented) is to not do math on the remote but do all math locally.
| dim_of(..., 0) returns milliseconds; divide by 1e3 to convert to seconds. | ||
| """ | ||
| key = Requirement( | ||
| r"dim_of(\TRANSPORT::TOP.GLOBAL.TIMES.TAUE, 0) / 1e3", |
Collaborator
There was a problem hiding this comment.
The conversion should not happen in an MDSplus query but be done locally.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SummaryMapperthat maps DIII-D TRANSPORT MDSplus tree data to the IMASsummaryIDSsummary.global_quantities.tau_energy.valueandsummary.global_quantities.tau_energy.timeMDSplus mapping
summary.global_quantities.tau_energy.value\TRANSPORT::TOP.GLOBAL.TIMES.TAUEsummary.global_quantities.tau_energy.timedim_of(\TRANSPORT::TOP.GLOBAL.TIMES.TAUE, 0) / 1e3TAUEis stored in seconds. The time dimension is stored in milliseconds and is converted to seconds on fetch.Motivation
The
summaryIDS was the last missing piece preventing the TR-TSV IPB98(y,2) confinement time model from comparing its predicted τ_E against the measured experimental value. With this mapper, the reference pathsummary.global_quantities.tau_energy.valuebecomes fetchable from MDSplus, enabling metric computation in theconfinementvalidation category.Tests
tests/test_summary_requirements.py— parametric test that each field's requirements resolve without error (follows the pattern of all othertest_*_requirements.pyfiles)tests/test_summary_composition.py— composition tests verifying:tests/test_config_summary.yaml— skips OMAS comparison (thesummaryIDS is derived/computed in OMAS rather than read directly from MDSplus, so there is no direct OMAS reference to compare against)Test plan
pytest tests/test_summary_requirements.pyon a machine with DIII-D MDSplus access (requires TRANSPORT tree for reference shots)pytest tests/test_summary_composition.pyon same machinesimple_load(['summary.global_quantities.tau_energy.value'], <shot>)returns a sensible time trace for a known H-mode shot🤖 Generated with Claude Code