-
Notifications
You must be signed in to change notification settings - Fork 35
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
Expand axes tests to check for correct units #144
Expand axes tests to check for correct units #144
Conversation
4a0d8e4 should fix the majority of vocabulary mismatches between OME schema units (https://www.openmicroscopy.org/Schemas/Documentation/Generated/OME-2016-06/ome_xsd.html#UnitsLength, https://www.openmicroscopy.org/Schemas/Documentation/Generated/OME-2016-06/ome_xsd.html#UnitsTime) and the units suggested by the NGFF spec. There are still a few things in the OME schema which are not included in the NGFF spec:
Most of those are extremely rare outside of an artificial test case, but In discussing with @sbesson, @joshmoore, and @jburel, we could choose to do one or more of the following to better address vocabulary mismatches:
This is somewhat related to a few other open spec issues, including ome/ngff#91 and ome/ngff#104. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the additional tests and the mapping effort. It's reassuring to see that most units found in OME-XML can be mapped into the UDUNIT-2 vocabulary used in the NGFF spec via the enum name without the need for additional APIs/hardcoding. Converesely, this also means that any scale unit defined in the NGFF specification can be mapped back into the OME system of units. As a general rule, we should ensure these two systems do not start deviating in incompatible way and fill the equivalence gaps.
I think the solution proposed in this PR is the most straightforward way to allow to this tool to achieve strict compliance with the NGFF spec in the majority of the cases for the physical pixel size.
On the remaining units, I would be surprised is most of them do not have an equivalent in the UDUNITS-2 vocabulary. For pixel
and/or referenceframe
, it is possible the best mapping might be to remove the unit
information in the NGFF space
@constantinpape any opinion on which ones of the options mentioned by @melissalinkert above should be converted as ome/ngff issues?
just my 2 cents here:
I would be fairly unhappy with this solution, since we are recommending to use I think my preferred solution would be:
Also, what exactly are the meaning of these units:
Just for some context: one of the reasons we decided to keep this at SHOULD was to allow for other And I think an issue on any of this would be fine, but we can maybe narrow down the scope a bit further here. |
In general, the meaning of the OME length units should either be found in the XSD specification or in the generated documentation
Since the 0.4 specification allows unspecified axis types, I agree trying to specify a complete list of units is not an option. For defined axis types such as |
Checks that units are (or aren't) written as expected.
@chris-allan noticed when reviewing #134 that the units written by bioformats2raw are valid OME units, but not valid units based on the list in https://ngff.openmicroscopy.org/latest/#axes-md. This isn't technically incorrect, but probably isn't setting a good example. Adding OME units to the spec is probably the easiest solution, but I assume we'll need to discuss.
/cc @sbesson, @joshmoore, @dgault