Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility between DDL2 and DDLm enumeration ranges #502

Open
vaitkus opened this issue Sep 3, 2024 · 0 comments
Open

Compatibility between DDL2 and DDLm enumeration ranges #502

vaitkus opened this issue Sep 3, 2024 · 0 comments

Comments

@vaitkus
Copy link
Collaborator

vaitkus commented Sep 3, 2024

Recently, there have been some efforts to migrate the DDL2 dictionaries to DDLm (for example, the imgCIF dictionary, https://github.com/COMCIFS/imgCIF). Most DDL2 concepts align quite well with DDLm, however, I did notice a significant difference in the way enumeration ranges are defined with DDL2 seemingly using a superior approach.

DDL version Category/Item Min/Max representation Allows multiple ranges per item Allows non-inclusive min/max
DDLm _enumeration.range Min/Max as a composite string No No
DDL2 ITEM_RANGE Min/Max as separate items Yes Yes

While all DDLm ranges can be expressed in DDL2, the reverse is not true. Given the somewhat recent migration of certain DDL2 dictionaries to DDLm (e.g. imgCIF, https://github.com/COMCIFS/imgCIF), maybe it would make sense to introduce a similar more advanced range description to the DDLm dictionary as well (e.g. deprecate the old one and add a new category)? Note, that the previously mentioned imgCIF dictionary already contains non-inclusive range values that cannot be equivalently represented in DDLm (e.g. _array_element_size.size, _array_intensities.gain).

Possible approaches of specifying whether a range in inclusive were previously discussed in issue #372, but I would prefer the DDL2 approach since it also allows specifying discontinuous enumeration ranges. See, for example, how the range of (0.0, 1.0] ∪ [2.0, +inf) can be expressed in DDL2:

   loop_
   _item_range.minimum
   _item_range.maximum
     0.0  1.0  
     1.0  1.0
     2.0  2.0
     2.0  .     

Is this something worth pursuing?

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

No branches or pull requests

1 participant