-
Notifications
You must be signed in to change notification settings - Fork 56
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
Clarify if a field in a specified NXdata
is a AXISNAME
or DATA
#1523
Comments
Another case to consider: This is however also a conceptual question of how "specializing/extending" actually means in NeXus. Does it mean that the concept is
or
|
Continuing on the previous item, consider this: Currently, if you have
However,
would not inherit On the other hand, if we have With the extend keyword, we could define exceptions for the second case. I.e., if we add add a sensor <definition xmlns="http://definition.nexusformat.org/nxdl/3.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" category="application" name="NXiv_temp" extends="NXsensor_scan" type="group" xsi:schemaLocation="http://definition.nexusformat.org/nxdl/3.1 ../nxdl.xsd">
<group type="NXentry">
<group type="NXinstrument">
<group type="NXenvironment">
<group name="voltage_controller" type="NXsensor" extends="/NXenvironment/NXsensor"/>
</group>
</group>
</group>
</definition> This is of course a much bigger change that the |
NXdata
contains two renameable fields,AXISNAME
andDATA
, that are both of typeNX_NUMBER
. This naturally presents a problem in that any instance of any of the two must be properly allocated to either of the two concepts.On the data level, this is not a problem since this can be handled by properly assigning the
@signal
and@axes
attributes and thus it is immediately clear which data field belongs to which concept (see here).The problem is however not solved on the conceptual, data modelling level, i.e., when writing base classes and application definitions.
Consider the following situation (borrowed directly from contributed_definitions/NXiv_temp):
Here, we as humans know which field in
/NXiv_temp/NXentry/NXdata
is associated with which field inNXdata
. However, there is no way for any interpreation tool to automatically understand this. Note that currently the way that each conceptual field is assigned toAXISNAME
orDATA
is by doing namefitting, i.e., by comparing whether the name of the field more closely resembles "axisname" or "data". For this particular example, this would lead to an assignment (on the conceptual level) of/NXiv_temp/NXentry/NXdata/temperature
toDATA
, i.e.temperature
would be specializingNXdata/DATA
. See the pop-up link on the bottom of this screenshot, here we actually visualize which concepttemperature
is inheriting from.During file writing with actual data, we will assign
temperature
toAXISNAME
by adding it to theaxes
. However, any proper data management system will complain here because what we define on the conceptual level will not be the same as what the data provider will injest.So what I think is needed is a way to already define on the data modelling level which field is an axis and which one is a data field. One possible solution would be to add an extra attribute
extends
tofieldType
andattributeType
where one can explicitly say which field in the inheritance shall be extended.The text was updated successfully, but these errors were encountered: