Repository navigation
Fix AEQDSK RSURF/ZSURF/AMINOR unit conversion: data is in metres, not cm - #442
Conversation
DIII-D EFIT stores AEQDSK.RSURF, AEQDSK.ZSURF, and AEQDSK.AMINOR with units of metres in the MDSplus tree. The previous /100. conversions assumed centimetres, returning values ~100x too small: boundary_separatrix.geometric_axis.r → ~0.017 m (expected ~1.7 m) boundary_separatrix.minor_radius → ~0.006 m (expected ~0.6 m) Verified on DIII-D shots 163303 and 200000: AEQDSK.AMINOR ∈ [0.57, 0.63] m and AEQDSK.RSURF ∈ [1.63, 1.70] m with units explicitly labelled "metres" in the MDSplus tree. ZSURF follows the same EFIT unit convention. Note: AEQDSK.SEPLIM, GAPIN, GAPOUT, GAPTOP, and GAPBOT also carry a /100. conversion and should be checked against the tree units before a follow-up fix. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
torrinba
left a comment
There was a problem hiding this comment.
Good catch! I've confirmed that the MDSplus units for these are meters, which differs from the EFIT a-files and is likely the source of the error.
|
@torrinba So there are units stored for this one? I wonder if that could be part of the regression tests. |
That's correct. Most of the MDSplus equilibrium entries have units and all the ones I've checked are valid. We could add a test for the order of magnitude of some variables like Are you suggesting this should be an |
Problem
boundary_separatrix.geometric_axis.r,geometric_axis.z, andminor_radiusreturn values ~100× too small on DIII-D.
geometric_axis.rminor_radiusRoot cause
The
_efit.jsonmappings apply a/100.conversion assuming CGS (cm), butDIII-D MDSplus stores
AEQDSK.RSURF,AEQDSK.ZSURF, andAEQDSK.AMINORin metres with units explicitly labelled in the tree.
Verified on shots 163303 :
AEQDSK.AMINOR∈ [0.57, 0.63] m (units: metres)AEQDSK.RSURF∈ [1.63, 1.70] m (units: metres)Fix
Remove the
/100.from three TDI expressions in_efit.json.Related
The same erroneous
/100.appears onAEQDSK.SEPLIM,GAPIN,GAPOUT,GAPTOP, andGAPBOT. These have not been verified yet and are leftfor a follow-up issue/PR after confirming tree units.
Corresponding fix in imas_composer: boundary_separatrix.geometric_axis.r and minor_radius return ~100x wrong values on DIII-D GA-FDP/imas_composer#112
🤖 Generated with Claude Code