scipp / scippneutron

Neutron scattering toolkit built using scipp for Data Reduction. Not facility or instrument specific.
https://scipp.github.io/scippneutron/
BSD 3-Clause "New" or "Revised" License
4 stars 3 forks source link

JSONGroup/JSONDataset not compatible with the latest json nexus template. #501

Closed YooSunYoung closed 5 months ago

YooSunYoung commented 6 months ago

It is not compatible with the latest json nexus templates.

For example, https://github.com/scipp/scippneutron/blob/0988a279a8b2fc480bca867bdc4a06233d0e4e2b/tests/io/json_nexus_examples/entry.json#L1-L24

Now looks like:

{
  "children": [{
      "name": "entry",
      "type": "group",
      "attributes": [{ "name": "NX_class", "dtype": "string", "values": "NXentry"}],
      "children": [{
          "module": "dataset",
          "config": { "name": "title", "values": "$TITLE$", "type": "string"}
        }]
    }]
}

We should make it compatible and update the examples.

jokasimr commented 5 months ago

After looking at this for a bit it seems to me like the JSON structures are quite different. The new ECDC structure has module and config properties that seems like they specify the source and kind of message that populates the dataset, those fields don't seem present in the current code in scippneutron.

What is the schema assumed by json_nexus_group?

To continue I'll need to understand what the schema is for the ECDC templates. I'll ask them. Unless someone else already knows?

SimonHeybrock commented 5 months ago

I think this was clarified in our f2f, or is there still some unclear aspect?

jokasimr commented 5 months ago

This comment was posted before we talked.

However, I'm still not sure what to do there. Maybe we can have a quick call today to figure it out.

jokasimr commented 5 months ago

Should we continue to support the old json schema for specifying nexus structure, or should we only support the new schema?

SimonHeybrock commented 5 months ago

Only the new.