Open sherjeelshabih opened 1 year ago
Can you leave an example here? @mkuehbach
how to describe conditional requirements. Something is required IF some other condition is met in the dataset.
The validation in the data converter could be summarized as below:
Check if all required fields described in the AppDef exist a. Loops over all paths in the template and checks whether they exist in the data instance by converting both to NXDL paths and then matching them. b. If given path in template is just a group, not a field or attrib, the converter checks if the group exists i. To check if a group exists, the converter checks whether there is a child of the given group in the data instance.
Paths that have been added but are not part of the template and may be still available in the NXDL space are then checked. a. Convert all paths to NXDL and check with nexus.py if an NXDL entry exists in the NeXus space. b. If found, the data instance of the found path is tagged correctly in the template for its optionality.
The converter then checks for entries in the data instance that have optional parents. It means that if you have an optional parent defined in the AppDef, this part of the code will check whether this entry should exist or more is needed. a. Loops over all paths in data instance and checks whether they are a child of an optional parent. b. If they are a child of an optional parent, the converter checks if all required children of the given optional group are also set. This is the only thing that matters for optional groups. All required fields of an optional group should exist.
MarkusK, em_lab in ENTRY[entry]/measurement/NXEVENT_DATA_EM[event_data_em]/