Skip to content

Conversation

dee-mew
Copy link

@dee-mew dee-mew commented Sep 10, 2025

Code is tested with the attached script.
test_issue59.py

Test output log attached.
testresult_issue59.txt

Also tested with "imas:hdf5?path=/work/imas/shared/imasdb/ITER_MD/3/150100/5"
Test result attached.
testresult_issue59_magnetics_150100_5.txt

[INPUT]

$ idsprint --uri "imas:hdf5?path=/home/ITER/hoeneno/public/expdata/ITER/MD#wall/description_2d[0]/limiter"
16:14:47 INFO     Parsing data dictionary version 4.0.0 @dd_zip.py:166
16:14:48 INFO     Parsing data dictionary version 3.42.0 @dd_zip.py:166
limiter
├── description_2d[0]/limiter/type
│   ├── name: 'Divertor and FW'
│   ├── index: 1
│   └── description: 'Divertor and FW contour'
├── description_2d[0]/limiter/unit[0]
│   ├── name: 'First Wall'
│   ├── closed: 0
│   └── description_2d[0]/limiter/unit[0]/outline
│       ├── r: array([4.1113, 4.1113, 4.1113, ..., 7.8949, 7.2779, 6.2111])
│       └── z: array([-2.4956, -1.4833, -0.468 , ..., -1.3262, -2.2421, -3.0686])
└── description_2d[0]/limiter/unit[1]
    ├── name: 'Divertor'
    ├── closed: 0
    └── description_2d[0]/limiter/unit[1]/outline
        ├── r: array([3.9421, 4.1146, 4.2141, ..., 6.1549, 6.2651, 6.3632])
        └── z: array([-2.5357, -2.5462, -2.5774, ..., -3.2296, -3.2286, -3.2446])

[OUTPUT]

$ idsprint --uri "imas:hdf5?path=/home/ITER/meward/Work/IMAS-Python/imas/testdb/#wall/description_2d[0]/limiter" 
16:14:32 INFO     Parsing data dictionary version 4.0.0 @dd_zip.py:166
limiter
├── description_2d[0]/limiter/type
│   ├── name: 'Divertor and FW'
│   ├── index: 1
│   └── description: 'Divertor and FW contour'
├── description_2d[0]/limiter/unit[0]
│   ├── description: 'First Wall'
│   └── description_2d[0]/limiter/unit[0]/outline
│       ├── r: array([4.1113, 4.1113, 4.1113, ..., 7.8949, 7.2779, 6.2111])
│       └── z: array([-2.4956, -1.4833, -0.468 , ..., -1.3262, -2.2421, -3.0686])
└── description_2d[0]/limiter/unit[1]
    ├── description: 'Divertor'
    └── description_2d[0]/limiter/unit[1]/outline
        ├── r: array([3.9421, 4.1146, 4.2141, ..., 6.1549, 6.2651, 6.3632])
        └── z: array([-2.5357, -2.5462, -2.5774, ..., -3.2296, -3.2286, -3.2446])

@olivhoenen
Copy link
Collaborator

Great, thank you @dee-mew. There are some code style issues raised by the linter, please check https://imas-python.readthedocs.io/en/stable/code_style.html#code-style-and-linting and fix them.

@dee-mew
Copy link
Author

dee-mew commented Sep 12, 2025

@olivhoenen : Resolved the lint warnings

Signed-off-by: Deepak Mewar <deepak.mewar@iter.org>
@dee-mew dee-mew force-pushed the renaming_3to4_name_identifier branch from dd2ca25 to e382589 Compare September 12, 2025 13:48
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.

[DD3to4] Convert name/identifier (DD3) into description/name (DD4)
3 participants