Skip to content
This repository was archived by the owner on Apr 22, 2024. It is now read-only.

'u' of Object type should not be treated as a unit #702

@jkotan

Description

@jkotan

Summary

Currently "u" in ingested RawDataset json is treated as a unit, even if it is a dictionary i.e. a JS object.
Our users often use u to denote the chi angle position. It would be good to check if "u" is a dictionary or a string and treat it as a unit only if it is a string.

Steps to Reproduce

ingest scientificMetadata containing

{
  "u":
    {
        "value": 12.323,
        "unit": "deg"
    }
}

Current Behaviour

All 'u' are treated as units and unitSI is added with a weird content e.g.

u_object_scicat

Expected Behaviour

It would be good to check if "u" is a dictionary or a string and treat it as a unit only if it is a string.

Metadata

Metadata

Assignees

No one assigned

    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