[Fix] depends_on targets can be (NXcoordinate_system) groups#297
[Fix] depends_on targets can be (NXcoordinate_system) groups#297g5t wants to merge 1 commit intoscipp:mainfrom
Conversation
jl-wynen
left a comment
There was a problem hiding this comment.
@SimonHeybrock can you take a look? I think we should extend this at least to NXcoordinate_system since the standard allows it. But I would prefer to not allow arbitrary classes in depends on chains.
| if isinstance(parent, Group) and name in parent: | ||
| target = parent[name][...] |
There was a problem hiding this comment.
Minor optimisation, probably irrelevant:
| if isinstance(parent, Group) and name in parent: | |
| target = parent[name][...] | |
| if isinstance(parent, Group) and (target := ds.get(name)) is not None: | |
| target = ds[...] |
Yes, this should check the |
|
I'm only using My current NeXus structure abuses this implementation to chain through a |
Are you implying that you don't actually want the |
The
@depends_onattribute of an entry in aNXtransformationsgroup can be either another entry in anNXtransformationsgroup or aNXcoordinate_systemgroup:The
NXcoordinate_systemgroup has adepends_onentry not a@depends_onattribute.This change allows for the target of a transformation's
@depends_onattribute to be either a group (with adepends_onentry) or a dataset (with a@depends_onattribute).