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

Use proper mapping for OME-XML time units to Unitful time units #32

Closed
tlnagy opened this issue Jun 16, 2019 · 1 comment
Closed

Use proper mapping for OME-XML time units to Unitful time units #32

tlnagy opened this issue Jun 16, 2019 · 1 comment
Milestone

Comments

@tlnagy
Copy link
Owner

tlnagy commented Jun 16, 2019

Currently, I directly cast the OME-XML time units to Unitful ones:

# This is an ugly hack to convert the unit string into Unitful.Unit till
# https://github.com/PainterQubits/Unitful.jl/issues/214 gets fixed
unitstr = replace(image[units], "u" => "μ")

This is really fragile and there should be a proper 1 to 1 mapping between the OME-XML time units (see https://www.openmicroscopy.org/Schemas/Documentation/Generated/OME-2016-06/ome_xsd.html#UnitsTime for the possible values) and https://github.com/PainterQubits/Unitful.jl/blob/be0190219e60f9eac5a5b60f1011e942a865aad9/src/pkgdefaults.jl#L246-L247

@tlnagy tlnagy added this to the v1.0 milestone Jun 16, 2019
@tlnagy
Copy link
Owner Author

tlnagy commented Nov 23, 2019

I'm not sure that this is needed any more.

@tlnagy tlnagy closed this as completed Nov 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant