Skip to content

DD3to4: name/identifier not converted when inside a renamed array of structures #117

@maarten-ic

Description

@maarten-ic

The conversion mechanism implemented with #59 (and adjusted with #115) doesn't work for renamed arrays of structures.

For example:

import imas

mag = imas.IDSFactory("3.39.0").magnetics()
mag.b_field_tor_probe.resize(1)
mag.b_field_tor_probe[0].name = "name"
mag.b_field_tor_probe[0].identifier = "identifier"

mag4 = imas.convert_ids(mag, "4.0.0")
imas.util.print_tree(mag4)

Gives output

11:28:48 INFO     Parsing data dictionary version 4.0.0 @dd_zip.py:89
11:28:49 INFO     Starting conversion of IDS magnetics from version 3.39.0 to version 4.0.0. @ids_convert.py:588
11:28:49 WARNING  Element 'b_field_tor_probe/identifier' does not exist in the target IDS. Data is not copied. @ids_convert.py:691
11:28:49 INFO     Conversion of IDS magnetics finished. @ids_convert.py:626
magnetics
└── b_field_phi_probe[0]
    └── name: 'name'

Expected result:

magnetics
└── b_field_phi_probe[0]
    ├── name: 'identifier'
    └── description: 'name'

Metadata

Metadata

Assignees

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