Disallow explicit indices in coordinates#179
Disallow explicit indices in coordinates#179maarten-ic wants to merge 1 commit intoiterorganization:developfrom
Conversation
|
Mentioning an explicit index in an AoS may be linked to the assumption that the AoS children have always the same size, as in the camera_ir example : the size of camera frames doesn't change with time. We should be able to make this assumption explicit and to allow referring to the first index only. Otherwise we would have to repeat the calibration data for each time slice in the camera_ir IDS |
So what is the next step? |
|
I am not sure why (1) is problematic. Does it help if we indicate for the coordinate: |
Could be error prone if C++/Python code users are putting this 1 index in their code (and again it's the only place in the entire DD where an index value is explicitly given).
That would be ok I guess ,to be checked with the validate functions. And note that we can't say that all child of frame can have the same size, as I guess that |
The validation logic should be able to handle this (no validation is performed for this case, as discussed in IMAS-4675). IMAS-Python handles this case here: https://github.com/iterorganization/IMAS-Python/blob/develop/imas/ids_coordinates.py#L374-L381
The number of pixels is not time-dependent in this IDS (link to docs), so all frames must have the same number of pixels, no? |
|
At our last progress meeting, we have agreed to use the syntax frame(:) to note that any index will work, in case the coordinate is within an AoS but always has the same size (for all AoS indices). |
Fixes #157
As discussed in the progress meeting this morning. Note that this makes some existing coordinates invalid (hence the failing CI):
📚 Documentation preview 📚: https://imas-data-dictionary--179.org.readthedocs.build/en/179/